27 lines
503 B
Nix
27 lines
503 B
Nix
{
|
|
inputs,
|
|
lib,
|
|
root,
|
|
system,
|
|
util,
|
|
}:
|
|
let
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
|
|
|
packageFiles = builtins.filter (path: builtins.baseNameOf (toString path) == "package.nix") (
|
|
util.collectNixFiles (root + "/src")
|
|
);
|
|
|
|
package = packageFile: {
|
|
name = builtins.baseNameOf (toString (builtins.dirOf packageFile));
|
|
value = import packageFile {
|
|
inherit
|
|
lib
|
|
pkgs
|
|
root
|
|
;
|
|
};
|
|
};
|
|
in
|
|
builtins.listToAttrs (map package packageFiles)
|