Merge pull request from bendlas/wine64-staging

Integrate wine-staging into 32/64/wow build arch
This commit is contained in:
Nikolay Amiantov 2015-05-18 22:41:41 +03:00
commit b0972a0006
8 changed files with 64 additions and 42 deletions

View File

@ -6,30 +6,29 @@
assert stdenv.isLinux; assert stdenv.isLinux;
assert stdenv.cc.cc.isGNU or false; assert stdenv.cc.cc.isGNU or false;
with import ./util.nix { inherit lib; };
stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) { stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
builder = buildScript; builder = buildScript;
}) // { }) // rec {
inherit name src configureFlags; inherit name src configureFlags;
buildInputs = lib.concatLists (map (pkgs: (with pkgs; [ buildInputs = toBuildInputs pkgArches (pkgs: with pkgs; [
pkgconfig alsaLib ncurses libpng libjpeg lcms2 fontforge libxml2 libxslt pkgconfig alsaLib lcms2 fontforge libxml2 libxslt makeWrapper flex bison
openssl gnutls cups makeWrapper flex bison mesa mesa_noglu.osmesa ]);
nativeBuildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
freetype fontconfig mesa mesa_noglu.osmesa libdrm libpng libjpeg openssl gnutls cups ncurses
]) ++ (with pkgs.xlibs; [ ]) ++ (with pkgs.xlibs; [
xlibs libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite xlibs libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite
])) pkgArches); ]));
# Wine locates a lot of libraries dynamically through dlopen(). Add # 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 # them to the RPATH so that the user doesn't have to set them in
# LD_LIBRARY_PATH. # LD_LIBRARY_PATH.
NIX_LDFLAGS = map (path: "-rpath ${path}/lib") ([ NIX_LDFLAGS = map
stdenv.cc.cc (path: "-rpath ${path}/lib")
] ++ (lib.concatLists (map (pkgs: ([ stdenv.cc.cc ] ++ nativeBuildInputs);
(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 # Don't shrink the ELF RPATHs in order to keep the extra RPATH
# elements specified above. # elements specified above.
@ -51,6 +50,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
enableParallelBuilding = true; enableParallelBuilding = true;
passthru = { inherit pkgArches; };
meta = { meta = {
inherit version platforms; inherit version platforms;
homepage = "http://www.winehq.org/"; homepage = "http://www.winehq.org/";

View File

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

View File

@ -1,15 +1,22 @@
## Configuration: ## Configuration:
# Control you default wine config in nixpkgs-config: # Control you default wine config in nixpkgs-config:
# wine = { # wine = {
# release = "stable"; # "stable", "unstable" # release = "stable"; # "stable", "unstable", "staging"
# build = "wineWow"; # "wine32", "wine64", "wineWow" # build = "wineWow"; # "wine32", "wine64", "wineWow"
# }; # };
# Make additional configurations on demand: # Make additional configurations on demand:
# wine.overrideConfig { build = "wine32"; }; # wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
{ lib, system, callPackage, { lib, pkgs, system, callPackage,
wineRelease ? "stable", 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 { if wineRelease == "staging" then
inherit wineRelease; 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 { stdenv, callPackage, lib, fetchFromGitHub, wine, libtxc_dxtn_Name }:
, pulseaudio, libtxc_dxtn }:
let version = "1.7.42"; with callPackage ./util.nix {};
let v = (import ./versions.nix).staging;
inherit (v) version;
patch = fetchFromGitHub { patch = fetchFromGitHub {
inherit (v) sha256;
owner = "wine-compholio"; owner = "wine-compholio";
repo = "wine-staging"; repo = "wine-staging";
rev = "v${version}"; rev = "v${version}";
sha256 = "1qi1hf1w97n17vmj137p7da75g01ky84a3xvs50xrmxb7f62sm17";
}; };
build-inputs = pkgNames: extra:
(mkBuildInputs wine.pkgArches pkgNames) ++ extra;
in assert (builtins.parseDrvName wine.name).version == version; in assert (builtins.parseDrvName wine.name).version == version;
stdenv.lib.overrideDerivation wine (self: { stdenv.lib.overrideDerivation wine (self: {
nativeBuildInputs = [ pulseaudio libtxc_dxtn ] ++ self.nativeBuildInputs; nativeBuildInputs = build-inputs [ "pulseaudio" libtxc_dxtn_Name ] self.nativeBuildInputs;
buildInputs = [ perl utillinux autoconf ] ++ self.buildInputs; buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs;
name = "${self.name}-staging"; name = "${self.name}-staging";
@ -23,7 +26,7 @@ stdenv.lib.overrideDerivation wine (self: {
chmod +w patches chmod +w patches
cd patches cd patches
patchShebangs gitapply.sh patchShebangs gitapply.sh
./patchinstall.sh DESTDIR=.. --all ./patchinstall.sh DESTDIR="$TMP/$sourceRoot" --all
cd .. 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

@ -1,7 +1,7 @@
{ {
unstable = { unstable = {
wineVersion = "1.7.42"; wineVersion = "1.7.43";
wineSha256 = "18iv4dsx2p7bk5qhiqqc6fpnnzny9rx8vgbjlpnf3gr0n615qzss"; wineSha256 = "08kqj02m8xc1ppzhs5y83zzykjnz0qliq495rx1n90ybzyd9pm2k";
geckoVersion = "2.36"; geckoVersion = "2.36";
geckoSha256 = "12hjks32yz9jq4w3xhk3y1dy2g3iakqxd7aldrdj51cqiz75g95g"; geckoSha256 = "12hjks32yz9jq4w3xhk3y1dy2g3iakqxd7aldrdj51cqiz75g95g";
gecko64Version = "2.36"; gecko64Version = "2.36";
@ -22,4 +22,12 @@
#monoVersion = "0.0.8"; #monoVersion = "0.0.8";
#monoSha256 = "00jl24qp7vh3hlqv7wsw1s529lr5p0ybif6s73jy85chqaxj7z1x"; #monoSha256 = "00jl24qp7vh3hlqv7wsw1s529lr5p0ybif6s73jy85chqaxj7z1x";
}; };
staging = {
version = "1.7.43";
sha256 = "01b7npa8hc2nrv4hm16r9ikic4wd34nbz1lvfhy0ali2jbcsaqqb";
};
winetricks = {
version = "20150416";
sha256 = "0467cn5hqry6fscjskpvxw0y00lr059jmldv1csicbav4l0dxx8k";
};
} }

View File

@ -1,15 +1,15 @@
{ stdenv, fetchFromGitHub, wine, perl, which, coreutils, zenity, curl { stdenv, fetchFromGitHub, wine, perl, which, coreutils, zenity, curl
, cabextract, unzip, p7zip, gnused, gnugrep, bash } : , cabextract, unzip, p7zip, gnused, gnugrep, bash } :
let version = "20150316"; let v = (import ./versions.nix).winetricks;
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "winetricks-${version}"; name = "winetricks-${v.version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Winetricks"; owner = "Winetricks";
repo = "winetricks"; repo = "winetricks";
rev = version; rev = v.version;
sha256 = "00c55jpca6l3v3p02xc0gy5l4xb17gf90282hq5h85nh72kqsbrh"; sha256 = v.sha256;
}; };
buildInputs = [ perl which ]; buildInputs = [ perl which ];

View File

@ -14461,18 +14461,12 @@ let
}; };
wineStable = wine.override { wineRelease = "stable"; }; wineStable = wine.override { wineRelease = "stable"; };
wineUnstable = wine.override { wineRelease = "unstable"; }; wineUnstable = wine.override { wineRelease = "unstable"; };
wineStaging = wine.override { wineRelease = "staging"; };
winetricks = callPackage ../misc/emulators/wine/winetricks.nix { winetricks = callPackage ../misc/emulators/wine/winetricks.nix {
inherit (gnome2) zenity; 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 { }; wmutils-core = callPackage ../tools/X11/wmutils-core { };
wxmupen64plus = callPackage ../misc/emulators/wxmupen64plus { }; wxmupen64plus = callPackage ../misc/emulators/wxmupen64plus { };