query
On this page

callPackageWith

lib.customisation.callPackageWith



Call the package function in the file fn with the required arguments automatically. The function is called with the arguments args, but any missing arguments are obtained from autoArgs. This function is intended to be partially parameterised, e.g.,

callPackage = callPackageWith pkgs;
pkgs = {
libfoo = callPackage ./foo.nix { };
libbar = callPackage ./bar.nix { };
};

If the libbar function expects an argument named libfoo, it is automatically passed as an argument. Overrides or missing arguments can be supplied in args, e.g.

libbar = callPackage ./bar.nix {
libfoo = null;
enableX11 = true;
};

Type

callPackageWith :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a

Arguments

  • [autoArgs]
  • [fn]
  • [args]

Noogle also knows

Aliases