ark/pkgs-set/default.nix
2024-01-23 02:11:22 +03:00

44 lines
853 B
Nix

{
inputs,
system,
lib,
tlib,
...
}: let
l = lib;
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} =
final.callPackage
"${./pkgs}/${name}"
{inherit inputs tlib;};
}
)
(l.readDir ./pkgs);
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
config.allowBroken = true;
config.permittedInsecurePackages = ["electron-25.9.0"];
overlays = overlays ++ newPkgs;
};
pkgsToExport = import ./pkgs-to-export.nix pkgs;
in
pkgs
// {
_exported = pkgsToExport;
}