Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize the (non-flakes) installable syntax #10046

Open
thufschmitt opened this issue Feb 20, 2024 · 3 comments
Open

Stabilize the (non-flakes) installable syntax #10046

thufschmitt opened this issue Feb 20, 2024 · 3 comments
Labels
idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. new-cli Relating to the "nix" command

Comments

@thufschmitt
Copy link
Member

Part of #7701.

The syntax for non-flakes installables isn't optimal, and probably not exactly what we want to stabilize.
After considering various options and asking about them, we settled on the second one, namely:

  • By default, positional arguments are not allowed on the command-line (or parsed as flake references when flakes are enabled)
  • After encountering --file /some/file.nix, the CLI parser interprets every positional argument as an attribute path in import /some/file.nix until the next --file/--expr(/--flake) argument
  • After encountering --expr e, the CLI parser interprets every positional argument as an attribute path in the nix expression e until the next --file/--expr(/--flake) argument
  • (After encountering --flake, the CLI parser interprets every positional argument as a flake reference until the next --file/--expr/--flake argument)

with the parenthesized bits corresponding to the behaviour with flakes enabled.

This new behaviour is open for implementation to anyone who would want to give it a stab.

@thufschmitt thufschmitt added new-cli Relating to the "nix" command idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. labels Feb 20, 2024
@thufschmitt thufschmitt added this to the CLI Stabilisation milestone Feb 20, 2024
@Ericson2314
Copy link
Member

(See also #10047)

@nixos-discourse
Copy link

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

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-55/40996/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. new-cli Relating to the "nix" command
Projects
Status: Defined work
Development

No branches or pull requests

3 participants