From bfccf8e42cb42a3876b4ed7c4514552f53e66d90 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 23 Dec 2017 15:13:29 +0100 Subject: [PATCH] cacert: add hook that sets SSL_CERT_FILE Fixes #32981 --- pkgs/data/misc/cacert/default.nix | 2 ++ pkgs/data/misc/cacert/setup-hook.sh | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 pkgs/data/misc/cacert/setup-hook.sh diff --git a/pkgs/data/misc/cacert/default.nix b/pkgs/data/misc/cacert/default.nix index 275ae6dc2d86..91af84c42245 100644 --- a/pkgs/data/misc/cacert/default.nix +++ b/pkgs/data/misc/cacert/default.nix @@ -52,6 +52,8 @@ stdenv.mkDerivation rec { cp -v ca-bundle.crt $out/etc/ssl/certs ''; + setupHook = ./setup-hook.sh; + meta = { homepage = https://curl.haxx.se/docs/caextract.html; description = "A bundle of X.509 certificates of public Certificate Authorities (CA)"; diff --git a/pkgs/data/misc/cacert/setup-hook.sh b/pkgs/data/misc/cacert/setup-hook.sh new file mode 100644 index 000000000000..ff68bf0e1808 --- /dev/null +++ b/pkgs/data/misc/cacert/setup-hook.sh @@ -0,0 +1,6 @@ +cacertHook() { + export SSL_CERT_FILE=@out@/etc/ssl/certs/ca-bundle.crt +} + +envHooks+=(cacertHook) +crossEnvHooks+=(cacertHook)