mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
templates: inherit checks
from _all_ templates
This commit is contained in:
parent
53bfadc2c2
commit
e3938e9464
1 changed files with 16 additions and 13 deletions
|
@ -25,7 +25,7 @@
|
|||
args@{
|
||||
inputs,
|
||||
outputs,
|
||||
sourceInfo,
|
||||
sourceInfo ? { },
|
||||
}:
|
||||
let
|
||||
outputs = args.outputs (inputs // { self = result; });
|
||||
|
@ -39,18 +39,21 @@
|
|||
in
|
||||
result;
|
||||
|
||||
templateFlakeOutputs = callFlake {
|
||||
inputs = {
|
||||
inherit (inputs) flake-parts nixpkgs;
|
||||
nixvim = self;
|
||||
};
|
||||
# Import and read the `outputs` field of the template flake.
|
||||
inherit (import ../templates/simple/flake.nix) outputs;
|
||||
sourceInfo = { };
|
||||
};
|
||||
|
||||
templateChecks = templateFlakeOutputs.checks.${system};
|
||||
flakes = lib.mapAttrs (
|
||||
name: template:
|
||||
callFlake {
|
||||
# Use inputs from our flake
|
||||
inputs = {
|
||||
inherit (inputs) flake-parts nixpkgs;
|
||||
nixvim = self;
|
||||
};
|
||||
# Use outputs from the template flake
|
||||
inherit (import "${template.path}/flake.nix") outputs;
|
||||
}
|
||||
) self.templates;
|
||||
in
|
||||
lib.concatMapAttrs (checkName: check: { "template-${checkName}" = check; }) templateChecks;
|
||||
lib.concatMapAttrs (name: flake: {
|
||||
"template-${name}" = pkgs.linkFarm name flake.checks.${system};
|
||||
}) flakes;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue