nix3-flake-check - Man Page
check whether the flake evaluates and run its tests
Warning
This program is experimental and its interface is subject to change.
Synopsis
nix flake check [option…] flake-url
Examples
- Evaluate the flake in the current directory, and build its checks:
# nix flake check
- Verify that the
patchelfflake evaluates, but don’t build its checks:
# nix flake check --no-build github:NixOS/patchelf
Description
This command verifies that the flake specified by flake reference flake-url can be evaluated successfully (as detailed below), and that the derivations specified by the flake’s checks output can be built successfully.
If the keep-going option is set to true, Nix will keep evaluating as much as it can and report the errors as it encounters them. Otherwise it will stop at the first error.
Evaluation checks
The following flake output attributes must be derivations:
checks.system.namedefaultPackage.systemdevShell.systemdevShells.system.namenixosConfigurations.name.config.system.build.toplevelpackages.system.name
The following flake output attributes must be app definitions :
apps.system.namedefaultApp.system
The following flake output attributes must be template definitions :
defaultTemplatetemplates.name
The following flake output attributes must be Nixpkgs overlays:
overlayoverlays.name
The following flake output attributes must be NixOS modules:
nixosModulenixosModules.name
The following flake output attributes must be bundlers :
bundlers.namedefaultBundler
In addition, the hydraJobs output is evaluated in the same way as Hydra’s hydra-eval-jobs (i.e. as a arbitrarily deeply nested attribute set of derivations). Similarly, the legacyPackages.system output is evaluated like nix-env --query --available.
Options
--all-systemsCheck the outputs for all systems.
--no-buildDo not build checks.
Common evaluation options
--argname exprPass the value expr as the argument name to Nix functions.
--arg-from-filename pathPass the contents of file path as the argument name to Nix functions.
--arg-from-stdinnamePass the contents of stdin as the argument name to Nix functions.
--argstrname stringPass the string string as the argument name to Nix functions.
--debuggerStart an interactive environment if evaluation fails.
--eval-storestore-urlThe URL of the Nix store to use for evaluation, i.e. to store derivations (
.drvfiles) and inputs referenced by them.--impureAllow access to mutable paths and repositories.
--include/-IpathAdd path to search path entries used to resolve lookup paths
This option may be given multiple times.
Paths added through
-Itake precedence over thenix-pathconfiguration setting and theNIX_PATHenvironment variable .--override-flakeoriginal-ref resolved-refOverride the flake registries, redirecting original-ref to resolved-ref.
Miscellaneous global options
--helpShow usage information.
--offlineDisable substituters and consider all previously downloaded files up-to-date.
--optionname valueSet the Nix configuration setting name to value (overriding
nix.conf).--refreshConsider all previously downloaded files out-of-date.
--repairDuring evaluation, rewrite missing or corrupted files in the Nix store. During building, rebuild missing or corrupted store paths.
--versionShow version information.
Note
See
man nix.conffor overriding configuration settings with command line flags.