query
On this page

getInclude

lib.getInclude

Docs pulled from | This Revision | 12 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 include output will be retrieved.

Type

getInclude :: Derivation -> Derivation

Examples

lib.attrsets.getInclude usage example

"${getInclude pkgs.openssl}"
=> "/nix/store/00000000000000000000000000000000-openssl-1.0.1r-dev"
(lib.attrsets.getInclude)

Noogle detected

Aliases

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}