-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add nix check command (#13805)
#14322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add a new `nix check` command that verifies installables can be built or substituted without creating result symlinks or downloading outputs. Key features: - Searches checks.<system>, then packages.<system>, then legacyPackages.<system> - Uses queryMissing() to determine substitutability without downloads - Checks derivations by building only what cannot be substituted - Requires explicit installable arguments with attribute paths - Supports --dry-run to show what would be built or fetched The command is useful for CI systems and development workflows where you want to verify buildability without producing local outputs.
|
It's confusing that this doesn't check the same things as |
|
@edolstra but then it would be confusing that it looks up in I think we could unify
As for moving this forward, I think this is a good incremental step. I think it'd be good to integrate this with The only changes I would expect to follow from this integration is having more eval-level checks in |
| "checks." + settings.thisSystem.get() + ".", | ||
| "packages." + settings.thisSystem.get() + ".", | ||
| "legacyPackages." + settings.thisSystem.get() + "."}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "checks." + settings.thisSystem.get() + ".", | |
| "packages." + settings.thisSystem.get() + ".", | |
| "legacyPackages." + settings.thisSystem.get() + "."}; | |
| "checks." + settings.thisSystem.get() + "." | |
| }; |
Having all the packages in the completions is counterproductive, and I haven't wanted to check buildability of a package yet.
Motivation
I can't do it anymore.
Yesterday I've made this mistake more than once:
nix run .#checks.x86_64-linux.somethingIt's horrible to type, and to add insult to injury, it fails because of my own stupidity.
I need to rewire my brain to type something sensible and nice.
nix check .#somethingI'm dogfooding this. Pretty great so far.
Context
nix checksubcommand #13805nix flake checkinsteadAdd 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.