fix mkPackages

move "lint" command to /packages
This commit is contained in:
Gerg-L 2023-12-10 17:01:30 -05:00
parent 7f33afb985
commit a132ccf4b6
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
4 changed files with 71 additions and 88 deletions

View file

@ -127,29 +127,25 @@ rec {
(lib.mapAttrs (
n: _:
let
addArgs =
x:
lib.setFunctionArgs x (
lib.mapAttrs
(
n: v:
{
inherit inputs self;
#sources = import ../npins;
}
.${n} or v
)
(lib.functionArgs x)
);
callPackage = lib.callPackageWith (
pkgs
// {
inherit inputs;
# maybe add self?
# inherit self;
# npins sources if i need them
# sources = import ./npins;
}
);
in
if builtins.pathExists "${path}/${n}/call.nix" then
let
x = import "${path}/${n}/call.nix" pkgs;
in
(addArgs x.callPackage "${path}/${n}/package.nix") x.args
x.callPackage "${path}/${n}/package.nix" x.args
else
(addArgs pkgs.callPackage "${path}/${n}/package.nix") {}
callPackage "${path}/${n}/package.nix" {}
))
];