doc: fix typos
This commit is contained in:
@@ -9,7 +9,7 @@ By default, Nix will prevent installation if any of the following criteria are t
|
||||
|
||||
- The package's `meta.license` is set to a license which is considered to be unfree.
|
||||
|
||||
- The package has known security vulnerabilities but has not or can not be updated for some reason, and a list of issues has been entered in to the package's `meta.knownVulnerabilities`.
|
||||
- The package has known security vulnerabilities but has not or can not be updated for some reason, and a list of issues has been entered into the package's `meta.knownVulnerabilities`.
|
||||
|
||||
Each of these criteria can be altered in the Nixpkgs configuration.
|
||||
|
||||
@@ -87,7 +87,7 @@ There are several ways to tweak how Nix handles a package which has been marked
|
||||
{ allowUnfreePredicate = (pkg: false); }
|
||||
```
|
||||
|
||||
For a more useful example, try the following. This configuration only allows unfree packages named roon-server and visual studio code:
|
||||
For a more useful example, try the following. This configuration only allows unfree packages named roon-server and Visual Studio Code:
|
||||
|
||||
```nix
|
||||
{
|
||||
@@ -241,7 +241,7 @@ To install it into our environment, you can just run `nix-env -iA nixpkgs.myPack
|
||||
}
|
||||
```
|
||||
|
||||
`pathsToLink` tells Nixpkgs to only link the paths listed which gets rid of the extra stuff in the profile. `/bin` and `/share` are good defaults for a user environment, getting rid of the clutter. If you are running on Nix on MacOS, you may want to add another path as well, `/Applications`, that makes GUI apps available.
|
||||
`pathsToLink` tells Nixpkgs to only link the paths listed which gets rid of the extra stuff in the profile. `/bin` and `/share` are good defaults for a user environment, getting rid of the clutter. If you are running on Nix on macOS, you may want to add another path as well, `/Applications`, that makes GUI apps available.
|
||||
|
||||
### Getting documentation {#sec-getting-documentation}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ If you want to ensure that things keep working, consider [becoming a maintainer]
|
||||
|
||||
## <pkg>.overrideAttrs {#sec-pkg-overrideAttrs}
|
||||
|
||||
The function `overrideAttrs` allows overriding the attribute set passed to a `stdenv.mkDerivation` call, producing a new derivation based on the original one. This function is available on all derivations produced by the `stdenv.mkDerivation` function, which is most packages in the nixpkgs expression `pkgs`.
|
||||
The function `overrideAttrs` allows overriding the attribute set passed to a `stdenv.mkDerivation` call, producing a new derivation based on the original one. This function is available on all derivations produced by the `stdenv.mkDerivation` function, which is most packages in the Nixpkgs expression `pkgs`.
|
||||
|
||||
Example usages:
|
||||
|
||||
@@ -98,7 +98,7 @@ You should prefer `overrideAttrs` in almost all cases, see its documentation for
|
||||
Do not use this function in Nixpkgs as it evaluates a derivation before modifying it, which breaks package abstraction. In addition, this evaluation-per-function application incurs a performance penalty, which can become a problem if many overrides are used. It is only intended for ad-hoc customisation, such as in `~/.config/nixpkgs/config.nix`.
|
||||
:::
|
||||
|
||||
The function `overrideDerivation` creates a new derivation based on an existing one by overriding the original's attributes with the attribute set produced by the specified function. This function is available on all derivations defined using the `makeOverridable` function. Most standard derivation-producing functions, such as `stdenv.mkDerivation`, are defined using this function, which means most packages in the nixpkgs expression, `pkgs`, have this function.
|
||||
The function `overrideDerivation` creates a new derivation based on an existing one by overriding the original's attributes with the attribute set produced by the specified function. This function is available on all derivations defined using the `makeOverridable` function. Most standard derivation-producing functions, such as `stdenv.mkDerivation`, are defined using this function, which means most packages in the Nixpkgs expression, `pkgs`, have this function.
|
||||
|
||||
Example usage:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user