Merge #217
217: lib/mkPkgs: don't import external files and get inputs as argument r=nrdxp a=Pacman99 Changes mkPkgs to take extern, overrides, and pkgs as an argument. This improves their ability to be used as lib functions. Co-authored-by: Pacman99 <pachum99@gmail.com>
This commit is contained in:
commit
ef1ee6e6b8
3 changed files with 13 additions and 8 deletions
|
@ -34,8 +34,11 @@
|
||||||
inherit (lib) os;
|
inherit (lib) os;
|
||||||
|
|
||||||
extern = import ./extern { inherit inputs; };
|
extern = import ./extern { inherit inputs; };
|
||||||
|
overrides = import ./overrides;
|
||||||
|
|
||||||
multiPkgs = os.mkPkgs;
|
multiPkgs = os.mkPkgs {
|
||||||
|
inherit extern overrides;
|
||||||
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
|
@ -90,7 +93,7 @@
|
||||||
packages = lib.filterPackages system legacyPackages;
|
packages = lib.filterPackages system legacyPackages;
|
||||||
|
|
||||||
devShell = import ./shell {
|
devShell = import ./shell {
|
||||||
inherit self system;
|
inherit self system extern overrides;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
{ lib, dev, nixos, self, ... }:
|
{ lib, dev, nixos, self, inputs, ... }:
|
||||||
|
|
||||||
let inherit (self) inputs;
|
{ extern, overrides }:
|
||||||
in
|
|
||||||
(inputs.utils.lib.eachDefaultSystem
|
(inputs.utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
extern = import ../../extern { inherit inputs; };
|
|
||||||
overridePkgs = dev.os.pkgImport inputs.override [ ] system;
|
overridePkgs = dev.os.pkgImport inputs.override [ ] system;
|
||||||
overridesOverlay = (import ../../overrides).packages;
|
overridesOverlay = overrides.packages;
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
{ self ? (import ../compat).defaultNix
|
{ self ? (import ../compat).defaultNix
|
||||||
, system ? builtins.currentSystem
|
, system ? builtins.currentSystem
|
||||||
|
, extern ? import ../extern { inherit (self) inputs; }
|
||||||
|
, overrides ? import ../overrides
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pkgs = (self.lib.os.mkPkgs).${system};
|
pkgs = (self.lib.os.mkPkgs {
|
||||||
|
inherit overrides extern;
|
||||||
|
}).${system};
|
||||||
|
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue