diff options
author | Corey O'Connor <coreyoconnor@gmail.com> | 2013-02-03 10:06:51 -0800 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2013-02-10 16:20:24 +0100 |
commit | fde87b3a9bfb776e0873f0d97dc0e1e99907cab5 (patch) | |
tree | 8078068a325a388a339b556137be500b2aebfaea /pkgs/misc/emulators | |
parent | 09a3f9f7752fffff18a2ebb5c904acd844aff868 (diff) | |
download | nixpkgs-fde87b3a9bfb776e0873f0d97dc0e1e99907cab5.tar nixpkgs-fde87b3a9bfb776e0873f0d97dc0e1e99907cab5.tar.gz nixpkgs-fde87b3a9bfb776e0873f0d97dc0e1e99907cab5.tar.bz2 nixpkgs-fde87b3a9bfb776e0873f0d97dc0e1e99907cab5.tar.lz nixpkgs-fde87b3a9bfb776e0873f0d97dc0e1e99907cab5.tar.xz nixpkgs-fde87b3a9bfb776e0873f0d97dc0e1e99907cab5.tar.zst nixpkgs-fde87b3a9bfb776e0873f0d97dc0e1e99907cab5.zip |
add winetricks, modified by vcunat@gmail.com
Originally from #89.
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r-- | pkgs/misc/emulators/wine/build_winetricks.sh | 17 | ||||
-rw-r--r-- | pkgs/misc/emulators/wine/winetricks.nix | 28 | ||||
-rw-r--r-- | pkgs/misc/emulators/wine/winetricks.patch | 21 |
3 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/misc/emulators/wine/build_winetricks.sh b/pkgs/misc/emulators/wine/build_winetricks.sh new file mode 100644 index 00000000000..2d19e749f2d --- /dev/null +++ b/pkgs/misc/emulators/wine/build_winetricks.sh @@ -0,0 +1,17 @@ +#!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 new file mode 100644 index 00000000000..8a0901ddb80 --- /dev/null +++ b/pkgs/misc/emulators/wine/winetricks.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchsvn, wine, perl, which, coreutils, zenity, curl, cabextract, unzip, p7zip } : + +stdenv.mkDerivation rec { + rev = "939"; + name = "winetricks-${rev}"; + + src = fetchsvn { + url = "http://winetricks.googlecode.com/svn/trunk"; + inherit rev; + }; + + buildInputs = [ perl which ]; + + pathAdd = stdenv.lib.concatStringsSep "/bin:" # coreutils is for sha1sum + [ wine perl which coreutils zenity curl cabextract unzip p7zip ] + + "/bin"; + + patch = ./winetricks.patch; + + builder = ./build_winetricks.sh; + + meta = { + description = "A script to install DLLs needed to work around problems in Wine"; + license = "LGPLv2.1"; + homepage = http://code.google.com/p/winetricks/; + }; +} + diff --git a/pkgs/misc/emulators/wine/winetricks.patch b/pkgs/misc/emulators/wine/winetricks.patch new file mode 100644 index 00000000000..f419a0dcee4 --- /dev/null +++ b/pkgs/misc/emulators/wine/winetricks.patch @@ -0,0 +1,21 @@ +--- 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 + |