From aea7158e794dcf30e83f29c8c2f59a2db59a60ca Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Tue, 8 Mar 2016 00:50:06 +0100 Subject: [PATCH 1/8] opencl icd: init at 2.2.9 --- pkgs/development/libraries/opencl-icd/default.nix | 15 +++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/development/libraries/opencl-icd/default.nix diff --git a/pkgs/development/libraries/opencl-icd/default.nix b/pkgs/development/libraries/opencl-icd/default.nix new file mode 100644 index 00000000000..9f556739ae6 --- /dev/null +++ b/pkgs/development/libraries/opencl-icd/default.nix @@ -0,0 +1,15 @@ +{ stdenv, fetchurl, ruby, opencl-headers }: let + + version = "2.2.9"; + +in stdenv.mkDerivation { + + name = "opencl-icd-${version}"; + buildInputs = [ ruby opencl-headers ]; + configureFlags = [ "--enable-official-khronos-headers" ]; + src = fetchurl { + url = "https://forge.imag.fr/frs/download.php/716/ocl-icd-${version}.tar.gz"; + sha256 = "1rgaixwnxmrq2aq4kcdvs0yx7i6krakarya9vqs7qwsv5hzc32hc"; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a05669559b..cc714d2f203 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8555,6 +8555,8 @@ in opencl-headers = callPackage ../development/libraries/opencl-headers { }; + opencl-icd = callPackage ../development/libraries/opencl-icd { }; + opencollada = callPackage ../development/libraries/opencollada { }; opencsg = callPackage ../development/libraries/opencsg { }; From 33c6a9d1e79470a98fe5cebf9bf288165d653d16 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Tue, 8 Mar 2016 00:50:53 +0100 Subject: [PATCH 2/8] wine: add optional dependencies --- pkgs/misc/emulators/wine/base.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix index 0398ed57a70..4d4e897ba9d 100644 --- a/pkgs/misc/emulators/wine/base.nix +++ b/pkgs/misc/emulators/wine/base.nix @@ -22,10 +22,16 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) { 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 + + libva libpcap saneBackends libv4l libgphoto2 gtk3 gsm openldap + opencl-headers opencl-icd gnome.glib cairo libtiff unixODBC + + ## for libnetapi + samba3_light ]) ++ lib.optional pulseaudioSupport pkgs.libpulseaudio ++ (with pkgs.xorg; [ - libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite libXext + libX11 libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite libXext ])); # Wine locates a lot of libraries dynamically through dlopen(). Add From 4416644eb32fe0572846a0f9b55b402cb5ba0ddb Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Mon, 25 Apr 2016 03:48:19 +0200 Subject: [PATCH 3/8] wine-unstable: 1.9.7 -> 1.9.9 --- pkgs/misc/emulators/wine/sources.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 9ad09ed5dfe..4b28b103da1 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.7"; + version = "1.9.9"; url = "mirror://sourceforge/wine/wine-${version}.tar.bz2"; - sha256 = "1v47i0pxqcixnh06x23kzp2dbz1cf3d2sric0bw6xqh54ph5yw29"; + sha256 = "0hbvvb7b5sbfrpcp3rqzs57a0d9h37kn5k9hx62y63rdhkcnzrx1"; inherit (stable) mono; gecko32 = fetchurl rec { version = "2.44"; @@ -48,7 +48,7 @@ in rec { staging = fetchFromGitHub rec { inherit (unstable) version; - sha256 = "1h5hwd07qyx0qw5whf6lcp7v57kqd6mrrcvwwg1bydir68b0zp16"; + sha256 = "1hmdl7gaiqjc22pw77ra237bnlpg1gxndlvlqf6nd9av6rlkvafj"; owner = "wine-compholio"; repo = "wine-staging"; rev = "v${version}"; From 0f3ff1401dfd0c15fe69cadf8e8d523a58330b48 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Tue, 10 May 2016 20:41:25 +0200 Subject: [PATCH 4/8] wine-staging: move libtxc_dxtn to buildInputs this adds it to RPATH, via LDFLAGS (see base.nix) --- pkgs/misc/emulators/wine/staging.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/misc/emulators/wine/staging.nix b/pkgs/misc/emulators/wine/staging.nix index 9419aff1a39..51af13b8a15 100644 --- a/pkgs/misc/emulators/wine/staging.nix +++ b/pkgs/misc/emulators/wine/staging.nix @@ -8,8 +8,7 @@ let patch = (callPackage ./sources.nix {}).staging; in assert (builtins.parseDrvName wineUnstable.name).version == patch.version; stdenv.lib.overrideDerivation wineUnstable (self: { - nativeBuildInputs = build-inputs [ libtxc_dxtn_Name ] self.nativeBuildInputs; - buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs; + buildInputs = build-inputs [ "perl" "utillinux" "autoconf" libtxc_dxtn_Name ] self.buildInputs; name = "${self.name}-staging"; From edb5a8c63228971be54bae3b2ab066e738db75db Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Thu, 26 May 2016 14:29:25 +0200 Subject: [PATCH 5/8] wine: 1.9.9 -> 1.9.10 --- pkgs/misc/emulators/wine/sources.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 4b28b103da1..0021fbb46dd 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.9"; + version = "1.9.10"; url = "mirror://sourceforge/wine/wine-${version}.tar.bz2"; - sha256 = "0hbvvb7b5sbfrpcp3rqzs57a0d9h37kn5k9hx62y63rdhkcnzrx1"; + sha256 = "1gqvhqq8a7h4s2ll5y54x65w51bdv8izw4k17qy9fb2lyvgh0jcd"; inherit (stable) mono; gecko32 = fetchurl rec { version = "2.44"; @@ -48,7 +48,7 @@ in rec { staging = fetchFromGitHub rec { inherit (unstable) version; - sha256 = "1hmdl7gaiqjc22pw77ra237bnlpg1gxndlvlqf6nd9av6rlkvafj"; + sha256 = "0lk171mk8iar7vhgv7af90975dqa4vrj5p3729bvp6r6fs3pqxkh"; owner = "wine-compholio"; repo = "wine-staging"; rev = "v${version}"; From 98d720d72c51099044597c30ad096a5a8390d27e Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Thu, 26 May 2016 14:31:00 +0200 Subject: [PATCH 6/8] wine: 1.8.1 -> 1.8.2 --- pkgs/misc/emulators/wine/sources.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 0021fbb46dd..bb726941a4b 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -6,9 +6,9 @@ let fetchurl = args@{url, sha256, ...}: in rec { stable = fetchurl rec { - version = "1.8.1"; + version = "1.8.2"; url = "mirror://sourceforge/wine/wine-${version}.tar.bz2"; - sha256 = "15ya496qq24ipqii7ij8x8h5x8n21vgqa4h6binb74w5mzdd76hl"; + sha256 = "0vsswlnaa9ndg1pais63c39xks519r9fhz0yq3q8fphly2nlyqji"; ## see http://wiki.winehq.org/Gecko gecko32 = fetchurl rec { From 1c215828d5c811a523fbc599e7c38d96b586d9e8 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Sun, 29 May 2016 10:43:47 +0200 Subject: [PATCH 7/8] wine: make features configurable --- pkgs/misc/emulators/wine/base.nix | 51 +++++++++++++++++++-------- pkgs/misc/emulators/wine/default.nix | 40 +++++++++++++++++++-- pkgs/misc/emulators/wine/packages.nix | 10 +++--- pkgs/top-level/all-packages.nix | 46 +++++++++++++++++++++++- 4 files changed, 124 insertions(+), 23 deletions(-) diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix index 4d4e897ba9d..f5b64f1517f 100644 --- a/pkgs/misc/emulators/wine/base.nix +++ b/pkgs/misc/emulators/wine/base.nix @@ -1,7 +1,7 @@ { stdenv, lib, pkgArches, name, version, src, monos, geckos, platforms, pkgconfig, fontforge, makeWrapper, flex, bison, - pulseaudioSupport, + supportFlags, buildScript ? null, configureFlags ? "" }: @@ -19,20 +19,41 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) { pkgconfig fontforge makeWrapper flex bison ]; - 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 - - libva libpcap saneBackends libv4l libgphoto2 gtk3 gsm openldap - opencl-headers opencl-icd gnome.glib cairo libtiff unixODBC - - ## for libnetapi - samba3_light - ]) - ++ lib.optional pulseaudioSupport pkgs.libpulseaudio + buildInputs = toBuildInputs pkgArches (with supportFlags; (pkgs: + [ pkgs.freetype ] + ++ lib.optional pngSupport pkgs.libpng + ++ lib.optional jpegSupport pkgs.libjpeg + ++ lib.optional cupsSupport pkgs.cups + ++ lib.optional colorManagementSupport pkgs.lcms2 + ++ lib.optional gettextSupport pkgs.gettext + ++ lib.optional dbusSupport pkgs.dbus + ++ lib.optional mpg123Support pkgs.mpg123 + ++ lib.optional openalSupport pkgs.openal + ++ lib.optional cairoSupport pkgs.cairo + ++ lib.optional tiffSupport pkgs.libtiff + ++ lib.optional odbcSupport pkgs.unixODBC + ++ lib.optional netapiSupport pkgs.samba3_light + ++ lib.optional cursesSupport pkgs.ncurses + ++ lib.optional vaSupport pkgs.libva + ++ lib.optional pcapSupport pkgs.libpcap + ++ lib.optional v4lSupport pkgs.libv4l + ++ lib.optional saneSupport pkgs.saneBackends + ++ lib.optional gsmSupport pkgs.gsm + ++ lib.optional gphoto2Support pkgs.libgphoto2 + ++ lib.optional ldapSupport pkgs.openldap + ++ lib.optional fontconfigSupport pkgs.fontconfig + ++ lib.optional alsaSupport pkgs.alsaLib + ++ lib.optional pulseaudioSupport pkgs.libpulseaudio + ++ lib.optional xineramaSupport pkgs.xorg.libXinerama + ++ lib.optional gstreamerSupport pkgs.gst_plugins_base + ++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.gnome.glib ] + ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.opencl-icd ] + ++ lib.optionals xmlSupport [ pkgs.libxml2 pkgs.libxslt ] + ++ lib.optionals tlsSupport [ pkgs.openssl pkgs.gnutls ] + ++ lib.optionals openglSupport [ pkgs.mesa pkgs.mesa_noglu.osmesa pkgs.libdrm ] ++ (with pkgs.xorg; [ - libX11 libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite libXext - ])); + libX11 libXi libXcursor 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 @@ -40,7 +61,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) { NIX_LDFLAGS = map (path: "-rpath " + path) ( map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ] ++ buildInputs) # libpulsecommon.so is linked but not found otherwise - ++ lib.optionals pulseaudioSupport (map (x: "${lib.getLib x}/lib/pulseaudio") + ++ lib.optionals supportFlags.pulseaudioSupport (map (x: "${lib.getLib x}/lib/pulseaudio") (toBuildInputs pkgArches (pkgs: [ pkgs.libpulseaudio ]))) ); diff --git a/pkgs/misc/emulators/wine/default.nix b/pkgs/misc/emulators/wine/default.nix index a402fba69f6..deeff3c7343 100644 --- a/pkgs/misc/emulators/wine/default.nix +++ b/pkgs/misc/emulators/wine/default.nix @@ -9,13 +9,49 @@ { lib, pkgs, system, callPackage, wineRelease ? "stable", wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32"), + libtxc_dxtn_Name ? "libtxc_dxtn_s2tc", + pngSupport ? false, + jpegSupport ? false, + tiffSupport ? false, + gettextSupport ? false, + fontconfigSupport ? false, + alsaSupport ? false, + gtkSupport ? false, + openglSupport ? false, + tlsSupport ? false, + gstreamerSupport ? false, + cupsSupport ? false, + colorManagementSupport ? false, + dbusSupport ? false, + mpg123Support ? false, + openalSupport ? false, + openclSupport ? false, + cairoSupport ? false, + odbcSupport ? false, + netapiSupport ? false, + cursesSupport ? false, + vaSupport ? false, + pcapSupport ? false, + v4lSupport ? false, + saneSupport ? false, + gsmSupport ? false, + gphoto2Support ? false, + ldapSupport ? false, pulseaudioSupport ? false, - libtxc_dxtn_Name ? "libtxc_dxtn_s2tc" }: + xineramaSupport ? false, + xmlSupport ? false }: let wine-build = build: release: lib.getAttr build (callPackage ./packages.nix { wineRelease = release; - inherit pulseaudioSupport; + supportFlags = { + inherit pngSupport jpegSupport cupsSupport colorManagementSupport gettextSupport + dbusSupport mpg123Support openalSupport cairoSupport tiffSupport odbcSupport + netapiSupport cursesSupport vaSupport pcapSupport v4lSupport saneSupport + gsmSupport gphoto2Support ldapSupport fontconfigSupport alsaSupport + pulseaudioSupport xineramaSupport gtkSupport openclSupport xmlSupport tlsSupport + openglSupport gstreamerSupport; + }; }); in if wineRelease == "staging" then diff --git a/pkgs/misc/emulators/wine/packages.nix b/pkgs/misc/emulators/wine/packages.nix index 206deb01b8b..6c06bcb0949 100644 --- a/pkgs/misc/emulators/wine/packages.nix +++ b/pkgs/misc/emulators/wine/packages.nix @@ -1,14 +1,14 @@ { system, stdenv, stdenv_32bit, lib, pkgs, pkgsi686Linux, callPackage, callPackage_i686, overrideCC, wrapCCMulti, gcc49, - pulseaudioSupport, - wineRelease ? "stable" + wineRelease ? "stable", + supportFlags }: let src = lib.getAttr wineRelease (callPackage ./sources.nix {}); in with src; { wine32 = callPackage_i686 ./base.nix { name = "wine-${version}"; - inherit src version pulseaudioSupport; + inherit src version supportFlags; pkgArches = [ pkgsi686Linux ]; geckos = [ gecko32 ]; monos = [ mono ]; @@ -16,7 +16,7 @@ in with src; { }; wine64 = callPackage ./base.nix { name = "wine64-${version}"; - inherit src version pulseaudioSupport; + inherit src version supportFlags; # 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; @@ -28,7 +28,7 @@ in with src; { }; wineWow = callPackage ./base.nix { name = "wine-wow-${version}"; - inherit src version pulseaudioSupport; + inherit src version supportFlags; # FIXME: see above. stdenv = overrideCC stdenv_32bit (wrapCCMulti gcc49); pkgArches = [ pkgs pkgsi686Linux ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc714d2f203..01a65e76ffe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16819,8 +16819,52 @@ in wineRelease = config.wine.release or "stable"; wineBuild = config.wine.build or "wine32"; pulseaudioSupport = config.pulseaudio or stdenv.isLinux; + pngSupport = true; + jpegSupport = true; + tiffSupport = true; + gettextSupport = true; + fontconfigSupport = true; + alsaSupport = true; + openglSupport = true; + tlsSupport = true; + cursesSupport = true; }; - wineStable = wine.override { wineRelease = "stable"; }; + wineMinimal = lowPrio (self.wine.override { + pulseaudioSupport = false; + pngSupport = false; + jpegSupport = false; + tiffSupport = false; + gettextSupport = false; + fontconfigSupport = false; + alsaSupport = false; + openglSupport = false; + tlsSupport = false; + cursesSupport = false; + }); + wineFull = lowPrio (self.wine.override { + gtkSupport = true; + gstreamerSupport = true; + cupsSupport = true; + colorManagementSupport = true; + dbusSupport = true; + mpg123Support = true; + openalSupport = true; + openclSupport = true; + cairoSupport = true; + odbcSupport = true; + netapiSupport = true; + vaSupport = true; + pcapSupport = true; + v4lSupport = true; + saneSupport = true; + gsmSupport = true; + gphoto2Support = true; + ldapSupport = true; + pulseaudioSupport = true; + xineramaSupport = true; + xmlSupport = true; + }); + wineStable = self.wine.override { wineRelease = "stable"; }; wineUnstable = lowPrio (self.wine.override { wineRelease = "unstable"; }); wineStaging = lowPrio (self.wine.override { wineRelease = "staging"; }); From 8c0f03ae9dacf0dcdcdacdc13069634614c47d14 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Mon, 30 May 2016 03:54:02 +0200 Subject: [PATCH 8/8] wine: 1.9.10 -> 1.9.11 --- pkgs/misc/emulators/wine/sources.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index bb726941a4b..0c4690bffef 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.10"; + version = "1.9.11"; url = "mirror://sourceforge/wine/wine-${version}.tar.bz2"; - sha256 = "1gqvhqq8a7h4s2ll5y54x65w51bdv8izw4k17qy9fb2lyvgh0jcd"; + sha256 = "15mbrnx4zqsdsxz7rwkb1pp58bcyfqnm8f2fh7cbbdgwh117k3vj"; inherit (stable) mono; gecko32 = fetchurl rec { version = "2.44"; @@ -48,7 +48,7 @@ in rec { staging = fetchFromGitHub rec { inherit (unstable) version; - sha256 = "0lk171mk8iar7vhgv7af90975dqa4vrj5p3729bvp6r6fs3pqxkh"; + sha256 = "0q990d26wsik16w1yya2z8nwxnhnaiiy85igdnan1ib2b00z861m"; owner = "wine-compholio"; repo = "wine-staging"; rev = "v${version}";