3 ms·
That's actually just a command line infelicity; the advice to use `nix-env -i foobar` is really misguided, and you can avoid excessive memory usage by doing `ni
by taktoa 7y ago
That's actually just a command line infelicity; the advice to use `nix-env -i foobar` is really misguided, and you can avoid excessive memory usage by doing `nix-env -iA nixos.foobar` (or `nixpkgs.foobar` if you are using it on a non-NixOS machine). The difference is that in the former case, `foobar` is a regular expression that is being matched against the `name` field of every package in nixpkgs, whereas in the latter case, `foobar` is an attribute path that is used to traverse the nested Nix objects that make up nixpkgs. Since Nix is lazy, the former results in evaluating a LOT of stuff, whereas the latter does not.
- kstenerud 7y agoEven if it were evaluating the entire library of Congress, there's no valid reason for it to consume gigabytes of memory. I really can't understand why this is so...