mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Fix internal links
This commit is contained in:
parent
da3d776cb9
commit
05a282295f
21 changed files with 245 additions and 262 deletions
|
@ -89,10 +89,10 @@ Derivations can declare some infrequently used optional attributes.
|
|||
to make it use the proxy server configuration specified by the user
|
||||
in the environment variables `http_proxy` and friends.
|
||||
|
||||
This attribute is only allowed in [fixed-output
|
||||
derivations](#fixed-output-drvs), where impurities such as these are
|
||||
okay since (the hash of) the output is known in advance. It is
|
||||
ignored for all other derivations.
|
||||
This attribute is only allowed in *fixed-output derivations* (see
|
||||
below), where impurities such as these are okay since (the hash
|
||||
of) the output is known in advance. It is ignored for all other
|
||||
derivations.
|
||||
|
||||
> **Warning**
|
||||
>
|
||||
|
@ -183,13 +183,14 @@ Derivations can declare some infrequently used optional attributes.
|
|||
- `"recursive"`
|
||||
The hash is computed over the NAR archive dump of the output
|
||||
(i.e., the result of [`nix-store
|
||||
--dump`](#refsec-nix-store-dump)). In this case, the output can
|
||||
be anything, including a directory tree.
|
||||
--dump`](../command-ref/nix-store.md#operation---dump)). In
|
||||
this case, the output can be anything, including a directory
|
||||
tree.
|
||||
|
||||
The `outputHash` attribute, finally, must be a string containing the
|
||||
hash in either hexadecimal or base-32 notation. (See the [`nix-hash`
|
||||
command](#sec-nix-hash) for information about converting to and from
|
||||
base-32 notation.)
|
||||
The `outputHash` attribute, finally, must be a string containing
|
||||
the hash in either hexadecimal or base-32 notation. (See the
|
||||
[`nix-hash` command](../command-ref/nix-hash.md) for information
|
||||
about converting to and from base-32 notation.)
|
||||
|
||||
- `passAsFile`
|
||||
A list of names of attributes that should be passed via files rather
|
||||
|
@ -213,10 +214,11 @@ Derivations can declare some infrequently used optional attributes.
|
|||
|
||||
- `preferLocalBuild`
|
||||
If this attribute is set to `true` and [distributed building is
|
||||
enabled](#chap-distributed-builds), then, if possible, the derivaton
|
||||
will be built locally instead of forwarded to a remote machine. This
|
||||
is appropriate for trivial builders where the cost of doing a
|
||||
download or remote build would exceed the cost of building locally.
|
||||
enabled](../advanced-topics/distributed-builds.md), then, if
|
||||
possible, the derivaton will be built locally instead of forwarded
|
||||
to a remote machine. This is appropriate for trivial builders
|
||||
where the cost of doing a download or remote build would exceed
|
||||
the cost of building locally.
|
||||
|
||||
- `allowSubstitutes`
|
||||
If this attribute is set to `false`, then Nix will always build this
|
||||
|
|
|
@ -57,19 +57,19 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
|||
installations that don’t have the desired built-in function.
|
||||
|
||||
- `builtins.compareVersions` *s1* *s2*
|
||||
Compare two strings representing versions and return `-1` if version
|
||||
*s1* is older than version *s2*, `0` if they are the same, and `1`
|
||||
if *s1* is newer than *s2*. The version comparison algorithm is the
|
||||
same as the one used by [`nix-env
|
||||
-u`](#ssec-version-comparisons).
|
||||
Compare two strings representing versions and return `-1` if
|
||||
version *s1* is older than version *s2*, `0` if they are the same,
|
||||
and `1` if *s1* is newer than *s2*. The version comparison
|
||||
algorithm is the same as the one used by [`nix-env
|
||||
-u`](../command-ref/nix-env.md#operation---upgrade).
|
||||
|
||||
- `builtins.concatLists` *lists*
|
||||
Concatenate a list of lists into a single list.
|
||||
|
||||
- `builtins.concatStringsSep` *separator* *list*
|
||||
Concatenate a list of strings with a separator between each element,
|
||||
e.g. `concatStringsSep "/"
|
||||
["usr" "local" "bin"] == "usr/local/bin"`
|
||||
Concatenate a list of strings with a separator between each
|
||||
element, e.g. `concatStringsSep "/" ["usr" "local" "bin"] ==
|
||||
"usr/local/bin"`
|
||||
|
||||
- `builtins.currentSystem`
|
||||
The built-in value `currentSystem` evaluates to the Nix platform
|
||||
|
@ -77,10 +77,9 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
|||
evaluated, such as `"i686-linux"` or `"x86_64-darwin"`.
|
||||
|
||||
- `builtins.deepSeq` *e1* *e2*
|
||||
This is like `seq
|
||||
e1
|
||||
e2`, except that *e1* is evaluated *deeply*: if it’s a list or set,
|
||||
its elements or attributes are also evaluated recursively.
|
||||
This is like `seq e1 e2`, except that *e1* is evaluated *deeply*:
|
||||
if it’s a list or set, its elements or attributes are also
|
||||
evaluated recursively.
|
||||
|
||||
- `derivation` *attrs*; `builtins.derivation` *attrs*
|
||||
`derivation` is described in [its own section](derivations.md).
|
||||
|
@ -104,7 +103,7 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
|||
- `builtins.fetchurl` *url*
|
||||
Download the specified URL and return the path of the downloaded
|
||||
file. This function is not available if [restricted evaluation
|
||||
mode](#conf-restrict-eval) is enabled.
|
||||
mode](../command-ref/conf-file.md) is enabled.
|
||||
|
||||
- `fetchTarball` *url*; `builtins.fetchTarball` *url*
|
||||
Download the specified URL, unpack it and return the path of the
|
||||
|
@ -140,7 +139,7 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
|||
stdenv.mkDerivation { … }
|
||||
|
||||
This function is not available if [restricted evaluation
|
||||
mode](#conf-restrict-eval) is enabled.
|
||||
mode](../command-ref/conf-file.md) is enabled.
|
||||
|
||||
- `builtins.fetchGit` *args*
|
||||
Fetch a path from git. *args* can be a URL, in which case the HEAD
|
||||
|
@ -491,9 +490,8 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
|||
name is everything up to but not including the first dash followed
|
||||
by a digit, and the version is everything following that dash. The
|
||||
result is returned in a set `{ name, version }`. Thus,
|
||||
`builtins.parseDrvName "nix-0.12pre12876"` returns `{ name = "nix";
|
||||
version = "0.12pre12876";
|
||||
}`.
|
||||
`builtins.parseDrvName "nix-0.12pre12876"` returns `{ name =
|
||||
"nix"; version = "0.12pre12876"; }`.
|
||||
|
||||
- `builtins.path` *args*
|
||||
An enrichment of the built-in path type, based on the attributes
|
||||
|
@ -508,9 +506,8 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
|||
like `@`.
|
||||
|
||||
- filter
|
||||
A function of the type expected by
|
||||
[builtins.filterSource](#builtin-filterSource), with the same
|
||||
semantics.
|
||||
A function of the type expected by `builtins.filterSource`,
|
||||
with the same semantics.
|
||||
|
||||
- recursive
|
||||
When `false`, when `path` is added to the store it is with a
|
||||
|
@ -609,7 +606,7 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
|||
- `builtins.splitVersion` *s*
|
||||
Split a string representing a version into its components, by the
|
||||
same version splitting logic underlying the version comparison in
|
||||
[`nix-env -u`](#ssec-version-comparisons).
|
||||
[`nix-env -u`](../command-ref/nix-env.md#operation---upgrade).
|
||||
|
||||
- `builtins.stringLength` *e*
|
||||
Return the length of the string *e*. If *e* is not a string,
|
||||
|
|
|
@ -19,11 +19,11 @@ yet. The best way to test the package is by using the command
|
|||
$ ./result/bin/hello
|
||||
Hello, world!
|
||||
|
||||
The [`-A`](#opt-attr) option selects the `hello` attribute. This is
|
||||
faster than using the symbolic package name specified by the `name`
|
||||
attribute (which also happens to be `hello`) and is unambiguous (there
|
||||
can be multiple packages with the symbolic name `hello`, but there can
|
||||
be only one attribute in a set named `hello`).
|
||||
The `-A` option selects the `hello` attribute. This is faster than
|
||||
using the symbolic package name specified by the `name` attribute
|
||||
(which also happens to be `hello`) and is unambiguous (there can be
|
||||
multiple packages with the symbolic name `hello`, but there can be
|
||||
only one attribute in a set named `hello`).
|
||||
|
||||
`nix-build` registers the `./result` symlink as a garbage collection
|
||||
root, so unless and until you delete the `./result` symlink, the output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue