Open utterances-bot opened 11 months ago
Thanks for this - I think you might be missing doCheck = true
? My reading of https://nixos.org/manual/nixpkgs/stable/#ssec-check-phase is that the check phase is skipped unless you explicitly set doCheck
.
Thanks for this - I think you might be missing
doCheck = true
? My reading of https://nixos.org/manual/nixpkgs/stable/#ssec-check-phase is that the check phase is skipped unless you explicitly setdoCheck
.
To my knowledge if a derivation is passed to the checks
output it's check phase is run unconditionally, otherwise yes you're correct about doCheck
for regular derivations.
I stumbled across this too, and from https://nixos.org/manual/nixpkgs/stable/#ssec-check-phase (and the behavior I observed), I'm pretty sure that doCheck
is false by default:
doCheck Controls whether the check phase is executed. By default it is skipped, but if doCheck is set to true, the check phase is usually executed.
Finally had the opportunity to test this, I don't know what drove my misconception but the doCheck
is definitely required, I've amended the code examples. Thanks for the corrections folks!
Writing your own Nix Flake checks | Harsh Shandilya
Quick how-to for writing ad-hoc checks for your own Nix Flakes
https://msfjarvis.dev/posts/writing-your-own-nix-flake-checks/