lib.values: init getPrio

This function can be used to get the priority of all values within a module
This commit is contained in:
Johannes Kirschbauer
2024-12-04 17:37:01 +01:00
parent fb6fa46a3b
commit fca193073e
5 changed files with 327 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{ self, inputs, ... }:
let
inputOverrides = builtins.concatStringsSep " " (
builtins.map (input: " --override-input ${input} ${inputs.${input}}") (builtins.attrNames inputs)
);
in
{
perSystem =
{ pkgs, system, ... }:
{
checks = {
lib-values-eval = pkgs.runCommand "tests" { nativeBuildInputs = [ pkgs.nix-unit ]; } ''
export HOME="$(realpath .)"
nix-unit --eval-store "$HOME" \
--extra-experimental-features flakes \
${inputOverrides} \
--flake ${self}#legacyPackages.${system}.evalTests-inventory
touch $out
'';
};
};
}