When package sets are written like gitAndTools
:
/* All git-relates tools live here, in a separate attribute set so that users
* can get a fast overview over what's available.
*/
args @ {config, lib, pkgs}: with args; with pkgs;
let
gitBase = callPackage ./git { ... };
self = rec {
git = appendToName "minimal" gitBase;
gitFull = gitBase.override { ... };
};
in
self
…it becomes really annoying to try and override the definition of gitBase
or whatever local bindings are defined, because you have to do so for every attribute in the set that uses the binding; and there’s really no reason not to expose the binding so it can be overridden. It doesn’t reduce closure sizes, and we’re already in a scope so it’s not polluting the top level.
In general, I wish for a convention that any binding made with callPackage
should be exposed to the top level of the scope in which it’s used. emacs-packages.nix
is an egregious offender.