mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-18 20:11:33 +03:00
fix: sourceOverrides not applied to path sources
This commit is contained in:
parent
59754b406d
commit
3e19b05b9a
@ -151,6 +151,7 @@ let
|
||||
dreamLock,
|
||||
fetcher ? null,
|
||||
extract ? false,
|
||||
sourceOverrides ? oldSources: {},
|
||||
}@args:
|
||||
let
|
||||
# if dream lock is a file, read and parse it
|
||||
@ -163,6 +164,7 @@ let
|
||||
args.fetcher;
|
||||
|
||||
fetched = fetcher rec {
|
||||
inherit sourceOverrides;
|
||||
defaultPackage = dreamLock._generic.defaultPackage;
|
||||
defaultPackageVersion = dreamLock._generic.packages."${defaultPackage}";
|
||||
sources = dreamLock'.sources;
|
||||
@ -261,11 +263,6 @@ let
|
||||
|
||||
dreamLockInterface = (utils.readDreamLock { inherit dreamLock; }).interface;
|
||||
|
||||
fetchedSources =
|
||||
lib.recursiveUpdate
|
||||
args.fetchedSources
|
||||
(sourceOverrides args.fetchedSources);
|
||||
|
||||
produceDerivation = name: pkg:
|
||||
utils.applyOverridesToPackage {
|
||||
inherit pkg;
|
||||
@ -411,7 +408,7 @@ let
|
||||
fetcher;
|
||||
|
||||
fetchedSources = (fetchSources {
|
||||
inherit dreamLock;
|
||||
inherit dreamLock sourceOverrides;
|
||||
fetcher = fetcher';
|
||||
}).fetchedSources;
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
# sources attrset from dream lock
|
||||
defaultPackage,
|
||||
defaultPackageVersion,
|
||||
sourceOverrides,
|
||||
sources,
|
||||
...
|
||||
}:
|
||||
@ -31,7 +32,7 @@ let
|
||||
source.path
|
||||
# assume path relative to main package source
|
||||
else
|
||||
"${fetchedSources."${defaultPackage}"."${defaultPackageVersion}"}/${source.path}"
|
||||
"${overriddenSources."${defaultPackage}"."${defaultPackageVersion}"}/${source.path}"
|
||||
else if fetchers.fetchers ? "${source.type}" then
|
||||
fetchSource {
|
||||
source = source // {
|
||||
@ -43,8 +44,13 @@ let
|
||||
versions)
|
||||
sources;
|
||||
|
||||
overriddenSources =
|
||||
lib.recursiveUpdate
|
||||
fetchedSources
|
||||
(sourceOverrides fetchedSources);
|
||||
|
||||
in
|
||||
{
|
||||
# attrset: pname -> path of downloaded source
|
||||
inherit fetchedSources;
|
||||
fetchedSources = overriddenSources;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user