[Nix-dev] What does `self` mean in the function `ghcWithPackages`?

Carlo Nucera meditans at gmail.com
Tue Dec 16 03:30:03 CET 2014


Hi all,
I was reading the sources of ghcWithPackages:

ghcWithPackages = pkgs : callPackage
../development/compilers/ghc/with-packages.nix {
  ghc = ghc;                  # refers to ghcPlain
  packages = pkgs self;
  ignoreCollisions = false;
}

In the line `packages = pkgs self;` what does `self` refer to?

I gather that pkgs, the value we should pass to ghcWithPackages, has
to be a function, to be called on self;
but what should this function do?

Best regards
Carlo Nucera


More information about the nix-dev mailing list