You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran nix eval .#hello to see what would happen, but it just spammed the following line in my terminal forever until I pressed CTRL-C:
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
Expected behavior
I don't know the expected behaviour because I'm still learning Flakes, but whatever it is, it shouldn't spam an unhelpful error forever.
Version info
$ nix --version
nix (Nix) 2.18.1
I run NixOS 23.11
The text was updated successfully, but these errors were encountered:
nix eval is a fairly low-level command designed to directly integrate with the language, and will blindly recurse into anything. For some reason, the derivations exposed by Nixpkgs are a cyclic data structure, so trying to directly evaluate a derivation is bound to loop forever.
I think there are three paths from here (in order of preference as far as I'm concerned):
Fix Nixpkgs stdenv to not yield infinitely recursive data structures (why does it even need that?)
Do like the old nix-instantiate --eval command which didn't deeply evaluate anything by default (and had a --strict mode for that)
Keep the current behaviour.
nix eval is in the queue of commands to be stabilized (#7701), so it will soon be a good time to re-visit it
Worse. this even segfaults on my machine. Very confusing:
arian@Arians-MacBook-Pro mercury-intranet % nix eval nixpkgs#gcc
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
trace: warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
zsh: segmentation fault nix eval nixpkgs#gcc
Steps To Reproduce
I'm trying to follow a Flakes tutorial here:
https://serokell.io/blog/practical-nix-flakes#basic-flake-structure
I got to the point of a trivial Flake that just re-exports the
hello
package:I ran
nix eval .#hello
to see what would happen, but it just spammed the following line in my terminal forever until I pressed CTRL-C:Expected behavior
I don't know the expected behaviour because I'm still learning Flakes, but whatever it is, it shouldn't spam an unhelpful error forever.
Version info
I run NixOS 23.11
The text was updated successfully, but these errors were encountered: