See #8188. Resolves issues about the error not being actionable, but I am not marking it closing yet because of further discussion about the naming of these flags in the thread. `nix build --rebuild` (and others) will fail if the derivation has not been built before, because it runs a check build and confirms that the build was deterministic. It may be unclear to users that --rebuild will fail if the derivation has never been built before, because the flag makes no indication that a determinism check occurs. The error message does not help clear this up, or provide any actionable steps, and at first glance seems to indicate that the derivation being built is invalid, rather than just not present in the store: ``` error: some outputs of '...' are not valid, so checking is not possible ``` We can suggest to the user the following (correct) rewrites. This list of commands that may result in the error is comprehensive. - `nix build --rebuild` to `nix build` or `nix build --repair` - `nix-build --check` to `nix-build` or `nix-build --repair` - `nix-store --realise --check` to `nix-store --realise` or `nix-store --realise --repair` Wording is based on that in the documentation: ``` (nix build) --repair During evaluation, rewrite missing or corrupted files in the Nix store. During building, rebuild missing or corrupted store paths. (nix-build) --repair Fix corrupted or missing store paths by redownloading or rebuilding them. Note that this is slow because it requires computing a cryptographic hash of the contents of every path in the closure of the build. Also note the warning under nix-store --repair-path. (nix-store --realise) --repair Fix corrupted or missing store paths by redownloading or rebuilding them. (etc) ```
Nix
Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. Please refer to the Nix manual for more details.
Installation and first steps
Visit nix.dev for installation instructions and beginner tutorials.
Full reference documentation can be found in the Nix manual.
Building and developing
Follow instructions in the Nix reference manual to set up a development environment and build Nix from source.
Contributing
Check the contributing guide if you want to get involved with developing Nix.
Additional resources
Nix was created by Eelco Dolstra and developed as the subject of his PhD thesis The Purely Functional Software Deployment Model, published 2006. Today, a world-wide developer community contributes to Nix and the ecosystem that has grown around it.
- The Nix, Nixpkgs, NixOS Community on nixos.org
- Official documentation on nix.dev
- Nixpkgs is the largest, most up-to-date free software repository in the world
- NixOS is a Linux distribution that can be configured fully declaratively
- Discourse
- Matrix: #users:nixos.org for user support and #nix-dev:nixos.org for development
License
Nix is released under the LGPL v2.1.