2024-07-16 10:50:29 +00:00
|
|
|
# As a design restriction, this flake shouldn't have any inputs whatsoever.
|
|
|
|
# We're already using the Nix projects through pinning with npins.
|
2024-07-02 11:39:25 +00:00
|
|
|
{
|
|
|
|
description = "wrapper-manager-fds flake";
|
2024-07-31 13:51:40 +00:00
|
|
|
outputs =
|
|
|
|
{ ... }:
|
|
|
|
let
|
|
|
|
sources = import ./npins;
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
|
|
|
eachSystem =
|
|
|
|
systems: f:
|
|
|
|
let
|
|
|
|
# Merge together the outputs for all systems.
|
|
|
|
op =
|
|
|
|
attrs: system:
|
|
|
|
let
|
|
|
|
ret = f system;
|
|
|
|
op =
|
|
|
|
attrs: key:
|
|
|
|
attrs
|
|
|
|
// {
|
|
|
|
${key} = (attrs.${key} or { }) // {
|
|
|
|
${system} = ret.${key};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
builtins.foldl' op attrs (builtins.attrNames ret);
|
|
|
|
in
|
|
|
|
builtins.foldl' op { } (
|
|
|
|
systems
|
|
|
|
# add the current system if --impure is used
|
|
|
|
++ (
|
|
|
|
if builtins ? currentSystem then
|
|
|
|
if builtins.elem builtins.currentSystem systems then [ ] else [ builtins.currentSystem ]
|
|
|
|
else
|
|
|
|
[ ]
|
|
|
|
)
|
|
|
|
);
|
|
|
|
in
|
|
|
|
import ./. { }
|
|
|
|
// (eachSystem systems (
|
|
|
|
system:
|
2024-07-14 03:13:08 +00:00
|
|
|
let
|
2024-07-31 13:51:40 +00:00
|
|
|
pkgs = import sources.nixos-unstable { inherit system; };
|
2024-09-21 11:32:08 +00:00
|
|
|
inherit (pkgs) lib;
|
2024-07-31 13:51:40 +00:00
|
|
|
tests = import ./tests { inherit pkgs; };
|
|
|
|
docs = import ./docs { inherit pkgs; };
|
2024-07-14 03:13:08 +00:00
|
|
|
in
|
2024-07-31 13:51:40 +00:00
|
|
|
{
|
|
|
|
devShells = {
|
|
|
|
default = import ./shell.nix { inherit pkgs; };
|
|
|
|
website = import ./docs/website/shell.nix { inherit pkgs; };
|
|
|
|
};
|
2024-07-14 03:14:22 +00:00
|
|
|
|
2024-09-22 07:41:22 +00:00
|
|
|
devPackages = {
|
2024-07-31 13:51:40 +00:00
|
|
|
manpage-reference = docs.outputs.manpage;
|
|
|
|
html-reference = docs.outputs.html;
|
2024-11-21 05:16:35 +00:00
|
|
|
website = docs.website { };
|
2024-07-31 13:51:40 +00:00
|
|
|
};
|
2024-07-14 03:13:08 +00:00
|
|
|
|
2025-01-12 09:58:39 +00:00
|
|
|
checks = {
|
|
|
|
inherit (tests) lib;
|
|
|
|
} // lib.mapAttrs' (n: v: lib.nameValuePair "config-test-${n}" v) tests.configs;
|
2024-07-31 13:51:40 +00:00
|
|
|
}
|
|
|
|
));
|
2024-07-02 11:39:25 +00:00
|
|
|
}
|