[Nix-dev] What does `self` mean in the function `ghcWithPackages`?
roconnor at theorem.ca
roconnor at theorem.ca
Tue Dec 16 15:40:29 CET 2014
Hi, if you are familiar with fixpoints, then the following blog post may
be helpful in understanding this pattern:
http://r6.ca/blog/20140422T142911Z.html
On Tue, 16 Dec 2014, Carlo Nucera wrote:
> 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
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
--
Russell O'Connor <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
More information about the nix-dev
mailing list