Always set NIX_SSL_CERT_FILE
Some things in nixpkgs expect this to be set. E.g. NIX_SSL_CERT_FILE= ruby -r net/http -e 'Net::HTTP.get(URI("https://example.com"))' With `ruby` from Nixpkgs will always fail with e.g. > SSL_connect returned=1 errno=0 state=error: certificate verify failed > (unable to get local issuer certificate) (OpenSSL::SSL::SSLError) However, with NIX_SSL_CERT_FILE set correctly, will succeed.
This commit is contained in:
parent
11f4ad19be
commit
9492129c75
@ -72,11 +72,10 @@ done
|
||||
|
||||
sh "$workdir/install" "${installer_options[@]}"
|
||||
|
||||
cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
|
||||
echo "NIX_SSL_CERT_FILE=$cert_file" >> "$GITHUB_ENV"
|
||||
export NIX_SSL_CERT_FILE=$cert_file
|
||||
if [[ $OSTYPE =~ darwin ]]; then
|
||||
# macOS needs certificates hints
|
||||
cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
|
||||
echo "NIX_SSL_CERT_FILE=$cert_file" >> "$GITHUB_ENV"
|
||||
export NIX_SSL_CERT_FILE=$cert_file
|
||||
sudo launchctl setenv NIX_SSL_CERT_FILE "$cert_file"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user