In:
n = import <nixpkgs> {};
n contains an attribute n.pkgs, which also seems to contain all the available packages. What's the difference then between n and n.pkgs?
It seems it's related to the fixpoint semantics of Nix configuration and the availability to override some packages from nixpkgs, but I can't really wrap my head around it and find a clear distinction.
import <nixpkgs> {} gives you a pristine instance of Nixpkgs, i.e. without any user-configuration applied.
(import <nixpkgs> {}).pkgs gives you a version of Nixpkgs that has user-configured settings and overrides from ~/.nixpkgs/config.nix applied.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With