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@{
|
args@{
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
sourceInfo,
|
sourceInfo ? { },
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
outputs = args.outputs (inputs // { self = result; });
|
outputs = args.outputs (inputs // { self = result; });
|
||||||
|
@ -39,18 +39,21 @@
|
||||||
in
|
in
|
||||||
result;
|
result;
|
||||||
|
|
||||||
templateFlakeOutputs = callFlake {
|
flakes = lib.mapAttrs (
|
||||||
inputs = {
|
name: template:
|
||||||
inherit (inputs) flake-parts nixpkgs;
|
callFlake {
|
||||||
nixvim = self;
|
# Use inputs from our flake
|
||||||
};
|
inputs = {
|
||||||
# Import and read the `outputs` field of the template flake.
|
inherit (inputs) flake-parts nixpkgs;
|
||||||
inherit (import ../templates/simple/flake.nix) outputs;
|
nixvim = self;
|
||||||
sourceInfo = { };
|
};
|
||||||
};
|
# Use outputs from the template flake
|
||||||
|
inherit (import "${template.path}/flake.nix") outputs;
|
||||||
templateChecks = templateFlakeOutputs.checks.${system};
|
}
|
||||||
|
) self.templates;
|
||||||
in
|
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