rustPlatform: run cargoDepsHook inside cargoSetupPostUnpackHook

This commit is contained in:
Yueh-Shun Li
2025-08-20 22:05:44 +08:00
parent 56a5fc5c78
commit cdb722fa01
2 changed files with 2 additions and 5 deletions
@@ -162,11 +162,6 @@ lib.extendMkDerivation {
patches = cargoPatches ++ patches;
postUnpack = ''
eval "$cargoDepsHook"
''
+ (args.postUnpack or "");
configurePhase =
args.configurePhase or ''
runHook preConfigure
@@ -1,6 +1,8 @@
cargoSetupPostUnpackHook() {
echo "Executing cargoSetupPostUnpackHook"
eval "${cargoDepsHook-}"
# 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