mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
(WIP) srcOnly: Add noogle-compatible documentation
This commit is contained in:
parent
1463fe69c6
commit
28ee6e7979
@ -1,12 +1,39 @@
|
||||
{ lib, stdenvNoCC }:
|
||||
|
||||
# srcOnly is a utility builder that only fetches and unpacks the given `src`,
|
||||
# and optionally patching with `patches` or adding build inputs.
|
||||
#
|
||||
# It can be invoked directly, or be used to wrap an existing derivation. Eg:
|
||||
#
|
||||
# > srcOnly pkgs.hello
|
||||
#
|
||||
/**
|
||||
A utility builder to get the source code of the input derivation, with any patches applied.
|
||||
|
||||
# Examples
|
||||
|
||||
```nix
|
||||
srcOnly pkgs.hello
|
||||
=> «derivation /nix/store/gyfk2jg9079ga5g5gfms5i4h0k9jhf0f-hello-2.12.1-source.drv»
|
||||
|
||||
srcOnly {
|
||||
inherit (pkgs.hello) name version src stdenv;
|
||||
}
|
||||
=> «derivation /nix/store/vf9hdhz38z7rfhzhrk0vi70h755fnsw7-hello-2.12.1-source.drv»
|
||||
```
|
||||
|
||||
# Type
|
||||
|
||||
```
|
||||
srcOnly :: (Derivation | AttrSet) -> Derivation
|
||||
```
|
||||
|
||||
# Input
|
||||
|
||||
`attrs`
|
||||
|
||||
: One of the following:
|
||||
|
||||
- A derivation with (at minimum) an unpackPhase and a patchPhase.
|
||||
- A set of attributes that would be passed to a `stdenv.mkDerivation` or `stdenvNoCC.mkDerivation` call.
|
||||
|
||||
# Output
|
||||
|
||||
A derivation that runs a derivation's `unpackPhase` and `patchPhase`, and then copies the result to the output path.
|
||||
*/
|
||||
|
||||
attrs:
|
||||
let
|
||||
|
Loading…
Reference in New Issue
Block a user