mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-08-16 18:00:30 +03:00
feat(rust): update crane builder, make sure vendor dir reference removal works
This commit is contained in:
parent
091440502b
commit
1576b6321b
@ -42,11 +42,11 @@
|
||||
"crane": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1670284777,
|
||||
"narHash": "sha256-JF0pc0s4z/X+Iy+lNHOwUQ8I5bz+q7uX4HrKTNIEj24=",
|
||||
"lastModified": 1670900067,
|
||||
"narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "2243fb9c872de25cb564a02d324ea6a5b9853052",
|
||||
"rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -55,10 +55,12 @@
|
||||
inherit pname version;
|
||||
|
||||
src = utils.getRootSource pname version;
|
||||
cargoVendorDir = "./nix-vendor";
|
||||
cargoVendorDir = "$TMPDIR/nix-vendor";
|
||||
installCargoArtifactsMode = "use-zstd";
|
||||
|
||||
postUnpack = ''
|
||||
export CARGO_HOME=$(pwd)/.cargo_home
|
||||
export cargoVendorDir="$TMPDIR/nix-vendor"
|
||||
'';
|
||||
preConfigure = ''
|
||||
${writeGitVendorEntries}
|
||||
@ -86,7 +88,7 @@
|
||||
cargoCheckCommand = "cargo check --release --package ${pname}";
|
||||
dream2nixVendorDir = vendoring.vendoredDependencies;
|
||||
preUnpack = ''
|
||||
${vendoring.copyVendorDir "$dream2nixVendorDir" "$cargoVendorDir"}
|
||||
${vendoring.copyVendorDir "$dream2nixVendorDir" common.cargoVendorDir}
|
||||
'';
|
||||
# move the vendored dependencies folder to $out for main derivation to use
|
||||
postInstall = ''
|
||||
@ -105,7 +107,7 @@
|
||||
cargoArtifacts = deps;
|
||||
# link the vendor dir we used earlier to the correct place
|
||||
preUnpack = ''
|
||||
${vendoring.copyVendorDir "$cargoArtifacts/nix-vendor" "$cargoVendorDir"}
|
||||
${vendoring.copyVendorDir "$cargoArtifacts/nix-vendor" common.cargoVendorDir}
|
||||
'';
|
||||
# write our cargo lock
|
||||
# note: we don't do this in buildDepsOnly since
|
||||
|
Loading…
Reference in New Issue
Block a user