feat: add getSourceSpec

This commit is contained in:
Yusuf Bera Ertan 2022-01-08 13:30:39 +03:00
parent 1d8fc17b93
commit c9ea0f7c13
No known key found for this signature in database
GPG Key ID: 1D8F8FAF2294D6EA
3 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,7 @@
getCyclicDependencies,
getDependencies,
getSource,
getSourceSpec,
produceDerivation,
...

View File

@ -302,6 +302,7 @@ let
inherit (dreamLockInterface)
subsystemAttrs
getSourceSpec
getDependencies
getCyclicDependencies
mainPackageName

View File

@ -77,6 +77,9 @@ let
cyclicDependencies = lock.cyclicDependencies;
getSourceSpec = pname: version:
sources."${pname}"."${version}" or {};
getDependencies = pname: version:
b.filter
(dep: ! b.elem dep cyclicDependencies."${pname}"."${version}" or [])
@ -96,6 +99,7 @@ let
subsystemAttrs
getCyclicDependencies
getDependencies
getSourceSpec
packageVersions
subDreamLocks
;