[Nix-dev] Scoping with, rec - shouldn't it be more intuitive?

Marc Weber marco-oweber at gmx.de
Sun Aug 10 19:23:38 CEST 2008


example:

        let pkgs = {
          postfix = "postfix";
        }; in
        rec {
          config = {
            extraPackages = (with pkgs; [ postfix ]);
          };
          postfix = "dummy";
        }.config


results in
|| Attrs([Bind("extraPackages",List([Str("dummy",[])]),NoPos)])
I would have expected postfix beeing taken from pkgs here!

the way it is just feels wrong to me.

Should we change this?

Marc Weber



More information about the nix-dev mailing list