naersk
naersk copied to clipboard
How to achieve `cargo build --bins --lib --tests`?
Hey, I've been rereading these docs for a while now and I cannot figure out which "targets" the parameters is referring to when saying "targets | The targets to build if the Cargo.toml is a virtual manifest".
I wish to achieve the same as in the issue title, that is: cargo build --bins --lib --tests. How would I write the config to achieve this in the spirit of this API?
I think this is what you want:
# ...
in naersk.buildPackage {
inherit src;
# concat existing options with custom options
# takes lambda input
cargoBuildOptions = inputList: inputList ++ ["--bins" "--tests"];
# ...
}
This will change the "cargo build"-arguments.