summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2015-05-11 10:05:23 +0200
committerDomen Kožar <domen@dev.si>2015-05-11 10:05:23 +0200
commitbb4d658f646df61285d5b05ce0b407b7795f9045 (patch)
treedb55b600f0bbb1136f22dad0a34041a49fdd37ca /pkgs/misc
parentb7f15c43da7822f0def11b0cf1afbf4f45707204 (diff)
parentc3bdabca737c50b13b9db71476fdf1dc7e853b5b (diff)
downloadnixpkgs-bb4d658f646df61285d5b05ce0b407b7795f9045.tar
nixpkgs-bb4d658f646df61285d5b05ce0b407b7795f9045.tar.gz
nixpkgs-bb4d658f646df61285d5b05ce0b407b7795f9045.tar.bz2
nixpkgs-bb4d658f646df61285d5b05ce0b407b7795f9045.tar.lz
nixpkgs-bb4d658f646df61285d5b05ce0b407b7795f9045.tar.xz
nixpkgs-bb4d658f646df61285d5b05ce0b407b7795f9045.tar.zst
nixpkgs-bb4d658f646df61285d5b05ce0b407b7795f9045.zip
Merge branch 'master' into staging
Conflicts:
	nixos/doc/manual/release-notes/rl-unstable.xml
	nixos/modules/services/printing/cupsd.nix
	pkgs/applications/misc/calibre/default.nix
	pkgs/development/haskell-modules/hackage-packages.nix
	pkgs/development/libraries/libsodium/default.nix
	pkgs/misc/emulators/wine/unstable.nix
	pkgs/top-level/all-packages.nix
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/emulators/emulationstation/default.nix8
-rw-r--r--pkgs/misc/emulators/wine/base.nix61
-rw-r--r--pkgs/misc/emulators/wine/builder-wow.sh29
-rw-r--r--pkgs/misc/emulators/wine/default.nix15
-rw-r--r--pkgs/misc/emulators/wine/packages.nix60
-rw-r--r--pkgs/misc/emulators/wine/stable.nix81
-rw-r--r--pkgs/misc/emulators/wine/unstable.nix78
-rw-r--r--pkgs/misc/emulators/wine/versions.nix25
8 files changed, 194 insertions, 163 deletions
diff --git a/pkgs/misc/emulators/emulationstation/default.nix b/pkgs/misc/emulators/emulationstation/default.nix
index 6ff0a21135a..529e5d3d0a2 100644
--- a/pkgs/misc/emulators/emulationstation/default.nix
+++ b/pkgs/misc/emulators/emulationstation/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation rec {
   name = "emulationstation-${version}";
-  version = "2.0.0-rc1";
+  version = "2.0.1a";
 
   src = fetchFromGitHub {
     owner = "Aloshi";
     repo = "EmulationStation";
-    rev = "8739519e1591819cab85e1d2056804d20c197dac";
-    sha256 = "1psq5cqyq2yy1lqxrcj7pfp8szfmzhamxf3111l97w2h2zzcgvq9";
+    rev = "646bede3d9ec0acf0ae378415edac136774a66c5";
+    sha256 = "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v";
   };
 
   buildInputs = [ pkgconfig cmake alsaLib boost curl eigen freeimage freetype libarchive mesa SDL2 ];
@@ -25,4 +25,4 @@ stdenv.mkDerivation rec {
     maintainers = [ stdenv.lib.maintainers.edwtjo ];
     license = stdenv.lib.licenses.mit;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix
new file mode 100644
index 00000000000..ce39740f113
--- /dev/null
+++ b/pkgs/misc/emulators/wine/base.nix
@@ -0,0 +1,61 @@
+{ stdenv, lib, pkgArches,
+  name, version, src, monos, geckos, platforms,
+  buildScript ? null, configureFlags ? ""
+}:
+
+assert stdenv.isLinux;
+assert stdenv.cc.cc.isGNU or false;
+
+stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
+  builder = buildScript;
+}) // {
+  inherit name src configureFlags;
+
+  buildInputs = lib.concatLists (map (pkgs: (with pkgs; [
+    pkgconfig alsaLib ncurses libpng libjpeg lcms2 fontforge libxml2 libxslt
+    openssl gnutls cups makeWrapper flex bison mesa mesa_noglu.osmesa
+  ]) ++ (with pkgs.xlibs; [
+    xlibs libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite
+  ])) pkgArches);
+
+  # 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
+  ] ++ (lib.concatLists (map (pkgs:
+        (with pkgs; [
+    freetype fontconfig mesa mesa_noglu.osmesa libdrm
+    libpng libjpeg openssl gnutls cups ncurses
+  ]) ++ (with pkgs.xlibs; [
+    libXinerama libXrender libXrandr libXcursor libXcomposite
+  ])) pkgArches)));
+
+  # Don't shrink the ELF RPATHs in order to keep the extra RPATH
+  # elements specified above.
+  dontPatchELF = true;
+
+  ## FIXME
+  # Add capability to ignore known failing tests
+  # and enable doCheck
+  doCheck = false;
+  
+  postInstall = let
+    links = prefix: pkg: "ln -s ${pkg} $out/${prefix}/${pkg.name}";
+  in ''
+    mkdir -p $out/share/wine/gecko $out/share/wine/mono/
+    ${lib.strings.concatStringsSep "\n"
+          ((map (links "share/wine/gecko") geckos)
+        ++ (map (links "share/wine/mono")  monos))}
+  '';
+  
+  enableParallelBuilding = true;
+
+  meta = {
+    inherit version platforms;
+    homepage = "http://www.winehq.org/";
+    license = "LGPL";
+    description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix";
+    maintainers = [stdenv.lib.maintainers.raskin];
+  };
+})
diff --git a/pkgs/misc/emulators/wine/builder-wow.sh b/pkgs/misc/emulators/wine/builder-wow.sh
new file mode 100644
index 00000000000..9f946f3b71f
--- /dev/null
+++ b/pkgs/misc/emulators/wine/builder-wow.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+source $stdenv/setup
+
+unpackPhase
+patchPhase
+
+configureScript=$TMP/$sourceRoot/configure
+mkdir -p $TMP/wine-wow $TMP/wine64
+
+cd $TMP/wine64
+sourceRoot=`pwd`
+configureFlags="--enable-win64"
+configurePhase
+buildPhase
+# checkPhase
+
+cd $TMP/wine-wow
+sourceRoot=`pwd`
+configureFlags="--with-wine64=../wine64"
+configurePhase
+buildPhase
+# checkPhase
+
+eval "$preInstall"
+cd $TMP/wine64 && make install
+cd $TMP/wine-wow && make install
+eval "$postInstall"
+fixupPhase
diff --git a/pkgs/misc/emulators/wine/default.nix b/pkgs/misc/emulators/wine/default.nix
new file mode 100644
index 00000000000..962aee9fb5d
--- /dev/null
+++ b/pkgs/misc/emulators/wine/default.nix
@@ -0,0 +1,15 @@
+## Configuration:
+# Control you default wine config in nixpkgs-config:
+# wine = {
+#   release = "stable"; # "stable", "unstable"
+#   build = "wineWow"; # "wine32", "wine64", "wineWow"
+# };
+# Make additional configurations on demand:
+# wine.overrideConfig { build = "wine32"; };
+{ lib, system, callPackage,
+  wineRelease ? "stable",
+  wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32") }:
+
+lib.getAttr wineBuild (callPackage ./packages.nix {
+  inherit wineRelease;
+})
diff --git a/pkgs/misc/emulators/wine/packages.nix b/pkgs/misc/emulators/wine/packages.nix
new file mode 100644
index 00000000000..4d95dc911dc
--- /dev/null
+++ b/pkgs/misc/emulators/wine/packages.nix
@@ -0,0 +1,60 @@
+{ system, stdenv, stdenv_32bit, lib, pkgs, pkgsi686Linux, fetchurl,
+  wineRelease ? "stable"
+}:
+
+let sources = with lib.getAttr wineRelease (import ./versions.nix); {
+      version = wineVersion;
+      src = fetchurl {
+        url = "mirror://sourceforge/wine/wine-${wineVersion}.tar.bz2";
+        sha256 = wineSha256;
+      };
+
+      wineGecko32 = fetchurl {
+        url = "mirror://sourceforge/wine/wine_gecko-${geckoVersion}-x86.msi";
+        sha256 = geckoSha256;
+      };
+
+      wineGecko64 = fetchurl {
+        url = "mirror://sourceforge/wine/wine_gecko-${gecko64Version}-x86_64.msi";
+        sha256 = gecko64Sha256;
+      };
+
+      wineMono = fetchurl {
+        url = "mirror://sourceforge/wine/wine-mono-${monoVersion}.msi";
+        sha256 = monoSha256;
+      };
+    };
+    inherit (sources) version;
+in {
+  wine32 = import ./base.nix {
+    name = "wine32-${version}";
+    inherit (sources) version src;
+    inherit (pkgsi686Linux) lib stdenv;
+    pkgArches = [ pkgsi686Linux ];
+    geckos = with sources; [ wineGecko32 ];
+    monos = with sources; [ wineMono ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+  wine64 = import ./base.nix {
+    name = "wine64-${version}";
+    inherit (sources) version src;
+    inherit lib stdenv;
+    pkgArches = [ pkgs ];
+    geckos = with sources; [ wineGecko64 ];
+    monos = with sources; [ wineMono ];
+    configureFlags = "--enable-win64";
+    platforms = [ "x86_64-linux" ];
+  };
+  wineWow = import ./base.nix {
+    name = "wineWow-${version}";
+    inherit (sources) version src;
+    inherit lib;
+    stdenv = stdenv_32bit;
+    pkgArches = [ pkgs pkgsi686Linux ];
+    geckos = with sources; [ wineGecko32 wineGecko64 ];
+    monos = with sources; [ wineMono ];
+    buildScript = ./builder-wow.sh;
+    platforms = [ "x86_64-linux" ];
+  };
+}
+
diff --git a/pkgs/misc/emulators/wine/stable.nix b/pkgs/misc/emulators/wine/stable.nix
deleted file mode 100644
index bdf696f541f..00000000000
--- a/pkgs/misc/emulators/wine/stable.nix
+++ /dev/null
@@ -1,81 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, xlibs, flex, bison, mesa, mesa_noglu, alsaLib
-, ncurses, libpng, libjpeg, lcms2, freetype, fontconfig, fontforge
-, libxml2, libxslt, openssl, gnutls, cups, libdrm, makeWrapper
-}:
-
-assert stdenv.isLinux;
-assert stdenv.cc.cc.isGNU or false;
-
-let
-    version = "1.6.2";
-    name = "wine-${version}";
-
-    src = fetchurl {
-      url = "mirror://sourceforge/wine/${name}.tar.bz2";
-      sha256 = "1gmc0ljgfz3qy50mdxcwwjcr2yrpz54jcs2hdszsrk50wpnrxazh";
-    };
-
-    gecko = fetchurl {
-      url = "mirror://sourceforge/wine/wine_gecko-2.21-x86.msi";
-      sha256 = "1n0zccnvchkg0m896sjx5psk4bxw9if32xyxib1rbfdasykay7zh";
-    };
-
-    gecko64 = fetchurl {
-      url = "mirror://sourceforge/wine/wine_gecko-2.21-x86_64.msi";
-      sha256 = "0grc86dkq90i59zw43hakh62ra1ajnk11m64667xjrlzi7f0ndxw";
-    };
-
-    mono = fetchurl {
-      url = "mirror://sourceforge/wine/wine-mono-0.0.8.msi";
-      sha256 = "00jl24qp7vh3hlqv7wsw1s529lr5p0ybif6s73jy85chqaxj7z1x";
-    };
-
-in stdenv.mkDerivation rec {
-  inherit version name src;
-
-  buildInputs = [
-    pkgconfig
-    xlibs.xlibs flex bison xlibs.libXi mesa mesa_noglu.osmesa
-    xlibs.libXcursor xlibs.libXinerama xlibs.libXrandr
-    xlibs.libXrender xlibs.libXxf86vm xlibs.libXcomposite
-    alsaLib ncurses libpng libjpeg lcms2 fontforge
-    libxml2 libxslt openssl gnutls cups makeWrapper
-  ];
-
-  # 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 ") [
-    freetype fontconfig stdenv.cc.cc mesa mesa_noglu.osmesa libdrm
-    xlibs.libXinerama xlibs.libXrender xlibs.libXrandr
-    xlibs.libXcursor xlibs.libXcomposite libpng libjpeg
-    openssl gnutls cups
-  ];
-
-  # Don't shrink the ELF RPATHs in order to keep the extra RPATH
-  # elements specified above.
-  dontPatchELF = true;
-
-  postInstall = ''
-    install -D ${gecko} $out/share/wine/gecko/${gecko.name}
-  '' + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
-    install -D ${gecko} $out/share/wine/gecko/${gecko64.name}
-  '' + ''
-    install -D ${mono} $out/share/wine/mono/${mono.name}
-
-    paxmark psmr $out/bin/wine{,-preloader}
-
-    wrapProgram $out/bin/wine --prefix LD_LIBRARY_PATH : ${stdenv.cc.cc}/lib
-  '';
-
-  enableParallelBuilding = true;
-
-  meta = {
-    homepage = "http://www.winehq.org/";
-    license = "LGPL";
-    inherit version;
-    description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix";
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/misc/emulators/wine/unstable.nix b/pkgs/misc/emulators/wine/unstable.nix
deleted file mode 100644
index aac97fe05b8..00000000000
--- a/pkgs/misc/emulators/wine/unstable.nix
+++ /dev/null
@@ -1,78 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, xlibs, flex, bison, mesa, mesa_noglu, alsaLib
-, ncurses, libpng, libjpeg, lcms, freetype, fontconfig, fontforge
-, libxml2, libxslt, openssl, gnutls, cups, libdrm, makeWrapper
-}:
-
-assert stdenv.isLinux;
-assert stdenv.cc.cc.isGNU or false;
-
-let
-    version = "1.7.42";
-    name = "wine-${version}";
-
-    src = fetchurl {
-      url = "mirror://sourceforge/wine/${name}.tar.bz2";
-      sha256 = "18iv4dsx2p7bk5qhiqqc6fpnnzny9rx8vgbjlpnf3gr0n615qzss";
-    };
-
-    gecko = fetchurl {
-      url = "mirror://sourceforge/wine/wine_gecko-2.36-x86.msi";
-      sha256 = "12hjks32yz9jq4w3xhk3y1dy2g3iakqxd7aldrdj51cqiz75g95g";
-    };
-
-    gecko64 = fetchurl {
-      url = "mirror://sourceforge/wine/wine_gecko-2.36-x86_64.msi";
-      sha256 = "0i7dchrzsda4nqbkhp3rrchk74rc2whn2af1wzda517m9c0886vh";
-    };
-
-    mono = fetchurl {
-      url = "mirror://sourceforge/wine/wine-mono-4.5.4.msi";
-      sha256 = "1wnn273f232141x9x0sahg4w499x0g2p0xphxmwm5wh1xrzyvg10";
-    };
-
-in stdenv.mkDerivation rec {
-  inherit version name src;
-
-  buildInputs = [
-    pkgconfig
-    xlibs.xlibs flex bison xlibs.libXi mesa mesa_noglu.osmesa
-    xlibs.libXcursor xlibs.libXinerama xlibs.libXrandr
-    xlibs.libXrender xlibs.libXxf86vm xlibs.libXcomposite
-    alsaLib ncurses libpng libjpeg lcms fontforge
-    libxml2 libxslt openssl gnutls cups makeWrapper
-  ];
-
-  # 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 ") [
-    freetype fontconfig stdenv.cc.cc mesa mesa_noglu.osmesa libdrm
-    xlibs.libXinerama xlibs.libXrender xlibs.libXrandr
-    xlibs.libXcursor xlibs.libXcomposite libpng libjpeg
-    openssl gnutls cups ncurses
-  ];
-
-  # Don't shrink the ELF RPATHs in order to keep the extra RPATH
-  # elements specified above.
-  dontPatchELF = true;
-
-  postInstall = ''
-    install -D ${gecko} $out/share/wine/gecko/${gecko.name}
-  '' + stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
-    install -D ${gecko} $out/share/wine/gecko/${gecko64.name}
-  '' + ''
-    install -D ${mono} $out/share/wine/mono/${mono.name}
-    wrapProgram $out/bin/wine --prefix LD_LIBRARY_PATH : ${stdenv.cc.cc}/lib
-  '';
-
-  enableParallelBuilding = true;
-
-  meta = {
-    homepage = "http://www.winehq.org/";
-    license = "LGPL";
-    inherit version;
-    description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix";
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/misc/emulators/wine/versions.nix b/pkgs/misc/emulators/wine/versions.nix
new file mode 100644
index 00000000000..e599f04f857
--- /dev/null
+++ b/pkgs/misc/emulators/wine/versions.nix
@@ -0,0 +1,25 @@
+{
+  unstable = {
+    wineVersion = "1.7.42";
+    wineSha256  = "18iv4dsx2p7bk5qhiqqc6fpnnzny9rx8vgbjlpnf3gr0n615qzss";
+    geckoVersion = "2.36";
+    geckoSha256 = "12hjks32yz9jq4w3xhk3y1dy2g3iakqxd7aldrdj51cqiz75g95g";
+    gecko64Version = "2.36";
+    gecko64Sha256 = "0i7dchrzsda4nqbkhp3rrchk74rc2whn2af1wzda517m9c0886vh";
+    monoVersion = "4.5.6";
+    monoSha256 = "09dwfccvfdp3walxzp6qvnyxdj2bbyw9wlh6cxw2sx43gxriys5c";
+  };
+  stable = {
+    wineVersion = "1.6.2";
+    wineSha256  = "1gmc0ljgfz3qy50mdxcwwjcr2yrpz54jcs2hdszsrk50wpnrxazh";
+    geckoVersion = "2.21";
+    geckoSha256 = "1n0zccnvchkg0m896sjx5psk4bxw9if32xyxib1rbfdasykay7zh";
+    gecko64Version = "2.21";
+    gecko64Sha256 = "0grc86dkq90i59zw43hakh62ra1ajnk11m64667xjrlzi7f0ndxw";
+    monoVersion = "4.5.6";
+    monoSha256 = "09dwfccvfdp3walxzp6qvnyxdj2bbyw9wlh6cxw2sx43gxriys5c";
+    ## TESTME wine stable should work with most recent mono
+    #monoVersion = "0.0.8";
+    #monoSha256 = "00jl24qp7vh3hlqv7wsw1s529lr5p0ybif6s73jy85chqaxj7z1x";
+  };
+}