summary refs log tree commit diff
path: root/pkgs/misc/emulators
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2015-02-19 02:12:09 +0300
committerNikolay Amiantov <ab@fmap.me>2015-02-19 02:12:09 +0300
commitca8137d4a8d717072598499bdb0707539b0bab6a (patch)
tree0acc531dbc1cc3436195d49b693e1d6cd55558cc /pkgs/misc/emulators
parent602860e25902a77bc035498066c8f47836e5526b (diff)
downloadnixpkgs-ca8137d4a8d717072598499bdb0707539b0bab6a.tar
nixpkgs-ca8137d4a8d717072598499bdb0707539b0bab6a.tar.gz
nixpkgs-ca8137d4a8d717072598499bdb0707539b0bab6a.tar.bz2
nixpkgs-ca8137d4a8d717072598499bdb0707539b0bab6a.tar.lz
nixpkgs-ca8137d4a8d717072598499bdb0707539b0bab6a.tar.xz
nixpkgs-ca8137d4a8d717072598499bdb0707539b0bab6a.tar.zst
nixpkgs-ca8137d4a8d717072598499bdb0707539b0bab6a.zip
winetricks: update
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r--pkgs/misc/emulators/wine/build_winetricks.sh17
-rw-r--r--pkgs/misc/emulators/wine/winetricks.nix27
-rw-r--r--pkgs/misc/emulators/wine/winetricks.patch21
3 files changed, 15 insertions, 50 deletions
diff --git a/pkgs/misc/emulators/wine/build_winetricks.sh b/pkgs/misc/emulators/wine/build_winetricks.sh
deleted file mode 100644
index 2d19e749f2d..00000000000
--- a/pkgs/misc/emulators/wine/build_winetricks.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!bash
-source $stdenv/setup
-mkdir -p $out/bin
-cp $src/src/winetricks $out/bin/winetricks
-chmod +x $out/bin/winetricks
-cd $out/bin
-patch -u -p0 < $patch
-
-mkdir -p "$out/share/man/man1"
-cp "$src/src/winetricks.1" "$out/share/man/man1/"
-
-patchShebangs "$out"
-
-substituteInPlace "$out/bin/winetricks" --replace "/usr/bin/perl" `which perl`
-
-# add stuff to PATH
-sed -i "2i PATH=\"${pathAdd}:\${PATH}\"" "$out/bin/winetricks"
diff --git a/pkgs/misc/emulators/wine/winetricks.nix b/pkgs/misc/emulators/wine/winetricks.nix
index 8103ff9c43f..e65530e38c3 100644
--- a/pkgs/misc/emulators/wine/winetricks.nix
+++ b/pkgs/misc/emulators/wine/winetricks.nix
@@ -1,25 +1,28 @@
-{ stdenv, fetchsvn, wine, perl, which, coreutils, zenity, curl
+{ stdenv, fetchgit, wine, perl, which, coreutils, zenity, curl
 , cabextract, unzip, p7zip, gnused, gnugrep, bash } :
 
 stdenv.mkDerivation rec {
-  rev = "1199";
-  name = "winetricks-${rev}";
+  name = "winetricks-20150206";
 
-  src = fetchsvn {
-    url = "http://winetricks.googlecode.com/svn/trunk";
-    inherit rev;
-    sha256 = "1kji1n6ps09g8xnl9m7vqk3vkl03abzwnc43c52i8p0adnv06khb";
+  src = fetchgit {
+    url = "https://code.google.com/p/winetricks/";
+    rev = "483056823093a90c9186b3d1a4867f481acf5fa1";
+    sha256 = "8b86a2a130ced405886775f0f81e7a6b25eb1bc22f357d0fe705fead52fff829";
   };
 
   buildInputs = [ perl which ];
 
-  pathAdd = stdenv.lib.concatStringsSep "/bin:" # coreutils is for sha1sum
-    [ wine perl which coreutils zenity curl cabextract unzip p7zip gnused gnugrep bash ]
-    + "/bin";
+  # coreutils is for sha1sum
+  pathAdd = stdenv.lib.concatMapStringsSep ":" (x: x + "/bin")
+    [ wine perl which coreutils zenity curl cabextract unzip p7zip gnused gnugrep bash ];
 
-  patch = ./winetricks.patch;
+  makeFlags = [ "PREFIX=$(out)" ];
 
-  builder = ./build_winetricks.sh;
+  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";
diff --git a/pkgs/misc/emulators/wine/winetricks.patch b/pkgs/misc/emulators/wine/winetricks.patch
deleted file mode 100644
index f419a0dcee4..00000000000
--- a/pkgs/misc/emulators/wine/winetricks.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- upstream-winetricks 2013-01-12 13:26:12.333076904 -0800
-+++ winetricks 2013-01-12 14:37:39.675092352 -0800
-@@ -3398,7 +3398,7 @@
-     WINETRICKS_OPT_SHAREDPREFIX=${WINETRICKS_OPT_SHAREDPREFIX:-0}
- 
-     # Mac folks tend to not have sha1sum, but we can make do with openssl
--    if [ -x "`which sha1sum 2>/dev/null`" ]
-+    if [ -e "`which sha1sum 2>/dev/null`" ]
-     then
-         WINETRICKS_SHA1SUM="sha1sum"
-     elif [ -x "`which openssl 2>/dev/null`" ]
-@@ -3628,7 +3628,7 @@
- if ! test "$WINETRICKS_LIB"
- then
-     WINETRICKS_SRCDIR=`dirname "$0"`
--    WINETRICKS_SRCDIR=`cd "$WINETRICKS_SRCDIR"; /bin/pwd`
-+    WINETRICKS_SRCDIR=`cd "$WINETRICKS_SRCDIR"; pwd`
- 
-     # Which GUI helper to use (none/zenity/kdialog).  See winetricks_detect_gui.
-     WINETRICKS_GUI=none
-