You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a --tree cli flag for evaluating a Nix file from an arbitrary fetchTree URL #10047
cliThe old and/or new command line interfacefeatureFeature request or proposalidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.
One of the killer features of flakes is Flakerefs which allow to directly refer to a – potentially remote – Nix expression from the command-line very concisely (nix run nixpkgs#hello).
Most of that is however not flake-specific, but just pertains to the fetchers infrastructure which gives this URL-ish syntax for accessing remote resources1.
We can easily bring that to old-style Nix expressions with a new CLI syntax --tree <treeRef>#attr.path that would be morally equivalent to --file $(nix flake prefetch <treeRef>) attr.path.
We can then remove the NIX_PATH=flake:<flakeref> hack as it won't be needed any more (removing it is OK because although it's exposed to the old CLI, it depends on Flakes to be enabled).
Footnotes
There is actually a hack that allows having flake:<flakeref> in NIX_PATH to fetch a remote fetcher ref from the network without really using flakes ↩
Reacted by Robert Hensing and kiara
Reacted by John Ericson, Josef Kemetmüller and kiara
cliThe old and/or new command line interfacefeatureFeature request or proposalidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.
Activity
nixos-discourse commentedon Feb 26, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2024-02-19-nix-team-meeting-minutes-126/40308/1