lix/src/nix/flake-check.md
raito b8cb7abcf0 chore: rebrand Nix to Lix when it makes sense
Here's my guide so far:

$ rg '((?!(recursive).*) Nix
(?!(daemon|store|expression|Rocks!|Packages|language|derivation|archive|account|user|sandbox|flake).*))'
-g '!doc/' --pcre2

All items from this query have been tackled. For the documentation side:
that's for #162.

Additionally, all remaining references to github.com/NixOS/nix which
were not relevant were also replaced.

Fixes: #148.
Fixes: #162.
Change-Id: Ib3451fae5cb8ab8cd9ac9e4e4551284ee6794545
Signed-off-by: Raito Bezarius <raito@lix.systems>
2024-06-01 20:31:24 +02:00

1.8 KiB

R""(

Examples

  • Evaluate the flake in the current directory, and build its checks:

    # nix flake check
    
  • Verify that the patchelf flake 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, Lix 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.name
  • defaultPackage.system
  • devShell.system
  • devShells.system.name
  • nixosConfigurations.name.config.system.build.toplevel
  • packages.system.name

The following flake output attributes must be app definitions:

  • apps.system.name
  • defaultApp.system

The following flake output attributes must be template definitions:

  • defaultTemplate
  • templates.name

The following flake output attributes must be Nixpkgs overlays:

  • overlay
  • overlays.name

The following flake output attributes must be NixOS modules:

  • nixosModule
  • nixosModules.name

The following flake output attributes must be bundlers:

  • bundlers.name
  • defaultBundler

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 .

)""