mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-30 16:57:59 +00:00
wrapper-manager-fds: put more things in flake
This commit is contained in:
parent
417247ad45
commit
d4056c82bc
4
LICENSE
4
LICENSE
@ -1,5 +1,9 @@
|
||||
Copyright (c) 2024 Gabriel Arazas <foodogsquared@foodogsquared.one>
|
||||
|
||||
Program uses the following files/implementations from other authors;
|
||||
see their respective license headers for more details:
|
||||
flake.nix, specifically the eachSystem which is taken directly from flake-utils: Copyright (c) 2020 zimbatm
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
|
36
flake.nix
36
flake.nix
@ -1,4 +1,38 @@
|
||||
{
|
||||
description = "wrapper-manager-fds flake";
|
||||
outputs = { ... }: import ./. { };
|
||||
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: let
|
||||
pkgs = import sources.nixos-unstable { inherit system; };
|
||||
tests = import ./tests { inherit pkgs; };
|
||||
in {
|
||||
devShells.default = import ./shell.nix { inherit pkgs; };
|
||||
|
||||
checks.wrapperManagerLibrarySetPkg = tests.libTestPkg;
|
||||
}));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user