feat(rust): add the krantz.rust.cargoArtifacts.extraAttrs option
This commit is contained in:
+13
-2
@@ -43,9 +43,9 @@
|
|||||||
|
|
||||||
# Build *just* the cargo dependencies, so we can reuse
|
# Build *just* the cargo dependencies, so we can reuse
|
||||||
# all of that work (e.g. via cachix) when running in CI
|
# all of that work (e.g. via cachix) when running in CI
|
||||||
cargoArtifacts = craneLib.buildDepsOnly {
|
cargoArtifacts = craneLib.buildDepsOnly ({
|
||||||
inherit src buildInputs nativeBuildInputs;
|
inherit src buildInputs nativeBuildInputs;
|
||||||
};
|
} // cfg.cargoArtifacts.extraAttrs);
|
||||||
in {
|
in {
|
||||||
options.krantz.rust = {
|
options.krantz.rust = {
|
||||||
enable = lib.mkEnableOption "building a cargo project with crane";
|
enable = lib.mkEnableOption "building a cargo project with crane";
|
||||||
@@ -96,6 +96,17 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cargoArtifacts = {
|
||||||
|
extraAttrs = lib.mkOption {
|
||||||
|
description = "Extra attributes to merge into buildDepsOnly. See https://crane.dev/API.html#cranelibbuilddepsonly";
|
||||||
|
type = lib.types.attrs;
|
||||||
|
default = {};
|
||||||
|
example = {
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
devShell = {
|
devShell = {
|
||||||
enable = lib.mkEnableOption "a rust development environment" // {default = true;};
|
enable = lib.mkEnableOption "a rust development environment" // {default = true;};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user