mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
rust: Fix for legacy fetch cargo
See inline comment and #79975 for details.
This commit is contained in:
parent
4c900027b1
commit
6d881472ef
@ -45,11 +45,17 @@ let
|
||||
# and have vendored deps, check them against the src attr for consistency.
|
||||
validateCargoDeps = cargoSha256 != "unset" && !legacyCargoFetcher;
|
||||
|
||||
# Some cargo builds include build hooks that modify their own vendor
|
||||
# dependencies. This copies the vendor directory into the build tree and makes
|
||||
# it writable. If we're using a tarball, the unpackFile hook already handles
|
||||
# this for us automatically.
|
||||
setupVendorDir = if cargoVendorDir == null
|
||||
then ''
|
||||
then (''
|
||||
unpackFile "$cargoDeps"
|
||||
cargoDepsCopy=$(stripHash $cargoDeps)
|
||||
''
|
||||
'' + stdenv.lib.optionalString legacyCargoFetcher ''
|
||||
chmod -R +w "$cargoDepsCopy"
|
||||
'')
|
||||
else ''
|
||||
cargoDepsCopy="$sourceRoot/${cargoVendorDir}"
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user