add a check
All checks were successful
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.

This commit is contained in:
Abel Luck 2026-02-25 15:50:24 +01:00
parent 2c2761d8cb
commit f0f0ffcce9

View file

@ -8,8 +8,17 @@
let let
forAllSystems = nixpkgs.lib.genAttrs [ forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux" "x86_64-linux"
"aarch64-linux"
]; ];
# Discover child flake directories automatically
childFlakeDirs =
let
entries = builtins.readDir ./.;
in
builtins.filter (
name:
entries.${name} == "directory"
&& builtins.pathExists (./. + "/${name}/flake.nix")
) (builtins.attrNames entries);
in in
{ {
packages = forAllSystems ( packages = forAllSystems (
@ -37,5 +46,27 @@
program = "${self.packages.${system}.update}/bin/update-pins"; program = "${self.packages.${system}.update}/bin/update-pins";
}; };
}); });
checks = forAllSystems (
system:
builtins.listToAttrs (
map (
name:
let
lock = builtins.fromJSON (builtins.readFile (./. + "/${name}/flake.lock"));
nixpkgsNode = lock.nodes.${lock.nodes.root.inputs.nixpkgs};
nixpkgsSrc = builtins.fetchTarball {
url = "https://github.com/${nixpkgsNode.locked.owner}/${nixpkgsNode.locked.repo}/archive/${nixpkgsNode.locked.rev}.tar.gz";
sha256 = nixpkgsNode.locked.narHash;
};
pkgs = import nixpkgsSrc { inherit system; };
in
{
inherit name;
value = pkgs.matrix-synapse;
}
) childFlakeDirs
)
);
}; };
} }