diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-08-14 00:20:49 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-08-14 00:23:16 +0000 |
commit | 4999a38db7c5de0ea9f514a12ecd4133cce647f3 (patch) | |
tree | bbb659ab07fda4c9b98053499b7e3f046ac6d5dc /nixpkgs/pkgs/misc/emulators/wine | |
parent | f9abd30e11337cf07034f2cc8ad1691aa4a69386 (diff) | |
parent | 8746c77a383f5c76153c7a181f3616d273acfa2a (diff) | |
download | nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.gz nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.bz2 nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.lz nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.xz nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.tar.zst nixlib-4999a38db7c5de0ea9f514a12ecd4133cce647f3.zip |
Merge commit '8746c77a383f5c76153c7a181f3616d273acfa2a'
Diffstat (limited to 'nixpkgs/pkgs/misc/emulators/wine')
-rw-r--r-- | nixpkgs/pkgs/misc/emulators/wine/base.nix | 25 | ||||
-rw-r--r-- | nixpkgs/pkgs/misc/emulators/wine/sources.nix | 14 |
2 files changed, 28 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/misc/emulators/wine/base.nix b/nixpkgs/pkgs/misc/emulators/wine/base.nix index e86db53c88a6..01d096599155 100644 --- a/nixpkgs/pkgs/misc/emulators/wine/base.nix +++ b/nixpkgs/pkgs/misc/emulators/wine/base.nix @@ -46,7 +46,9 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { ++ lib.optional udevSupport pkgs.udev ++ lib.optional vulkanSupport pkgs.vulkan-loader ++ lib.optional sdlSupport pkgs.SDL2 - ++ lib.optionals gstreamerSupport (with pkgs.gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav ]) + ++ lib.optionals gstreamerSupport (with pkgs.gst_all_1; + [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-libav + (gst-plugins-bad.override { enableZbar = false; }) ]) ++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.glib ] ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ] ++ lib.optionals xmlSupport [ pkgs.libxml2 pkgs.libxslt ] @@ -95,10 +97,25 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { ((map (links "share/wine/gecko") geckos) ++ (map (links "share/wine/mono") monos))} '' + lib.optionalString supportFlags.gstreamerSupport '' - for i in wine ; do - if [ -e "$out/bin/$i" ]; then - wrapProgram "$out/bin/$i" \ + # Wrapping Wine is tricky. + # https://github.com/NixOS/nixpkgs/issues/63170 + # https://github.com/NixOS/nixpkgs/issues/28486 + # The main problem is that wine-preloader opens and loads the wine(64) binary, and + # breakage occurs if it finds a shell script instead of the real binary. We solve this + # by setting WINELOADER to point to the original binary. Additionally, the locations + # of the 32-bit and 64-bit binaries must differ only by the presence of "64" at the + # end, due to the logic Wine uses to find the other binary (see get_alternate_loader + # in dlls/kernel32/process.c). Therefore we do not use wrapProgram which would move + # the binaries to ".wine-wrapped" and ".wine64-wrapped", but use makeWrapper directly, + # and move the binaries to ".wine" and ".wine64". + for i in wine wine64 ; do + prog="$out/bin/$i" + if [ -e "$prog" ]; then + hidden="$(dirname "$prog")/.$(basename "$prog")" + mv "$prog" "$hidden" + makeWrapper "$hidden" "$prog" \ --argv0 "" \ + --set WINELOADER "$hidden" \ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0" fi done diff --git a/nixpkgs/pkgs/misc/emulators/wine/sources.nix b/nixpkgs/pkgs/misc/emulators/wine/sources.nix index e4958b8cfc32..4ccdb254daa9 100644 --- a/nixpkgs/pkgs/misc/emulators/wine/sources.nix +++ b/nixpkgs/pkgs/misc/emulators/wine/sources.nix @@ -31,24 +31,24 @@ in rec { ## see http://wiki.winehq.org/Mono mono = fetchurl rec { - version = "4.8.3"; + version = "4.9.0"; url = "http://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}.msi"; - sha256 = "0xhavcjwwr21am3bxp2cxlvykwasw8y4g8p470j5fg7skc0izynn"; + sha256 = "04y7w57cgay74227qci1bjbzwvclkawwljqvgd7a5yhhdz7cfblf"; }; }; unstable = fetchurl rec { # NOTE: Don't forget to change the SHA256 for staging as well. - version = "4.9"; + version = "4.12.1"; url = "https://dl.winehq.org/wine/source/4.x/wine-${version}.tar.xz"; - sha256 = "16vrzhhk0x862mfhninx5515s76j2kbjgmz7gzdigjzkzwi8x14i"; + sha256 = "09yjfb2k14y11k19lm8dqmb8qwxyhh67d5q1gqv480y64mljvkx0"; inherit (stable) mono gecko32 gecko64; }; staging = fetchFromGitHub rec { # https://github.com/wine-staging/wine-staging/releases inherit (unstable) version; - sha256 = "17v66rsxvm3grglidxxzllw4msfrgwg35hmzanvrf8x8jfzjlvv2"; + sha256 = "1bvpvj6vcw2p6vcjm6mw5maarbs4lfw1ix3pj020w4n3kg4nmmc4"; owner = "wine-staging"; repo = "wine-staging"; rev = "v${version}"; @@ -56,8 +56,8 @@ in rec { winetricks = fetchFromGitHub rec { # https://github.com/Winetricks/winetricks/releases - version = "20190310"; - sha256 = "0mqzl7k9q7lfkmk8fk9dfzi2dm45h31mrid9265qh2d56nk28ali"; + version = "20190615"; + sha256 = "1bdvj363yjn7agqq1fxdfz31j1rrs2wc02v874jjx5sw1bfq5qsa"; owner = "Winetricks"; repo = "winetricks"; rev = version; |