mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-30 18:15:46 +03:00
fix: indexers: always add main source to dream-lock.json
This commit is contained in:
parent
c6723cb1a5
commit
5ddce49dce
@ -11,7 +11,9 @@
|
||||
replaceRootSources = {
|
||||
dreamLock,
|
||||
newSourceRoot,
|
||||
}: let
|
||||
} @ args: let
|
||||
dreamLockLoaded = utils.readDreamLock {dreamLock = args.dreamLock;};
|
||||
iface = dreamLockLoaded.interface;
|
||||
patchVersion = version: source:
|
||||
if
|
||||
source.type
|
||||
@ -24,10 +26,18 @@
|
||||
dir = source.relPath;
|
||||
}
|
||||
else source;
|
||||
|
||||
patchedSources =
|
||||
l.mapAttrs
|
||||
(_: versions: l.mapAttrs patchVersion versions)
|
||||
dreamLock.sources;
|
||||
l.recursiveUpdate
|
||||
{
|
||||
"${iface.defaultPackageName}"."${iface.defaultPackageVersion}" =
|
||||
newSourceRoot;
|
||||
}
|
||||
(
|
||||
l.mapAttrs
|
||||
(_: versions: l.mapAttrs patchVersion versions)
|
||||
dreamLock.sources
|
||||
);
|
||||
in
|
||||
dreamLock // {sources = patchedSources;};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user