Skip to content

Commit e67c6fb

Browse files
Merge master into staging-nixos
2 parents 017f198 + 4999ab7 commit e67c6fb

97 files changed

Lines changed: 297 additions & 255 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/languages-frameworks/php.section.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,6 @@ code, while others choose not to.
214214

215215
In Nix, there are multiple approaches to building a Composer-based project.
216216

217-
::: {.warning}
218-
`buildComposerProject2` has a [known bug](https://github.com/NixOS/nixpkgs/issues/451395)
219-
where the `vendorHash` changes every time a Composer release happens that changes the
220-
`autoload.php` or vendored composer code.
221-
:::
222-
223217
One such method is the `php.buildComposerProject2` helper function, which serves
224218
as a wrapper around `mkDerivation`.
225219

doc/languages-frameworks/python.section.md

Lines changed: 73 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,62 @@ following are specific to `buildPythonPackage`:
207207
* `setupPyGlobalFlags ? []`: List of flags passed to `setup.py` command.
208208
* `setupPyBuildFlags ? []`: List of flags passed to `setup.py build_ext` command.
209209

210+
##### Using fixed-point arguments {#buildpythonpackage-fixed-point-arguments}
211+
212+
Both `buildPythonPackage` and `buildPythonApplication` support [fixed-point arguments](#chap-build-helpers-finalAttrs), similar to `stdenv.mkDerivation`.
213+
This allows you to reference the final attributes of the derivation.
214+
215+
Instead of using `rec`:
216+
217+
```nix
218+
buildPythonPackage rec {
219+
pname = "pyspread";
220+
version = "2.4";
221+
src = fetchPypi {
222+
inherit pname version;
223+
hash = "sha256-...";
224+
};
225+
}
226+
```
227+
228+
You can use the `finalAttrs` pattern:
229+
230+
```nix
231+
buildPythonPackage (finalAttrs: {
232+
pname = "pyspread";
233+
version = "2.4";
234+
src = fetchPypi {
235+
pname = "pyspread";
236+
inherit (finalAttrs) version;
237+
hash = "sha256-...";
238+
};
239+
})
240+
```
241+
242+
See the [general documentation on fixed-point arguments](#chap-build-helpers-finalAttrs) for more details on the benefits of this pattern.
243+
244+
::: {.note}
245+
246+
Some `buildPythonPackage`/`buildPythonApplication` arguments are passed down indirectly to `stdenv.mkDerivation` via `passthru`.
247+
Therefore the final state of these attributes can be accessed via `finalAttrs.passthru.${name}`.
248+
[`<pkg>.overrideAttrs`](#sec-pkg-overrideAttrs) can override them using the `passthru = prevAttrs.passthru // { foo = "bar"; }` pattern.
249+
Such arguments include:
250+
251+
- `disabled`
252+
- `pyproject`
253+
- `format`
254+
- `build-system`
255+
- `dependencies`
256+
- `optional-dependencies`
257+
258+
<!--
259+
TODO(@doronbehar): When `.overridePythonAttrs` will be removed, the above text might need to be revised. See:
260+
261+
- https://github.com/NixOS/nixpkgs/pull/379637
262+
- https://github.com/NixOS/nixpkgs/pull/469804
263+
-->
264+
:::
265+
210266
The [`stdenv.mkDerivation`](#sec-using-stdenv) function accepts various parameters for describing
211267
build inputs (see "Specifying dependencies"). The following are of special
212268
interest for Python packages, either because these are primarily used, or
@@ -237,29 +293,23 @@ the overrides for packages in the package set.
237293
```nix
238294
with import <nixpkgs> { };
239295
240-
(
241-
let
242-
python =
243-
let
244-
packageOverrides = self: super: {
245-
pandas = super.pandas.overridePythonAttrs (old: rec {
246-
version = "0.19.1";
247-
src = fetchPypi {
248-
pname = "pandas";
249-
inherit version;
250-
hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE=";
251-
};
252-
});
253-
};
254-
in
255-
pkgs.python3.override {
256-
inherit packageOverrides;
257-
self = python;
258-
};
259-
260-
in
261-
python.withPackages (ps: [ ps.blaze ])
262-
).env
296+
let
297+
python = pkgs.python3.override {
298+
packageOverrides = self: super: {
299+
pandas = super.pandas.overridePythonAttrs (
300+
finalAttrs: prevAttrs: {
301+
version = "0.19.1";
302+
src = fetchPypi {
303+
pname = "pandas";
304+
inherit (finalAttrs) version;
305+
hash = "sha256-JQn+rtpy/OA2deLszSKEuxyttqBzcAil50H+JDHUdCE=";
306+
};
307+
}
308+
);
309+
};
310+
};
311+
in
312+
(python.withPackages (ps: [ ps.blaze ])).env
263313
```
264314

265315
The next example shows a non trivial overriding of the `blas` implementation to

doc/redirects.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4059,6 +4059,9 @@
40594059
"buildpythonpackage-parameters": [
40604060
"index.html#buildpythonpackage-parameters"
40614061
],
4062+
"buildpythonpackage-fixed-point-arguments": [
4063+
"index.html#buildpythonpackage-fixed-point-arguments"
4064+
],
40624065
"overriding-python-build-helpers": [
40634066
"index.html#overriding-python-build-helpers"
40644067
],

doc/release-notes/rl-2605.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@
269269
270270
- `opensmtpd-filter-dkimsign` is now installed into `libexec/smtpd` instead of `libexec/opensmtpd` so that now it is properly linked into the environment built by `services.opensmtpd.procPackages`. If you hardcoded path to `filter-dkimsign` please consider using this option.
271271
272+
- `shisho` has been removed because it's archived. `semgrep`, `opengrep`, and `ast-grep` provide similar functionality.
273+
272274
- `services.openssh.settings.AcceptEnv` now explicitly defined as an option that takes a list of strings, to facilitate option merging. Setting it to a string value is no longer supported.
273275
274276
- All Xfce packages have been moved to top level (e.g. if you previously added `pkgs.xfce.xfce4-whiskermenu-plugin` to `environment.systemPackages`, you will need to change it to `pkgs.xfce4-whiskermenu-plugin`). The `xfce` scope will be removed in NixOS 26.11.

pkgs/applications/editors/vscode/extensions/anthropic.claude-code/default.nix

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
{
22
lib,
3+
stdenv,
34
stdenvNoCC,
5+
autoPatchelfHook,
6+
alsa-lib,
7+
testers,
48
vscode-utils,
59
}:
610

7-
vscode-utils.buildVscodeMarketplaceExtension {
11+
vscode-utils.buildVscodeMarketplaceExtension (finalAttrs: {
12+
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
13+
14+
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
15+
(lib.getLib stdenv.cc.cc)
16+
alsa-lib
17+
];
18+
819
mktplcRef =
920
let
1021
sources = {
@@ -34,6 +45,11 @@ vscode-utils.buildVscodeMarketplaceExtension {
3445
// sources.${stdenvNoCC.hostPlatform.system}
3546
or (throw "Unsupported system ${stdenvNoCC.hostPlatform.system}");
3647

48+
passthru.tests.bundled-claude-runs = testers.testVersion {
49+
package = finalAttrs.finalPackage;
50+
command = "${finalAttrs.finalPackage}/share/vscode/extensions/anthropic.claude-code/resources/native-binary/claude --version";
51+
};
52+
3753
meta = {
3854
description = "Harness the power of Claude Code without leaving your IDE";
3955
homepage = "https://docs.anthropic.com/s/claude-code";
@@ -48,4 +64,4 @@ vscode-utils.buildVscodeMarketplaceExtension {
4864
"aarch64-darwin"
4965
];
5066
};
51-
}
67+
})

pkgs/applications/editors/vscode/extensions/saoudrizwan.claude-dev/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ vscode-utils.buildVscodeMarketplaceExtension {
77
mktplcRef = {
88
name = "claude-dev";
99
publisher = "saoudrizwan";
10-
version = "3.79.0";
11-
hash = "sha256-BqIJNUkq7q2/WlsWqN/dHZtYqHvDm3v7CesEM4XJ1Es=";
10+
version = "3.81.0";
11+
hash = "sha256-gVQmKuyUH+bXpr7X2Z23U2oKFnAV2mxhckjef2uL8KQ=";
1212
};
1313

1414
meta = {

pkgs/applications/emulators/libretro/cores/pcsx-rearmed.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
}:
66
mkLibretroCore {
77
core = "pcsx-rearmed";
8-
version = "0-unstable-2026-04-15";
8+
version = "0-unstable-2026-04-25";
99

1010
src = fetchFromGitHub {
1111
owner = "libretro";
1212
repo = "pcsx_rearmed";
13-
rev = "00512d47f9d4d220efa4f2418b4a5896f9cd2e75";
14-
hash = "sha256-ERllT1RkoLMafnHx2HSHdURoWdnF8fJlZ80pfiw18gQ=";
13+
rev = "a97efbb0646dd7766bd66fe9e93118206edec36a";
14+
hash = "sha256-2MAj/UdEg/kRZuGZcVQ+hBMe2pRlZWvEQnXeqb+444Y=";
1515
};
1616

1717
dontConfigure = true;

pkgs/applications/emulators/libretro/cores/stella.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
}:
66
mkLibretroCore {
77
core = "stella";
8-
version = "0-unstable-2026-04-19";
8+
version = "0-unstable-2026-04-28";
99

1010
src = fetchFromGitHub {
1111
owner = "stella-emu";
1212
repo = "stella";
13-
rev = "8b7bc991d2500cbf2e861c25f96ff81e0d13f273";
14-
hash = "sha256-jeu/7hHuPfSoJg2/6UxUqHWOGMSe0vX6cgWLmVYHABQ=";
13+
rev = "0c1b944387b5ac2b1bf753c2c4221db4fdc10f79";
14+
hash = "sha256-mohkp6oOP8MtRs/WHw4Rxs3FrB6h4X6/ENrRdjiiXlQ=";
1515
};
1616

1717
makefile = "Makefile";

pkgs/applications/networking/cluster/terraform-providers/providers.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,13 @@
400400
"vendorHash": null
401401
},
402402
"fastly_fastly": {
403-
"hash": "sha256-2QfgzzWYXPOCMAX2EBodDPVEtcIHHPT4Lbh0W1+q2to=",
403+
"hash": "sha256-deph1BQ/aUgTOf4Bgaxpac4V2fmy4dSdbBRa/qvvKdk=",
404404
"homepage": "https://registry.terraform.io/providers/fastly/fastly",
405405
"owner": "fastly",
406406
"repo": "terraform-provider-fastly",
407-
"rev": "v9.1.0",
407+
"rev": "v9.1.1",
408408
"spdx": "MPL-2.0",
409-
"vendorHash": "sha256-E64AMHGFpAhg6UNYHJXAdRWPdWWdZineW/b+Gs2O2jk="
409+
"vendorHash": "sha256-lxBvfkuvf1eoprkCuPtYqOw6P7sTzS70VXTYGToazf8="
410410
},
411411
"flexibleenginecloud_flexibleengine": {
412412
"hash": "sha256-yEZ9JiUSqFFbfqzOOD59ZBv4yFCeUBBKlp6aiUqDqiM=",

pkgs/build-support/rust/fetch-cargo-vendor.nix

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ let
2222
];
2323
} (builtins.readFile ./replace-workspace-values.py);
2424

25+
nix-prefetch-git' = nix-prefetch-git.override {
26+
git = gitMinimal;
27+
# break loop of nix-prefetch-git -> git-lfs -> asciidoctor -> ruby (yjit) -> fetchCargoVendor -> nix-prefetch-git
28+
# Cargo does not currently handle git-lfs: https://github.com/rust-lang/cargo/issues/9692
29+
git-lfs = null;
30+
};
31+
32+
removedArgs = [
33+
"name"
34+
"pname"
35+
"version"
36+
"nativeBuildInputs"
37+
"hash"
38+
];
39+
2540
mkFetchCargoVendorUtil =
2641
name: src:
2742
writers.writePython3Bin name {
@@ -57,14 +72,6 @@ in
5772
# TODO: add asserts about pname version and name
5873

5974
let
60-
removedArgs = [
61-
"name"
62-
"pname"
63-
"version"
64-
"nativeBuildInputs"
65-
"hash"
66-
];
67-
6875
vendorStaging = stdenvNoCC.mkDerivation (
6976
{
7077
name = "${name}-vendor-staging";
@@ -74,12 +81,7 @@ let
7481
nativeBuildInputs = [
7582
fetchCargoVendorUtilV2
7683
cacert
77-
(nix-prefetch-git.override {
78-
git = gitMinimal;
79-
# break loop of nix-prefetch-git -> git-lfs -> asciidoctor -> ruby (yjit) -> fetchCargoVendor -> nix-prefetch-git
80-
# Cargo does not currently handle git-lfs: https://github.com/rust-lang/cargo/issues/9692
81-
git-lfs = null;
82-
})
84+
nix-prefetch-git'
8385
]
8486
++ nativeBuildInputs;
8587

@@ -108,7 +110,6 @@ let
108110
// removeAttrs args removedArgs
109111
);
110112
in
111-
112113
runCommand "${name}-vendor"
113114
{
114115
inherit vendorStaging;

0 commit comments

Comments
 (0)