.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-flake-check" "1" "" .PP \fBWarning\fR: This program is \fBexperimental\fR and its interface is subject to change. .SH Name \fCnix flake check\fR - check whether the flake evaluates and run its tests .SH Synopsis \fCnix flake check\fR [\fIoption\fR\[u2026]] \fIflake-url\fR .SH Examples .IP "\(bu" 2 Evaluate the flake in the current directory, and build its checks: .LP .EX # nix flake check .EE .IP "\(bu" 2 Verify that the \fCpatchelf\fR flake evaluates, but don\[u2019]t build its checks: .LP .EX # nix flake check --no-build github:NixOS/patchelf .EE .SH Description This command verifies that the flake specified by flake reference \fIflake-url\fR can be evaluated successfully (as detailed below), and that the derivations specified by the flake\[u2019]s \fCchecks\fR output can be built successfully. .PP If the \fCkeep-going\fR option is set to \fCtrue\fR, 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. .SH Evaluation checks The following flake output attributes must be derivations: .IP "\(bu" 2 \fCchecks.\fR\fIsystem\fR\fC.\fR\fIname\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCdefaultPackage.\fR\fIsystem\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCdevShell.\fR\fIsystem\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCdevShells.\fR\fIsystem\fR\fC.\fR\fIname\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCnixosConfigurations.\fR\fIname\fR\fC.config.system.build.toplevel\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCpackages.\fR\fIsystem\fR\fC.\fR\fIname\fR .LP The following flake output attributes must be \fBapp definitions\fR (\fI./nix3-run.md\fR): .IP "\(bu" 2 \fCapps.\fR\fIsystem\fR\fC.\fR\fIname\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCdefaultApp.\fR\fIsystem\fR .LP The following flake output attributes must be \fBtemplate definitions\fR (\fI./nix3-flake-init.md\fR): .IP "\(bu" 2 \fCdefaultTemplate\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCtemplates.\fR\fIname\fR .LP The following flake output attributes must be \fINixpkgs overlays\fR: .IP "\(bu" 2 \fCoverlay\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCoverlays.\fR\fIname\fR .LP The following flake output attributes must be \fINixOS modules\fR: .IP "\(bu" 2 \fCnixosModule\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCnixosModules.\fR\fIname\fR .LP The following flake output attributes must be \fBbundlers\fR (\fI./nix3-bundle.md\fR): .IP "\(bu" 2 \fCbundlers.\fR\fIname\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 \fCdefaultBundler\fR .LP In addition, the \fChydraJobs\fR output is evaluated in the same way as Hydra\[u2019]s \fChydra-eval-jobs\fR (i.e. as a arbitrarily deeply nested attribute set of derivations). Similarly, the \fClegacyPackages\fR.\fIsystem\fR output is evaluated like \fCnix-env -qa\fR. .SH Options .IP "\(bu" 2 \fC--no-build\fR .br Do not build checks. .LP \fBCommon evaluation options:\fR .IP "\(bu" 2 \fC--arg\fR \fIname\fR \fIexpr\fR .br Pass the value \fIexpr\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 2 \fC--argstr\fR \fIname\fR \fIstring\fR .br Pass the string \fIstring\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 2 \fC--eval-store\fR \fIstore-url\fR .br The Nix store to use for evaluations. .IP "\(bu" 2 \fC--impure\fR .br Allow access to mutable paths and repositories. .IP "\(bu" 2 \fC--include\fR / \fC-I\fR \fIpath\fR .br Add \fIpath\fR to the list of locations used to look up \fC<...>\fR file names. .IP "\(bu" 2 \fC--override-flake\fR \fIoriginal-ref\fR \fIresolved-ref\fR .br Override the flake registries, redirecting \fIoriginal-ref\fR to \fIresolved-ref\fR. .LP \fBCommon flake-related options:\fR .IP "\(bu" 2 \fC--commit-lock-file\fR .br Commit changes to the flake\[u2019]s lock file. .IP "\(bu" 2 \fC--inputs-from\fR \fIflake-url\fR .br Use the inputs of the specified flake as registry entries. .IP "\(bu" 2 \fC--no-registries\fR .br Don\[u2019]t allow lookups in the flake registries. This option is deprecated; use \fC--no-use-registries\fR. .IP "\(bu" 2 \fC--no-update-lock-file\fR .br Do not allow any updates to the flake\[u2019]s lock file. .IP "\(bu" 2 \fC--no-write-lock-file\fR .br Do not write the flake\[u2019]s newly generated lock file. .IP "\(bu" 2 \fC--override-input\fR \fIinput-path\fR \fIflake-url\fR .br Override a specific flake input (e.g. \fCdwarffs/nixpkgs\fR). This implies \fC--no-write-lock-file\fR. .IP "\(bu" 2 \fC--recreate-lock-file\fR .br Recreate the flake\[u2019]s lock file from scratch. .IP "\(bu" 2 \fC--update-input\fR \fIinput-path\fR .br Update a specific flake input (ignoring its previous entry in the lock file).