getInclude
lib.attrsets.getInclude
Docs pulled from | This Revision | 11 minutes ago
Nixpkgs manual
Get a package's include output.
If the output does not exist, fallback to .dev, then to .out, and then to the default.
Inputs
pkg-
The package whose
includeoutput will be retrieved.
Type
getInclude :: Derivation -> Derivation
Examples
lib.attrsets.getInclude usage example
"${getInclude pkgs.openssl}"
=> "/nix/store/00000000000000000000000000000000-openssl-1.0.1r-dev"
Noogle detected
Implementation
The following is the current implementation of this function.
pkg:
let
outputs = builtins.filter (name: hasAttr name pkg) candidates;
output = builtins.head outputs;
in
if pkg.outputSpecified or false || outputs == [ ] then pkg else pkg.${output}