From 2922e3082e2eb896ad7745a2c27a7140880d5231 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sun, 18 May 2025 00:37:23 +0100 Subject: [PATCH] Add release note for non-flake inputs having `sourceInfo` --- .../rl-next/outpath-and-sourceinfo-fixes.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/manual/rl-next/outpath-and-sourceinfo-fixes.md diff --git a/doc/manual/rl-next/outpath-and-sourceinfo-fixes.md b/doc/manual/rl-next/outpath-and-sourceinfo-fixes.md new file mode 100644 index 000000000..479a2f5cb --- /dev/null +++ b/doc/manual/rl-next/outpath-and-sourceinfo-fixes.md @@ -0,0 +1,17 @@ +--- +synopsis: Non-flake inputs now contain a `sourceInfo` attribute +issues: 13164 +prs: 13170 +--- + +Flakes have always a `sourceInfo` attribute which describes the source of the flake. +The `sourceInfo.outPath` is often identical to the flake's `outPath`, however it can differ when the flake is located in a subdirectory of its source. + +Non-flake inputs (i.e. inputs with `flake = false`) can also be located at some path _within_ a wider source. +This usually happens when defining a relative path input within the same source as the parent flake, e.g. `inputs.foo.url = ./some-file.nix`. +Such relative inputs will now inherit their parent's `sourceInfo`. + +This also means it is now possible to use `?dir=subdir` on non-flake inputs. + +This iterates on the work done in 2.26 to improve relative path support ([#10089](https://github.com/NixOS/nix/pull/10089)), +and resolves a regression introduced in 2.28 relating to nested relative path inputs ([#13164](https://github.com/NixOS/nix/issues/13164)).