[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
98/376: nix-profile.sh: Set $SSL_CERT_FILE
From: |
Ludovic Courtès |
Subject: |
98/376: nix-profile.sh: Set $SSL_CERT_FILE |
Date: |
Wed, 28 Jan 2015 22:04:18 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 50ed345fad74ec48d88393fc53e879de162d0192
Author: Eelco Dolstra <address@hidden>
Date: Tue Jul 29 17:11:54 2014 +0200
nix-profile.sh: Set $SSL_CERT_FILE
---
scripts/nix-profile.sh.in | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
index 5d682fc..7dd7968 100644
--- a/scripts/nix-profile.sh.in
+++ b/scripts/nix-profile.sh.in
@@ -1,4 +1,4 @@
-if test -n "$HOME"; then
+if [ -n "$HOME" ]; then
NIX_LINK="$HOME/.nix-profile"
# Set the default profile.
@@ -19,4 +19,13 @@ if test -n "$HOME"; then
# <nixpkgs> paths work when the user has fetched the Nixpkgs
# channel.
export
NIX_PATH=${NIX_PATH:+$NIX_PATH:}nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs
+
+ # Set $SSL_CERT_FILE so that Nixpkgs applications like curl work.
+ if [ -e /etc/ssl/certs/ca-bundle.crt ]; then # Fedora, NixOS
+ export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
+ elif [ -e /etc/ssl/certs/ca-certificates.crt ]; then # Ubuntu, Debian
+ export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
+ elif [ -e "$NIX_LINK/etc/ca-bundle.crt" ]; then # fall back to Nix profile
+ export SSL_CERT_FILE="$NIX_LINK/etc/ca-bundle.crt"
+ fi
fi
- 91/376: Remove obsolete SSH master connection code, (continued)
- 91/376: Remove obsolete SSH master connection code, Ludovic Courtès, 2015/01/28
- 100/376: Rename nixPath to __nixPath, Ludovic Courtès, 2015/01/28
- 95/376: Change the default for use-ssh-substituter to ‘true’, Ludovic Courtès, 2015/01/28
- 90/376: Implement nix-copy-closure --from via nix-store --serve, Ludovic Courtès, 2015/01/28
- 97/376: Remove outdated AUTHORS file, Ludovic Courtès, 2015/01/28
- 92/376: Fix NIX_SSHOPTS, Ludovic Courtès, 2015/01/28
- 103/376: Allow regular files as GC roots, Ludovic Courtès, 2015/01/28
- 94/376: nix-copy-closure: Drop --bzip2, --xz, --show-progress, Ludovic Courtès, 2015/01/28
- 84/376: Use pthread_cancel instead of a signal, Ludovic Courtès, 2015/01/28
- 102/376: Restore default SIGPIPE handler before invoking ‘man’, Ludovic Courtès, 2015/01/28
- 98/376: nix-profile.sh: Set $SSL_CERT_FILE,
Ludovic Courtès <=
- 96/376: nix-daemon: Pass on the user's $SSH_AUTH_SOCK to the SSH substituter, Ludovic Courtès, 2015/01/28
- 101/376: make clean: Remove Makefile.config, Ludovic Courtès, 2015/01/28
- 105/376: findRoots(): Prevent a call to lstat(), Ludovic Courtès, 2015/01/28
- 108/376: Remove ugly hack for detecting build environment setup errors, Ludovic Courtès, 2015/01/28
- 107/376: Call commonChildInit() before doing chroot init, Ludovic Courtès, 2015/01/28
- 104/376: Make readDirectory() return inode / file type, Ludovic Courtès, 2015/01/28
- 106/376: Eliminate redundant copy, Ludovic Courtès, 2015/01/28
- 110/376: Make chroot builds easier to set up, Ludovic Courtès, 2015/01/28
- 109/376: Speed up nix-shell, Ludovic Courtès, 2015/01/28
- 121/376: nix-install-package: Use extra-binary-caches, Ludovic Courtès, 2015/01/28