mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-19 20:41:54 +03:00
php: improve getAllDependencies
This commit is contained in:
parent
39c5375a94
commit
8f7dc2ac07
@ -56,15 +56,12 @@
|
||||
makePackage = name: version: let
|
||||
dependencies = getDependencies name version;
|
||||
allDependencies = let
|
||||
getAllDependencies = deps: let
|
||||
getSubdependencies = dep: let
|
||||
subdeps = getDependencies dep.name dep.version;
|
||||
in
|
||||
getAllDependencies subdeps;
|
||||
in
|
||||
deps ++ (l.flatten (map getSubdependencies deps));
|
||||
withKey = x: x // {key = "${x.name} ${x.version}";};
|
||||
in
|
||||
getAllDependencies dependencies;
|
||||
l.genericClosure {
|
||||
startSet = map withKey dependencies;
|
||||
operator = dep: map withKey (getDependencies dep.name dep.version);
|
||||
};
|
||||
|
||||
intoRepository = dep: {
|
||||
type = "path";
|
||||
|
Loading…
Reference in New Issue
Block a user