nixpkgs/pkgs/misc/emulators/wine/staging.nix

33 lines
985 B
Nix
Raw Normal View History

{ stdenv, callPackage, lib, fetchFromGitHub, wineUnstable, libtxc_dxtn_Name }:
2015-04-06 22:13:56 +00:00
with callPackage ./util.nix {};
let v = (import ./versions.nix).staging;
inherit (v) version;
2015-04-06 22:13:56 +00:00
patch = fetchFromGitHub {
inherit (v) sha256;
2015-04-06 22:13:56 +00:00
owner = "wine-compholio";
repo = "wine-staging";
rev = "v${version}";
};
build-inputs = pkgNames: extra:
(mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
in assert (builtins.parseDrvName wineUnstable.name).version == version;
2015-04-06 22:13:56 +00:00
stdenv.lib.overrideDerivation wineUnstable (self: {
nativeBuildInputs = build-inputs [ libtxc_dxtn_Name ] self.nativeBuildInputs;
buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs;
2015-04-06 22:13:56 +00:00
name = "${self.name}-staging";
postPatch = self.postPatch or "" + ''
patchShebangs tools
cp -r ${patch}/patches .
chmod +w patches
cd patches
patchShebangs gitapply.sh
./patchinstall.sh DESTDIR="$TMP/$sourceRoot" --all
2015-04-06 22:13:56 +00:00
cd ..
'';
})