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

28 lines
676 B
Nix

{ lib, dev, nixpkgs, userSelf, 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)
userSelf.overlay
]
++ extern.overlays
++ (lib.attrValues userSelf.overlays);
in
{ pkgs = dev.os.pkgImport nixpkgs overlays system; }
)
).pkgs