mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-03 01:25:22 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -1,8 +1,5 @@
|
|||
{ self, inputs, ... }:
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake.templates = {
|
||||
default = {
|
||||
path = ../templates/simple;
|
||||
|
@ -12,49 +9,48 @@
|
|||
|
||||
# The following adds the template flake's checks to the main (current) flake's checks.
|
||||
# It ensures that the template's own checks are successful.
|
||||
perSystem = {
|
||||
pkgs,
|
||||
system,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
checks = let
|
||||
# Approximates https://github.com/NixOS/nix/blob/7cd08ae379746749506f2e33c3baeb49b58299b8/src/libexpr/flake/call-flake.nix#L46
|
||||
# s/flake.outputs/args.outputs/
|
||||
callFlake = args @ {
|
||||
inputs,
|
||||
outputs,
|
||||
sourceInfo,
|
||||
}: let
|
||||
outputs = args.outputs (inputs // {self = result;});
|
||||
result =
|
||||
outputs
|
||||
// sourceInfo
|
||||
// {
|
||||
inherit inputs outputs sourceInfo;
|
||||
_type = "flake";
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
system,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
checks =
|
||||
let
|
||||
# Approximates https://github.com/NixOS/nix/blob/7cd08ae379746749506f2e33c3baeb49b58299b8/src/libexpr/flake/call-flake.nix#L46
|
||||
# s/flake.outputs/args.outputs/
|
||||
callFlake =
|
||||
args@{
|
||||
inputs,
|
||||
outputs,
|
||||
sourceInfo,
|
||||
}:
|
||||
let
|
||||
outputs = args.outputs (inputs // { self = result; });
|
||||
result =
|
||||
outputs
|
||||
// sourceInfo
|
||||
// {
|
||||
inherit inputs outputs sourceInfo;
|
||||
_type = "flake";
|
||||
};
|
||||
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 = { };
|
||||
};
|
||||
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};
|
||||
in
|
||||
lib.concatMapAttrs
|
||||
(
|
||||
checkName: check: {
|
||||
"template-${checkName}" = check;
|
||||
}
|
||||
)
|
||||
templateChecks;
|
||||
};
|
||||
templateChecks = templateFlakeOutputs.checks.${system};
|
||||
in
|
||||
lib.concatMapAttrs (checkName: check: { "template-${checkName}" = check; }) templateChecks;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue