Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 86f8732194f2
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ae929e63b449
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 24, 2020

  1. Copy the full SHA
    d414941 View commit details

Commits on Jan 30, 2020

  1. Merge pull request #78406 from helsinki-systems/wine-certs

    wine: Look for root certs at $NIX_SSL_CERT_FILE
    7c6f434c authored Jan 30, 2020
    Copy the full SHA
    ae929e6 View commit details
Showing with 29 additions and 0 deletions.
  1. +5 −0 pkgs/misc/emulators/wine/base.nix
  2. +24 −0 pkgs/misc/emulators/wine/cert-path.patch
5 changes: 5 additions & 0 deletions pkgs/misc/emulators/wine/base.nix
Original file line number Diff line number Diff line change
@@ -68,6 +68,11 @@ 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
];

# 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
# LD_LIBRARY_PATH.
24 changes: 24 additions & 0 deletions pkgs/misc/emulators/wine/cert-path.patch
Original file line number Diff line number Diff line change
@@ -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 <stdarg.h>
#include <stdio.h>
+#include <stdlib.h> /* getenv */
#include <sys/types.h>
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -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);