mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 11:10:03 +00:00
lib: add getStatic
This commit is contained in:
parent
76db6ba81a
commit
98384afab5
|
@ -1901,6 +1901,35 @@ rec {
|
||||||
*/
|
*/
|
||||||
getLib = getOutput "lib";
|
getLib = getOutput "lib";
|
||||||
|
|
||||||
|
/**
|
||||||
|
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 `static` output will be retrieved.
|
||||||
|
|
||||||
|
# Type
|
||||||
|
|
||||||
|
```
|
||||||
|
getStatic :: Derivation -> Derivation
|
||||||
|
```
|
||||||
|
|
||||||
|
# Examples
|
||||||
|
:::{.example}
|
||||||
|
## `lib.attrsets.getStatic` usage example
|
||||||
|
|
||||||
|
```nix
|
||||||
|
"${lib.getStatic pkgs.glibc}"
|
||||||
|
=> "/nix/store/00000000000000000000000000000000-glibc-2.39-52-static"
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
*/
|
||||||
|
getStatic = getFirstOutput [ "static" "lib" "out" ];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get a package's `dev` output.
|
Get a package's `dev` output.
|
||||||
|
|
|
@ -87,7 +87,7 @@ let
|
||||||
mapAttrsRecursiveCond genAttrs isDerivation toDerivation optionalAttrs
|
mapAttrsRecursiveCond genAttrs isDerivation toDerivation optionalAttrs
|
||||||
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil
|
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil
|
||||||
recursiveUpdate matchAttrs mergeAttrsList overrideExisting showAttrPath getOutput getFirstOutput
|
recursiveUpdate matchAttrs mergeAttrsList overrideExisting showAttrPath getOutput getFirstOutput
|
||||||
getBin getLib getDev getInclude getMan chooseDevOutputs zipWithNames zip
|
getBin getLib getStatic getDev getInclude getMan chooseDevOutputs zipWithNames zip
|
||||||
recurseIntoAttrs dontRecurseIntoAttrs cartesianProduct cartesianProductOfSets
|
recurseIntoAttrs dontRecurseIntoAttrs cartesianProduct cartesianProductOfSets
|
||||||
mapCartesianProduct updateManyAttrsByPath listToAttrs hasAttr getAttr isAttrs intersectAttrs removeAttrs;
|
mapCartesianProduct updateManyAttrsByPath listToAttrs hasAttr getAttr isAttrs intersectAttrs removeAttrs;
|
||||||
inherit (self.lists) singleton forEach map foldr fold foldl foldl' imap0 imap1
|
inherit (self.lists) singleton forEach map foldr fold foldl foldl' imap0 imap1
|
||||||
|
|
Loading…
Reference in a new issue