about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc/emulators/wine/winetricks.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/misc/emulators/wine/winetricks.nix')
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/winetricks.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/misc/emulators/wine/winetricks.nix b/nixpkgs/pkgs/misc/emulators/wine/winetricks.nix
new file mode 100644
index 000000000000..76606edf53c3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/winetricks.nix
@@ -0,0 +1,32 @@
+{ stdenv, callPackage, wine, perl, which, coreutils, zenity, curl
+, cabextract, unzip, p7zip, gnused, gnugrep, bash } :
+
+stdenv.mkDerivation rec {
+  name = "winetricks-${src.version}";
+
+  src = (callPackage ./sources.nix {}).winetricks;
+
+  buildInputs = [ perl which ];
+
+  # coreutils is for sha1sum
+  pathAdd = stdenv.lib.concatMapStringsSep ":" (x: x + "/bin")
+    [ wine perl which coreutils zenity curl cabextract unzip p7zip gnused gnugrep bash ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  doCheck = false; # requires "bashate"
+
+  postInstall = ''
+    sed -i \
+      -e '2i PATH="${pathAdd}:$PATH"' \
+      "$out/bin/winetricks"
+  '';
+
+  meta = {
+    description = "A script to install DLLs needed to work around problems in Wine";
+    license = stdenv.lib.licenses.lgpl21;
+    homepage = https://github.com/Winetricks/winetricks;
+    maintainers = with stdenv.lib.maintainers; [ the-kenny ];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}