[Nix#8900] nix run does not allow passing arguments with --expr #119

Open
opened 2024-03-16 06:45:00 +00:00 by lix-bot · 0 comments
Member

Upstream-Issue: NixOS/nix#8900

Describe the bug

This works:

$ nix run -f '<nixpkgs>' re2c -- --version
re2c 3.1

This does not:

$ nix run --impure --expr 'with import <nixpkgs> {}; re2c' -- --version
error: attribute '--version' in selection path '--version' not found
       Did you mean version?

Expected behavior

I think both should work.

nix-env --version output

nix-env (Nix) 2.17.0

Priorities

Add 👍 to issues you find important.

Upstream-Issue: https://git.lix.systems/NixOS/nix/issues/8900 **Describe the bug** This works: ``` $ nix run -f '<nixpkgs>' re2c -- --version re2c 3.1 ``` This does not: ``` $ nix run --impure --expr 'with import <nixpkgs> {}; re2c' -- --version error: attribute '--version' in selection path '--version' not found Did you mean version? ``` **Expected behavior** I think both should work. **`nix-env --version` output** nix-env (Nix) 2.17.0 **Priorities** Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
lix-bot added the
bug
imported
labels 2024-03-16 06:45:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#119
No description provided.