getStatic
lib.attrsets.getStatic
Docs pulled from | This Revision | 11 minutes ago
Nixpkgs manual
Get a package's static output.
If the output does not exist, fallback to .lib, then to .out, and then to the default.
Inputs
pkg-
The package whose
staticoutput will be retrieved.
Type
getStatic :: Derivation -> Derivation
Examples
lib.attrsets.getStatic usage example
"${lib.getStatic pkgs.glibc}"
=> "/nix/store/00000000000000000000000000000000-glibc-2.39-52-static"
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}