mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-09-11 14:35:30 +03:00
fix(rust): don't replace path deps if they are already in source
This commit is contained in:
parent
9331fb1376
commit
fcdb3dfa6b
@ -231,8 +231,18 @@ in {
|
||||
value = dlib.sanitizeRelativePath "${package.relPath}/${dep.path}";
|
||||
};
|
||||
replacements = l.listToAttrs (l.map makeReplacement outsideDeps);
|
||||
# filter out replacements which won't replace anything
|
||||
# this means that the path doesn't need to be replaced because it's
|
||||
# already in the source that we are building
|
||||
filtered =
|
||||
l.filterAttrs
|
||||
(
|
||||
n: v:
|
||||
(l.removeSuffix "/" (l.removePrefix "./" n)) != v
|
||||
)
|
||||
replacements;
|
||||
in
|
||||
replacements;
|
||||
filtered;
|
||||
# find replacements for all packages we export
|
||||
allPackageReplacements =
|
||||
l.map
|
||||
|
Loading…
Reference in New Issue
Block a user