about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/emulators/wine/staging.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/misc/emulators/wine/staging.nix')
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/staging.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/misc/emulators/wine/staging.nix b/nixpkgs/pkgs/misc/emulators/wine/staging.nix
new file mode 100644
index 000000000000..48ea93a97a8e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/staging.nix
@@ -0,0 +1,28 @@
+{ stdenv, callPackage, wineUnstable }:
+
+with callPackage ./util.nix {};
+
+let patch = (callPackage ./sources.nix {}).staging;
+    build-inputs = pkgNames: extra:
+      (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
+in assert stdenv.lib.getVersion wineUnstable == patch.version;
+
+(stdenv.lib.overrideDerivation wineUnstable (self: {
+  buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs;
+
+  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="$PWD/.." --all
+    cd ..
+  '';
+})) // {
+  meta = wineUnstable.meta // {
+    description = wineUnstable.meta.description + " (with staging patches)";
+  };
+}