tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
wine: enable 64bit build for wineStaging
Herwig Hochleitner
11 years ago
ef9cfd3d
023aaf8f
+54
-36
7 changed files
expand all
collapse all
unified
split
pkgs
misc
emulators
wine
base.nix
builder-wow.sh
default.nix
staging.nix
util.nix
versions.nix
top-level
all-packages.nix
+14
-14
pkgs/misc/emulators/wine/base.nix
reviewed
···
6
6
assert stdenv.isLinux;
7
7
assert stdenv.cc.cc.isGNU or false;
8
8
9
9
+
with import ./util.nix { inherit lib; };
10
10
+
9
11
stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
10
12
builder = buildScript;
11
11
-
}) // {
13
13
+
}) // rec {
12
14
inherit name src configureFlags;
13
15
14
14
-
buildInputs = lib.concatLists (map (pkgs: (with pkgs; [
15
15
-
pkgconfig alsaLib ncurses libpng libjpeg lcms2 fontforge libxml2 libxslt
16
16
-
openssl gnutls cups makeWrapper flex bison mesa mesa_noglu.osmesa
16
16
+
buildInputs = toBuildInputs pkgArches (pkgs: with pkgs; [
17
17
+
pkgconfig alsaLib lcms2 fontforge libxml2 libxslt makeWrapper flex bison
18
18
+
]);
19
19
+
20
20
+
nativeBuildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
21
21
+
freetype fontconfig mesa mesa_noglu.osmesa libdrm libpng libjpeg openssl gnutls cups ncurses
17
22
]) ++ (with pkgs.xlibs; [
18
23
xlibs libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite
19
19
-
])) pkgArches);
24
24
+
]));
20
25
21
26
# Wine locates a lot of libraries dynamically through dlopen(). Add
22
27
# them to the RPATH so that the user doesn't have to set them in
23
28
# LD_LIBRARY_PATH.
24
24
-
NIX_LDFLAGS = map (path: "-rpath ${path}/lib") ([
25
25
-
stdenv.cc.cc
26
26
-
] ++ (lib.concatLists (map (pkgs:
27
27
-
(with pkgs; [
28
28
-
freetype fontconfig mesa mesa_noglu.osmesa libdrm
29
29
-
libpng libjpeg openssl gnutls cups ncurses
30
30
-
]) ++ (with pkgs.xlibs; [
31
31
-
libXinerama libXrender libXrandr libXcursor libXcomposite
32
32
-
])) pkgArches)));
29
29
+
NIX_LDFLAGS = map
30
30
+
(path: "-rpath ${path}/lib")
31
31
+
([ stdenv.cc.cc ] ++ nativeBuildInputs);
33
32
34
33
# Don't shrink the ELF RPATHs in order to keep the extra RPATH
35
34
# elements specified above.
···
51
50
52
51
enableParallelBuilding = true;
53
52
53
53
+
passthru = { inherit pkgArches; };
54
54
meta = {
55
55
inherit version platforms;
56
56
homepage = "http://www.winehq.org/";
+1
pkgs/misc/emulators/wine/builder-wow.sh
reviewed
···
3
3
source $stdenv/setup
4
4
5
5
unpackPhase
6
6
+
cd $TMP/$sourceRoot
6
7
patchPhase
7
8
8
9
configureScript=$TMP/$sourceRoot/configure
+14
-7
pkgs/misc/emulators/wine/default.nix
reviewed
···
1
1
## Configuration:
2
2
# Control you default wine config in nixpkgs-config:
3
3
# wine = {
4
4
-
# release = "stable"; # "stable", "unstable"
4
4
+
# release = "stable"; # "stable", "unstable", "staging"
5
5
# build = "wineWow"; # "wine32", "wine64", "wineWow"
6
6
# };
7
7
# Make additional configurations on demand:
8
8
-
# wine.overrideConfig { build = "wine32"; };
9
9
-
{ lib, system, callPackage,
8
8
+
# wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
9
9
+
{ lib, pkgs, system, callPackage,
10
10
wineRelease ? "stable",
11
11
-
wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32") }:
11
11
+
wineBuild ? (if system == "x86_64-linux" then "wineWow" else "wine32"),
12
12
+
libtxc_dxtn_Name ? "libtxc_dxtn_s2tc" }:
12
13
13
13
-
lib.getAttr wineBuild (callPackage ./packages.nix {
14
14
-
inherit wineRelease;
15
15
-
})
14
14
+
if wineRelease == "staging" then
15
15
+
callPackage ./staging.nix {
16
16
+
inherit libtxc_dxtn_Name;
17
17
+
wine = lib.getAttr wineBuild (callPackage ./packages.nix { wineRelease = "unstable"; });
18
18
+
}
19
19
+
else
20
20
+
lib.getAttr wineBuild (callPackage ./packages.nix {
21
21
+
inherit wineRelease;
22
22
+
})
+11
-8
pkgs/misc/emulators/wine/staging.nix
reviewed
···
1
1
-
{ stdenv, fetchFromGitHub, wine, perl, autoconf, utillinux
2
2
-
, pulseaudio, libtxc_dxtn }:
1
1
+
{ stdenv, callPackage, lib, fetchFromGitHub, wine, libtxc_dxtn_Name }:
3
2
4
4
-
let version = "1.7.42";
3
3
+
with callPackage ./util.nix {};
4
4
+
5
5
+
let v = (import ./versions.nix).staging;
6
6
+
inherit (v) version;
5
7
patch = fetchFromGitHub {
8
8
+
inherit (v) sha256;
6
9
owner = "wine-compholio";
7
10
repo = "wine-staging";
8
11
rev = "v${version}";
9
9
-
sha256 = "1qi1hf1w97n17vmj137p7da75g01ky84a3xvs50xrmxb7f62sm17";
10
12
};
11
11
-
13
13
+
build-inputs = pkgNames: extra:
14
14
+
(mkBuildInputs wine.pkgArches pkgNames) ++ extra;
12
15
in assert (builtins.parseDrvName wine.name).version == version;
13
16
14
17
stdenv.lib.overrideDerivation wine (self: {
15
15
-
nativeBuildInputs = [ pulseaudio libtxc_dxtn ] ++ self.nativeBuildInputs;
16
16
-
buildInputs = [ perl utillinux autoconf ] ++ self.buildInputs;
18
18
+
nativeBuildInputs = build-inputs [ "pulseaudio" libtxc_dxtn_Name ] self.nativeBuildInputs;
19
19
+
buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs;
17
20
18
21
name = "${self.name}-staging";
19
22
···
23
26
chmod +w patches
24
27
cd patches
25
28
patchShebangs gitapply.sh
26
26
-
./patchinstall.sh DESTDIR=.. --all
29
29
+
./patchinstall.sh DESTDIR="$TMP/$sourceRoot" --all
27
30
cd ..
28
31
'';
29
32
})
+9
pkgs/misc/emulators/wine/util.nix
reviewed
···
1
1
+
{ lib }:
2
2
+
rec {
3
3
+
toPackages = pkgNames: pkgs:
4
4
+
map (pn: lib.getAttr pn pkgs) pkgNames;
5
5
+
toBuildInputs = pkgArches: archPkgs:
6
6
+
lib.concatLists (map archPkgs pkgArches);
7
7
+
mkBuildInputs = pkgArches: pkgNames:
8
8
+
toBuildInputs pkgArches (toPackages pkgNames);
9
9
+
}
+4
pkgs/misc/emulators/wine/versions.nix
reviewed
···
22
22
#monoVersion = "0.0.8";
23
23
#monoSha256 = "00jl24qp7vh3hlqv7wsw1s529lr5p0ybif6s73jy85chqaxj7z1x";
24
24
};
25
25
+
staging = {
26
26
+
version = "1.7.42";
27
27
+
sha256 = "1qi1hf1w97n17vmj137p7da75g01ky84a3xvs50xrmxb7f62sm17";
28
28
+
};
25
29
}
+1
-7
pkgs/top-level/all-packages.nix
reviewed
···
14461
14461
};
14462
14462
wineStable = wine.override { wineRelease = "stable"; };
14463
14463
wineUnstable = wine.override { wineRelease = "unstable"; };
14464
14464
+
wineStaging = wine.override { wineRelease = "staging"; };
14464
14465
14465
14466
winetricks = callPackage ../misc/emulators/wine/winetricks.nix {
14466
14467
inherit (gnome2) zenity;
14467
14467
-
};
14468
14468
-
14469
14469
-
### FIXME integrate wineStaging into 64bit
14470
14470
-
wineStaging = callPackage_i686 ../misc/emulators/wine/staging.nix {
14471
14471
-
wine = pkgsi686Linux.wineUnstable;
14472
14472
-
# Patent issues
14473
14473
-
libtxc_dxtn = pkgsi686Linux.libtxc_dxtn_s2tc;
14474
14468
};
14475
14469
14476
14470
wmutils-core = callPackage ../tools/X11/wmutils-core { };