about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/emulators/wine/base.nix20
-rw-r--r--pkgs/misc/emulators/wine/packages.nix22
-rw-r--r--pkgs/misc/emulators/wine/sources.nix6
3 files changed, 28 insertions, 20 deletions
diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix
index e031627a032d..503e8da6845e 100644
--- a/pkgs/misc/emulators/wine/base.nix
+++ b/pkgs/misc/emulators/wine/base.nix
@@ -1,5 +1,6 @@
 { stdenv, lib, pkgArches,
   name, version, src, monos, geckos, platforms,
+  pkgconfig, fontforge, makeWrapper, flex, bison,
   pulseaudioSupport,
   buildScript ? null, configureFlags ? ""
 }:
@@ -14,24 +15,27 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
 }) // rec {
   inherit name src configureFlags;
 
-  buildInputs = toBuildInputs pkgArches (pkgs: with pkgs; [
-    pkgconfig alsaLib lcms2 fontforge libxml2 libxslt makeWrapper flex bison
-  ]);
+  nativeBuildInputs = [
+    pkgconfig fontforge makeWrapper flex bison
+  ];
 
-  nativeBuildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
+  buildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
     freetype fontconfig mesa mesa_noglu.osmesa libdrm libpng libjpeg openssl gnutls cups ncurses
+    alsaLib libxml2 libxslt lcms2 gettext dbus mpg123 openal
   ])
   ++ lib.optional pulseaudioSupport pkgs.libpulseaudio
   ++ (with pkgs.xorg; [
-    xlibsWrapper libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite
+    libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite libXext
   ]));
 
   # Wine locates a lot of libraries dynamically through dlopen().  Add
   # them to the RPATH so that the user doesn't have to set them in
   # LD_LIBRARY_PATH.
-  NIX_LDFLAGS = map
-    (path: "-rpath ${path}/lib")
-    ([ stdenv.cc.cc ] ++ nativeBuildInputs);
+  NIX_LDFLAGS = map (path: "-rpath " + path) (
+      map (x: "${x}/lib") ([ stdenv.cc.cc ] ++ buildInputs)
+      # libpulsecommon.so is linked but not found otherwise
+      ++ lib.optionals pulseaudioSupport (map (x: "${x}/lib/pulseaudio") (toBuildInputs pkgArches (pkgs: [ pkgs.libpulseaudio ])))
+    );
 
   # Don't shrink the ELF RPATHs in order to keep the extra RPATH
   # elements specified above.
diff --git a/pkgs/misc/emulators/wine/packages.nix b/pkgs/misc/emulators/wine/packages.nix
index 69275a74b356..206deb01b8bb 100644
--- a/pkgs/misc/emulators/wine/packages.nix
+++ b/pkgs/misc/emulators/wine/packages.nix
@@ -1,32 +1,36 @@
-{ system, stdenv, stdenv_32bit, lib, pkgs, pkgsi686Linux, callPackage,
+{ system, stdenv, stdenv_32bit, lib, pkgs, pkgsi686Linux, callPackage, callPackage_i686,
+  overrideCC, wrapCCMulti, gcc49,
   pulseaudioSupport,
   wineRelease ? "stable"
 }:
 
 let src = lib.getAttr wineRelease (callPackage ./sources.nix {});
 in with src; {
-  wine32 = import ./base.nix {
+  wine32 = callPackage_i686 ./base.nix {
     name = "wine-${version}";
     inherit src version pulseaudioSupport;
-    inherit (pkgsi686Linux) lib stdenv;
     pkgArches = [ pkgsi686Linux ];
     geckos = [ gecko32 ];
     monos =  [ mono ];
     platforms = [ "i686-linux" "x86_64-linux" ];
   };
-  wine64 = import ./base.nix {
+  wine64 = callPackage ./base.nix {
     name = "wine64-${version}";
-    inherit src version pulseaudioSupport lib stdenv;
+    inherit src version pulseaudioSupport;
+    # FIXME: drop this when GCC is updated to >5.3.
+    # Corresponding bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69140
+    stdenv = overrideCC stdenv gcc49;
     pkgArches = [ pkgs ];
     geckos = [ gecko64 ];
     monos =  [ mono ];
-    configureFlags = "--enable-win64";
+    configureFlags = [ "--enable-win64" ];
     platforms = [ "x86_64-linux" ];
   };
-  wineWow = import ./base.nix {
+  wineWow = callPackage ./base.nix {
     name = "wine-wow-${version}";
-    inherit src version pulseaudioSupport lib;
-    stdenv = stdenv_32bit;
+    inherit src version pulseaudioSupport;
+    # FIXME: see above.
+    stdenv = overrideCC stdenv_32bit (wrapCCMulti gcc49);
     pkgArches = [ pkgs pkgsi686Linux ];
     geckos = [ gecko32 gecko64 ];
     monos =  [ mono ];
diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix
index cd877403d3a0..9ad09ed5dfe1 100644
--- a/pkgs/misc/emulators/wine/sources.nix
+++ b/pkgs/misc/emulators/wine/sources.nix
@@ -30,9 +30,9 @@ in rec {
   };
 
   unstable = fetchurl rec {
-    version = "1.9.4";
+    version = "1.9.7";
     url = "mirror://sourceforge/wine/wine-${version}.tar.bz2";
-    sha256 = "1f5v1gns0xs512a6ym785cn29j8dxdbnxnvkg8v0p1w0p6vfmhbm";
+    sha256 = "1v47i0pxqcixnh06x23kzp2dbz1cf3d2sric0bw6xqh54ph5yw29";
     inherit (stable) mono;
     gecko32 = fetchurl rec {
       version = "2.44";
@@ -48,7 +48,7 @@ in rec {
 
   staging = fetchFromGitHub rec {
     inherit (unstable) version;
-    sha256 = "0xjxbip0ab1lqgxrww08082ndsb8b5wjfwlf51zlr3f59c9bx9y5";
+    sha256 = "1h5hwd07qyx0qw5whf6lcp7v57kqd6mrrcvwwg1bydir68b0zp16";
     owner = "wine-compholio";
     repo = "wine-staging";
     rev = "v${version}";