pub-solar-os/lib/devos/mkPkgs.nix
2021-04-18 19:11:26 -05:00

28 lines
664 B
Nix

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