Closed nejucomo closed 9 months ago
From https://github.com/yusdacra/nix-cargo-integration/issues/136#issuecomment-1744735909 on https://github.com/yusdacra/nix-cargo-integration/issues/136, it sounds like the check output should be automatically added, but it doesn't seem so in my case. What am I missing?
The check
output is not automatically exported to the flake outputs. I don't remember why I didn't do this before but I will make them be exported if export
is set to true
. Thanks for reporting.
Tangential question: I wrote the function find-crate-configs parses the workspace Cargo.toml to populate nci.crates with "${crate-name} = {}; for each crate. Is there functionality already present in nci to automate this?
I didn't implement anything like this because I didn't find it useful. Mainly because you'll likely want to configure the crates so you have to specify the crate name and configuration anyway (and most of the times you don't want everything to be exported, in my experience). But I can add an option for this, if it's proving useful.
Hi, I'm fairly new to nixos and learning how to wrap my rust projects in flakes, so I'm trying to understand basic flakes,
flake-parts
, andnci
.When I run
nix flake check --print-build-logs
I see no output from cargo tests.If I add
checks.default = outputs."${default-crate}".check;
then I do see the tests for that single crate execute withflake check
. How can I ensure all tests for all crates in the cargo workspace are executed withnix flake check
?From this comment on #136, it sounds like the
check
output should be automatically added, but it doesn't seem so in my case. What am I missing?I have this
flake.nix
:Tangential question: I wrote the function
find-crate-configs
parses the workspaceCargo.toml
to populatenci.crates
with"${crate-name} = {};
for each crate. Is there functionality already present innci
to automate this?When I run
nix show
I see:It doesn't show checks, only
devShells
andpackages
.