wine: enable 64bit build for wineStaging

This commit is contained in:
Herwig Hochleitner 2015-05-10 21:33:00 +02:00
parent 023aaf8f6d
commit ef9cfd3dda
7 changed files with 54 additions and 36 deletions

View file

@ -6,30 +6,29 @@
assert stdenv.isLinux;
assert stdenv.cc.cc.isGNU or false;
with import ./util.nix { inherit lib; };
stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
builder = buildScript;
}) // {
}) // rec {
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
buildInputs = toBuildInputs pkgArches (pkgs: with pkgs; [
pkgconfig alsaLib lcms2 fontforge libxml2 libxslt makeWrapper flex bison
]);
nativeBuildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
freetype fontconfig mesa mesa_noglu.osmesa libdrm libpng libjpeg openssl gnutls cups ncurses
]) ++ (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)));
NIX_LDFLAGS = map
(path: "-rpath ${path}/lib")
([ stdenv.cc.cc ] ++ nativeBuildInputs);
# Don't shrink the ELF RPATHs in order to keep the extra RPATH
# elements specified above.
@ -51,6 +50,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
enableParallelBuilding = true;
passthru = { inherit pkgArches; };
meta = {
inherit version platforms;
homepage = "http://www.winehq.org/";

View file

@ -3,6 +3,7 @@
source $stdenv/setup
unpackPhase
cd $TMP/$sourceRoot
patchPhase
configureScript=$TMP/$sourceRoot/configure

View file

@ -1,15 +1,22 @@
## Configuration:
# Control you default wine config in nixpkgs-config:
# wine = {
# release = "stable"; # "stable", "unstable"
# release = "stable"; # "stable", "unstable", "staging"
# build = "wineWow"; # "wine32", "wine64", "wineWow"
# };
# Make additional configurations on demand:
# wine.overrideConfig { build = "wine32"; };
{ lib, system, callPackage,
# wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
{ lib, pkgs, system, callPackage,
wineRelease ? "stable",
wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32") }:
wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32"),
libtxc_dxtn_Name ? "libtxc_dxtn_s2tc" }:
lib.getAttr wineBuild (callPackage ./packages.nix {
inherit wineRelease;
})
if wineRelease == "staging" then
callPackage ./staging.nix {
inherit libtxc_dxtn_Name;
wine = lib.getAttr wineBuild (callPackage ./packages.nix { wineRelease = "unstable"; });
}
else
lib.getAttr wineBuild (callPackage ./packages.nix {
inherit wineRelease;
})

View file

@ -1,19 +1,22 @@
{ stdenv, fetchFromGitHub, wine, perl, autoconf, utillinux
, pulseaudio, libtxc_dxtn }:
{ stdenv, callPackage, lib, fetchFromGitHub, wine, libtxc_dxtn_Name }:
let version = "1.7.42";
with callPackage ./util.nix {};
let v = (import ./versions.nix).staging;
inherit (v) version;
patch = fetchFromGitHub {
inherit (v) sha256;
owner = "wine-compholio";
repo = "wine-staging";
rev = "v${version}";
sha256 = "1qi1hf1w97n17vmj137p7da75g01ky84a3xvs50xrmxb7f62sm17";
};
build-inputs = pkgNames: extra:
(mkBuildInputs wine.pkgArches pkgNames) ++ extra;
in assert (builtins.parseDrvName wine.name).version == version;
stdenv.lib.overrideDerivation wine (self: {
nativeBuildInputs = [ pulseaudio libtxc_dxtn ] ++ self.nativeBuildInputs;
buildInputs = [ perl utillinux autoconf ] ++ self.buildInputs;
nativeBuildInputs = build-inputs [ "pulseaudio" libtxc_dxtn_Name ] self.nativeBuildInputs;
buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs;
name = "${self.name}-staging";
@ -23,7 +26,7 @@ stdenv.lib.overrideDerivation wine (self: {
chmod +w patches
cd patches
patchShebangs gitapply.sh
./patchinstall.sh DESTDIR=.. --all
./patchinstall.sh DESTDIR="$TMP/$sourceRoot" --all
cd ..
'';
})

View file

@ -0,0 +1,9 @@
{ lib }:
rec {
toPackages = pkgNames: pkgs:
map (pn: lib.getAttr pn pkgs) pkgNames;
toBuildInputs = pkgArches: archPkgs:
lib.concatLists (map archPkgs pkgArches);
mkBuildInputs = pkgArches: pkgNames:
toBuildInputs pkgArches (toPackages pkgNames);
}

View file

@ -22,4 +22,8 @@
#monoVersion = "0.0.8";
#monoSha256 = "00jl24qp7vh3hlqv7wsw1s529lr5p0ybif6s73jy85chqaxj7z1x";
};
staging = {
version = "1.7.42";
sha256 = "1qi1hf1w97n17vmj137p7da75g01ky84a3xvs50xrmxb7f62sm17";
};
}

View file

@ -14461,18 +14461,12 @@ let
};
wineStable = wine.override { wineRelease = "stable"; };
wineUnstable = wine.override { wineRelease = "unstable"; };
wineStaging = wine.override { wineRelease = "staging"; };
winetricks = callPackage ../misc/emulators/wine/winetricks.nix {
inherit (gnome2) zenity;
};
### FIXME integrate wineStaging into 64bit
wineStaging = callPackage_i686 ../misc/emulators/wine/staging.nix {
wine = pkgsi686Linux.wineUnstable;
# Patent issues
libtxc_dxtn = pkgsi686Linux.libtxc_dxtn_s2tc;
};
wmutils-core = callPackage ../tools/X11/wmutils-core { };
wxmupen64plus = callPackage ../misc/emulators/wxmupen64plus { };