diff options
author | Herwig Hochleitner <herwig@bendlas.net> | 2015-04-21 18:00:59 +0200 |
---|---|---|
committer | Herwig Hochleitner <herwig@bendlas.net> | 2015-05-10 15:45:01 +0200 |
commit | ae6d2796bc1d1a0ebc729f8826ae6ff5b97256e2 (patch) | |
tree | 5e8a6908eb347477462bb33a39e5e638c3bf4e35 /pkgs/misc/emulators/wine/base.nix | |
parent | f550eb7fdea5dd4e3183ce92c4ae993a3352ac48 (diff) | |
download | nixlib-ae6d2796bc1d1a0ebc729f8826ae6ff5b97256e2.tar nixlib-ae6d2796bc1d1a0ebc729f8826ae6ff5b97256e2.tar.gz nixlib-ae6d2796bc1d1a0ebc729f8826ae6ff5b97256e2.tar.bz2 nixlib-ae6d2796bc1d1a0ebc729f8826ae6ff5b97256e2.tar.lz nixlib-ae6d2796bc1d1a0ebc729f8826ae6ff5b97256e2.tar.xz nixlib-ae6d2796bc1d1a0ebc729f8826ae6ff5b97256e2.tar.zst nixlib-ae6d2796bc1d1a0ebc729f8826ae6ff5b97256e2.zip |
wine: add 64 bit build and nixpkgs configuration
The default release channel (stable/unstable) and the default build (wine32/wine64/wineWow) can be customized via the "wine" key in config
Diffstat (limited to 'pkgs/misc/emulators/wine/base.nix')
-rw-r--r-- | pkgs/misc/emulators/wine/base.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix new file mode 100644 index 000000000000..ce39740f1133 --- /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]; + }; +}) |