rustPlatform.fetchCargoTarball: fail on git dependencies
The reason is that we can not expect the extended logic run on git dependencies starting from Cargo 1.68 to be reproducible in future versions, and thus the output hash would not be sufficiently stable. https://github.com/rust-lang/cargo/pull/11414
This commit is contained in:
parent
34aef860a5
commit
4329de1264
1 changed files with 11 additions and 0 deletions
|
@ -76,6 +76,17 @@ in stdenv.mkDerivation ({
|
|||
# Override the `http.cainfo` option usually specified in `.cargo/config`.
|
||||
export CARGO_HTTP_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
|
||||
if grep '^source = "git' Cargo.lock; then
|
||||
echo
|
||||
echo "ERROR: The Cargo.lock contains git dependencies"
|
||||
echo
|
||||
echo "This is currently not supported in the fixed-output derivation fetcher."
|
||||
echo "Use cargoLock.lockFile / importCargoLock instead."
|
||||
echo
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cargo vendor $name --respect-source-config | cargo-vendor-normalise > $CARGO_CONFIG
|
||||
|
||||
# Create an empty vendor directory when there is no dependency to vendor
|
||||
|
|
Loading…
Reference in a new issue