git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #104719 from avnik/wine-update

Wine update

commit9567f6f62febb33445ff52edb6a6ce4b518029ac authorMichael Raskin <7c6f434c@mail.ru> dateFri 27 Nov 2020, 10:36 (6 years ago) parent144a972626f931
5 files changed+77−37
pkgs/misc/emulators/wine/base.nix+3−4 pkgs/misc/emulators/wine/cert-path-stable.patch+24 pkgs/misc/emulators/wine/cert-path.patch+20−21 pkgs/misc/emulators/wine/packages.nix+3−3 pkgs/misc/emulators/wine/sources.nix+27−9
pkgs/misc/emulators/wine/base.nix+3−4
@@ -2,6 +2,7 @@
22 name, version, src, mingwGccs, monos, geckos, platforms,
33 pkgconfig, fontforge, makeWrapper, flex, bison,
44 supportFlags,
5+ patches,
56 buildScript ? null, configureFlags ? []
67}:
78
@@ -9,6 +10,7 @@ with import ./util.nix { inherit lib; };
910
1011let
1112 vkd3d = callPackage ./vkd3d.nix {};
13+ patches' = patches;
1214in
1315stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
1416 builder = buildScript;
@@ -73,10 +75,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
7375 ])
7476 ++ [ pkgs.xorg.libX11 pkgs.perl ]));
7577
76− patches = [
77− # Also look for root certificates at $NIX_SSL_CERT_FILE
78− ./cert-path.patch
79− ];
78+ patches = [ ] ++ patches';
8079
8180 # Wine locates a lot of libraries dynamically through dlopen(). Add
8281 # them to the RPATH so that the user doesn't have to set them in
pkgs/misc/emulators/wine/cert-path-stable.patchnew file+24
@@ -0,0 +1,24 @@
1+diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c
2+index f795181..fb4926a 100644
3+--- a/dlls/crypt32/rootstore.c
4++++ b/dlls/crypt32/rootstore.c
5+@@ -18,6 +18,7 @@
6+ #include "config.h"
7+ #include <stdarg.h>
8+ #include <stdio.h>
9++#include <stdlib.h> /* getenv */
10+ #include <sys/types.h>
11+ #ifdef HAVE_SYS_STAT_H
12+ #include <sys/stat.h>
13+@@ -916,6 +917,11 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store)
14+
15+ for (i = 0; !ret && i < ARRAY_SIZE(CRYPT_knownLocations); i++)
16+ ret = import_certs_from_path(CRYPT_knownLocations[i], from, TRUE);
17++
18++ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE");
19++ if (nix_cert_file != NULL)
20++ ret = import_certs_from_path(nix_cert_file, from, TRUE);
21++
22+ check_and_store_certs(from, store);
23+ }
24+ CertCloseStore(from, 0);
pkgs/misc/emulators/wine/cert-path.patch+20−21
@@ -1,24 +1,23 @@
1−diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c
2−index f795181..fb4926a 100644
3−--- a/dlls/crypt32/rootstore.c
4−+++ b/dlls/crypt32/rootstore.c
5−@@ -18,6 +18,7 @@
6− #include "config.h"
1+diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c
2+index 035f2d936bb..959716d727a 100644
3+--- a/dlls/crypt32/unixlib.c
4++++ b/dlls/crypt32/unixlib.c
5+@@ -24,6 +24,7 @@
6+ #include "wine/port.h"
7+
78 #include <stdarg.h>
8− #include <stdio.h>
9−+#include <stdlib.h> /* getenv */
10− #include <sys/types.h>
11− #ifdef HAVE_SYS_STAT_H
12− #include <sys/stat.h>
13−@@ -916,6 +917,11 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store)
9++#include <stdlib.h>
10+ #include <dirent.h>
11+ #include <fcntl.h>
12+ #include <unistd.h>
13+@@ -605,6 +606,10 @@ static void load_root_certs(void)
1414
15− for (i = 0; !ret && i < ARRAY_SIZE(CRYPT_knownLocations); i++)
16− ret = import_certs_from_path(CRYPT_knownLocations[i], from, TRUE);
17−+
18−+ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE");
19−+ if (nix_cert_file != NULL)
20−+ ret = import_certs_from_path(nix_cert_file, from, TRUE);
15+ for (i = 0; i < ARRAY_SIZE(CRYPT_knownLocations) && list_empty(&root_cert_list); i++)
16+ import_certs_from_path( CRYPT_knownLocations[i], TRUE );
2117+
22− check_and_store_certs(from, store);
23− }
24− CertCloseStore(from, 0);
18++ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE");
19++ if (nix_cert_file != NULL)
20++ import_certs_from_path(nix_cert_file, TRUE);
21+ }
22+
23+ static BOOL WINAPI enum_root_certs( void *buffer, SIZE_T size, SIZE_T *needed )
pkgs/misc/emulators/wine/packages.nix+3−3
@@ -7,7 +7,7 @@ let src = lib.getAttr wineRelease (callPackage ./sources.nix {});
77in with src; {
88 wine32 = pkgsi686Linux.callPackage ./base.nix {
99 name = "wine-${version}";
10− inherit src version supportFlags;
10+ inherit src version supportFlags patches;
1111 pkgArches = [ pkgsi686Linux ];
1212 geckos = [ gecko32 ];
1313 mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc ];
@@ -16,7 +16,7 @@ in with src; {
1616 };
1717 wine64 = callPackage ./base.nix {
1818 name = "wine64-${version}";
19− inherit src version supportFlags;
19+ inherit src version supportFlags patches;
2020 pkgArches = [ pkgs ];
2121 mingwGccs = with pkgsCross; [ mingwW64.buildPackages.gcc ];
2222 geckos = [ gecko64 ];
@@ -26,7 +26,7 @@ in with src; {
2626 };
2727 wineWow = callPackage ./base.nix {
2828 name = "wine-wow-${version}";
29− inherit src version supportFlags;
29+ inherit src version supportFlags patches;
3030 stdenv = stdenv_32bit;
3131 pkgArches = [ pkgs pkgsi686Linux ];
3232 geckos = [ gecko32 gecko64 ];
pkgs/misc/emulators/wine/sources.nix+27−9
@@ -13,9 +13,9 @@ let fetchurl = args@{url, sha256, ...}:
1313in rec {
1414
1515 stable = fetchurl rec {
16− version = "5.0.2";
16+ version = "5.0.3";
1717 url = "https://dl.winehq.org/wine/source/5.0/wine-${version}.tar.xz";
18− sha256 = "1g7c5djbi262h6zivmxbk26rsflwq8mrghr7hci3ajw7f3s89hn2";
18+ sha256 = "sha256-nBo1Ni/VE9/1yEW/dtpj6hBaeUrHFEqlA/cTYa820i8=";
1919
2020 ## see http://wiki.winehq.org/Gecko
2121 gecko32 = fetchurl rec {
@@ -31,27 +31,45 @@ in rec {
3131
3232 ## see http://wiki.winehq.org/Mono
3333 mono = fetchurl rec {
34− version = "4.9.4";
35− url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}.msi";
36− sha256 = "1p8g45xphxnns7dkg9rbaknarbjy5cjhrngaf0fsgk9z68wgz9ji";
34+ version = "5.1.1";
35+ url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi";
36+ sha256 = "09wjrfxbw0072iv6d2vqnkc3y7dzj15vp8mv4ay44n1qp5ji4m3l";
3737 };
38+
39+ patches = [
40+ # Also look for root certificates at $NIX_SSL_CERT_FILE
41+ ./cert-path-stable.patch
42+ ];
3843 };
3944
4045 unstable = fetchurl rec {
4146 # NOTE: Don't forget to change the SHA256 for staging as well.
42− version = "5.20";
47+ version = "5.22";
4348 url = "https://dl.winehq.org/wine/source/5.x/wine-${version}.tar.xz";
44− sha256 = "sha256-j1Ui+M6+vbqhL1jhumcaEfZjcuCu33T7kyz1qJOQhhw=";
49+ sha256 = "sha256-Cb0GyHyMl05q00UHzsh11yF+tW/Anfg41UU+DrvOTSE=";
4550 inherit (stable) mono gecko32 gecko64;
51+
52+ patches = [
53+ # Also look for root certificates at $NIX_SSL_CERT_FILE
54+ ./cert-path.patch
55+
56+ # Hotfix picked from master for https://bugs.winehq.org/show_bug.cgi?id=50163
57+ (pkgs.fetchpatch {
58+ url = "https://bugs.winehq.org/attachment.cgi?id=68680";
59+ sha256 = "sha256-GTPQhRWeu6DPadqgFiuVUjI6MzJPaTN4l//8DSG6hpo=";
60+ })
61+ ];
4662 };
4763
4864 staging = fetchFromGitHub rec {
4965 # https://github.com/wine-staging/wine-staging/releases
5066 inherit (unstable) version;
51− sha256 = "sha256-1oWoLb5w9g3wDghpvHpNsJCws7QoZ/E2dqxLuaIgi6o=";
67+ sha256 = "sha256-HzAKLPlybO1lrkHo4Q1Y9H0vmjiqo9HiT05TcX08Ubk=";
5268 owner = "wine-staging";
5369 repo = "wine-staging";
54− rev = "v${version}";
70+ #rev = "v${version}"; # revert back to this statement on next release
71+ # Include hotfix for https://bugs.winehq.org/show_bug.cgi?id=50162
72+ rev = "f257f37b92041fc718de04aa83ec3139b748ffa2";
5573
5674 # Just keep list empty, if current release haven't broken patchsets
5775 disabledPatchsets = [ ];