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:
David Craven 2016-05-31 20:30:19 +02:00
parent c4eaa26cde
commit c22f0c7474
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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