mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-19 02:24:30 +00:00
Doc: init stdenv.mkDerivation doc-comment (#343031)
This commit is contained in:
commit
039db25806
@ -42,6 +42,24 @@ let
|
|||||||
inherit (import ../../build-support/lib/cmake.nix { inherit lib stdenv; }) makeCMakeFlags;
|
inherit (import ../../build-support/lib/cmake.nix { inherit lib stdenv; }) makeCMakeFlags;
|
||||||
inherit (import ../../build-support/lib/meson.nix { inherit lib stdenv; }) makeMesonFlags;
|
inherit (import ../../build-support/lib/meson.nix { inherit lib stdenv; }) makeMesonFlags;
|
||||||
|
|
||||||
|
/**
|
||||||
|
This function creates a derivation, and returns it in the form of a [package attribute set](https://nix.dev/manual/nix/latest/glossary#package-attribute-set)
|
||||||
|
that refers to the derivation's outputs.
|
||||||
|
|
||||||
|
`mkDerivation` takes many argument attributes, most of which affect the derivation environment,
|
||||||
|
but [`meta`](#chap-meta) and [`passthru`](#var-stdenv-passthru) only directly affect package attributes.
|
||||||
|
|
||||||
|
The `mkDerivation` argument attributes can be made to refer to one another by passing a function to `mkDerivation`.
|
||||||
|
See [Fixed-point argument of `mkDerivation`](#mkderivation-recursive-attributes).
|
||||||
|
|
||||||
|
Reference documentation see: https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv
|
||||||
|
|
||||||
|
:::{.note}
|
||||||
|
This is used as the fundamental building block of most other functions in Nixpkgs for creating derivations.
|
||||||
|
|
||||||
|
Most Arguments are transparently forwarded to [`builtins.derivation`](https://nixos.org/manual/nix/stable/language/derivations).
|
||||||
|
:::
|
||||||
|
*/
|
||||||
mkDerivation =
|
mkDerivation =
|
||||||
fnOrAttrs:
|
fnOrAttrs:
|
||||||
if builtins.isFunction fnOrAttrs
|
if builtins.isFunction fnOrAttrs
|
||||||
|
Loading…
Reference in New Issue
Block a user