HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduledistribution-nixpkgs-1.7.1.1Haskell2010

Distribution.Nixpkgs.PackageMap

Build a lookup table from package identifiers to full attribute paths in nixpkgs.

  • 1 type
  • 2 values
valuereadNixpkgPackageMap
  1. :: String

    Path to nixpkgs, must be a valid nix path (absolute, relative or NIX_PATH lookup)

  2. -> Maybe String

    (Optional) argument attribute set to pass to nixpkgs. Must be a valid nix attribute set.

  3. -> IO PackageMap
#

Evaluate nixpkgs at a given (nix) path and build a Map keeping track of all Paths that end in a given Identifier and evaluate to a derivation. This can be used to find an attribute Path for an arbitrary package name using resolve.

Note: Evaluation of nixpkgs is very expensive (takes multiple seconds), so cache the result of this function if possible.

Example1 expression
readNixpkgPackageMap "<nixpkgs>" (Just "{ config = { allowAliases = false; }; }")fromList [ … ]