Skip to content

feat(cli): add --tree flag for evaluating a Nix file from a fetchTree URL - #15658

Open
KiaraGrouwstra wants to merge 1 commit into
NixOS:masterfrom
KiaraGrouwstra:cli-flag-tree
Open

KiaraGrouwstra wants to merge 1 commit into
NixOS:masterfrom
KiaraGrouwstra:cli-flag-tree

Conversation

@KiaraGrouwstra

Copy link
Copy Markdown
Contributor

provides for a non-flake way to use fetchtree by cli.
works with both v3 and v2 commands.

usage:

# v2
nix-instantiate --extra-experimental-features 'fetch-tree' --eval --tree 'github:NixOS/nixpkgs' -A lib.version
nix-build --extra-experimental-features 'fetch-tree' --no-out-link --tree 'github:NixOS/nixpkgs' -A hello
nix-shell --extra-experimental-features 'fetch-tree' --tree 'github:NixOS/nixpkgs' -A hello --run 'hello'
# v3
nix --extra-experimental-features 'nix-command fetch-tree' eval --tree 'github:NixOS/nixpkgs' lib.version

(fetch-tree is implied in flakes)

Motivation

closes #10047.

Context

disclaimer i used a coding agent in the creation of this patch.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions Bot added documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority labels Apr 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a --tree cli flag for evaluating a Nix file from an arbitrary fetchTree URL

1 participant