ark/lib/devos/mkPkgs.nix
Pacman99 562f476fb5 lib/mkPkgs: fix function arguments
take extern and overrides as arguments as to not import external files
get inputs as a function dependency from callLib
2021-03-27 10:09:05 -07:00

28 lines
660 B
Nix

{ lib, dev, nixos, self, inputs, ... }:
{ extern, overrides }:
(inputs.utils.lib.eachDefaultSystem
(system:
let
overridePkgs = dev.os.pkgImport inputs.override [ ] system;
overridesOverlay = overrides.packages;
overlays = [
(overridesOverlay overridePkgs)
self.overlay
(final: prev: {
lib = prev.lib.extend (lfinal: lprev: {
inherit dev;
inherit (lib) nixosSystem;
utils = inputs.utils.lib;
});
})
]
++ extern.overlays
++ (lib.attrValues self.overlays);
in
{ pkgs = dev.os.pkgImport nixos overlays system; }
)
).pkgs