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)