Fix buildRustPackage edge cases
1. When multiple versions of the same package are required $revs is an array. 2. When cargo fetch is run it usually doesn't need a network connection. But when it does SSL_CERT_FILE isn't set.
This commit is contained in:
parent
c4eaa26cde
commit
c22f0c7474
@ -44,6 +44,7 @@ in stdenv.mkDerivation (args // {
|
||||
|
||||
export CARGO_HOME="$(realpath deps)"
|
||||
export RUST_LOG=${logLevel}
|
||||
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
|
||||
# Let's find out which $indexHash cargo uses for file:///dev/null
|
||||
(cd $sourceRoot && cargo fetch &>/dev/null) || true
|
||||
|
@ -147,7 +147,7 @@ EOF
|
||||
done
|
||||
|
||||
# Create ad-hoc branches for the revs we need
|
||||
echo "$revs" | while read rev; do
|
||||
echo "$revs" | tr " " "\n" | while read -d " " rev; do
|
||||
echo "Creating git branch b_$rev $rev"
|
||||
git branch b_$rev $rev
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user