1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 13:31:48 +02:00

Merge pull request #10089 from edolstra/relative-flakes

Improve support for relative path inputs
This commit is contained in:
Eelco Dolstra 2025-01-16 14:21:27 +01:00 committed by GitHub
commit 043df13f72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 358 additions and 114 deletions

View file

@ -41,10 +41,17 @@ let
(key: node:
let
parentNode = allNodes.${getInputByPath lockFile.root node.parent};
sourceInfo =
if overrides ? ${key}
then
overrides.${key}.sourceInfo
else if node.locked.type == "path" && builtins.substring 0 1 node.locked.path != "/"
then
parentNode.sourceInfo // {
outPath = parentNode.outPath + ("/" + node.locked.path);
}
else
# FIXME: remove obsolete node.info.
# Note: lock file entries are always final.