Skip to content

Commit cac1168

Browse files
authored
Merge pull request #12424 from ilya-bobyr/fish-profile-unify-ca-bundle.crt-search
nix-profile.fish: Look for ca-bundle.crt in $NIX_PROFILES
2 parents c9a3101 + 23f07fa commit cac1168

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/nix-profile.fish.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ else if test -e "$NIX_LINK/etc/ssl/certs/ca-bundle.crt" # fall back to cacert in
5353
set --export NIX_SSL_CERT_FILE "$NIX_LINK/etc/ssl/certs/ca-bundle.crt"
5454
else if test -e "$NIX_LINK/etc/ca-bundle.crt" # old cacert in Nix profile
5555
set --export NIX_SSL_CERT_FILE "$NIX_LINK/etc/ca-bundle.crt"
56+
else
57+
# Fall back to what is in the nix profiles, favouring whatever is defined last.
58+
for i in (string split ' ' $NIX_PROFILES)
59+
if test -e "$i/etc/ssl/certs/ca-bundle.crt"
60+
set --export NIX_SSL_CERT_FILE "$i/etc/ssl/certs/ca-bundle.crt"
61+
end
62+
end
5663
end
5764

5865
# Only use MANPATH if it is already set. In general `man` will just simply

0 commit comments

Comments
 (0)