From 3d9ee22da3e3f8673981c39f854e1a538b2c247a Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 9 Nov 2020 22:04:35 +0100 Subject: [PATCH 1/6] wine{Unstable,Staging}: 5.20 -> 5.21 --- pkgs/misc/emulators/wine/sources.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index c26b84ffa0a..f36afbe4baa 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -39,16 +39,16 @@ in rec { unstable = fetchurl rec { # NOTE: Don't forget to change the SHA256 for staging as well. - version = "5.20"; + version = "5.21"; url = "https://dl.winehq.org/wine/source/5.x/wine-${version}.tar.xz"; - sha256 = "sha256-j1Ui+M6+vbqhL1jhumcaEfZjcuCu33T7kyz1qJOQhhw="; + sha256 = "sha256-WhpcJUnRG84NZkAiDtb9MQQq/LyzZvR14My0eB0tKEA="; inherit (stable) mono gecko32 gecko64; }; staging = fetchFromGitHub rec { # https://github.com/wine-staging/wine-staging/releases inherit (unstable) version; - sha256 = "sha256-1oWoLb5w9g3wDghpvHpNsJCws7QoZ/E2dqxLuaIgi6o="; + sha256 = "sha256-8IIjdGyRZf2v0dVvinqA2gvjR5eCXxN3+tWj1eCjjWA="; owner = "wine-staging"; repo = "wine-staging"; rev = "v${version}"; From dfcd45de58e124b401fc9c9497c4317433eb7243 Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 11 Nov 2020 09:48:38 +0100 Subject: [PATCH 2/6] wineStable: 5.0.2 -> 5.0.3 --- pkgs/misc/emulators/wine/sources.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index f36afbe4baa..8ea3ff183b0 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -13,9 +13,9 @@ let fetchurl = args@{url, sha256, ...}: in rec { stable = fetchurl rec { - version = "5.0.2"; + version = "5.0.3"; url = "https://dl.winehq.org/wine/source/5.0/wine-${version}.tar.xz"; - sha256 = "1g7c5djbi262h6zivmxbk26rsflwq8mrghr7hci3ajw7f3s89hn2"; + sha256 = "sha256-nBo1Ni/VE9/1yEW/dtpj6hBaeUrHFEqlA/cTYa820i8="; ## see http://wiki.winehq.org/Gecko gecko32 = fetchurl rec { From 152147a8f6548c83d9944a0e6aecd350becfeb09 Mon Sep 17 00:00:00 2001 From: Lengyel Balazs Date: Thu, 29 Oct 2020 22:29:57 +0100 Subject: [PATCH 3/6] wine-mono: 4.9.4 -> 5.1.1 --- pkgs/misc/emulators/wine/sources.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 8ea3ff183b0..b722e697ee1 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -31,9 +31,9 @@ in rec { ## see http://wiki.winehq.org/Mono mono = fetchurl rec { - version = "4.9.4"; - url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}.msi"; - sha256 = "1p8g45xphxnns7dkg9rbaknarbjy5cjhrngaf0fsgk9z68wgz9ji"; + version = "5.1.1"; + url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi"; + sha256 = "09wjrfxbw0072iv6d2vqnkc3y7dzj15vp8mv4ay44n1qp5ji4m3l"; }; }; From 22da5d92aff8f7c962b5d9da9c422b9071104cb3 Mon Sep 17 00:00:00 2001 From: "Alexander V. Nikolaev" Date: Mon, 23 Nov 2020 18:01:00 +0200 Subject: [PATCH 4/6] wine{Unstable,Staging}: 5.21 -> 5.22 --- pkgs/misc/emulators/wine/cert-path.patch | 43 ++++++++++++------------ pkgs/misc/emulators/wine/sources.nix | 6 ++-- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/pkgs/misc/emulators/wine/cert-path.patch b/pkgs/misc/emulators/wine/cert-path.patch index da01a477810..18a90e1a9af 100644 --- a/pkgs/misc/emulators/wine/cert-path.patch +++ b/pkgs/misc/emulators/wine/cert-path.patch @@ -1,24 +1,23 @@ -diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c -index f795181..fb4926a 100644 ---- a/dlls/crypt32/rootstore.c -+++ b/dlls/crypt32/rootstore.c -@@ -18,6 +18,7 @@ - #include "config.h" - #include - #include -+#include /* getenv */ - #include - #ifdef HAVE_SYS_STAT_H - #include -@@ -916,6 +917,11 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store) +diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c +index 035f2d936bb..959716d727a 100644 +--- a/dlls/crypt32/unixlib.c ++++ b/dlls/crypt32/unixlib.c +@@ -24,6 +24,7 @@ + #include "wine/port.h" - for (i = 0; !ret && i < ARRAY_SIZE(CRYPT_knownLocations); i++) - ret = import_certs_from_path(CRYPT_knownLocations[i], from, TRUE); + #include ++#include + #include + #include + #include +@@ -605,6 +606,10 @@ static void load_root_certs(void) + + for (i = 0; i < ARRAY_SIZE(CRYPT_knownLocations) && list_empty(&root_cert_list); i++) + import_certs_from_path( CRYPT_knownLocations[i], TRUE ); + -+ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE"); -+ if (nix_cert_file != NULL) -+ ret = import_certs_from_path(nix_cert_file, from, TRUE); -+ - check_and_store_certs(from, store); - } - CertCloseStore(from, 0); ++ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE"); ++ if (nix_cert_file != NULL) ++ import_certs_from_path(nix_cert_file, TRUE); + } + + static BOOL WINAPI enum_root_certs( void *buffer, SIZE_T size, SIZE_T *needed ) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index b722e697ee1..081594e6214 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -39,16 +39,16 @@ in rec { unstable = fetchurl rec { # NOTE: Don't forget to change the SHA256 for staging as well. - version = "5.21"; + version = "5.22"; url = "https://dl.winehq.org/wine/source/5.x/wine-${version}.tar.xz"; - sha256 = "sha256-WhpcJUnRG84NZkAiDtb9MQQq/LyzZvR14My0eB0tKEA="; + sha256 = "sha256-Cb0GyHyMl05q00UHzsh11yF+tW/Anfg41UU+DrvOTSE="; inherit (stable) mono gecko32 gecko64; }; staging = fetchFromGitHub rec { # https://github.com/wine-staging/wine-staging/releases inherit (unstable) version; - sha256 = "sha256-8IIjdGyRZf2v0dVvinqA2gvjR5eCXxN3+tWj1eCjjWA="; + sha256 = "sha256-witIBZB8LRNSGTbBB7Rkm9QGvkH4EMuLc6gUpcqVVGo="; owner = "wine-staging"; repo = "wine-staging"; rev = "v${version}"; From 9144ebaf1e4bb906218894d9954a2ecf0bbf1073 Mon Sep 17 00:00:00 2001 From: "Alexander V. Nikolaev" Date: Tue, 24 Nov 2020 22:02:24 +0200 Subject: [PATCH 5/6] wineStable: revert cert-path patch for stable --- pkgs/misc/emulators/wine/base.nix | 7 +++--- .../emulators/wine/cert-path-stable.patch | 24 +++++++++++++++++++ pkgs/misc/emulators/wine/packages.nix | 6 ++--- pkgs/misc/emulators/wine/sources.nix | 5 ++++ 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 pkgs/misc/emulators/wine/cert-path-stable.patch diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix index c4858c6c579..0be36daac9f 100644 --- a/pkgs/misc/emulators/wine/base.nix +++ b/pkgs/misc/emulators/wine/base.nix @@ -2,6 +2,7 @@ name, version, src, mingwGccs, monos, geckos, platforms, pkgconfig, fontforge, makeWrapper, flex, bison, supportFlags, + patches, buildScript ? null, configureFlags ? [] }: @@ -9,6 +10,7 @@ with import ./util.nix { inherit lib; }; let vkd3d = callPackage ./vkd3d.nix {}; + patches' = patches; in stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { builder = buildScript; @@ -73,10 +75,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { ]) ++ [ pkgs.xorg.libX11 pkgs.perl ])); - patches = [ - # Also look for root certificates at $NIX_SSL_CERT_FILE - ./cert-path.patch - ]; + patches = [ ] ++ patches'; # 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 diff --git a/pkgs/misc/emulators/wine/cert-path-stable.patch b/pkgs/misc/emulators/wine/cert-path-stable.patch new file mode 100644 index 00000000000..da01a477810 --- /dev/null +++ b/pkgs/misc/emulators/wine/cert-path-stable.patch @@ -0,0 +1,24 @@ +diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c +index f795181..fb4926a 100644 +--- a/dlls/crypt32/rootstore.c ++++ b/dlls/crypt32/rootstore.c +@@ -18,6 +18,7 @@ + #include "config.h" + #include + #include ++#include /* getenv */ + #include + #ifdef HAVE_SYS_STAT_H + #include +@@ -916,6 +917,11 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store) + + for (i = 0; !ret && i < ARRAY_SIZE(CRYPT_knownLocations); i++) + ret = import_certs_from_path(CRYPT_knownLocations[i], from, TRUE); ++ ++ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE"); ++ if (nix_cert_file != NULL) ++ ret = import_certs_from_path(nix_cert_file, from, TRUE); ++ + check_and_store_certs(from, store); + } + CertCloseStore(from, 0); diff --git a/pkgs/misc/emulators/wine/packages.nix b/pkgs/misc/emulators/wine/packages.nix index 31d21058e3a..c4fec3360e1 100644 --- a/pkgs/misc/emulators/wine/packages.nix +++ b/pkgs/misc/emulators/wine/packages.nix @@ -7,7 +7,7 @@ let src = lib.getAttr wineRelease (callPackage ./sources.nix {}); in with src; { wine32 = pkgsi686Linux.callPackage ./base.nix { name = "wine-${version}"; - inherit src version supportFlags; + inherit src version supportFlags patches; pkgArches = [ pkgsi686Linux ]; geckos = [ gecko32 ]; mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc ]; @@ -16,7 +16,7 @@ in with src; { }; wine64 = callPackage ./base.nix { name = "wine64-${version}"; - inherit src version supportFlags; + inherit src version supportFlags patches; pkgArches = [ pkgs ]; mingwGccs = with pkgsCross; [ mingwW64.buildPackages.gcc ]; geckos = [ gecko64 ]; @@ -26,7 +26,7 @@ in with src; { }; wineWow = callPackage ./base.nix { name = "wine-wow-${version}"; - inherit src version supportFlags; + inherit src version supportFlags patches; stdenv = stdenv_32bit; pkgArches = [ pkgs pkgsi686Linux ]; geckos = [ gecko32 gecko64 ]; diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 081594e6214..5abfab2691d 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -35,6 +35,11 @@ in rec { url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi"; sha256 = "09wjrfxbw0072iv6d2vqnkc3y7dzj15vp8mv4ay44n1qp5ji4m3l"; }; + + patches = [ + # Also look for root certificates at $NIX_SSL_CERT_FILE + ./cert-path-stable.patch + ]; }; unstable = fetchurl rec { From 626f931022580d5afea8281f12a31d375fefb631 Mon Sep 17 00:00:00 2001 From: "Alexander V. Nikolaev" Date: Tue, 24 Nov 2020 22:02:46 +0200 Subject: [PATCH 6/6] wineUnstable: use own set of patches Contain important hotfixes from wine's master and staging master. --- pkgs/misc/emulators/wine/sources.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 5abfab2691d..4b16e78cd73 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -48,15 +48,28 @@ in rec { url = "https://dl.winehq.org/wine/source/5.x/wine-${version}.tar.xz"; sha256 = "sha256-Cb0GyHyMl05q00UHzsh11yF+tW/Anfg41UU+DrvOTSE="; inherit (stable) mono gecko32 gecko64; + + patches = [ + # Also look for root certificates at $NIX_SSL_CERT_FILE + ./cert-path.patch + + # Hotfix picked from master for https://bugs.winehq.org/show_bug.cgi?id=50163 + (pkgs.fetchpatch { + url = "https://bugs.winehq.org/attachment.cgi?id=68680"; + sha256 = "sha256-GTPQhRWeu6DPadqgFiuVUjI6MzJPaTN4l//8DSG6hpo="; + }) + ]; }; staging = fetchFromGitHub rec { # https://github.com/wine-staging/wine-staging/releases inherit (unstable) version; - sha256 = "sha256-witIBZB8LRNSGTbBB7Rkm9QGvkH4EMuLc6gUpcqVVGo="; + sha256 = "sha256-HzAKLPlybO1lrkHo4Q1Y9H0vmjiqo9HiT05TcX08Ubk="; owner = "wine-staging"; repo = "wine-staging"; - rev = "v${version}"; + #rev = "v${version}"; # revert back to this statement on next release + # Include hotfix for https://bugs.winehq.org/show_bug.cgi?id=50162 + rev = "f257f37b92041fc718de04aa83ec3139b748ffa2"; # Just keep list empty, if current release haven't broken patchsets disabledPatchsets = [ ];