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
- Packagedistribution-nixpkgs-1.7.1.1
- Exports3
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourcePackageMap.hs
readNixpkgPackageMap :: StringPath to nixpkgs, must be a valid nix path (absolute, relative or
NIX_PATHlookup)-> Maybe String(Optional) argument attribute set to pass to nixpkgs. Must be a valid nix attribute set.
-> 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.
readNixpkgPackageMap "<nixpkgs>" (Just "{ config = { allowAliases = false; }; }")fromList [ … ]
Finds the shortest Path in a PackageMap that has the given Identifier as its last component.
resolve nixpkgs (ident # "pam")Just (Bind (Identifier "pam") (Path [Identifier "pam"]))