Skip to content

Commit cdb722f

Browse files
committed
rustPlatform: run cargoDepsHook inside cargoSetupPostUnpackHook
1 parent 56a5fc5 commit cdb722f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pkgs/build-support/rust/build-rust-package/default.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ lib.extendMkDerivation {
162162

163163
patches = cargoPatches ++ patches;
164164

165-
postUnpack = ''
166-
eval "$cargoDepsHook"
167-
''
168-
+ (args.postUnpack or "");
169-
170165
configurePhase =
171166
args.configurePhase or ''
172167
runHook preConfigure

pkgs/build-support/rust/hooks/cargo-setup-hook.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
cargoSetupPostUnpackHook() {
22
echo "Executing cargoSetupPostUnpackHook"
33

4+
eval "${cargoDepsHook-}"
5+
46
# Some cargo builds include build hooks that modify their own vendor
57
# dependencies. This copies the vendor directory into the build tree and makes
68
# it writable. If we're using a tarball, the unpackFile hook already handles

0 commit comments

Comments
 (0)