mirror of
https://github.com/NixOS/nix.dev.git
synced 2024-10-18 14:32:43 -04:00
Merge pull request #779 from fricklerhandwerk/fix-styling
fix styling issues and links
This commit is contained in:
commit
8186923cfc
|
@ -117,7 +117,7 @@ You will often encounter Nix language code samples that refer to `<nixpkgs>`.
|
|||
`<...>` is special syntax that was [introduced in 2011] to conveniently access values from the environment variable [`$NIX_PATH`].
|
||||
|
||||
[introduced in 2011]: https://github.com/NixOS/nix/commit/1ecc97b6bdb27e56d832ca48cdafd3dbb5185a04
|
||||
[`$NIX_PATH`]: https://nixos.org/manual/nix/unstable/command-ref/env-common.html?highlight=nix_path#env-NIX_PATH
|
||||
[`$NIX_PATH`]: https://nixos.org/manual/nix/unstable/command-ref/env-common.html#env-NIX_PATH
|
||||
|
||||
This means, the value of a search path depends on external system state.
|
||||
When using search paths, the same Nix expression can produce different results.
|
||||
|
@ -132,13 +132,13 @@ The state of a subscribed channel is external to the Nix expressions relying on
|
|||
It is not easily portable across machines.
|
||||
This may limit reproducibility.
|
||||
|
||||
For example, two developers on different machines are likely to have `<nixpkgs>` point to different revisions of the `nixpkgs` repository.
|
||||
For example, two developers on different machines are likely to have `<nixpkgs>` point to different revisions of the {term}`Nixpkgs` repository.
|
||||
Builds may work for one and fail for the other, causing confusion.
|
||||
|
||||
:::{tip}
|
||||
Declare dependencies explicitly using the techniques shown in [](ref-pinning-nixpkgs).
|
||||
Declare dependencies explicitly using the techniques shown in [](pinning-nixpkgs).
|
||||
|
||||
Do not use search paths, except in examples.
|
||||
Do not use search paths, except in minimal examples.
|
||||
:::
|
||||
|
||||
Some tools expect the search path to be set. In that case:
|
||||
|
|
|
@ -955,7 +955,7 @@ Example:
|
|||
|
||||
The value of a named path is a file system path that depends on the contents of the [`$NIX_PATH`][NIX_PATH] environment variable.
|
||||
|
||||
In practice, `<nixpkgs>` points to the file system path of some revision of [`nixpkgs`][nixpkgs], the source repository of Nixpkgs.
|
||||
In practice, `<nixpkgs>` points to the file system path of some revision of {term}`Nixpkgs`.
|
||||
|
||||
For example, `<nixpkgs/lib>` points to the subdirectory `lib` of that file system path:
|
||||
|
||||
|
@ -969,7 +969,7 @@ For example, `<nixpkgs/lib>` points to the subdirectory `lib` of that file syste
|
|||
/nix/var/nix/profiles/per-user/root/channels/nixpkgs/lib
|
||||
```
|
||||
|
||||
While you will see many such examples, we recommend to [avoid search paths](search-path) in practice, as they are [impurities](impurities) which are not reproducible.
|
||||
While you will encounter many such examples, we recommend to [avoid search paths](search-path) in production code, as they are [impurities](impurities) which are not reproducible.
|
||||
|
||||
[NIX_PATH]: https://nixos.org/manual/nix/unstable/command-ref/env-common.html?highlight=nix_path#env-NIX_PATH
|
||||
[nixpkgs]: https://github.com/NixOS/nixpkgs
|
||||
|
@ -1811,10 +1811,10 @@ Files to be used as build inputs do not have to come from the file system.
|
|||
|
||||
The Nix language provides built-in impure functions to fetch files over the network during evaluation:
|
||||
|
||||
- [builtins.fetchurl][fetchurl]
|
||||
- [builtins.fetchTarball][fetchTarball]
|
||||
- [builtins.fetchGit][fetchGit]
|
||||
- [builtins.fetchClosure][fetchClosure]
|
||||
- [`builtins.fetchurl`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchurl)
|
||||
- [`builtins.fetchTarball`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchTarball)
|
||||
- [`builtins.fetchGit`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchGit)
|
||||
- [`builtins.fetchClosure`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchClosure)
|
||||
|
||||
These functions evaluate to a file system path in the Nix store.
|
||||
|
||||
|
@ -1850,10 +1850,6 @@ The Nixpkgs manual on [Fetchers][nixpkgs-fetchers] lists numerous additional lib
|
|||
|
||||
It is an error if the network request fails.
|
||||
|
||||
[fetchurl]: https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchurl
|
||||
[fetchTarball]: https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchTarball
|
||||
[fetchGit]: https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchGit
|
||||
[fetchClosure]: https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchClosure
|
||||
[nixpkgs-fetchers]: https://nixos.org/manual/nixpkgs/stable/#chap-pkgs-fetchers
|
||||
|
||||
(derivations)=
|
||||
|
|
Loading…
Reference in a new issue