mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-27 06:37:01 +03:00
fix(rust/crane): make sure cargo only builds the package we want
This commit is contained in:
parent
309af8d366
commit
2fe01e1715
@ -37,14 +37,16 @@ let
|
||||
'';
|
||||
# The deps-only derivation will use this as a prefix to the `pname`
|
||||
depsNameSuffix = "-deps";
|
||||
# Make sure cargo only builds the package we want
|
||||
cargoExtraArgs = "--package ${pname}";
|
||||
|
||||
deps = produceDerivation "${pname}${depsNameSuffix}" (crane.buildDepsOnly {
|
||||
inherit pname version src cargoVendorDir preBuild;
|
||||
inherit pname version src cargoVendorDir cargoExtraArgs preBuild;
|
||||
pnameSuffix = depsNameSuffix;
|
||||
});
|
||||
in
|
||||
produceDerivation pname (crane.buildPackage {
|
||||
inherit pname version src cargoVendorDir preBuild;
|
||||
inherit pname version src cargoVendorDir cargoExtraArgs preBuild;
|
||||
cargoArtifacts = deps;
|
||||
});
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user