ark/pkgs-set/default.nix

42 lines
760 B
Nix
Raw Normal View History

2022-04-09 21:33:13 +03:00
{
2022-05-28 16:12:53 +03:00
inputs,
2022-04-09 21:33:13 +03:00
system,
lib,
2022-08-11 05:44:58 +03:00
tlib,
2022-04-10 05:48:34 +03:00
...
2022-04-09 21:33:13 +03:00
}: let
2022-05-28 16:12:53 +03:00
l = lib;
2022-05-29 22:12:19 +03:00
overlays =
l.mapAttrsToList
(
name: _: let
o = import "${./overlays}/${name}";
in
if (l.functionArgs o) ? inputs
then o {inherit inputs;}
else o
)
(l.readDir ./overlays);
newPkgs =
l.mapAttrsToList
(
name: _: final: prev: {
${l.removeSuffix ".nix" name} =
2022-08-11 07:13:11 +03:00
final.callPackage
2022-05-29 22:12:19 +03:00
"${./pkgs}/${name}"
2022-08-11 05:44:58 +03:00
{inherit inputs tlib;};
2022-05-29 22:12:19 +03:00
}
)
(l.readDir ./pkgs);
2022-05-28 16:12:53 +03:00
pkgs = import inputs.nixpkgs {
2022-04-09 21:33:13 +03:00
inherit system;
2022-04-09 22:09:32 +03:00
config.allowUnfree = true;
2022-05-29 22:12:19 +03:00
overlays = overlays ++ newPkgs;
2022-04-09 21:33:13 +03:00
};
2022-07-01 04:45:26 +03:00
pkgsToExport = import ./pkgs-to-export.nix pkgs;
2022-04-09 21:33:13 +03:00
in
pkgs
2022-04-10 05:48:34 +03:00
// {
2022-07-01 04:45:26 +03:00
_exported = pkgsToExport;
2022-04-10 05:48:34 +03:00
}