nix eval has baffling forcing behaviour #2

Closed
opened 2024-03-03 22:49:23 +00:00 by jade · 3 comments
Owner

Describe the bug

Also fun fact, from that I learned that  `nix eval --eval --expr 'with import <nixpkgs> {}; { a = fish;  b = bash; }'  --impure` will instead of acting the same, instead it will try to evaluate all of nixpkgs and segfault

@lunaphied

If you have a problem with a specific package or NixOS,
you probably want to file an issue at https://github.com/NixOS/nixpkgs/issues.

Steps To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

nix-env --version output

Additional context

Add any other context about the problem here.

Priorities

Add 👍 to issues you find important.

**Describe the bug** ``` Also fun fact, from that I learned that `nix eval --eval --expr 'with import <nixpkgs> {}; { a = fish; b = bash; }' --impure` will instead of acting the same, instead it will try to evaluate all of nixpkgs and segfault ``` @lunaphied If you have a problem with a specific package or NixOS, you probably want to file an issue at https://github.com/NixOS/nixpkgs/issues. **Steps To Reproduce** 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **`nix-env --version` output** **Additional context** Add any other context about the problem here. **Priorities** Add :+1: to [issues you find important](https://github.com/NixOS/nix/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc).
Owner

Doesn't even need with:

nix eval --expr 'let pkgs = import <nixpkgs> {}; in { a = pkgs.fish;  b = pkgs.bash; }'  --impure
Doesn't even need `with`: ``` nix eval --expr 'let pkgs = import <nixpkgs> {}; in { a = pkgs.fish; b = pkgs.bash; }' --impure ```
Owner

Doesn't even need --expr:

nix eval nixpkgs#bash
Doesn't even need `--expr`: ``` nix eval nixpkgs#bash ```
Author
Owner

fixed by wiggles upstream, pulled in in https://gerrit.lix.systems/c/lix/+/446

fixed by wiggles upstream, pulled in in https://gerrit.lix.systems/c/lix/+/446
jade closed this issue 2024-03-10 22:20:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#2
No description provided.