add a check
This commit is contained in:
parent
2c2761d8cb
commit
f0f0ffcce9
1 changed files with 32 additions and 1 deletions
33
flake.nix
33
flake.nix
|
|
@ -8,8 +8,17 @@
|
|||
let
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"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
|
||||
{
|
||||
packages = forAllSystems (
|
||||
|
|
@ -37,5 +46,27 @@
|
|||
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
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue