-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Relative git flake inputs git+file:relative/path #12281
Copy link
Copy link
Open
Labels
bugfeatureFeature request or proposalFeature request or proposalfetchingNetworking with the outside (non-Nix) world, input lockingNetworking with the outside (non-Nix) world, input lockingidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.The given proposal has been discussed and approved by the Nix team. An implementation is welcome.
Metadata
Metadata
Assignees
Labels
bugfeatureFeature request or proposalFeature request or proposalfetchingNetworking with the outside (non-Nix) world, input lockingNetworking with the outside (non-Nix) world, input lockingidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.The given proposal has been discussed and approved by the Nix team. An implementation is welcome.
Fields
Give feedbackNo fields configured for issues without a type.
Is your feature request related to a problem?
git+file:relative/pathaccording to the process working directory instead of theflake.nixbase directory. This is unreliable. Evaluation should be invariant under the process working directory, or it would violate the ability to be used as a flake input, among other things.fetchTreedoes not have a base directory argument (and no implicit argument either, because that'd also be bad)fetchTreedoes not have the information to resolve relative paths.Solution for Flakes users
Users will be able to use a relative path reference since Nix 2.26 and they can enable submodules declaratively, planned for release in 2.27
inputs.self.submodulesflake attribute #12421For Nix 2.26, instead of
inputs.self.submodules, use:Proposed solution (for
fetchTree)fetchTreecall-flake.nix(with a primop that does it? - unclear if that's future proof enough for reproducibility)baseDirectoryargument tofetchTreeAlternative solution
Forbid altogether. This blocks some users:
git+file:./${submodule}no longer works #9708Additional context
Add 👍 to issues you find important.