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, getCyclicDependencies,
getDependencies, getDependencies,
getSource, getSource,
getSourceSpec,
produceDerivation, produceDerivation,
... ...

View File

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

View File

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