forked from mirrors/nixpkgs
Document how to use packages with extensions. (#145011)
Co-authored-by: Artturi <Artturin@artturin.com> Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
This commit is contained in:
parent
7efb781c3a
commit
dc7d4dece5
|
@ -12,6 +12,29 @@ Unfortunately, Nixpkgs currently lacks a way to query available
|
|||
configuration options.
|
||||
:::
|
||||
|
||||
::: {.note}
|
||||
Alternatively, many packages come with extensions one might add.
|
||||
Examples include:
|
||||
- [`passExtensions.pass-otp`](https://search.nixos.org/packages/query=passExtensions.pass-otp)
|
||||
- [`python310Packages.requests`](https://search.nixos.org/packages/query=python310Packages.requests)
|
||||
|
||||
You can use them like this:
|
||||
```nix
|
||||
environment.systemPackages = with pkgs; [
|
||||
sl
|
||||
(pass.withExtensions (subpkgs: with subpkgs; [
|
||||
pass-audit
|
||||
pass-otp
|
||||
pass-genphrase
|
||||
]))
|
||||
(python3.withPackages (subpkgs: with subpkgs; [
|
||||
requests
|
||||
]))
|
||||
cowsay
|
||||
];
|
||||
```
|
||||
:::
|
||||
|
||||
Apart from high-level options, it's possible to tweak a package in
|
||||
almost arbitrary ways, such as changing or disabling dependencies of a
|
||||
package. For instance, the Emacs package in Nixpkgs by default has a
|
||||
|
|
Loading…
Reference in a new issue