serviceDefn build function handles dependencies

in a bit of a hacky way, we culd clean this up
This commit is contained in:
Daniel Barlow 2023-08-27 22:09:43 +01:00
parent 6b28f5dd79
commit 485ecc03b0

View file

@ -23,7 +23,14 @@ in {
checkTypes = t : p : typeChecked (builtins.toString path) t p;
in {
inherit parameters;
build = args : pkg (checkTypes parameters args);
build = { dependencies ? [], ... } @ args :
let
s = pkg (checkTypes parameters
(builtins.removeAttrs args ["dependencies"]));
in s.overrideAttrs (o: {
dependencies = (builtins.map (d: d.name) dependencies) ++ o.dependencies;
buildInputs = dependencies ++ o.buildInputs;
});
};
lib = {
types =