-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
idea 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.new-cliRelating to the "nix" commandRelating to the "nix" command
Milestone
Description
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 inimport /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 expressione
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.
Metadata
Metadata
Assignees
Labels
idea 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.new-cliRelating to the "nix" commandRelating to the "nix" command
Type
Projects
Status
Defined work