Files
Enzime 130b619cee
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
gitea-mq/buildbot/nix-eval Build done.
gitea-mq/buildbot/nix-build Build done.
gitea-mq Merge queue passed
checks/vars: speed up
2026-06-08 23:12:05 +02:00

54 lines
1.4 KiB
Nix

{
self,
inputs,
...
}:
{
perSystem =
{
inputs',
pkgs,
lib,
...
}:
{
checks = lib.optionalAttrs (!pkgs.stdenv.hostPlatform.isDarwin) {
vars =
let
# Recursively collect all flake inputs including transitive ones
allInputPaths = map (x: x.key) (
lib.genericClosure {
startSet = lib.mapAttrsToList (_: input: {
key = input.outPath or input;
inherit input;
}) inputs;
operator =
{ input, ... }:
lib.mapAttrsToList (_: i: {
key = i.outPath or i;
input = i;
}) (input.inputs or { });
}
);
in
pkgs.runCommand "check-vars"
{
nativeBuildInputs = [
inputs'.clan-core.packages.default
pkgs.nixVersions.latest
pkgs.sops
];
env.closureInfo = pkgs.closureInfo { rootPaths = allInputPaths; };
}
''
${inputs'.clan-core.legacyPackages.setupNixInNix}
mkdir -p self
cp -r --no-target-directory ${self} self
clan vars check --flake ./self --debug
clan vars fix --flake ./self --debug
touch $out
'';
};
};
}