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

29 lines
873 B
Nix
Raw Normal View History

{ lib, callPackage, wineUnstable }:
2015-04-06 22:13:56 +00:00
with callPackage ./util.nix {};
let patch = (callPackage ./sources.nix {}).staging;
build-inputs = pkgNames: extra:
(mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
2021-01-15 13:21:58 +00:00
in assert lib.getVersion wineUnstable == patch.version;
2015-04-06 22:13:56 +00:00
2021-01-15 13:21:58 +00:00
(lib.overrideDerivation wineUnstable (self: {
2020-11-24 15:29:28 +00:00
buildInputs = build-inputs [ "perl" "util-linux" "autoconf" "gitMinimal" ] 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
2021-01-15 13:21:58 +00:00
./patchinstall.sh DESTDIR="$PWD/.." --all ${lib.concatMapStringsSep " " (ps: "-W ${ps}") patch.disabledPatchsets}
2015-04-06 22:13:56 +00:00
cd ..
'';
})) // {
meta = wineUnstable.meta // {
description = wineUnstable.meta.description + " (with staging patches)";
};
}