You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
24
-
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
24
+
- made sure NixOS tests are [linked](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#linking-nixos-module-tests-to-a-package) to the relevant packages
25
25
-[ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
26
26
-[ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
27
27
-[24.11 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2411.section.md) (or backporting [23.11](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) and [24.05](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2405.section.md) Release notes)
Nixpkgs provides a variety of wrapper functions that help build commonly useful derivations.
4
4
Like [`stdenv.mkDerivation`](#sec-using-stdenv), each of these build helpers creates a derivation, but the arguments passed are different (usually simpler) from those required by `stdenv.mkDerivation`.
The result of `runCommand name drvAttrs buildCommand` is a derivation that is built by running the specified shell commands.
9
+
The function `runCommandWith` returns a derivation built using the specified command(s), in a specified environment.
11
10
12
-
By default `runCommand` runs in a stdenv with no compiler environment, whereas [`runCommandCC`](#trivial-builder-runCommandCC) uses the default stdenv, `pkgs.stdenv`.
11
+
It is the underlying base function of all [`runCommand*` variants].
12
+
The general behavior is controlled via a single attribute set passed
13
+
as the first argument, and allows specifying `stdenv` freely.
13
14
14
-
`name :: String`
15
-
: The name that Nix will append to the store path in the same way that `stdenv.mkDerivation` uses its `name` attribute.
15
+
The following [`runCommand*` variants] exist: `runCommand`, `runCommandCC`, and `runCommandLocal`.
16
16
17
-
`drvAttr :: AttrSet`
18
-
: Attributes to pass to the underlying call to [`stdenv.mkDerivation`](#chap-stdenv).
@@ -49,18 +139,24 @@ By default `runCommand` runs in a stdenv with no compiler environment, whereas [
49
139
```
50
140
:::
51
141
52
-
## `runCommandCC` {#trivial-builder-runCommandCC}
53
-
54
-
This works just like `runCommand`. The only difference is that it also provides a C compiler in `buildCommand`'s environment. To minimize your dependencies, you should only use this if you are sure you will need a C compiler as part of running your command.
Variant of `runCommand` that forces the derivation to be built locally, it is not substituted. This is intended for very cheap commands (<1s execution time). It saves on the network round-trip and can speed up a build.
59
-
60
142
::: {.note}
61
-
This sets [`allowSubstitutes` to `false`](https://nixos.org/nix/manual/#adv-attr-allowSubstitutes), so only use `runCommandLocal` if you are certain the user will always have a builder for the `system` of the derivation. This should be true for most trivial use cases (e.g., just copying some files to a different location or adding symlinks) because there the `system` is usually the same as `builtins.currentSystem`.
143
+
`runCommand name derivationArgs buildCommand` is equivalent to
144
+
```nix
145
+
runCommandWith {
146
+
inherit name derivationArgs;
147
+
stdenv = stdenvNoCC;
148
+
} buildCommand
149
+
```
150
+
151
+
Likewise, `runCommandCC name derivationArgs buildCommand` is equivalent to
152
+
```nix
153
+
runCommandWith {
154
+
inherit name derivationArgs;
155
+
} buildCommand
156
+
```
62
157
:::
63
158
159
+
64
160
## Writing text files {#trivial-builder-text-writing}
65
161
66
162
Nixpkgs provides the following functions for producing derivations which write text files or executable scripts into the Nix store.
Copy file name to clipboardExpand all lines: doc/languages-frameworks/vim.section.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,14 @@ To add a new plugin, run `nix-shell -p vimPluginsUpdater --run 'vim-plugins-upda
232
232
233
233
Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `vimPluginsUpdater` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of the Language Server Protocol integration with Vim/Neovim.
Some plugins require specific configuration to work. We choose not to
238
+
patch those plugins but expose the necessary configuration under
239
+
`PLUGIN.passthru.initLua` for neovim plugins. For instance, the `unicode-vim` plugin
240
+
needs the path towards a unicode database so we expose the following snippet `vim.g.Unicode_data_directory="${self.unicode-vim}/autoload/unicode"` under `vimPlugins.unicode-vim.passthru.initLua`.
241
+
242
+
235
243
## Updating plugins in nixpkgs {#updating-plugins-in-nixpkgs}
236
244
237
245
Run the update script with a GitHub API token that has at least `public_repo` access. Running the script without the token is likely to result in rate-limiting (429 errors). For steps on creating an API token, please refer to [GitHub's token documentation](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token).
Copy file name to clipboardExpand all lines: nixos/doc/manual/release-notes/rl-2411.section.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,9 @@
87
87
88
88
-[Proton Mail bridge](https://proton.me/mail/bridge), a desktop application that runs in the background, encrypting and decrypting messages as they enter and leave your computer. It lets you add your Proton Mail account to your favorite email client via IMAP/SMTP by creating a local email server on your computer.
89
89
90
+
-[chromadb](https://www.trychroma.com/), an open-source AI application
91
+
database. Batteries included. Available as [services.chromadb](options.html#opt-services.chromadb.enable).
-`transmission` package has been aliased with a `trace` warning to `transmission_3`. Since [Transmission 4 has been released last year](https://github.com/transmission/transmission/releases/tag/4.0.0), and Transmission 3 will eventually go away, it was decided perform this warning alias to make people aware of the new version. The `services.transmission.package` defaults to `transmission_3` as well because the upgrade can cause data loss in certain specific usage patterns (examples: [#5153](https://github.com/transmission/transmission/issues/5153), [#6796](https://github.com/transmission/transmission/issues/6796)). Please make sure to back up to your data directory per your usage:
0 commit comments