Compare commits

..

823 Commits

Author SHA1 Message Date
Leona Maroni
11cb3517b3 Release NixOS 25.05 2025-05-23 20:56:20 +02:00
OPNA2608
f526c3e77a nixosTests.lomiri-filemanager-app: Fix OCR
(cherry picked from commit 66301f51a3)
2025-05-23 23:25:53 +05:30
OPNA2608
a12287d041 lomiri.lomiri-filemanager-app: 1.1.3 -> 1.1.4
(cherry picked from commit 2143771374)
2025-05-23 23:25:53 +05:30
Emily
85464f6a96 [Backport release-25.05] Revert "lib.meta.availableOn: Return false if pkg parameter is null" (#410242) 2025-05-23 18:47:35 +01:00
Emily
ea235dc9ee Revert "lib.meta.availableOn: Return false if pkg parameter is null"
I believe this change is wrong both theoretically and practically.

Theoretically, `null` is available on every platform, because
`buildInputs = [ null ];` always succeeds and never throws a platform
availability error. `null` should be handled consistently with packages
that have no explicit list of supported platforms, as it of course
has no such list itself.

Practically, we use `null` to represent libraries that are always
present on a platform and do not require a library (for instance,
because they are part of `libc` or the macOS SDK). This has been
used for a long time by `libintl` (on all non‐glibc platforms),
and is also now used by `libGL` and friends on Darwin. This change
broke the check SDL3 does for OpenGL availability on Darwin, causing
<https://github.com/NixOS/nixpkgs/issues/407056>, which had to be
worked around by <https://github.com/NixOS/nixpkgs/pull/409525>.

Both `libintl` and `libGL` should count as available on platforms
where their functionality is part of the standard build environment,
and a package that is completely unavailable and whose functionality
cannot be expected should not use `null`, as it should result in
errors if used in a dependency list on an unsupported platform.

I accept that overriding with `null` is often a useful way to disable
dependencies that don’t have explicit feature flags, but I do not
think that making it work better with feature flags conditioned on
availability is worth the inconsistency and problems caused by this
change. Packages can instead expose the relevant feature flags as
arguments that default to the `lib.meta.availableOn` check or, if they
want to keep an “override the dependency to `null`” interface,
insert an explicit `pkg != null && …` check.

Additionally, the pull request was merged over a week after all
breaking changes were restricted for the 25.05 release. I believe that
the potential problems of dealing with the effects of this change for
an entire release cycle – the first release cycle where `libGL` is
`null` on Darwin, a change I made before the deadline and before this
change to `lib.meta.availableOn` – offset the risks of backporting
this revert at such a late stage.

It will cause overrides to backwards‐incompatibly revert to the
behaviour they had before the change, but since such overrides were
not possible until a few weeks ago, I hope that is an acceptable risk
compared to the potential issues leaving this in the release can
cause, given that it was merged after the deadline and has already
broken an existing construction in Nixpkgs.

This reverts commit 9338d924db.

(cherry picked from commit 98dbc7cc58)
2025-05-23 17:39:28 +00:00
nixpkgs-ci[bot]
c5ac655645 [Backport release-25.05] ente-desktop: fix literal inclusion of '$out' (#410215)
ente-desktop: fix literal inclusion of '$out' (#410214)

(cherry picked from commit 766a203ac7)

Co-authored-by: oddlama <oddlama@oddlama.org>
2025-05-23 19:01:28 +02:00
Aleksana
243c587ad6 [Backport release-25.05] python313Packages.entry-points-txt: refactor (#408169) 2025-05-23 23:49:50 +08:00
Aleksana
35b528a99b [Backport release-25.05] python313Packages.types-lxml: adjust inputs (#408172) 2025-05-23 23:49:16 +08:00
Aleksana
773e2b7fef [Backport release-25.05] lazygit: 0.51.0 -> 0.51.1 (#410137) 2025-05-23 23:43:05 +08:00
Pol Dellaiera
591f3ea49f [Backport release-25.05] maintainers: remove my gpg key (#410189) 2025-05-23 14:37:08 +00:00
Aleksana
3d840c10d3 [Backport release-25.05] neovide, neovim-gtk, neovim-qt-unwrapped: minor refreshment (#410134) 2025-05-23 22:31:26 +08:00
Aleksana
9fb1625d7d [Backport release-25.05] rquickshare: clean up dependencies, don't use applyPatches (#410139) 2025-05-23 22:30:52 +08:00
eljamm
048ac2787b maintainers: remove my gpg key
(cherry picked from commit 75e677c32e)
2025-05-23 14:29:42 +00:00
Aleksana
cf6267fb09 [Backport release-25.05] tftui: accept posthog 4 (#407766) 2025-05-23 22:12:10 +08:00
Aleksana
55d285372d [Backport release-25.05] tree-sitter: update changelog url (#410133) 2025-05-23 22:11:21 +08:00
Aleksana
92d1b796c3 [Backport release-25.05] sing-box: clean up (#410175) 2025-05-23 22:10:07 +08:00
Sizhe Zhao
dedb89c43d sing-box: install shell completions directly 2025-05-23 21:56:54 +08:00
Sizhe Zhao
828eac07e7 sing-box: add prince213 to maintainers 2025-05-23 21:56:54 +08:00
Sizhe Zhao
7c6cc26c27 sing-box: use finalAttrs 2025-05-23 21:56:54 +08:00
Sizhe Zhao
fca99741a9 sing-box: avoid with lib; 2025-05-23 21:53:24 +08:00
Jörg Thalheim
76b4b619b8 [Backport release-25.05] qmk: add bootloadhid as a propagatedBuildInput for hardware support (#410147) 2025-05-23 15:28:18 +02:00
Aleksana
52207c55fd [Backport release-25.05] donpapi: refactor and mark as broken on darwin (#408965) 2025-05-23 21:21:04 +08:00
Aleksana
ddd0a706be [Backport release-25.05] nixos/orca: Make available to gdm greeter (#409142) 2025-05-23 21:20:41 +08:00
Aleksana
660a8bba18 [Backport release-25.05] pencil2d: init at 0.7.0 (#410154) 2025-05-23 21:19:34 +08:00
TheTaoOfSu
775ffcabc6 qmk: add bootloadhid as a propagatedBuildInput to support flashing more hardware
(cherry picked from commit 6fb834fb3c)
2025-05-23 16:11:37 +03:00
misuzu
d9335df305 [Backport release-25.05] bootloadhid: init at 0-unstable-2012-12-08 (#410149) 2025-05-23 16:08:48 +03:00
Aleksana
acdf0eb91a [Backport release-25.05] nixos/doc/rl-2505: add an entry for nixos/agnos (#410152) 2025-05-23 21:02:35 +08:00
Savchenko Dmitriy
40986e7094 pencil2d: init at 0.7.0 (#402895)
(cherry picked from commit e2cbbf11fc)
2025-05-23 13:00:33 +00:00
Sandro
fb54862276 [Backport release-25.05] yt-dlp: 2025.4.30 -> 2025.5.22 (#409746) 2025-05-23 14:57:55 +02:00
Sandro
2a17f894f8 [Backport release-25.05] python313Packages.tendo: fix build with python 3.13 (#409489) 2025-05-23 14:57:05 +02:00
Aleksana
779f282eeb [Backport release-25.05] ext4magic: add patch to fix segfault (#410136) 2025-05-23 20:55:16 +08:00
Justinas Stankevicius
aec7844290 nixos/doc/rl-2505: add an entry for nixos/agnos
(cherry picked from commit 315681dfe2)
2025-05-23 12:48:47 +00:00
TheTaoOfSu
5739aebdf7 bootloadhid: init at 0-unstable-2012-12-08
(cherry picked from commit d6fa60faf1)
2025-05-23 12:47:42 +00:00
TheTaoOfSu
b1af56092e maintainers: add thetaoofsu
(cherry picked from commit ed8e18ad6a)
2025-05-23 12:47:41 +00:00
Aleksana
58ae193744 [Backport release-25.05] vault: 1.19.3 -> 1.19.4, vault-bin: 1.19.3 -> 1.19.4 (#409914) 2025-05-23 20:33:58 +08:00
TomaSajt
afb42377cb rquickshare: clean up dependencies, don't use applyPatches
(cherry picked from commit 8a5a277122)
2025-05-23 12:28:42 +00:00
Aleksana
1a7b9de192 [Backport release-25.05] akkoma-admin-fe: Fix build for x86_64-darwin (#410014) 2025-05-23 20:23:00 +08:00
Aleksana
f2b15650e4 [Backport release-25.05] yandex-music: 5.50.0 -> 5.51.1 (#409751) 2025-05-23 20:22:22 +08:00
Aleksana
863399e14a [Backport release-25.05] python3Packages.klayout: fix darwin build (#409732) 2025-05-23 20:22:10 +08:00
Jost Alemann
1e591dc363 lazygit: 0.51.0 -> 0.51.1
Diff: https://github.com/jesseduffield/lazygit/compare/v0.51.0...v0.51.1
Changelog: https://github.com/jesseduffield/lazygit/releases/tag/v0.51.1
(cherry picked from commit b47cac5d69)
2025-05-23 12:21:42 +00:00
Nicolas Benes
7e6409f466 ext4magic: add patch to fix segfault
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854497
(cherry picked from commit 704bda7d20)
2025-05-23 12:18:02 +00:00
Acid Bong
c7cd3d76b4 neovim-gtk: use finalAttrs, remove with lib
(cherry picked from commit d88309158f)
2025-05-23 12:16:47 +00:00
Acid Bong
ba85488790 neovim-qt-unwrapped: use finalAttrs, remove with lib
(cherry picked from commit e98fa16484)
2025-05-23 12:16:47 +00:00
Acid Bong
6adeba369b neovide: use finalAttrs, remove with lib
(cherry picked from commit 6cead234cb)
2025-05-23 12:16:47 +00:00
uncenter
c7f133a9ca tree-sitter: update changelog url
(cherry picked from commit e5c4040441)
2025-05-23 12:11:36 +00:00
Adam M. Szalkowski
49189325fd hyprlandPlugins.hy3: 0.48.0 -> 0.49.0
(cherry picked from commit 41b894265a)
2025-05-23 17:40:35 +05:30
Aleksana
684552d89c [Backport release-25.05] argbash: update meta.homepage (#410127) 2025-05-23 19:56:25 +08:00
Aleksana
3756de4e62 [Backport release-25.05] plant-it: init at 0.10.0 (#410104) 2025-05-23 19:40:00 +08:00
Kenichi Kamiya
d9234922b0 argbash: update meta.homepage
Upstream replaced the link in 48a7252cfe

(cherry picked from commit f05abeb30e)
2025-05-23 11:39:14 +00:00
Edgar Pireyn
d220a959b6 plant-it-frontend: init at 0.10.0
(cherry picked from commit 2aa307ab83)
2025-05-23 10:17:47 +00:00
Edgar Pireyn
c8038975d0 plant-it: init at 0.10.0
(cherry picked from commit e2b421c169)
2025-05-23 10:17:47 +00:00
Edgar Pireyn
a8bf682bdc maintainers: Add epireyn
I plan on maintaining `plant-it` and probably other self-hosted services.

(cherry picked from commit 838e42eb51)
2025-05-23 10:17:47 +00:00
Robert Hensing
fa89de23e9 [Backport release-25.05] json-schema-catalog-rs: init at 0.1.1 (#410067) 2025-05-23 10:51:13 +02:00
Aleksana
1a4ede4083 [Backport release-25.05] lazygit: 0.50.0 -> 0.51.0 (#409822) 2025-05-23 16:33:58 +08:00
Aleksana
3ea5b529b4 [Backport release-25.05] anytype: fix single instance detection and specify URL in .desktop file (#410020) 2025-05-23 16:33:15 +08:00
Aleksana
5518e8787b [Backport release-25.05] fractal: 11 -> 11.1 (#409826) 2025-05-23 15:40:34 +08:00
Aleksana
263d12c0f3 [Backport release-25.05] pmars: Fix FTBFS due to ncurses change (#410023) 2025-05-23 15:39:20 +08:00
Aleksana
3b4043f39d [Backport release-25.05] musicpod: 2.11.4 -> 2.12.0 (#410065) 2025-05-23 15:32:13 +08:00
Ethan Carter Edwards
92e83dd9a0 json-schema-catalog-rs: add versionCheckHook
(cherry picked from commit 72eaf394d3)
2025-05-23 07:31:28 +00:00
Robert Hensing
b8815f1856 json-schema-catalog-rs: init at 0.1.1
(cherry picked from commit c598c6d576)
2025-05-23 07:31:28 +00:00
emaryn
1bf2e381f9 musicpod: 2.11.4 -> 2.12.0
(cherry picked from commit 07fbfa430b)
2025-05-23 07:24:54 +00:00
Aleksana
e4b8c79e53 [Backport release-25.05] fasthenry: fix build with gcc 14 (#410008) 2025-05-23 15:22:45 +08:00
Thomas Gerbet
5a06550939 [Backport release-25.05] librewolf-bin-unwrapped: 138.0.1-2 -> 138.0.4-1 (#409907) 2025-05-23 09:19:39 +02:00
Aleksana
ed3e8fdc88 [Backport release-25.05] nixos/paperless: expose manage package (#408739) 2025-05-23 15:19:26 +08:00
Aleksana
3e7836c84c [Backport release-25.05] llvmPackages.lldb-manpages: fix building (#410012) 2025-05-23 15:18:06 +08:00
Aleksana
955de76601 [Backport release-25.05] nwg-dock-hyprland: 0.4.5 -> 0.4.6 (#409993) 2025-05-23 15:17:44 +08:00
Aleksana
1282f40a4c [Backport release-25.05] scope-tui: 0.3.0-unstable-2024-05-06 -> 0.3.3 (#409991) 2025-05-23 15:16:04 +08:00
Leona Maroni
b53bc1676f [Backport release-25.05] doc/rl-2505: final cleanups (#410059) 2025-05-23 09:11:43 +02:00
Wolfgang Walther
67526450ee [Backport release-25.05] workflows/eval: run when base branch changed (#409857) 2025-05-23 07:09:06 +00:00
Sarah Clark
bee3bb87f2 python3Packages.labelbox: 6.6.0 -> 6.10.0
Changelogs:
* https://github.com/Labelbox/labelbox-python/releases/tag/v.6.10.0
* https://github.com/Labelbox/labelbox-python/releases/tag/v.6.9.0
* https://github.com/Labelbox/labelbox-python/releases/tag/v.6.8.0
* https://github.com/Labelbox/labelbox-python/releases/tag/v.6.8.0

diff: https://github.com/Labelbox/labelbox-python/compare/v.6.6.0...v.6.10.0
(cherry picked from commit 7b2772c14d)
2025-05-23 07:06:48 +00:00
Sarah Clark
bbdb4945bf python3Packages.labelbox: build missing lbox-clients dependency
(cherry picked from commit ae45b31e06)
2025-05-23 07:06:48 +00:00
Seth Flynn
7be97c226e nixos/doc/rl-2505: cleanup "new modules" section
(cherry picked from commit 7fb7f0c4a1)
2025-05-23 07:04:40 +00:00
Seth Flynn
4e3f17c106 doc/rl-2505: fix nexusmods.app entry formatting
I don't really think this needs its own header and section...

(cherry picked from commit b17e45ca7c)
2025-05-23 07:04:40 +00:00
Seth Flynn
0c0d19b831 doc/rl-2505: move unrelated entries from lib section
(cherry picked from commit 00ae244074)
2025-05-23 07:04:40 +00:00
Seth Flynn
8f6b37ece6 doc/rl-2505: fix links in lib section
(cherry picked from commit 041c3794c4)
2025-05-23 07:04:39 +00:00
Doron Behar
41430d9c93 [Backport release-25.05] nixos/i18n: Re-add special handling of LANGUAGE (#410054) 2025-05-23 09:33:08 +03:00
Doron Behar
24b41a7f8b nixos/i18n: Re-add special handling of LANGUAGE
This reverts commit 263297b4e5 while also
explaining in the docs where exactly LANGUAGE is ignored, and why.

Fixes #409306.

(cherry picked from commit 82dfbe95f5)
2025-05-23 06:25:48 +00:00
Aleksana
f89c89a1e7 [Backport release-25.05] netbird: fix typo in warning message (#410021) 2025-05-23 11:48:10 +08:00
Aleksana
4e0e6884e8 [Backport release-25.05] ulauncher: revert back to webkitgtk_4_0 to fix startup error (#410013) 2025-05-23 11:47:51 +08:00
Aleksana
03de5d2e9d [Backport release-25.05] catppuccin-plymouth: fix variant selection (#410015) 2025-05-23 11:47:32 +08:00
Aleksana
4a82db41dc [Backport release-25.05] nixos/foot: fix zshrc (#410018) 2025-05-23 11:47:12 +08:00
Tristan Ross
809b099146 [Backport release-25.05] selinux-sandbox: fix building (#410011) 2025-05-22 20:44:42 -07:00
OPNA2608
ada6f666ff pmars: Fix FTBFS due to ncurses change
WINDOW struct was turned opaque in recent versions, meaning that direct access to struct members is no longer supported.
Add patch to replace direct access with calls to getter functions.

(cherry picked from commit fe359e9681)
2025-05-23 03:36:05 +00:00
Pop
298a25eeec netbird: fix typo in warning message (#406819)
(cherry picked from commit 017276a4aa)
2025-05-23 03:32:43 +00:00
Axel Karjalainen
95ee32e5d8 anytype: fix single instance detection and specify URL in .desktop file
(cherry picked from commit 09ccea2424)
2025-05-23 03:31:31 +00:00
nyukuru
690b077209 nixos/foot: fix zshrc
Fixes error 'command not found: add-zsh-hook'

(cherry picked from commit 2c7a56cee9)
2025-05-23 03:27:28 +00:00
palumbou
ad30ac89b6 catppuccin-plymouth: fix formatting using "nix fmt" as written in the CONTRIBUTING.md documentation
(cherry picked from commit def8389c97)
2025-05-23 03:21:01 +00:00
palumbou
f8356eef66 catppuccin-plymouth: fix formatting using nixpkgs-fmt and statix
(cherry picked from commit 203e626742)
2025-05-23 03:21:01 +00:00
palumbou
d6cd99f80b catppuccin-plymouth: fix variant selection
The package previously had an issue where it defined valid variants but did
not properly connect the validation to the derivation. This resulted in only
the default "macchiato" variant being accessible.

Fixed by replacing `lib.checkListOfEnum` with `assert lib.assertOneOf`
to properly validate and allow selection of all defined variants:
"latte", "frappe", "macchiato" and "mocha".

Tested by successfully building the package with each variant.

(cherry picked from commit d71402645d)
2025-05-23 03:21:01 +00:00
Fiona Behrens
6588ff10ab akkoma-admin-fe: Fix build for x86_64-darwin
Add xcodebuild as build dependencies for both darwin platforms as
x86_64 needs it to run xcodebuild

(cherry picked from commit 0047d6e995)
2025-05-23 03:19:19 +00:00
Lan Tian
9f7898818d ulauncher: revert back to webkitgtk_4_0 to fix startup error
(cherry picked from commit 460905fe2e)
2025-05-23 03:16:11 +00:00
Tristan Ross
69a4741a6c llvmPackages.lldb-manpages: fix building
(cherry picked from commit 02260cbf40)
2025-05-23 03:15:36 +00:00
Tristan Ross
c0d22180c5 selinux-sandbox: fix building
(cherry picked from commit e34d28b3f3)
2025-05-23 03:15:19 +00:00
Aleksana
90576afade [Backport release-25.05] doc/rl-2505: wrangle in nixpkgs and nixos split (#410009) 2025-05-23 11:09:47 +08:00
Seth Flynn
fade580c6f doc/rl-2505: re-introduce note about __structuredAttrs & python
Seems this was accidentally removed in 8ae9309 instead of only being
moved from the highlight section

(cherry picked from commit 59b2dd2496)
2025-05-23 02:58:26 +00:00
Seth Flynn
f0e2cff733 doc/rl-2505: move all package entries from nixos notes
This ensures the NixOS notes only refer to things like modules and
NixOS-specific improvements, while the Nixpkgs notes refer to all
package changes

(cherry picked from commit 39a20c95fe)
2025-05-23 02:58:26 +00:00
Seth Flynn
e47625e0e2 nixos/doc/rl-2505: use "Release" as header name
This keeps us in-line with all previous releases. Users should be able
to still differentiate the NixOS and Nixpkgs release notes based on the
header of Nixpkgs' notes

(cherry picked from commit 7edb76465e)
2025-05-23 02:58:26 +00:00
Seth Flynn
71944a8ce8 doc/rl-2505: de-duplicate nixos entires
Make sure package updates are reported in the Nixpkgs notes

(cherry picked from commit 6f5fa0eee4)
2025-05-23 02:58:26 +00:00
Seth Flynn
1f0fc1044c doc/rl-2505: move some entires from nixos notes
These are more broadly applicable to Nixpkgs than only NixOS

(cherry picked from commit 84d6322031)
2025-05-23 02:58:26 +00:00
Sigmanificient
007e8903a9 fasthenry: modernize
(cherry picked from commit afc5cef256)
2025-05-23 02:57:21 +00:00
Sigmanificient
cbe848490c fasthenry: fix build
(cherry picked from commit 9aaa4ac521)
2025-05-23 02:57:21 +00:00
Aleksana
4d98ad776b [Backport release-25.05] treewide: rm empty inherit (#410004) 2025-05-23 10:46:25 +08:00
Sizhe Zhao
ecd10c7cef treewide: rm empty inherit
(cherry picked from commit 43ce4eae1b)
2025-05-23 02:37:45 +00:00
Aaron Andersen
270e01754e [Backport release-25.05] kodiPackages.youtube: 7.1.1.6 -> 7.2.0.1 (#409701) 2025-05-22 22:33:09 -04:00
rewine
4953a0bab4 [Backport release-25.05] vivaldi: 7.3.3635.11 -> 7.3.3635.12 (#409925) 2025-05-23 10:17:09 +08:00
R. Ryantm
1ebe1d9aa9 nwg-dock-hyprland: 0.4.5 -> 0.4.6
(cherry picked from commit 2d536ee8e8)
2025-05-23 02:14:27 +00:00
Lin Xianyi
16a5034a63 scope-tui: 0.3.0-unstable-2024-05-06 -> 0.3.3
Changelog: https://github.com/alemidev/scope-tui/releases/tag/v0.3.3
Diff: c2fe70a69c...v0.3.3
(cherry picked from commit 50f2577220)
2025-05-23 02:12:53 +00:00
Winter
c4aa829967 [Backport release-25.05] cargo-bazel: add libz as buildInput for darwin (#409731) 2025-05-22 21:59:15 -04:00
Aleksana
326ecfa0d5 [Backport release-25.05] gnomeExtensions.arcmenu: 63 -> 65 (#408326) 2025-05-23 09:37:20 +08:00
Aleksana
e6f0153145 [Backport release-25.05] xcircuit: fix build with gcc 14 (#409783) 2025-05-23 09:36:46 +08:00
Aleksana
d964705043 [Backport release-25.05] leo-editor: update meta.homepage (#409785) 2025-05-23 09:36:17 +08:00
Leona Maroni
55d1f923c4 [Backport release-25.05] nixos/manual/upgrading: update release number 24.11 -> 25.05 (#409931) 2025-05-23 00:35:25 +02:00
Leona Maroni
3acf6120ab [Backport release-25.05] nixos/doc/release-notes-2505: fix table formatting for system.build (#409930) 2025-05-23 00:35:16 +02:00
Leona Maroni
04e3910cf4 nixos/manual/upgrading: update release number 24.11 -> 25.05
(cherry picked from commit cc6a8582f6)
2025-05-22 22:26:06 +00:00
Leona Maroni
131205f2f9 nixos/doc/release-notes-2505: fix table formatting for system.build
(cherry picked from commit cce58bb959)
2025-05-22 22:25:08 +00:00
Leona Maroni
85dd2f6acf [Backport release-25.05] doc/rl-2505: Add deprecation warning for removal of GHC versions. (#409909) 2025-05-23 00:23:25 +02:00
R. Ryantm
bb248f8ff6 vivaldi: 7.3.3635.11 -> 7.3.3635.12
(cherry picked from commit 856bddbe8e)
2025-05-22 22:15:55 +00:00
techknowlogick
220c75f1bf vault-bin: 1.19.3 -> 1.19.4
(cherry picked from commit 26088a9aa8)
2025-05-22 21:54:46 +00:00
techknowlogick
9920daf3cd vault: 1.19.3 -> 1.19.4
Diff: https://github.com/hashicorp/vault/compare/v1.19.3...v1.19.4

Changelog: https://github.com/hashicorp/vault/blob/v1.19.4/CHANGELOG.md
(cherry picked from commit d9a74dfb6b)
2025-05-22 21:54:46 +00:00
Arne Keller
bd6e146876 [Backport release-25.05] golly: fix build on darwin (#409886) 2025-05-22 23:43:09 +02:00
maralorn
f86bd390bc doc/rl-2505: Add deprecation warning for removal of GHC versions.
(cherry picked from commit fd7165462c)
2025-05-22 21:28:30 +00:00
emaryn
e261f8c829 librewolf-bin-unwrapped: 138.0.3-1 -> 138.0.4-1
(cherry picked from commit a5fceb3f83)
2025-05-22 21:23:01 +00:00
emaryn
46224b87aa librewolf-bin-unwrapped: 138.0.1-2 -> 138.0.3-1
(cherry picked from commit 1d86f262cc)
2025-05-22 21:23:01 +00:00
Ben Siraphob
6f08466ff8 golly: fix build on darwin
(cherry picked from commit 9be97d3de7)
2025-05-22 20:26:11 +00:00
Wolfgang Walther
984f7dd066 [Backport release-25.05] ci/eval: remove left-over stats.json (#409856) 2025-05-22 20:10:06 +00:00
misuzu
b3627a1c6e [Backport release-25.05] floorp: 11.26.1 -> 11.26.2 (#409794) 2025-05-22 22:47:15 +03:00
Wolfgang Walther
042d2e6417 workflows: avoid running jobs when editing title etc.
We intend to use the edited event to react to base branch changes - but
before this change, we also ran those jobs on simple edits like title or
description.

While this works for some of the quicker jobs, it will not be
sustainable for all evaluation-related jobs. But evaluation needs to be
re-triggered on a base branch change as well, thus this change.

(cherry picked from commit 9b01e09a35)
2025-05-22 19:14:03 +00:00
Wolfgang Walther
dbb5ea9c26 ci/eval: remove left-over stats.json
This seems to be a left-over from before the performance comparison was
changed to a difference-per-chunk analysis.

(cherry picked from commit edaf51cb83)
2025-05-22 19:08:27 +00:00
K900
2225637595 [Backport release-25.05] unbreak linux v5.10 on x86_64 by disabling OF_OVERLAY (#409847) 2025-05-22 21:25:28 +03:00
K900
70d0752c76 [Backport release-25.05] linux/common-config: enable EFI on supported platforms (#409846) 2025-05-22 21:25:19 +03:00
K900
262b698461 [Backport release-25.05] Kernel updates for 2025-05-22 (#409845) 2025-05-22 21:25:12 +03:00
Yarny0
10d58f8ab4 linux/common-config: disable OF_OVERLAY on x86_64 if version < 5.15
`OF_OVERLAY` breaks kernel compilation for version 5.10
(beginning with 5.10.236), but only on x86_64.
Luckily, `OF_OVERLAY` is of not real interest on x86_64,
so this commit unbreaks the build by just disabling that option
if the target is x86_64 *and* the kernel version is below 5.15.

v5.15 contains a patch that turns the compilation error into a
warning, so this measure is not needed from that version on:
https://git.kernel.org/linus/5aad03685185b5133a28e1ee1d4e98d3fd3642a3

The reasons for the build failure are not
fully clear at the time of this writing;
apparently, a change in `pahole` is the core cause.
For details see the issue and in particular this comment:
https://github.com/NixOS/nixpkgs/issues/403985#issuecomment-2863338895
If that is correct and `pahole` gets fixed,
we can probably revert the commit at hand.

(cherry picked from commit 1e6c445767)
2025-05-22 18:25:07 +00:00
Ben Wolsieffer
6e1ff90aaf linux/common-config: enable EFI on supported platforms
Currently, is it possible for stdenv.hostPlatform.isEfi to be true but
the kernel to have no EFI support. This mainly occurs on armv6l and
causes systemd in initrd to fail to build because it attempts to include
the non-existent efivarfs module in the initrd.

To fix this, automatically enable CONFIG_EFI on platforms where isEfi is
true. An alternative would be to make isEfi false on armv6l, but EFI is
in fact usable on that platform.

To prove this, I successfully booted NixOS on a Raspberry Pi Zero using
systemd-boot and U-Boot's EFI support. I confirmed that efivarfs works
as well.

(cherry picked from commit 3aff7b471c)
2025-05-22 18:24:56 +00:00
K900
52788bba0b linux_5_15: 5.15.183 -> 5.15.184
(cherry picked from commit 858ce19170)
2025-05-22 18:24:53 +00:00
K900
637793bdb0 linux_6_1: 6.1.139 -> 6.1.140
(cherry picked from commit 3b7f48048a)
2025-05-22 18:24:53 +00:00
K900
f2d5d9fa17 linux_6_6: 6.6.91 -> 6.6.92
(cherry picked from commit 4fb15d7946)
2025-05-22 18:24:53 +00:00
K900
ec418d1b80 linux_6_12: 6.12.29 -> 6.12.30
(cherry picked from commit c02eaae23d)
2025-05-22 18:24:53 +00:00
K900
0f61178d7e linux_6_14: 6.14.7 -> 6.14.8
(cherry picked from commit 39f51ddad7)
2025-05-22 18:24:53 +00:00
Adam C. Stephens
8b602f0cff fractal: 11 -> 11.1
(cherry picked from commit ce802f152e)
2025-05-22 17:03:56 +00:00
Morgan Jones
64ac770c5a [Backport release-25.05] z3: 4.14.1 → 4.15.0, z3_4_14: drop (#409741) 2025-05-22 09:48:07 -07:00
Morgan Jones
cd4df48f4a [Backport release-25.05] mattermost: 10.5.5 -> 10.5.6, mattermostLatest: 10.8.0 -> 10.8.1 (#409734) 2025-05-22 09:44:13 -07:00
Jost Alemann
0d55ea6ddb lazygit: 0.50.0 -> 0.51.0
Changelog: https://github.com/jesseduffield/lazygit/releases/tag/v0.51.0
Diff: https://github.com/jesseduffield/lazygit/compare/v0.50.0...v0.51.0
(cherry picked from commit 9810b2ce38)
2025-05-22 16:36:21 +00:00
hustlerone
d5138ca3d6 nixos/limine: tidy up the boot menu
(cherry picked from commit de6905ee37)
2025-05-22 21:03:39 +05:30
Niklas Korz
96b2436984 [Backport release-25.05] nixos/meilisearch: use meilisearch_1_11 for stateVersion below 25.05 (#409773) 2025-05-22 17:31:33 +02:00
Christoph Heiss
27aaacdd00 floorp: 11.26.1 -> 11.26.2
Security fixes.

Release announcement: https://blog.floorp.app/en/release/11.26.2.html
Git changelog: https://github.com/Floorp-Projects/Floorp/compare/v11.26.1...v11.26.2

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
(cherry picked from commit d1bc54ae6c)
2025-05-22 14:54:17 +00:00
Aleksana
099325e609 [Backport release-25.05] velocity: make Nix register dependencies of native libraries (#409725) 2025-05-22 22:36:37 +08:00
Robert Hensing
6cb1302c83 [Backport release-25.05] nixVersions.git: 2.29pre20250409_e76bbe41 -> 2.30pre20250521_76a4d4c2 (#409644) 2025-05-22 16:24:18 +02:00
Jost Alemann
05f3285aae leo-editor: update meta.homepage
meta.homepage seems outdated

(cherry picked from commit e6ee64c4d4)
2025-05-22 14:23:22 +00:00
Sigmanificient
c8f63b2a82 xcircuit: fix build with gcc 14
(cherry picked from commit c06a4060f2)
2025-05-22 14:19:29 +00:00
Aleksana
5de2d5042d [Backport release-25.05] neo4j: fix and enable strictDeps (#409641) 2025-05-22 22:11:23 +08:00
Aleksana
558884cb6f [Backport release-25.05] lixPackageSets.{lix_2_92,lix_2_93,git}.lix: fix building on darwin (#409726) 2025-05-22 22:11:07 +08:00
Aleksana
a53af79559 [Backport release-25.05] ugarit: fix build (#409737) 2025-05-22 22:10:55 +08:00
Niklas Korz
26506af385 nixos/meilisearch: use meilisearch_1_11 for stateVersion below 25.05
(cherry picked from commit aac2e41ce0)
2025-05-22 13:54:53 +00:00
Niklas Korz
83a5adfbd0 meilisearch_1_11: init at 1.11.3
(cherry picked from commit 9b8ced6e69)
2025-05-22 13:54:53 +00:00
K900
24181e7f5c [Backport release-25.05] wireplumber: 0.5.8 -> 0.5.10 (#409762) 2025-05-22 16:12:13 +03:00
K900
2131c2cb01 wireplumber: 0.5.8 -> 0.5.10
Diff: https://gitlab.freedesktop.org/pipewire/wireplumber/-/compare/0.5.8...0.5.10
(cherry picked from commit 49842e98a7)
2025-05-22 13:11:53 +00:00
Leona Maroni
9f74a122b8 [Backport release-25.05] gitlab: 18.0.0 -> 18.0.1 (#409718) 2025-05-22 14:29:24 +02:00
R. Ryantm
9200345239 yandex-music: 5.50.0 -> 5.51.1
(cherry picked from commit accb7207bc)
2025-05-22 12:09:59 +00:00
Jost Alemann
c082e01f5c yt-dlp: 2025.4.30 -> 2025.5.22
Changelog: https://github.com/yt-dlp/yt-dlp/releases/tag/2025.05.22
Diff: https://github.com/yt-dlp/yt-dlp/compare/2025.04.30...2025.05.22
(cherry picked from commit 74595d480b)
2025-05-22 11:49:04 +00:00
Tom van Dijk
c8c8dadcde doc: rl-2505: z3 4.14 -> 4.15
(cherry picked from commit fa2bee6de3)
2025-05-22 11:46:42 +00:00
Tom van Dijk
ce48072285 z3: refactor
(cherry picked from commit 13c6d411e7)
2025-05-22 11:46:42 +00:00
Tom van Dijk
7ab6069ba4 z3_4_15: rename to z3
(cherry picked from commit 4b9c17e546)
2025-05-22 11:46:42 +00:00
Tom van Dijk
9bfc93a652 z3: add aliases for older versions
(cherry picked from commit 60cbd81553)
2025-05-22 11:46:41 +00:00
Tom van Dijk
bb98fba388 z3: 4.14.1 → 4.15.0, z3_4_14: drop, z3_4_15: init at 4.15.0
(cherry picked from commit f9d66c36aa)
2025-05-22 11:46:41 +00:00
Tom van Dijk
5eb2b2eefe ugarit: fix build
(cherry picked from commit edc5b6b0a5)
2025-05-22 11:44:12 +00:00
Thomas Gerbet
9db7cbf9f6 mattermostLatest: 10.8.0 -> 10.8.1
Fixes MMSA-2025-00491 (rated as a critical vuln).

(cherry picked from commit 45e21093c3)
2025-05-22 11:40:45 +00:00
Thomas Gerbet
60d095da85 mattermost: 10.5.5 -> 10.5.6
Fixes MMSA-2025-00491 (rated as a critical vuln).

(cherry picked from commit 0c65612e31)
2025-05-22 11:40:45 +00:00
Qiming Chu
881687dc9b python3Packages.klayout: fix darwin build
Signed-off-by: Qiming Chu <cchuqiming@gmail.com>
(cherry picked from commit e5474c6db5)
2025-05-22 11:39:19 +00:00
Fiona Behrens
5b841354b7 cargo-bazel: add libz as buildInput for darwin
Add libz as build input to allow building cargo-bazel on darwin.

(cherry picked from commit a952bd4a00)
2025-05-22 11:38:22 +00:00
Seth Flynn
1f9c0d8a31 lixPackageSets.{lix_2_92,lix_2_93,git}.lix: fix building on darwin
https://git.lix.systems/lix-project/lix/issues/568
https://git.lix.systems/lix-project/lix/issues/832
(cherry picked from commit ccd5688c94)
2025-05-22 11:27:47 +00:00
FliegendeWurst
3643b0d814 velocity: make Nix register dependencies of native libraries
Also fix and enable strictDeps.

(cherry picked from commit d0027f93ac)
2025-05-22 11:27:01 +00:00
Aleksana
031f393b52 [Backport release-25.05] bottles-unwrapped: 51.17 -> 51.21, update patches, add gamemode to propagatedBuildInputs, fix typo in warn-unsupported.patch (#408717) 2025-05-22 19:07:55 +08:00
Aleksana
56d78ec9a1 [Backport release-25.05] media-downloader: 5.3.2 -> 5.3.3 (#409647) 2025-05-22 19:07:24 +08:00
Leona Maroni
c20fc9e97d gitlab: 18.0.0 -> 18.0.1
https://about.gitlab.com/releases/2025/05/21/patch-release-gitlab-18-0-1-released/
(cherry picked from commit 3b258c1272)
2025-05-22 11:05:57 +00:00
R. Ryantm
1be40df630 kodiPackages.youtube: 7.1.1.6 -> 7.2.0.1
(cherry picked from commit 6957c41b05)
2025-05-22 10:26:43 +00:00
SchweGELBin
0711254279 element-web: 1.11.99 -> 1.11.100
(cherry picked from commit c1ef83481f)
2025-05-22 15:46:21 +05:30
SchweGELBin
ed640b085b element-desktop: 1.11.99 -> 1.11.100
(cherry picked from commit f25948845a)
2025-05-22 15:46:21 +05:30
Fabian Affolter
9ca0be1b31 python313Packages.nomadnet: 0.6.2 -> 0.7.0
Diff: https://github.com/markqvist/NomadNet/compare/refs/tags/0.6.2...refs/tags/0.7.0

Changelog: https://github.com/markqvist/NomadNet/releases/tag/0.7.0
(cherry picked from commit ae2ba4778a)
2025-05-22 15:45:39 +05:30
Fabian Affolter
5e47231a59 python313Packages.rns: 0.9.5 -> 0.9.6
Diff: https://github.com/markqvist/Reticulum/compare/refs/tags/0.9.5...refs/tags/0.9.6

Changelog: https://github.com/markqvist/Reticulum/blob/0.9.6/Changelog.md
(cherry picked from commit e229486656)
2025-05-22 15:45:39 +05:30
Fabian Affolter
c264cabb08 python313Packages.lxmf: 0.6.3 -> 0.7.1
Diff: markqvist/LXMF@refs/tags/0.6.3...refs/tags/0.7.1

Changelog: https://github.com/markqvist/LXMF/releases/tag/0.7.1
(cherry picked from commit 7dc9a25626)
2025-05-22 15:45:39 +05:30
Niklas Korz
6fd1da938a [Backport release-25.05] wesnoth: 1.18.4 -> 1.18.5 (#409690) 2025-05-22 12:06:00 +02:00
Niklas Korz
8247e3ab65 wesnoth: set meta.changelog
(cherry picked from commit 4601a7333d)
2025-05-22 09:49:48 +00:00
R. Ryantm
5787bd61ea wesnoth: 1.18.4 -> 1.18.5
Changelog: https://github.com/wesnoth/wesnoth/blob/1.18.5/changelog.md
(cherry picked from commit 8a0962d40f)
2025-05-22 09:49:48 +00:00
TomaSajt
615f703403 yacreader: fix darwin build
(cherry picked from commit 032bd9d013)
2025-05-22 08:45:36 +00:00
eljamm
fe9e37d756 linuxPackages.v86d: small improvements
- use `tag` in `src`
- specify phase hooks
- remove `with lib;` in `meta`

(cherry picked from commit 16dc84994e)
2025-05-22 08:38:42 +00:00
eljamm
d4c6f7eed4 linuxPackages.v86d: fix build
(cherry picked from commit fcd0c8318d)
2025-05-22 08:38:42 +00:00
Arne Keller
ccb6cb597e [Backport release-25.05] nodejs_24: 24.0.2 -> 24.1.0 (#409544) 2025-05-22 08:48:49 +02:00
Vincent Tourneur
f99963cbfd ocamlPackages.readline: 0.1 -> 0.2
Add myself as a maintainer.

(cherry picked from commit b67fbd8419)
2025-05-22 08:22:39 +02:00
R. Ryantm
b46093bb1b media-downloader: 5.3.2 -> 5.3.3
(cherry picked from commit 8a1a5d1b0f)
2025-05-22 05:35:45 +00:00
Aleksana
7060e0d30e [Backport release-25.05] Don't trigger the evaluation of apple-sdk in Linux stdenv (#409630) 2025-05-22 13:32:15 +08:00
Aleksana
e711955b96 [Backport release-25.05] nixos/gtklock: init (#409633) 2025-05-22 13:20:26 +08:00
John Ericson
a73b775fd6 nixVersions.git: 2.29pre20250409_e76bbe41 -> 2.30pre20250521_76a4d4c2
Changes: e76bbe41...76a4d4c2
(cherry picked from commit 70582d29dc)
2025-05-22 05:15:36 +00:00
FliegendeWurst
c44e43f872 neo4j: fix and enable strictDeps
neo4j-admin is a bash script.

(cherry picked from commit c08e5ee6d9)
2025-05-22 05:11:28 +00:00
Fugi
63b6a715ed nixos/gtklock: init
(cherry picked from commit 65a759f7b4)
2025-05-22 03:49:50 +00:00
Zhaofeng Li
5a465d9e8f Don't trigger the evaluation of apple-sdk in Linux stdenv
During the Apple SDK revamp of #346043, cc-wrapper and bintools-wrapper
were modified to automatically add a fallback SDK if $DEVELOPER_DIR is
not set [^1]. However, because of the order of the && operands,
apple-sdk is always evaluated even when it's not needed.

Flip the && operands so we only trigger the evaluation when targeting
Darwin.

[^1]: 51755b0c00

(cherry picked from commit 5953ae56d8)
2025-05-22 03:32:38 +00:00
Martin Weinelt
f2b166b813 bind: 9.20.7 -> 9.20.8 (#409609) 2025-05-22 04:22:21 +02:00
Aleksana
df0c56903b [Backport release-25.05] luaPackages.luv: fix installCheckPhase on Darwin (#409396) 2025-05-22 10:03:36 +08:00
Aleksana
4c0061c95a [Backport release-25.05] gitrs: add libz on darwin (#409395) 2025-05-22 10:03:15 +08:00
Aleksana
9ce41ef433 [Backport release-25.05] attic-server: don't depend on nix (#409477) 2025-05-22 10:03:02 +08:00
Martin Weinelt
547e5d4816 bind: remove globin from maintainers
Added in 2019 but made no change since.

(cherry picked from commit a3e38960d1)
2025-05-22 03:44:23 +02:00
Martin Weinelt
58071ef740 bind: make kubernetes passthru tests conditional on x86_64-linux
This unbreaks `nix-build -A knot.tests --eval system aarch64-linux`.

(cherry picked from commit 7f5b661595)
2025-05-22 03:44:19 +02:00
Martin Weinelt
85e096c5f8 bind: 9.20.8 -> 9.20.9
https://downloads.isc.org/isc/bind9/cur/9.20/doc/arm/html/notes.html#notes-for-bind-9-20-9

Fixes: CVE-2025-40775
(cherry picked from commit 135f8cb73c)
2025-05-22 03:44:14 +02:00
R. Ryantm
de90cbad22 bind: 9.20.7 -> 9.20.8
(cherry picked from commit cf21fe4271)
2025-05-22 03:43:50 +02:00
Leona Maroni
a289e66c76 [Backport release-25.05] percona-server_8_0: 8.0.41-32 -> 8.0.42-33 (#409555) 2025-05-21 23:25:15 +02:00
R. Ryantm
ff7f861950 percona-server_8_0: 8.0.41-32 -> 8.0.42-33
(cherry picked from commit 2bb53e99dd)
2025-05-21 21:18:32 +00:00
Adam C. Stephens
cd0a35bc10 [Backport release-25.05] erlang_28: 28.0-rc4 -> 28.0 (#409507) 2025-05-21 17:09:32 -04:00
Adam C. Stephens
3fba9b32a2 [Backport release-25.05] beam26Packages.elixir: 1.18.3 -> 1.18.4 (#409508) 2025-05-21 17:09:11 -04:00
Leona Maroni
27c1806235 [Backport release-25.05] python313Packages.supervisor: fix build with python 3.13 (#409542) 2025-05-21 22:49:36 +02:00
Antoine du Hamel
ea776c1eb0 nodejs_24: 24.0.2 -> 24.1.0
(cherry picked from commit c4869aace4)
2025-05-21 20:44:54 +00:00
Leona Maroni
cca8ef85e6 python313Packages.supervisor: fix build with python 3.13
(cherry picked from commit c16a5fefc6)
2025-05-21 20:41:48 +00:00
Yt
eb416ab640 [Backport release-25.05] stalwart-mail: use system jemalloc (#409430) 2025-05-21 15:56:01 -04:00
Felix Schröter
0b69188459 [Backport release-25.05] {tor,mullvad}-browser: 14.5.1 -> 14.5.2 (#409498) 2025-05-21 19:30:17 +00:00
Ramses
76647f3f1b [Backport release-25.05] udevCheckHook: guard platform (#409488) 2025-05-21 21:17:52 +02:00
Morgan Jones
5e8bb332d6 release-notes: document tpm2-pkcs11 abrmd changes for 25.05
(cherry picked from commit f86ebd9ac5)
2025-05-22 00:37:29 +05:30
Morgan Jones
423873feaa nixos/tpm2: default pkcs#11 module based on abrmd config
Since there are now variants of tpm2-pkcs11 with and without ABRMD
support (for the kernel resource manager), ensure we pick the correct
default.

Fixes an accidental backwards incompatibility with the module.

(cherry picked from commit 9c1564e395)
2025-05-22 00:37:29 +05:30
Morgan Jones
93cdd0f649 tpm2-pkcs11: export abrmd passthru
security.tpm2 should depend on this for the default PKCS#11 module.

(cherry picked from commit 75f77e7570)
2025-05-22 00:37:29 +05:30
Peder Bergebakken Sundt
ee4f822ff4 [Backport release-25.05] pygame{,-ce}: migrate to sdl2-compat; SDL2_classic: drop (#409503) 2025-05-21 21:03:00 +02:00
Thiago Kenji Okada
4f31d66c2a [Backport release-25.05] nixos-rebuild-ng: fixes for Python 3.13 (#409472) 2025-05-21 19:37:13 +01:00
R. Ryantm
195127387b beam26Packages.elixir: 1.18.3 -> 1.18.4
(cherry picked from commit ecd16b486d)
2025-05-21 18:35:52 +00:00
Adam C. Stephens
d052c58287 erlang_28: 28.0-rc4 -> 28.0
https://github.com/erlang/otp/releases/tag/OTP-28.0
https://www.erlang.org/blog/highlights-otp-28/
https://www.erlang.org/news/180
(cherry picked from commit 75aae3d848)
2025-05-21 18:35:28 +00:00
Grimmauld
374570b087 SDL2_classic: drop
(cherry picked from commit 67081ee1ba)
2025-05-21 20:30:41 +02:00
Grimmauld
79d5a39832 SDL2_classic_image: drop
(cherry picked from commit 3e7b6edf80)
2025-05-21 20:30:41 +02:00
Grimmauld
e4f1cf2208 SDL2_classic_mixer: drop
(cherry picked from commit 5d67c99207)
2025-05-21 20:30:41 +02:00
Grimmauld
0b4ab86284 SDL2_classic_ttf: drop
(cherry picked from commit 9bf188c26a)
2025-05-21 20:30:41 +02:00
Grimmauld
6d49d90eef SDL2_classic: remove passthru tests
(cherry picked from commit 39693262f5)
2025-05-21 20:30:41 +02:00
Marcin Serwin
6a69bd2539 SDL2_classic: use tests that actually use the package
The default libraries use SDL2 compat after migration, switched to use
the specifically created classic variants. Only pygame and pygame-ce
use SDL2 classic, other listed packages use SDL2 compat so they were
removed.

Signed-off-by: Marcin Serwin <marcin@serwin.dev>
2025-05-21 20:30:24 +02:00
Marcin Serwin
83a88e9f7d SDL2_classic: 2.32.4 -> 2.32.6 2025-05-21 20:30:24 +02:00
Marcin Serwin
b5e655b817 SDL2_classic: fix update script
Without the more specific regex it considered 3.x releases for updates.
2025-05-21 20:30:23 +02:00
Marcin Serwin
09457cb230 pygame: migrate to sdl2-compat
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit 99ecf06993)
2025-05-21 18:22:05 +00:00
Marcin Serwin
8bc000b3c9 pygame-ce: migrate to sdl2-compat
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit 225330b95d)
2025-05-21 18:22:05 +00:00
Marcin Serwin
0fdddacaf2 python3Packages.gymnasium: explicitly use dummy videodriver in checkPhase
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit 03a1fef71d)
2025-05-21 18:22:05 +00:00
Marcin Serwin
419efe965b python3Packages.gym: explicitly use dummy videodriver in checkPhase
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit 070f2a0336)
2025-05-21 18:22:04 +00:00
Sefa Eyeoglu
915fee7789 [Backport release-25.05] qpwgraph: 0.9.0 -> 0.9.2 (#409495) 2025-05-21 20:17:44 +02:00
Felix Schröter
2e8b38f142 mullvad-browser: 14.5.1 -> 14.5.2
https://github.com/mullvad/mullvad-browser/releases/tag/14.5.2
(cherry picked from commit 4d96fe74a5)
2025-05-21 18:13:15 +00:00
Felix Schröter
d296b6a849 tor-browser: 14.5.1 -> 14.5.2
https://blog.torproject.org/new-release-tor-browser-1452/
(cherry picked from commit c2763a2a81)
2025-05-21 18:13:14 +00:00
programmerlexi
f5c8555577 nixos/limine: don't modify boot order on bootloader update
(cherry picked from commit 95030d7eb3)
2025-05-21 23:38:10 +05:30
R. Ryantm
016b2284ad qpwgraph: 0.9.0 -> 0.9.2
(cherry picked from commit 1515a809d6)
2025-05-21 18:07:38 +00:00
Yohann Boniface
aeacd18dbe [Backport release-25.05] authelia: 4.39.1 -> 4.39.3 (#409333) 2025-05-21 19:49:38 +02:00
Michele Guerini Rocco
d05317b80e [Backport release-25.05] pdns-recursor: 5.1.2 -> 5.2.2 (#409486) 2025-05-21 19:41:55 +02:00
Leona Maroni
1bdd06c264 python313Packages.tendo: fix build with python 3.13
(cherry picked from commit dd54389252)
2025-05-21 17:39:23 +00:00
Felix Bargfeldt
9a2b723115 [Backport release-25.05] glance: 0.8.1 -> 0.8.3, fix build on x86_64-darwin (#409487) 2025-05-21 19:37:53 +02:00
Grimmauld
abeca9a5e3 udevCheckHook: guard platform
It is technically possible to guard all udevCheckHook usages behind
`lib.optionals (lib.meta.availableOn stdenv.buildPlatform systemdMinimal)`.

However, doing this is hard to read, clunky, and hard to discover.
*Not* doing such a guard would mean cross-compilation darwin -> linux breaks.
The workaround here is to just accept any udev rules if they can't be properly checked.

(cherry picked from commit 1461a8401c)
2025-05-21 17:37:02 +00:00
Defelo
cbbc83a308 glance: 0.8.1 -> 0.8.3
(cherry picked from commit f519f7581c)
2025-05-21 17:28:47 +00:00
Defelo
1f5bb8ce86 glance: fix build on x86_64-darwin
(cherry picked from commit 05859772ec)
2025-05-21 17:28:47 +00:00
emaryn
5f5b7b360e pdns-recursor: 5.1.2 -> 5.2.2
(cherry picked from commit e5a10947bb)
2025-05-21 17:24:07 +00:00
Yureka
06c38d6619 attic-server: don't depend on nix
(cherry picked from commit 4673e3b79e)
2025-05-21 16:30:16 +00:00
Martin Weinelt
82dc36b90d esphome: pin paho-mqtt at 1.6.1 (#409467) 2025-05-21 18:22:53 +02:00
Aleksana
18ba8345b0 [Backport release-25.05] poutine: mark as broken on darwin (#408963) 2025-05-22 00:18:34 +08:00
Aleksana
0ff579bc51 [Backport release-25.05] vorbis-tools: remove patch applied upstream (#409468) 2025-05-22 00:15:17 +08:00
Aleksana
471292d3f2 [Backport release-25.05] gupnp_1_6: Unbreak on Darwin (#408667) 2025-05-22 00:14:53 +08:00
Aleksana
10ebe60cac [Backport release-25.05] nixos/doc/rl-2505: Fix wording of users.users subuid allocation note (#408025) 2025-05-22 00:14:14 +08:00
Aleksana
6c8cd30a08 [Backport release-25.05] matrix-continuwuity: init at 0.5.0-rc.5; nixos/matrix-continuwuity: init (#407850) 2025-05-22 00:11:54 +08:00
Aleksana
a91687154d [Backport release-25.05] python313Packages.vat-moss: disable (#407941) 2025-05-22 00:11:41 +08:00
Aleksana
7d1cf045d3 [Backport release-25.05] bitwarden-cli: add zsh completion (#408901) 2025-05-22 00:11:02 +08:00
Aleksana
44ab8abcd7 [Backport release-25.05] {jimtcl,openocd,tinygo}: unmark as broken on Darwin (#409397) 2025-05-22 00:10:34 +08:00
Thiago Kenji Okada
df20fc4cbb nixos-rebuild-ng: assert if get_qualified_name is used by internal modules
(cherry picked from commit b1a205154c)
2025-05-21 16:08:56 +00:00
Thiago Kenji Okada
231feee62e nixos-rebuild-ng: do not use get_qualified_name for non-internal modules
To avoid breakage in future this avoid using `get_qualified_name()` for
any non-internal mock. This is fine because the idea to
`get_qualified_name()` is to make it easier to refactor since you can
rename the method name and this is also automatically rename the mocks,
but non-internal mocks are unlikely to change names anyway.

(cherry picked from commit 90f7121314)
2025-05-21 16:08:56 +00:00
Thiago Kenji Okada
c04b6a04ec nixos-rebuild-ng: avoid get_qualified_name usage for pathlib.Path
Seems to be broken since Python 3.13.

(cherry picked from commit 86e3302381)
2025-05-21 16:08:55 +00:00
Martin Madsen
e1b8fcbb5a vorbis-tools: remove patch applied upstream
(cherry picked from commit c529a88fcc)
2025-05-21 16:02:42 +00:00
DontEatOreo
2f2a3eb824 raycast: 1.98.0 -> 1.99.0
Changelog: https://www.raycast.com/changelog/1-99-0
(cherry picked from commit 1208d75e7e)
2025-05-21 09:00:26 -07:00
Martin Weinelt
7c0dc1475d esphome: pin paho-mqtt at 1.6.1
Closes: #409387
(cherry picked from commit 8ab765e2d4)
2025-05-21 17:56:39 +02:00
emaryn
75433c77cb organicmaps: 2025.03.02-7 -> 2025.05.20-5
Diff: https://github.com/organicmaps/organicmaps/compare/refs/tags/2025.03.02-7-android...refs/tags/2025.05.20-5-android
(cherry picked from commit 98a8834d7a)
2025-05-21 14:48:34 +00:00
Yureka
ceda4e89d3 stalwart-mail: use system jemalloc
fixes the package on aarch64 16k-pagesize systems

(cherry picked from commit 29ae2000b1)
2025-05-21 14:07:39 +00:00
Aleksana
b300e82533 [Backport release-25.05] librespeed-cli: refactor and mark as broken on darwin (#408956) 2025-05-21 21:43:24 +08:00
Aleksana
8e799186ae [Backport release-25.05] maigret: refactor and makr as broken on darwin (#408958) 2025-05-21 21:43:17 +08:00
Aleksana
414483378b [Backport release-25.05] mx-takeover: refactor and disable on darwin (#408960) 2025-05-21 21:43:07 +08:00
Aleksana
7cb7069726 [Backport release-25.05] azurehound: disable on darwin (#408961) 2025-05-21 21:42:52 +08:00
Felix Bargfeldt
b721e18bd4 [Backport release-25.05] synapse-admin-etkecc: 0.10.4-etke41 -> 0.11.0-etke42 (#409423) 2025-05-21 15:42:42 +02:00
Aleksana
5fa459ca90 [Backport release-25.05] cups-browsed: Fix cross-compilation RiscV (#409415) 2025-05-21 21:40:11 +08:00
Aleksana
1ea5694823 [Backport release-25.05] qc71_laptop: rectify meta.platforms (#409105) 2025-05-21 21:40:02 +08:00
Aleksana
a36016bd71 [Backport release-25.05] authelia: fix cross build (#409414) 2025-05-21 21:39:30 +08:00
Defelo
ebd1f7a253 synapse-admin-etkecc: 0.10.4-etke41 -> 0.11.0-etke42
(cherry picked from commit 1de00c4a2b)
2025-05-21 13:30:58 +00:00
Marcus Ramberg
df61adab13 [Backport release-25.05] cloudflare-warp: wrap warp-cli to fix browser opening (#408323) 2025-05-21 15:26:39 +02:00
Felix Bargfeldt
13c942f49c [Backport release-25.05] treefmt: 2.3.0 -> 2.3.1 (#409417) 2025-05-21 15:26:26 +02:00
Brian McGee
c701041032 treefmt: 2.3.0 -> 2.3.1
(cherry picked from commit 8d5d9d28be)
2025-05-21 13:16:47 +00:00
Jonas Heinrich
02032edaeb cups-browsed: Fix cross-compilation RiscV
(cherry picked from commit 8ae40661d1)
2025-05-21 13:11:53 +00:00
FliegendeWurst
645dcf4f86 authelia: fix cross build
(cherry picked from commit 490a00c7d9)
2025-05-21 13:08:33 +00:00
Aleksana
46e0204126 [Backport release-25.05] unicorn-angr: mark as broken on darwin (#408962) 2025-05-21 20:24:57 +08:00
Aleksana
8f2bef8334 [Backport release-25.05] deepsecrets: refactor and mark as broken on darwin (#408966) 2025-05-21 20:24:43 +08:00
Aleksana
7004e2ad6e [Backport release-25.05] midori: drop (#409393) 2025-05-21 20:24:03 +08:00
Liam Murphy
62f8fb0c1a tinygo: unmark as broken on Darwin
(cherry picked from commit 68443d7da6)
2025-05-21 12:24:00 +00:00
Liam Murphy
0651c9a51a openocd: unmark as broken on Darwin
(cherry picked from commit 5de8edee04)
2025-05-21 12:24:00 +00:00
Liam Murphy
cfcba5424d jimtcl: unmark as broken on Darwin
(cherry picked from commit e3002620b9)
2025-05-21 12:24:00 +00:00
Aleksana
338e3843d6 [Backport release-25.05] ares-rs: mark as broken on darwin (#408968) 2025-05-21 20:22:24 +08:00
Alex James
0d09a05785 luaPackages.luv: fix installCheckPhase on Darwin
(cherry picked from commit d58e5041de)
2025-05-21 12:22:23 +00:00
Aleksana
59191bb826 [Backport release-25.05] arp-scan-rs: mark as broken on darwin (#408969) 2025-05-21 20:22:08 +08:00
Fiona Behrens
b3af4ac586 gitrs: add libz on darwin
(cherry picked from commit fac152987b)
2025-05-21 12:21:23 +00:00
Thomas Gerbet
e8bf3e2fb5 midori: drop
Package is broken for a while and upstream project
seems to have been re-oriented to a Firefox fork.
See https://github.com/midori-browser/core/issues/468

Closes #374354

(cherry picked from commit f492075c53)
2025-05-21 12:16:05 +00:00
Sizhe Zhao
cd2812de55 limine: 9.3.0 -> 9.3.2 2025-05-21 16:35:15 +05:30
Sizhe Zhao
257020538a limine: add prince213 to maintainers 2025-05-21 16:35:15 +05:30
Yaya
f64ff96c0a nixos/doc/rl-2505: Mention minimal postgresql requirement for gitlab 18
`gitlab` >= 18.0 requires at least `postgresql` >= 16. GitLab users
are advised to follow the mentioned steps in the manual to upgrade their
PostgreSQL installation.

(cherry picked from commit c46cc8a67a)
2025-05-21 12:57:34 +02:00
Yaya
a1d1c7afd9 nixos/gitlab: update minimum PostgreSQL version assertion
GitLab 18.0.0 requires at least PostgreSQL 16.

https://docs.gitlab.com/18.0/install/requirements/#postgresql
(cherry picked from commit ee58f11546)
2025-05-21 12:57:34 +02:00
Yaya
7489e88915 gitlab: move to pkgs/by-name
(cherry picked from commit 4a1bbbba52)
2025-05-21 12:57:34 +02:00
Yaya
b437573e4a gitlab: 17.11.2 -> 18.0.0
https://gitlab.com/gitlab-org/gitlab/-/blob/v18.0.0-ee/CHANGELOG.md
(cherry picked from commit 816aa29cd6)
2025-05-21 12:57:34 +02:00
programmerlexi
d8c429b16a nixos/limine: carefully remove files instead of nuking them
(cherry picked from commit a094b5d8cc)
2025-05-21 15:42:12 +05:30
programmerlexi
ecc74afaf4 nixos/limine: atomically copy files
(cherry picked from commit 2c7659b1ff)
2025-05-21 15:42:12 +05:30
Aleksana
6408656bdf [Backport release-25.05] pan: 0.158 -> 0.162 (#409345) 2025-05-21 17:43:06 +08:00
Aleksana
7c5451f69a [Backport release-25.05] better-control: init at 6.11.6 (#409341) 2025-05-21 17:23:38 +08:00
emaryn
e7df0771b4 pan: 0.158 -> 0.162
(cherry picked from commit 522d23c200)
2025-05-21 09:22:58 +00:00
Rishabh
3087ace5ca better-control: init at 6.11.6 2025-05-21 14:28:08 +05:30
Ramses
ed42876fa5 [Backport release-25.05] brscan5: remove deprecated SYSFS udev rule (#409320) 2025-05-21 10:51:41 +02:00
Ramses
aac963f4c4 [Backport release-25.05] udevCheckHook: init (#409322) 2025-05-21 10:51:20 +02:00
Rishabh
f35374558e maintainers: add Rishabh5321 2025-05-21 14:12:47 +05:30
transcaffeine
b7ec9a04b8 authelia: 4.39.1 -> 4.39.3
Release notes:
  - https://github.com/authelia/authelia/releases/tag/v4.39.2
  - https://github.com/authelia/authelia/releases/tag/v4.39.3
Full changelog: https://github.com/authelia/authelia/compare/v4.39.1...v4.39.3

See #406404

(cherry picked from commit 7bbc83cedf)
2025-05-21 08:37:07 +00:00
Thiago Kenji Okada
4a9a592907 [Backport release-25.05] nixos-rebuild-ng: kill underlying remote process (#409147) 2025-05-21 09:31:01 +01:00
Felix Bargfeldt
21d52bffbc [Backport release-25.05] wivrn: 0.24.1 -> 0.25 (#408506) 2025-05-21 10:16:52 +02:00
Aleksana
a07ce2b16f [Backport release-25.05] anytype: Minor fixes to .desktop file (#409311) 2025-05-21 16:06:51 +08:00
Aleksana
bff1ef50f0 [Backport release-25.05] scorched3d: add gcc 14 fix (#409302) 2025-05-21 16:05:38 +08:00
Grimmauld
e01dd0db36 udevCheckHook: init
Usage:
```nix
nativeBuildInputs = [
  udevCheckHook
];
doInstallCheck = true;
```

This hook executes `udevadm verify --resolve-names=never --no-style`
on all outputs that have `/etc/udev/rules.d`.
This us a logical part of #404323 to check packages that supply udev rules.

Note this hook introduces a dependency on `systemdMinimal`,
meaning this can't check systemdMinimal or its dependencies.

(cherry picked from commit b3bdbf4806)
2025-05-21 07:52:46 +00:00
Matt Christ
7c33418bb0 brscan5: remove deprecated SYSFS udev rule
This patch resolves an issue where systemd-udevd outputs events like:

/nix/store/jm9paymkapbi6pzwbjgmi634vaf2y5va-udev-rules/49-brother-mfp-brscan5-1.0.2-2.rules:17 Invalid key 'SYSFS'.

(cherry picked from commit ff62fe4136)
2025-05-21 07:50:48 +00:00
Marcus Ramberg
8ff79da307 [Backport release-25.05] helmfile-wrapped: 1.0.0 -> 1.1.0 (#409242) 2025-05-21 09:49:34 +02:00
Axel Karjalainen
6782628b42 anytype: Minor fixes to .desktop file
Renamed to `anytype.desktop` to stay consistent with the Wayland
application ID and added support for the custom URL scheme handler.

(cherry picked from commit d02c917a25)
2025-05-21 06:59:37 +00:00
Aleksana
88ba6dcd9a [Backport release-25.05] clojure: fix and enable strictDeps (#409303) 2025-05-21 14:53:27 +08:00
Aleksana
9a58bf41cf [Backport release-25.05] nixos/spotifyd: Fix 404 URLs (#409304) 2025-05-21 14:53:04 +08:00
Evan Scamehorn
e9461aa3e3 nixos/spotifyd: Fix 404 URLs (#408504)
(cherry picked from commit a4e1ad5521)
2025-05-21 06:46:57 +00:00
FliegendeWurst
9edb988168 clojure: fix and enable strictDeps
(cherry picked from commit b46869e2b6)
2025-05-21 06:46:30 +00:00
Aleksana
f1cbdccde4 [Backport release-25.05] python313Packages.turrishw: fix changelog entry (#408957) 2025-05-21 14:42:12 +08:00
Marcin Serwin
3152f9d33a scorched3d: add gcc 14 fix
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit f51f718e7c)
2025-05-21 06:41:49 +00:00
Aleksana
3c76d9eba3 [Backport release-25.05] tsukimi: 0.20.0 -> 0.21.0 (#409298) 2025-05-21 14:40:23 +08:00
Aleksana
a279a19f67 [Backport release-25.05] iplookup-gtk: 0.4.0 -> 0.4.1 (#409297) 2025-05-21 14:40:08 +08:00
K900
05614b07fb [Backport release-25.05] mumble: Apply point release number to internal version string (#409299) 2025-05-21 09:35:37 +03:00
Felix Singer
fa9260a9fe mumble: Apply point release number to internal version string
Without applying the build option BUILD_NUMBER, Mumble only knows about
the major and minor version. So, if the actual version string is
1.5.735, then the Mumble application only displays 1.5.0. Fix that.

Reported-by: Hartmnt
Signed-off-by: Felix Singer <felixsinger@posteo.net>
(cherry picked from commit ccf1614060)
2025-05-21 06:32:55 +00:00
R. Ryantm
d7e521930e tsukimi: 0.20.0 -> 0.21.0
(cherry picked from commit 6ec497cb47)
2025-05-21 06:32:54 +00:00
R. Ryantm
8b2ea03133 iplookup-gtk: 0.4.0 -> 0.4.1
(cherry picked from commit 3978e2e8c4)
2025-05-21 06:31:35 +00:00
Aleksana
67bf56fa8c [Backport release-25.05] share-preview: 0.5.0 -> 1.0.0 (#409048) 2025-05-21 13:19:08 +08:00
R. Ryantm
3eee9a91de helmfile-wrapped: 1.0.0 -> 1.1.0
(cherry picked from commit 4ca5d61436)
2025-05-21 01:01:41 +00:00
Peder Bergebakken Sundt
d5bf86502f [Backport release-25.05] python3Packages.auto-lazy-imports: init at 0.4.2 (#408889) 2025-05-21 01:23:04 +02:00
Philip Taron
33ce17a328 [Backport release-25.05] openvpn3: 24 -> 24.1 (#409217)
Fixes CVE-2025-3908 / GHSA-fp2g-4h6f-28h2
2025-05-20 16:14:52 -07:00
Thomas Gerbet
1640a299be openvpn3: 24 -> 24.1
Fixes CVE-2025-3908.

https://github.com/OpenVPN/openvpn3-linux/releases/tag/v24.1
(cherry picked from commit 7dad80a626)
2025-05-20 22:32:56 +00:00
Fabián Heredia Montiel
9b4ab8a3d3 [Backport release-25.05] Linux kernels 2025-05-19 (#409094) 2025-05-20 16:17:52 -06:00
Peder Bergebakken Sundt
1b9bb5d0b8 [Backport release-25.05] moonlight-qt: build against sdl2-compat (#409204) 2025-05-21 00:10:13 +02:00
Grimmauld
c9dd6a6905 moonlight-qt: build against sdl2-compat
This was preliminarily pinned to SDL2_classic in 2532c66211 (#393386).
The reason for that was DRM support and an incompatible override interface.
sdl3 is build with drm enabled by default, which means building things
that depend on drm through sdl2-compat should just work, no override needed.

(cherry picked from commit 8f2001fb55)
2025-05-20 21:35:44 +00:00
Leona Maroni
3ff32b4adc [Backport release-25.05] gitlab-runner: Make Bash a runtime dependency to fix clear-docker-cache. (#409121) 2025-05-20 22:59:31 +02:00
Sefa Eyeoglu
d4512b12db [Backport release-25.05] proton-ge-bin: GE-Proton10-1 -> GE-Proton10-2, GE-Proton10-2 -> GE-Proton10-3 , add myself as maintainer (#409149) 2025-05-20 21:01:25 +02:00
Gliczy
16e8991cec proton-ge-bin: add myself as maintainer
(cherry picked from commit 0742d7dae9)
2025-05-20 20:37:32 +02:00
Gliczy
dd5a79547d proton-ge-bin: GE-Proton10-2 -> GE-Proton10-3
(cherry picked from commit b54dae9d78)
2025-05-20 20:37:29 +02:00
NotAShelf
ada2854c28 proton-ge-bin: GE-Proton10-1 -> GE-Proton10-2
https://github.com/GloriousEggroll/proton-ge-custom/compare/GE-Proton10-1...GE-Proton10-2
(cherry picked from commit 97d49b6c8a)
2025-05-20 20:37:26 +02:00
Thiago Kenji Okada
ca0f1439c5 nixos-rebuild-ng: use Final in constants.py
(cherry picked from commit b74e861c28)
2025-05-20 18:24:53 +00:00
Thiago Kenji Okada
9634c32938 nixos-rebuild-ng: mark logger as Final
(cherry picked from commit 2e06b6da56)
2025-05-20 18:24:53 +00:00
Thiago Kenji Okada
3bf9894d76 nixos-rebuild-ng: alert user if we can't clean-up remote process
(cherry picked from commit 062eaf7379)
2025-05-20 18:24:53 +00:00
Thiago Kenji Okada
621a8d5ce4 nixos-rebuild-ng: kill underlying remote process
`nixos-rebuild-ng` explicitly don't allocate a pseudo-TTY for SSH
because this causes lots of issues depending on the use case (for
example, multiplexing multiple SSH sessions).

Sadly not using a pseudo-TTY also cause other issues, like the fact that
using Ctrl+C (SIGINT) doesn't kill the underlying process because SSH
doesn't support it.

We can't really start using pseudo-TTY unless we want to overcomplicate
the code for parsing results (pseudo-TTY mangles the stdout/stderr
together), so we need to handle killing the underlying remote process
manually.

This is what this commit does, when we receive a `KeyboardInterrupt`
exception while calling `run_wrapper`, we will check if it is a remote
process and send a `pkill --full` with the arguments (this should ensure
that we don't kill other process, but we can't guarantee it). This
assumes the user has `procps` installed, but I think it is a safe
assumption since this seems to be a core package.

Sadly nothing we can do if the user doesn't have `procps` installed, the
good thing is that the worst that can happen is that we will silent
fail and the process will stay in background until it finishes.

Fix #403269.

(cherry picked from commit 61e61a59eb)
2025-05-20 18:24:53 +00:00
Jan Tojnar
3e574f1237 nixos/orca: Make available to gdm greeter
Without this, the greeter is unable to see `orca` program on `PATH`
and so `${gdm}/share/gdm/greeter/autostart/orca-autostart.desktop`
will fail to start it. As a result, screen reader would not work
on the login screen.

(cherry picked from commit 9af27f1cb5)
2025-05-20 18:09:17 +00:00
Felix Bargfeldt
41d0856d57 [Backport release-25.05] synapse-admin-etkecc: 0.10.4-etke40 -> 0.10.4-etke41 (#409129) 2025-05-20 19:32:55 +02:00
Defelo
31c69144b2 synapse-admin-etkecc: 0.10.4-etke40 -> 0.10.4-etke41
(cherry picked from commit ba675822e9)
2025-05-20 17:19:24 +00:00
commiterate
b31ced563d gitlab-runner: Make Bash a runtime dependency to fix clear-docker-cache.
(cherry picked from commit f26dd73367)
2025-05-20 16:48:17 +00:00
misuzu
8746d3bd23 [Backport release-25.05] snac2: 2.75 -> 2.77 (#408949) 2025-05-20 19:32:11 +03:00
LucasFA
302622d373 qc71_laptop: rectify meta.platforms
This package is not expected to build in other platforms and
has been failing aarch64-linux in Hydra for years:
https://hydra.nixos.org/eval/1790516?filter=qc71&compare=1790473
https://hydra.nixos.org/eval/1795290?filter=qc71&compare=1795271
https://hydra.nixos.org/eval/1807986?filter=qc71&compare=1807946

(cherry picked from commit 645719c0b3)
2025-05-20 15:50:15 +00:00
Alyssa Ross
2451b54fb4 linux/hardened/patches/6.6: v6.6.83-hardened1 -> v6.6.90-hardened1
(cherry picked from commit 43bfaecca6)
2025-05-20 15:04:37 +00:00
Alyssa Ross
fab51ff715 linux/hardened/patches/6.14: init at v6.14.6-hardened1
Co-authored-by: Fabián Heredia Montiel <fabianhjr@protonmail.com>
(cherry picked from commit 28ea08fde9)
2025-05-20 15:04:37 +00:00
Alyssa Ross
358ad9d030 linux/hardened/patches/6.13: v6.13.7-hardened1 -> v6.13.12-hardened1
(cherry picked from commit 0154bc329f)
2025-05-20 15:04:37 +00:00
Alyssa Ross
103574ce2f linux/hardened/patches/6.12: v6.12.19-hardened1 -> v6.12.28-hardened1
(cherry picked from commit da5df08f08)
2025-05-20 15:04:37 +00:00
Alyssa Ross
b7df92b766 linux/hardened/patches/6.1: v6.1.131-hardened1 -> v6.1.138-hardened1
(cherry picked from commit c44b873ebc)
2025-05-20 15:04:37 +00:00
Alyssa Ross
4d6ba54edf linux/hardened/patches/5.4: v5.4.291-hardened1 -> v5.4.293-hardened1
(cherry picked from commit cbdbb6ea17)
2025-05-20 15:04:37 +00:00
Alyssa Ross
83d754b142 linux/hardened/patches/5.15: v5.15.179-hardened1 -> v5.15.182-hardened1
(cherry picked from commit 993fa0f255)
2025-05-20 15:04:37 +00:00
Alyssa Ross
f699660ce1 linux/hardened/patches/5.10: v5.10.235-hardened1 -> v5.10.237-hardened1
(cherry picked from commit af90fa1c5e)
2025-05-20 15:04:37 +00:00
Alyssa Ross
a6be49f189 linux_latest-libre: 19769 -> 19792
(cherry picked from commit 5ff58f53b6)
2025-05-20 15:04:37 +00:00
Alyssa Ross
566a4bfce3 linux-rt_6_6: 6.6.77-rt50 -> 6.6.87-rt54
(cherry picked from commit b6208691c0)
2025-05-20 15:04:37 +00:00
Alyssa Ross
ef2c70f127 linux-rt_6_1: 6.1.128-rt49 -> 6.1.134-rt51
(cherry picked from commit 61fbc69aef)
2025-05-20 15:04:36 +00:00
Alyssa Ross
8b1a3f88bf linux-rt_5_15: 5.15.177-rt83 -> 5.15.179-rt84
(cherry picked from commit 9641b16352)
2025-05-20 15:04:36 +00:00
Alyssa Ross
eb6fbb5bd3 linux-rt_5_10: 5.10.234-rt127 -> 5.10.237-rt131
(cherry picked from commit c3c0061572)
2025-05-20 15:04:36 +00:00
Alyssa Ross
3c8d59d194 linux_testing: 6.15-rc6 -> 6.15-rc7
(cherry picked from commit 26b82c99ab)
2025-05-20 15:04:36 +00:00
Florian Klink
03c3cfde8f irccat: 0.4.8 -> 0.4.12
(cherry picked from commit 4612572032)
2025-05-20 16:38:20 +02:00
Arian van Putten
5815cbccc9 [Backport release-25.05] nixos/systemd: unconditional systemd-journald-audit.socket (#409070) 2025-05-20 16:31:50 +02:00
benaryorg
f551d91f2e nixos/systemd: unconditional systemd-journald-audit.socket
Containers did not have *systemd-journald-audit.socket* in *additionalUpstreamSystemUnits*, which meant that the unit was not provided.
However the *wantedBy* was added without any additional check, therefore creating an empty unit with just the *WantedBy* on *boot.isContainer* machines.
This caused `systemd-analyze verify` to fail:

```text
systemd-journald-audit.socket: Unit has no Listen setting (ListenStream=, ListenDatagram=, ListenFIFO=, ...). Refusing.
systemd-journald-audit.socket: Cannot add dependency job, ignoring: Unit systemd-journald-audit.socket has a bad unit file setting.
systemd-journald-audit.socket: Cannot add dependency job, ignoring: Unit systemd-journald-audit.socket has a bad unit file setting.
```

The upstream unit already contains the following, which should make it safe to include regardless:

```ini
[Unit]
ConditionSecurity=audit
ConditionCapability=CAP_AUDIT_READ
```

For reference, this popped up in the context of #[360426](https://redirect.github.com/NixOS/nixpkgs/issues/360426) as well as #[407696](https://redirect.github.com/NixOS/nixpkgs/pull/407696).

Co-authored-by: Bruce Toll <4109762+tollb@users.noreply.github.com>
Signed-off-by: benaryorg <binary@benary.org>
(cherry picked from commit e434130d0b)
2025-05-20 13:30:26 +00:00
Bruce Toll
0c6b3ff337 nixos/tests/systemd-journal: Fix failing tests
Fix regression from https://github.com/NixOS/nixpkgs/pull/379629.
The systemd-journal test has been failing on hydra since 2025-02-10.
See, for instance: https://hydra.nixos.org/build/290855155.

This commit enables auditing, as expected by the tests. It also
addresses an issue where audit messages were getting dropped due to
rate limits.

(cherry picked from commit 22d51e08cf)
2025-05-20 13:30:26 +00:00
Niklas Korz
33e0650223 [Backport release-25.05] doctoc: remove dangling symlinks (#409056) 2025-05-20 14:37:08 +02:00
Doron Behar
d155ce7c2c [Backport release-25.05] i18n: Add charset related settings (#409054) 2025-05-20 15:32:04 +03:00
Jasper Orschulko
8013887864 doctoc: remove dangling symlinks
Fixes https://github.com/NixOS/nixpkgs/issues/409046

(cherry picked from commit 5c380be4d3)
2025-05-20 12:29:39 +00:00
Doron Behar
ef5bc91e93 nixos/i18n: Remove special handling of LANGUAGE
Partially revert #179194 which first filtered
`extraLocaleSettings.LANGUAGE`. Indeed this environment variable is
given precedence according to:

https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html

So using it will simply make all other `extraLocaleSettings` be ignored
in practice, but the OS shouldn't ignore it when aggregating the locales
required in general, as this setup should still be legitimate, and it
may even be useful if you wish to set it by default and use `env -u
LANGUAGE` for some programs.

(cherry picked from commit 263297b4e5)
2025-05-20 12:17:52 +00:00
Doron Behar
53efec63d6 nixosTests.i18n: init
(cherry picked from commit cbbd59e14e)
2025-05-20 12:17:52 +00:00
Doron Behar
fdba215260 i18n: Add charset related settings
Fixes #404758

(cherry picked from commit e8581078a1)
2025-05-20 12:17:52 +00:00
awwpotato
e2667d755c share-preview: 0.5.0 -> 1.0.0
(cherry picked from commit 55e671aa88)
2025-05-20 11:57:16 +00:00
Martin Weinelt
2e90f0c297 [Backport release-25.05] deliantra-server: mark broken (#408931) 2025-05-20 13:14:16 +02:00
Maximilian Bosch
f48dd0b4fd Merge: [Backport release-25.05] mautrix-signal: 0.8.2 -> 0.8.3 (#407715) 2025-05-20 13:12:27 +02:00
Maximilian Bosch
fb3c66ee91 Merge: [Backport release-25.05] mautrix-whatsapp: 0.12.0 -> 0.12.1 (#407838) 2025-05-20 13:11:29 +02:00
R. Ryantm
4a79c48d14 ladybird: 0-unstable-2025-05-07 -> 0-unstable-2025-05-18
(cherry picked from commit 1b3b541eb1)
2025-05-20 10:33:49 +00:00
R. Ryantm
a9e3ea5d77 vulkan-memory-allocator: 3.2.1 -> 3.3.0
(cherry picked from commit 5efd4067cc)
2025-05-20 10:33:21 +00:00
Thiago Kenji Okada
fa7d4cb6aa [Backport release-25.05] linuxKernel.kernels.linux_zen: 6.14.6-zen1 -> 6.14.7-zen1, linuxKernel.kernels.linux_lqx: 6.14.6-lqx1 -> 6.14.7-lqx1 (#408703) 2025-05-20 10:47:38 +01:00
Arne Keller
cf83689420 [Backport release-25.05] flyctl: 0.3.116 -> 0.3.125 (#408525) 2025-05-20 10:35:07 +02:00
Niklas Korz
2ed07b2a8f [Backport release-25.05] python3Packages.whisperx: disable import check for aarch64-linux (#408986) 2025-05-20 09:56:53 +02:00
Aleksana
6a4a3aeba8 [Backport release-25.05] ptyxis: 47.10 -> 48.3 (#408983) 2025-05-20 15:47:30 +08:00
Benjamin Sparks
f16f2b3026 python3Packages.whisperx: disable import check for aarch64-linux
`onnxruntime` fails to find the logger in sandboxed `aarch64-linux` builds,
and promptly segfaults. As all other builds will check this import, I
doubt this has an effect on package health.

(cherry picked from commit 3de9866a86)
2025-05-20 07:43:57 +00:00
Florian Klink
e041816285 [Backport release-25.05] ipmitool: fix IANA registry warnings (#408982) 2025-05-20 10:37:10 +03:00
aleksana
7c9a9d026f ptyxis: 47.10 -> 48.3
(cherry picked from commit 51650dcf60)
2025-05-20 07:36:55 +00:00
Aleksana
2d67ec57a0 [Backport release-25.05] geteduroam: init at 0.10 (#408915) 2025-05-20 15:36:47 +08:00
Stefan Frijters
7e6e2afdb3 ipmitool: fix IANA registry warnings
(cherry picked from commit 6d85cc6c1c)
2025-05-20 07:36:19 +00:00
Jörg Thalheim
d7fdb1c0ba [Backport release-25.05] k3s: use patched util-linuxMinimal (#408972) 2025-05-20 08:57:16 +02:00
Jörg Thalheim
d0764b7e96 k3s: better util-linux patch url
The commit is in master so we don't need to point to the pull request
2025-05-20 08:56:20 +02:00
Morgan Jones
3708c98785 k3s: #405952: fix mount regression
Until #405952 is fixed, we can use our own util-linux to avoid breaking
k3s in the release. Revert this commit when that happens.

(cherry picked from commit 4cf4acae57)
2025-05-20 06:52:45 +00:00
Morgan Jones
83085bba1d k3s: use util-linuxMinimal
The full version of util-linux has systemd, NLS, and ncurses support.
k3s only uses a couple utilities from it at runtime, so use the minimal
version.

(cherry picked from commit 44d7b6dd7b)
2025-05-20 06:52:45 +00:00
Morgan Jones
c239eca2d9 nixos/k3s: get tests working again
Some of the attributes fetched throw, so tryEval them. Recurse into the
attribute set to pick up all the tests.

(cherry picked from commit 727809f534)
2025-05-20 06:52:45 +00:00
Fabian Affolter
df6ad0fcb0 arp-scan-rs: mark as broken on darwin
(cherry picked from commit 183015d5fa)
2025-05-20 06:41:35 +00:00
Fabian Affolter
98446992b4 ares-rs: mark as broken on darwin
(cherry picked from commit ed13d8a02f)
2025-05-20 06:41:26 +00:00
Fabian Affolter
d4d2192aaf deepsecrets: mark as broekn on darwin
(cherry picked from commit 075f82fe32)
2025-05-20 06:41:02 +00:00
Fabian Affolter
f9147b2b04 deepsecrets: refactor
(cherry picked from commit 51f6d18c05)
2025-05-20 06:41:02 +00:00
Fabian Affolter
391a088a14 donpapi: mark as broken on darwin
(cherry picked from commit d073665f04)
2025-05-20 06:40:53 +00:00
Fabian Affolter
130a9b1fe5 donpapi: refactor
(cherry picked from commit 4bd954bba1)
2025-05-20 06:40:53 +00:00
Fabian Affolter
13c6f2227a poutine: mark as broken on darwin
(cherry picked from commit f6d2a400a0)
2025-05-20 06:39:42 +00:00
Fabian Affolter
68fdc0273a unicorn-angr: mark as broken on darwin
(cherry picked from commit c940e6d868)
2025-05-20 06:39:35 +00:00
Fabian Affolter
973ba91345 azurehound: disable on darwin
(cherry picked from commit b9709f944d)
2025-05-20 06:39:05 +00:00
Fabian Affolter
06d02daff6 mx-takeover: disable on darwin
(cherry picked from commit c0c54903b1)
2025-05-20 06:38:39 +00:00
Fabian Affolter
50a802522d mx-takeover: refactor
(cherry picked from commit 85cd98223f)
2025-05-20 06:38:39 +00:00
Fabian Affolter
4f4b9450c0 maigret: mark as broken on darwin
(cherry picked from commit f218242aa9)
2025-05-20 06:38:31 +00:00
Fabian Affolter
1c1564de0f maigret: refactor
(cherry picked from commit 676d2f074e)
2025-05-20 06:38:30 +00:00
Fabian Affolter
79e272abd4 python313Packages.turrishw: disable tests on darwin
(cherry picked from commit cb6f5a6d1a)
2025-05-20 06:37:04 +00:00
Fabian Affolter
0fb6bb757a python313Packages.turrishw: fix changelog entry
(cherry picked from commit b096c95f51)
2025-05-20 06:37:04 +00:00
Fabian Affolter
9f20548cc6 librespeed-cli: mark as broken on darwin
(cherry picked from commit a1108763e0)
2025-05-20 06:36:53 +00:00
Fabian Affolter
4082f008ba librespeed-cli: refactor
(cherry picked from commit b910f2a72f)
2025-05-20 06:36:53 +00:00
R. Ryantm
9c3542c273 snac2: 2.75 -> 2.77
(cherry picked from commit ae837ad0a6)
2025-05-20 05:46:46 +00:00
Jonas Heinrich
3e1e848be4 [Backport release-25.05] nixos/tests/oncall: Fix LDAP mapping (#408939) 2025-05-20 07:12:20 +02:00
Johannes Kirschbauer
f0b1db3f94 [Backport release-25.05] python312Packages.llama-index-core: 0.12.23 -> 0.12.35 (#408669) 2025-05-20 06:16:16 +02:00
Jonas Heinrich
d86afdceca nixos/tests/oncall: Fix LDAP mapping
(cherry picked from commit 8a9cd899ac)
2025-05-20 04:00:29 +00:00
Rebecca Kelly
e4d44b9ac6 deliantra-server: remove
I'm not really using or maintaining it anymore and it's getting increasingly bit-rotted.

(cherry picked from commit b8a2f7fff9)
2025-05-20 02:39:44 +00:00
Peder Bergebakken Sundt
636724d4a8 geteduroam: init at 0.10
(cherry picked from commit 65888ccba9)
2025-05-20 01:21:00 +00:00
Martin Weinelt
8adbe6eafc [Backport release-25.05] home-assistant-custom-components.xiaomi_miot: 1.0.18 -> 1.0.19 (#408903) 2025-05-20 02:40:17 +02:00
R. Ryantm
8d82c8a0a7 home-assistant-custom-components.xiaomi_miot: 1.0.18 -> 1.0.19
(cherry picked from commit 5154d6cca5)
2025-05-20 00:24:41 +00:00
Yechiel Worenklein
c5d3a384d4 bitwarden-cli: add zsh completion
(cherry picked from commit 0200335e08)
2025-05-20 00:13:53 +00:00
Toma
0951a30f58 [Backport release-25.05] lrcget: use cargo-tauri.hook (#408718) 2025-05-20 01:56:35 +02:00
dotlambda
2d8aa81ec1 [Backport release-25.05] pgadmin4: fix build for sandbox=relaxed builds on darwin (#408840) 2025-05-19 16:36:13 -07:00
Gaétan Lepage
556000d37b [Backport release-25.05] apptainer: 1.4.0 -> 1.4.1 (#408751) 2025-05-20 01:04:15 +02:00
Peder Bergebakken Sundt
070dd17943 python3Packages.auto-lazy-imports: init at 0.4.2
(cherry picked from commit bbe729f9d5)
2025-05-19 22:57:54 +00:00
Peder Bergebakken Sundt
f6ea324012 python3Packages.hatch-autorun: init at 1.1.0
(cherry picked from commit e4f2d59409)
2025-05-19 22:57:53 +00:00
Arne Keller
9480817831 [Backport release-25.05] sticky-notes: 0.2.6 -> 0.2.7 (#408863) 2025-05-19 23:44:05 +02:00
Brian McGillion
50e53b391c sticky-notes: 0.2.6 -> 0.2.7
Fixes and issue where the application segfaults on launch.

https://github.com/vixalien/sticky/releases/tag/v0.2.7

Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
(cherry picked from commit 628013b47c)
2025-05-19 20:55:29 +00:00
Florian Brandes
925b2a5177 pgadmin4: fix build for sandbox=relaxed builds on darwin
fixes: clang: error: no such file or directory: '/usr/local/lib/libpng16.a'
on sandboxed darwin boxes

1. mozjpeg hasn't been updated since 2021. The newest commit from 2023
  fixes the build on darwin but no new release was put forward
  (see imagemin/mozjpeg-bin#64 and imagemin/mozjpeg-bin#81)
2. This prompts to manually patching the yarn.lock file
3. Which also needs to split the yarnConfigHook logic and
  duplicate it in parts in the derivation

The benefit is to be able to build pgadmin on aarch64-darwin
without network.

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
(cherry picked from commit 10ff832c4f)
2025-05-19 19:46:30 +00:00
Arne Keller
8cfb3a50f3 [Backport release-25.05] python3Packages.pydal: fix Darwin build (#408648) 2025-05-19 21:15:13 +02:00
Arne Keller
4dd119ab0d [Backport release-25.05] plexamp: 4.12.2 -> 4.12.3 (#408437) 2025-05-19 21:14:40 +02:00
dotlambda
c384b10abb [Backport release-25.05] qt6Packages.qgpgme: mark broken on Darwin (#408608) 2025-05-19 09:20:20 -07:00
Martin Weinelt
bd7e2ac052 [Backport release-25.05] element-call: 0.10.0 -> 0.11.1 (#408750) 2025-05-19 17:30:00 +02:00
Thomas Gerbet
ce260f0906 [Backport release-25.05] nodejs_24: 24.0.1 -> 24.0.2 (#408500) 2025-05-19 17:13:13 +02:00
Gaetan Lepage
cd443e9ecb apptainer: 1.4.0 -> 1.4.1
Diff: https://github.com/apptainer/apptainer/compare/v1.4.0...v1.4.1

Changelog:
https://github.com/apptainer/apptainer/blob/v1.4.1/CHANGELOG.md
(cherry picked from commit 5d336e7a9e)
2025-05-19 15:12:41 +00:00
Martin Weinelt
30c143bded element-call: 0.10.0 -> 0.11.1
https://github.com/element-hq/element-call/releases/tag/v0.11.0
https://github.com/element-hq/element-call/releases/tag/v0.11.1
(cherry picked from commit b4ac082d8a)
2025-05-19 15:08:28 +00:00
Martin Weinelt
ec3c9bf555 [Backport release-25.05] librewolf-unwrapped: 138.0.1-2 -> 138.0.4-1 (#408745) 2025-05-19 17:06:13 +02:00
Thomas Gerbet
f007fa8ec3 [Backport release-25.05] microsoft-edge: remove (#408740) 2025-05-19 17:02:07 +02:00
Andrew Marshall
11b66f7583 librewolf-unwrapped: 138.0.1-2 -> 138.0.4-1
(cherry picked from commit 9909624ba5)
2025-05-19 14:58:48 +00:00
Aleksana
3fc18e2cff [Backport release-25.05] est-sfs: drop (#408408) 2025-05-19 22:57:47 +08:00
Thomas Gerbet
16c3d05d9a [Backport release-25.05] mono: 6.12.0.182 -> 6.14.1 (#408492) 2025-05-19 16:54:21 +02:00
Leona Maroni
84b9a3019a [Backport release-25.05] release-notes: rework highlights section (#408646) 2025-05-19 16:40:51 +02:00
Adam C. Stephens
aff790ba7c microsoft-edge: remove
Due to lack of active maintenance, removing from tree to avoid
unnecessarily exposing users to active security vulnerabilities

(cherry picked from commit 13dce3b2e0)
2025-05-19 14:40:42 +00:00
Jonas Sander
c7eaa2ddb2 nixos/paperless: expose manage package (#405610)
(cherry picked from commit 309871725f)
2025-05-19 14:38:20 +00:00
David McFarland
6447b33849 godot3-mono: fix compile error with mono 6.14
This was introduced with #401409.

(cherry picked from commit c4b497e8d4)
2025-05-19 16:38:16 +02:00
Michele Guerini Rocco
c2db6a61f2 [Backport release-25.05] nixos/pdns-recursor: deprecate settings, add yaml-settings (#408645) 2025-05-19 16:30:26 +02:00
TomaSajt
2db6cadfc0 lrcget: use cargo-tauri.hook
(cherry picked from commit 9887ab90ba)
2025-05-19 13:01:22 +00:00
Gliczy
c9a844d156 bottles: fix typo in warn-unsupported.patch
(cherry picked from commit 4b6d16b82a)
2025-05-19 14:50:03 +02:00
Gliczy
80bdc3ecff bottles-unwrapped: add gamemode to propagatedBuildInputs
(cherry picked from commit 006b8bc52c)
2025-05-19 14:49:58 +02:00
Gliczy
87671549bf bottles: add info to disable unsupported popup
(cherry picked from commit bb8327b825)
2025-05-19 14:49:55 +02:00
Gliczy
c6b57432a7 bottles: update remove-unsupported-warning.patch
(cherry picked from commit 400b8c420c)
2025-05-19 14:49:51 +02:00
XBagon
31ad7d4e39 bottles-unwrapped: 51.17 -> 51.21
Diff: https://github.com/bottlesdevs/bottles/compare/refs/tags/51.17...refs/tags/51.21

bottles-unwrapped: update remove-flatpack-check.patch according to https://github.com/NixOS/nixpkgs/pull/403938#pullrequestreview-2847541020
(cherry picked from commit 2a7622d9f8)
2025-05-19 14:49:45 +02:00
XBagon
9e8ea59a07 bottles-unwrapped: add XBagon to maintainers
(cherry picked from commit d6c9c226f1)
2025-05-19 14:49:39 +02:00
Katherine Jamison
6bfb9d34a4 linuxKernel.kernels.linux_lqx: 6.14.6-lqx1 -> 6.14.7-lqx1
(cherry picked from commit 190577598a)
2025-05-19 12:31:40 +00:00
Katherine Jamison
cec51a9563 linuxKernel.kernels.linux_zen: 6.14.6-zen1 -> 6.14.7-zen1
(cherry picked from commit 0b09a98d61)
2025-05-19 12:31:40 +00:00
Jenny
9fe036b6ab [Backport release-25.05] arduino-cli: 1.2.0 -> 1.2.2 (#408698) 2025-05-19 14:31:04 +02:00
Jenny
f9b1b35fbd [Backport release-25.05] dependency-track: 4.12.7 -> 4.13.2 (#408692) 2025-05-19 14:17:48 +02:00
Stefan Frijters
ec1b8d5ea8 arduino-cli: remove 'with lib'
(cherry picked from commit 60faec14b9)
2025-05-19 12:13:32 +00:00
Stefan Frijters
935ba05bff arduino-cli: 1.2.0 -> 1.2.2
(cherry picked from commit 1e595f40ae)
2025-05-19 12:13:32 +00:00
R. Ryantm
2846ed5221 dependency-track: 4.12.7 -> 4.13.2
(cherry picked from commit 1bdb53fcf8)
2025-05-19 11:58:29 +00:00
taku0
c1b2b2231c [Backport release-25.05] thunderbird-latest-bin-unwrapped: 138.0 -> 138.0.1 (#408378) 2025-05-19 20:40:34 +09:00
Arian van Putten
f0be5c993c [Backport release-25.05] amazon-image: Increase disk size, Remove tags from label - use version only (#408684) 2025-05-19 13:25:59 +02:00
phaer
88294331fd amazon-image: Increase diskSize 3 -> 4GB
Disk usage of the image has risen considerably since last release. We
still need to investigate the cause in detail. Increasing it for now
prevents build failures at least.

(cherry picked from commit 813d0ba1fb)
2025-05-19 11:13:17 +00:00
phaer
9eaf700bf0 amazon-image: Remove tags from label, use version only
By default, `system.nixos.label` includes `system.nixos.tags` which
historically was not set for the amazon image.

Keeping the tag in the label of the generated disk image inside the
derivation (i.e. `image.filePath`) makes it easier to tell that the
file is for amazon (i.e.
`nixos-image-amazon-25.11pre-git-x86_64-linux.vpc`) while the "label"
in `image-info.json` for users of the AWS api stays stable (i.e.
`/25.05pre-git-x86_64-linux`).

`

(cherry picked from commit 8ccd7e5d9a)
2025-05-19 11:13:17 +00:00
Gaétan Lepage
9d22b3e6f6 [Backport release-25.05] python3Packages.wandb: fix x86_64-darwin (#408491) 2025-05-19 12:29:49 +02:00
Fabian Affolter
c233951d69 python312Packages.lama-index: update build-system
(cherry picked from commit e58d3c0f59)
2025-05-19 10:07:33 +00:00
Fabian Affolter
60d3b6ae19 python312Packages.curated-transformers: 0.1.1 -> 2.0.1
Changelog: https://github.com/explosion/curated-transformers/releases/tag/v2.0.1
(cherry picked from commit 86cfd4121c)
2025-05-19 10:07:33 +00:00
Fabian Affolter
a60bad2b58 python312Packages.llama-index-core: 0.12.23 -> 0.12.35
Changelog: https://github.com/run-llama/llama_index/blob/v0.12.35/CHANGELOG.md
(cherry picked from commit 2d72f28a38)
2025-05-19 10:07:32 +00:00
Fabian Affolter
4d5bc388fe python312Packages.llama-index-agent-openai: 0.4.6 -> 0.4.7
(cherry picked from commit 7d11816d36)
2025-05-19 10:07:32 +00:00
Fabian Affolter
c1f73838c8 python312Packages.llama-index-embeddings-huggingface: 0.5.3 -> 0.5.4
(cherry picked from commit 4e03a8ac2b)
2025-05-19 10:07:32 +00:00
Fabian Affolter
8188112c72 python312Packages.llama-index-graph-stores-neptune: 0.3.2 -> 0.3.3
(cherry picked from commit f9aa2ca7ff)
2025-05-19 10:07:32 +00:00
Fabian Affolter
55d63b7385 python312Packages.llama-index-llms-openai: 0.3.33 -> 0.3.38
(cherry picked from commit 7efba6d0f6)
2025-05-19 10:07:32 +00:00
Fabian Affolter
6779c602a0 python312Packages.llama-index-vector-stores-postgres: 0.4.2 -> 0.5.3
(cherry picked from commit f6cadae0e1)
2025-05-19 10:07:32 +00:00
Jan Tojnar
8529bbe7d6 gupnp_1_6: Use finalAttrs
(cherry picked from commit 96aca7526a)
2025-05-19 09:47:34 +00:00
Jan Tojnar
0d62eb72ea gupnp_1_6: Unbreak on Darwin
All the tests except `context-filter` are broken:

    ERROR:../tests/test-context.c:265:test_gupnp_context_error_when_bound: assertion failed (error == NULL): Error binding to address 127.0.0.1:0: Operation not permitted (g-io-error-quark, 14)

    ERROR:../tests/test-context-manager.c:42:test_context_manager_manage: assertion failed (error == NULL): Failed to find IP of interface lo (gssdp-error, 0)

But we already disable them on the old `gupnp`.

(cherry picked from commit 0443142472)
2025-05-19 09:47:34 +00:00
Jan Tojnar
761ad5fcad gssdp_1_6: Use finalAttrs
(cherry picked from commit edd0dc6111)
2025-05-19 09:47:34 +00:00
Jan Tojnar
0d1ada761e gssdp_1_6: Unbreak on Darwin
Only all the tests are broken:

    ERROR:../tests/test-functional.c:491:test_client_creation: assertion failed (error == NULL): Failed to bind socketError binding to address 169.254.192.89:1900: Operation not permitted (g-io-error-quark, 14)

But we already disable them on the old `gssdp`.

(cherry picked from commit 0ee528d2cc)
2025-05-19 09:47:34 +00:00
tomberek
dae513c187 [Backport release-25.05] teleport: modernize (#408582) 2025-05-19 05:30:32 -04:00
Atemu
5a0bb053d1 [Backport release-25.05] nixos/signald, signald, signaldctl, purple-signald: drop (#408483) 2025-05-19 11:10:56 +02:00
Atemu
190639e8e4 [Backport release-25.05] lasso: fix build with gcc14 (#408458) 2025-05-19 11:08:08 +02:00
K900
9b92bb723e [Backport release-25.05] kanidm: fix to actually work on Linux again (#408652) 2025-05-19 11:49:30 +03:00
K900
48479abffa [Backport release-25.05] nixos/tests/installer: fix eval (#408650) 2025-05-19 11:49:20 +03:00
K900
217bc1016e nixos/tests/kanidm: pin to v1.6
These should really be made versioned, but this gets us _something_
quickly, at least.

(cherry picked from commit bf0aa25e4b)
2025-05-19 08:49:00 +00:00
K900
494cad83b5 kanidm: fix running on Linux
(cherry picked from commit 29c9fa86b5)
2025-05-19 08:49:00 +00:00
K900
16f669780b nixos/tests/installer: fix eval
(cherry picked from commit c87615a319)
2025-05-19 08:48:28 +00:00
Thomas Gerbet
f1246574f5 [Backport release-25.05] webkitgtk_6_0: 2.48.1 → 2.48.2 (#408079) 2025-05-19 10:47:55 +02:00
FliegendeWurst
45c5fa41dc python3Packages.pydal: fix Darwin build
(cherry picked from commit c32a49ef8f)
2025-05-19 08:40:28 +00:00
Leona Maroni
c2d6e6ecd1 release-notes: rework highlights section
(cherry picked from commit 8ae9309031)
2025-05-19 08:32:49 +00:00
Leona Maroni
f995684de2 [25.05] xmlroff: mark as broken (#408385) 2025-05-19 10:31:48 +02:00
rnhmjoj
0142405cb7 nixos/release-notes: deprecate services.pdns-recursor.settings
(cherry picked from commit ab8653abd5)
2025-05-19 08:30:52 +00:00
rnhmjoj
77406f7c09 nixos/tests/pdns-recursor: test old-settings
(cherry picked from commit 13accc23b0)
2025-05-19 08:30:52 +00:00
rnhmjoj
fb77c246cb nixos/pdns-recursor: deprecate settings, add yaml-settings
(cherry picked from commit b71d4f5fb3)
2025-05-19 08:30:52 +00:00
Vladimír Čunát
3a5d2e3e26 thunderbird-esr(-bin): 128.10.0 -> 128.10.1, thunderbird-latest: 138.0 -> 138.0.1 (#408638) 2025-05-19 10:01:24 +02:00
Thomas Gerbet
12206c8aad thunderbird-latest-unwrapped: 138.0 -> 138.0.1
Fixes: CVE-2025-3875, CVE-2025-3877, CVE-2025-3909, CVE-2025-3932
https://www.mozilla.org/en-US/security/advisories/mfsa2025-35/

https://www.thunderbird.net/en-US/thunderbird/138.0.1/releasenotes/
(cherry picked from commit 47b01e7cbd)
2025-05-19 07:50:38 +00:00
Thomas Gerbet
ed92aa1b96 thunderbird-esr-unwrapped: 128.10.0 -> 128.10.1
Fixes: CVE-2025-3875, CVE-2025-3877, CVE-2025-3909, CVE-2025-3932
https://www.mozilla.org/en-US/security/advisories/mfsa2025-34/

https://www.thunderbird.net/en-US/thunderbird/128.10.1esr/releasenotes/
(cherry picked from commit 850c00e115)
2025-05-19 07:50:38 +00:00
Thomas Gerbet
059b47dcf7 thunderbird-esr-bin-unwrapped: 128.10.0 -> 128.10.1
Fixes: CVE-2025-3875, CVE-2025-3877, CVE-2025-3909, CVE-2025-3932
https://www.mozilla.org/en-US/security/advisories/mfsa2025-34/

https://www.thunderbird.net/en-US/thunderbird/128.10.1esr/releasenotes/
(cherry picked from commit 595c41eeaf)
2025-05-19 07:50:38 +00:00
Vladimír Čunát
a7fb7dd2ed linuxPackages.system76-acpi: fix build (#408633) 2025-05-19 09:41:56 +02:00
eljamm
805471238b linuxPackages.system76-acpi: small improvements
- use `finalAttrs`
- use `tag` and `hash` in `src`
- add {pre,post} hooks to the `installPhase`
- remove `with lib;` from `meta`

(cherry picked from commit 4adde8f35b)
2025-05-19 07:40:43 +00:00
eljamm
00500fe01f linuxPackages.system76-acpi: fix build
(cherry picked from commit 3b24475288)
2025-05-19 07:40:43 +00:00
Vladimír Čunát
4b026ac8a9 linuxPackages.rtl8821au: unstable-2024-03-16 -> unstable-2025-04-08 (#408630) 2025-05-19 09:35:11 +02:00
Winter
e33fd8ac58 [Backport release-25.05] nixos/tests: don't explicitly set meta.platforms (#408629) 2025-05-19 03:33:10 -04:00
cy
7870338039 linuxPackages.rtl8821au: fix meta.homepage
(cherry picked from commit 22966fa889)
2025-05-19 07:27:08 +00:00
cy
32b668e030 linuxPackages.rtl8821au: unstable-2024-03-16 -> unstable-2025-04-08
changelog: 168ac48174...b90b76d307
(cherry picked from commit 9fecdecb86)
2025-05-19 07:27:08 +00:00
Winter
25e8cba5ec nixos/tests/installer: include x86_64-darwin in platforms for uefi tests
Also makes it so that we only set `meta.platforms` in cases where we need
to restrict it; otherwise, we go with the default.

(cherry picked from commit f3db57edfa)
2025-05-19 07:24:22 +00:00
Winter
587a2bd106 nixos/tests: don't explicitly set meta.platforms
This prevents the tests from running on Darwin for no real reason.

(cherry picked from commit 2680e0beca)
2025-05-19 07:24:22 +00:00
Arne Keller
f362501e32 [Backport release-25.05] notmuch-mailmover: 0.6.0 -> 0.7.0 (#408063) 2025-05-19 09:00:45 +02:00
Leona Maroni
aad0fa6d18 [25.05] ggobi: mark as broken (#408374) 2025-05-19 08:36:05 +02:00
Ramses
e77859ec50 [Backport release-25.05] niri: 25.02 -> 25.05 (#408554) 2025-05-19 08:33:20 +02:00
Robert Schütz
d6cd75ce6e qt6Packages.qgpgme: mark broken on Darwin
(cherry picked from commit 58a92a258b)
2025-05-19 06:03:45 +00:00
Winter
a1ddb5de19 [Backport release-25.05] tpm2-tss: disable tcti-libtpms on darwin (#408593) 2025-05-19 01:57:56 -04:00
Winter
f32186bacd [Backport release-25.05] nixos/tests/common/x11.nix: Fix IceWM theme (#408446) 2025-05-19 01:51:06 -04:00
jopejoe1
3461d4da71 [Backport release-25.05] discord: update various (#408476) 2025-05-19 07:46:13 +02:00
Fiona Behrens
f81d7d1b86 tpm2-tss: disable tcti-libtpms on darwin
Add the `--disable-tcti-libtpms` config flag if build on darwin.
This was already done in a pr that also introduced darwin support for
tpm2-tss[0] but a earlier one was merged[1]

[0]: https://github.com/NixOS/nixpkgs/pull/370516
[1]: https://github.com/NixOS/nixpkgs/pull/365010

(cherry picked from commit e3c24c24fe)
2025-05-19 04:43:55 +00:00
JuliusFreudenberger
8e3671e458 teleport: move to by-name
Make teleport built by the by-name structure in package.nix.
The versioned attributes are defined in their own package.nix
in by-name using overrides.
Also change reference in ci/OWNERS

(cherry picked from commit a01b51d00b)
2025-05-19 02:40:51 +00:00
JuliusFreudenberger
e302c1fb18 teleport: remove with lib
(cherry picked from commit f45bf7d6a6)
2025-05-19 02:40:50 +00:00
JuliusFreudenberger
deac61c2a8 teleport: use finalAttrs pattern
(cherry picked from commit aa50c85761)
2025-05-19 02:40:50 +00:00
Defelo
eff078eb02 niri: 25.02 -> 25.05
(cherry picked from commit a1a253ef84)
2025-05-18 23:38:56 +00:00
Peder Bergebakken Sundt
ca49c4304a [Backport release-25.05] SDL_ttf: fix version string (#408539) 2025-05-19 01:15:00 +02:00
Grimmauld
e61f520014 SDL_ttf: fix version string
While upstream has added release notes in their repo [1], no `2.0.11.1` version has been tagged.
According to the repology guidelines [2] that we mostly follow,
versioning of snapshots should be relative to the last tagged upstream release, which would be `2.0.11`.
The `2.0.11.1-unstable...` version string currently crashes the update script,
which is irritating when checking for all updates as a maintainer.

By the off-chance upstream does end up tagging a `2.0.11.1` later,
our version string would also incorrectly represent what we actually have.
Changelogs in git without a tag are still subject to change,
though unlikely in the case of SDL_ttf.

Whether we do or do not have the `.1` probably does not matter too much.

[1] e31d11a692
[2] https://repology.org/docs/requirements

(cherry picked from commit 1d5023fc3e)
2025-05-18 22:49:42 +00:00
Jan Tojnar
40dedf83fa Merge [Backport release-25.05] gnomeExtensions.applications-menu: fix GMenu import (#408196) 2025-05-19 00:24:49 +02:00
Peder Bergebakken Sundt
4eed07903c [Backport release-25.05] dolphin-emu: set correct git revision (#408501) 2025-05-19 00:18:19 +02:00
Martin Weinelt
ac9cee7c04 [Backport release-25.05] firefox-esr: 128.10.0esr -> 128.10.1esr (#408516) 2025-05-19 00:14:14 +02:00
R. Ryantm
d989771974 flyctl: 0.3.116 -> 0.3.125
(cherry picked from commit 7ff2295b69)
2025-05-18 22:11:28 +00:00
Amadej Kastelic
aa3732438e firefox-esr: 128.10.0esr -> 128.10.1esr
Release-notes: https://www.mozilla.org/en-US/firefox/128.10.1/releasenotes/
Security-advisory: https://www.mozilla.org/en-US/security/advisories/mfsa2025-37/
Fixes: CVE-2025-4920, CVE-2025-4921

(cherry picked from commit 626cea8f4e)
2025-05-18 21:47:29 +00:00
Sapphire
9e3d6f80c3 wivrn: 0.24.1 -> 0.25
(cherry picked from commit 9a8c1bed1c)
2025-05-18 21:27:03 +00:00
Peder Bergebakken Sundt
9a444fd46a dolphin-emu: set correct git revision
(cherry picked from commit b335f1d5dd)
2025-05-18 21:14:25 +00:00
Antoine du Hamel
ae316829e9 nodejs_24: 24.0.1 -> 24.0.2
(cherry picked from commit 07f722d0a7)
2025-05-18 21:13:57 +00:00
Peder Bergebakken Sundt
31447d67ad [Backport release-25.05] SDL_image: 1.2.12-unstable-2025-02-13 -> 1.2.12-unstable-2025-04-27 (#408393) 2025-05-18 23:04:00 +02:00
Grimmauld
41288f7e08 mono: 6.14.0 -> 6.14.1
(cherry picked from commit b0319a96fb)
2025-05-18 20:35:57 +00:00
Grimmauld
1586de70b4 mono: 6.12.0.182 -> 6.14.0
The original Mono project [1] was archived.
It is now maintained by WineHQ on their gitlab [2].

This changes the homepage for the new mono package,
and moves the source fetchers to the version profiles.

[1] https://www.mono-project.com/
[2] https://gitlab.winehq.org/mono/mono

(cherry picked from commit 85e1bcb3a6)
2025-05-18 20:35:57 +00:00
Niklas Korz
b24acc6958 python3Packages.wandb: fix x86_64-darwin
(cherry picked from commit 7924c28ad9)
2025-05-18 20:29:49 +00:00
Niklas Korz
f357ba3e53 release-notes: removal of signald module and all signald-related packages
(cherry picked from commit 3186b66d0a)
2025-05-18 19:45:41 +00:00
Niklas Korz
5ef1b95049 signald: drop
(cherry picked from commit 2b19df574c)
2025-05-18 19:45:41 +00:00
Niklas Korz
ee21fc2e69 purple-signald: drop
(cherry picked from commit 0f842e0540)
2025-05-18 19:45:41 +00:00
Niklas Korz
8e140286aa signaldctl: drop
(cherry picked from commit 1cfcd51cf1)
2025-05-18 19:45:40 +00:00
Niklas Korz
ed59c106c7 nixos/signald: drop
(cherry picked from commit 9958792cae)
2025-05-18 19:45:40 +00:00
Niklas Korz
ac7187ebef [Backport release-25.05] signald: set jdkOnBuild (#408479) 2025-05-18 21:44:33 +02:00
Martin Weinelt
f51e2279a4 [Backport release-25.05] digikam: mark as big-paralllel (#408478) 2025-05-18 21:38:03 +02:00
tomberek
8fa6d96c96 [Backport release-25.05] teleport_17: 17.4.5 -> 17.4.8; teleport_16: 16.5.3 -> 16.5.8 (#408392) 2025-05-18 15:37:54 -04:00
Atemu
190ce8ef0f signald: set jdkOnBuild
This is required if the building jdk is a different version than what is default
which is now 21.

(cherry picked from commit 4541097f67)
2025-05-18 19:37:00 +00:00
Martin Weinelt
076c54c593 digikam: mark as big-paralllel
This will allocate more resources to the build making sure it completes
in a more reasonable time and not block a build slot for over 3 hours.

(cherry picked from commit 8ef6064848)
2025-05-18 19:35:13 +00:00
jopejoe1
b18979b822 pkgsCross.aarch64-darwin.discord-development: 0.0.87 -> 0.0.88
(cherry picked from commit ecfa3b3aa0)
2025-05-18 19:28:34 +00:00
jopejoe1
25e0adf975 pkgsCross.aarch64-darwin.discord-canary: 0.0.774 -> 0.0.784
(cherry picked from commit ad26466ee6)
2025-05-18 19:28:34 +00:00
jopejoe1
0fbfe433ec pkgsCross.aarch64-darwin.discord-ptb: 0.0.171 -> 0.0.173
(cherry picked from commit c4ce782320)
2025-05-18 19:28:34 +00:00
jopejoe1
2d069cf306 pkgsCross.aarch64-darwin.discord: 0.0.344 -> 0.0.345
(cherry picked from commit 758fe4bb87)
2025-05-18 19:28:33 +00:00
jopejoe1
932e8c1da5 discord-development: 0.0.74 -> 0.0.75
(cherry picked from commit fa58683542)
2025-05-18 19:28:33 +00:00
jopejoe1
5bfbfef6df discord-canary: 0.0.668 -> 0.0.678
(cherry picked from commit f5cd8207e8)
2025-05-18 19:28:33 +00:00
jopejoe1
05c93e17fb discord-ptb: 0.0.141 -> 0.0.143
(cherry picked from commit 6adbe026ac)
2025-05-18 19:28:33 +00:00
Atemu
91e450f385 [Backport release-25.05] lngen: fix build with GHC >=9.8.1 (#408404) 2025-05-18 20:44:02 +02:00
Atemu
ffd83d9253 [Backport release-25.05] edge-runtime: drop (#408407) 2025-05-18 20:43:31 +02:00
Leona Maroni
6648830ce0 lasso: fix build with gcc14
(cherry picked from commit 37385d9192)
2025-05-18 18:24:01 +00:00
Arne Keller
50c4e1db25 [Backport release-25.05] nodejs_20: 20.19.1 -> 20.19.2 (#408439) 2025-05-18 20:22:11 +02:00
R. Ryantm
cd28f44de0 tomcat: 11.0.6 -> 11.0.7
(cherry picked from commit c1053a2ea8)
2025-05-18 20:06:10 +02:00
R. Ryantm
e24d645c07 tomcat9: 9.0.104 -> 9.0.105
(cherry picked from commit f88761e23c)
2025-05-18 20:05:55 +02:00
R. Ryantm
24a5d1295d jetty: 12.0.20 -> 12.0.21
(cherry picked from commit 63611760d3)
2025-05-18 20:05:33 +02:00
R. Ryantm
a20f81f1b6 tomcat10: 10.1.40 -> 10.1.41
(cherry picked from commit 147f9b9ad9)
2025-05-18 20:05:06 +02:00
OPNA2608
9ac24b33ed nixos/tests/common/x11.nix: Fix IceWM theme
(cherry picked from commit f66c4ad65f)
2025-05-18 17:09:17 +00:00
Peder Bergebakken Sundt
58c34e570d [Backport release-25.05] SDL_net: 1.2.8-unstable-2024-04-23 -> 1.2.8-unstable-2025-04-21 (#408399) 2025-05-18 18:54:21 +02:00
Antoine du Hamel
b88415246f nodejs_20: 20.19.1 -> 20.19.2
(cherry picked from commit 2e14cbb3d8)
2025-05-18 16:28:06 +00:00
R. Ryantm
52121e5d86 plexamp: 4.12.2 -> 4.12.3
(cherry picked from commit 4d628d83ab)
2025-05-18 16:24:52 +00:00
Aleksana
8e1439fe0f [Backport release-25.05] upscaler: 1.5.1 -> 1.5.2 (#408434) 2025-05-19 00:09:39 +08:00
Grimmauld
88c14c523e upscaler: 1.5.1 -> 1.5.2
(cherry picked from commit b9b954e2e6)
2025-05-18 15:53:48 +00:00
Felix Bargfeldt
a842273877 [Backport release-25.05] fflogs: 8.17.1 -> 8.17.13 (#407862) 2025-05-18 17:51:44 +02:00
Aleksana
b6af4c9857 [Backport release-25.05] fluffychat: 1.26.0 -> 1.26.1 (#408418) 2025-05-18 23:00:24 +08:00
Atemu
982648f224 [Backport release-25.05] riko4: drop (#408410) 2025-05-18 16:51:16 +02:00
Atemu
a8895367c8 [Backport release-25.05] git-annex-utils: drop (#408402) 2025-05-18 16:43:25 +02:00
Atemu
00d78cf384 [Backport release-25.05] x16: adopt, fix build on GCC 14, modernize (#408401) 2025-05-18 16:42:45 +02:00
aleksana
341df29b3a fluffychat: add aleksana to maintainers
(cherry picked from commit 97e834870b)
2025-05-18 14:39:23 +00:00
aleksana
49a1857949 fluffychat: 1.26.0 -> 1.26.1
(cherry picked from commit 419fb0fdf2)
2025-05-18 14:39:23 +00:00
Grimmauld
8928fcbdf5 riko4: drop
The package in nixpkgs was basically unmaintained since 2018.
It's maintainer in nixpkgs is inactive since 2022.
It dependended on the already dropped SDL_gpu package, which it pinned internally.
This now also started failing to build.
While upstream has a newer version of `riko4` available,
it does not remove the SDL_gpu dependency or fix its issues.

(cherry picked from commit 3035235407)
2025-05-18 14:21:38 +00:00
Leona Maroni
733a794906 est-sfs: drop
Unmaintained in Nixpkgs

(cherry picked from commit 337d643e89)
2025-05-18 14:15:37 +00:00
Grimmauld
d6deff043e edge-runtime: drop
The version in nixpkgs was outdated since Nov 2024, with countless releases since [1].
This is unacceptable for what is intended to be a network-facing service.
It also started failing to build.

[1] https://github.com/supabase/edge-runtime/releases

(cherry picked from commit 4e5251e1ef)
2025-05-18 14:14:39 +00:00
Leah Amelia Chen
d76d76a3df lngen: fix build with GHC >=9.8.1
ZHF #403336

(cherry picked from commit 4f64e094ff)
2025-05-18 14:13:23 +00:00
Leona Maroni
0af09df267 [Backport release-25.05] edbrowse: drop (#408368) 2025-05-18 16:07:31 +02:00
Leona Maroni
b12e49a7cf git-annex-utils: drop
Upstream repositority deleted, unmaintained

(cherry picked from commit b6036a7067)
2025-05-18 14:06:43 +00:00
Atemu
d1bfeb9c2b clean: mark as broken (#408338) 2025-05-18 16:02:39 +02:00
Leah Amelia Chen
1f47ea6d8c x16: adopt & modernize
(cherry picked from commit 0405671c7b)
2025-05-18 14:01:24 +00:00
Leah Amelia Chen
fa53c7b41f x16: fix build on GCC 14
(cherry picked from commit b1a81b82aa)
2025-05-18 14:01:24 +00:00
R. Ryantm
06f07f8f77 SDL_net: 1.2.8-unstable-2024-04-23 -> 1.2.8-unstable-2025-04-21
(cherry picked from commit 1955443bda)
2025-05-18 13:55:54 +00:00
R. Ryantm
b6b5ecb97a SDL_image: 1.2.12-unstable-2025-02-13 -> 1.2.12-unstable-2025-04-27
(cherry picked from commit 484eeec743)
2025-05-18 13:47:32 +00:00
JuliusFreudenberger
43880c03b7 teleport_16: 16.5.3 -> 16.5.9
Changelogs: https://github.com/gravitational/teleport/releases/tag/v16.5.4 https://github.com/gravitational/teleport/releases/tag/v16.5.5 https://github.com/gravitational/teleport/releases/tag/v16.5.6 https://github.com/gravitational/teleport/releases/tag/v16.5.7 https://github.com/gravitational/teleport/releases/tag/v16.5.8 https://github.com/gravitational/teleport/releases/tag/v16.5.9
Diff: https://github.com/gravitational/teleport/compare/v16.5.3...v16.5.9
(cherry picked from commit 1cbe1100b0)
2025-05-18 13:40:32 +00:00
JuliusFreudenberger
3b595a9c77 teleport_17: 17.4.5 -> 17.4.8
Changelogs: https://github.com/gravitational/teleport/releases/tag/v17.4.6 https://github.com/gravitational/teleport/releases/tag/v17.4.7 https://github.com/gravitational/teleport/releases/tag/v17.4.8
Diff: https://github.com/gravitational/teleport/compare/v17.4.5...v17.4.8
(cherry picked from commit 9a0eed76cd)
2025-05-18 13:40:32 +00:00
Leona Maroni
149c1fc570 xmlroff: mark as broken 2025-05-18 15:21:52 +02:00
R. Ryantm
8b7f17f900 thunderbird-latest-bin-unwrapped: 138.0 -> 138.0.1
(cherry picked from commit ef1fae5601)
2025-05-18 12:59:25 +00:00
Emily
ff9aa69607 [Backport release-25.05] darwin: remove nix search warning spam (#408371) 2025-05-18 13:59:08 +01:00
Leona Maroni
5176aa4a9f ggobi: mark as broken 2025-05-18 14:44:11 +02:00
ash
f5d39add70 darwin: lib.warn -> lib.warnOnInstantiate
(cherry picked from commit a249cd2ea2)
2025-05-18 12:40:55 +00:00
ash
8cf643e05f darwin: reduce nix search warning spam
(cherry picked from commit 62b67805d4)
2025-05-18 12:40:55 +00:00
Aleksana
0aa45a9270 [25.05] libgadu: mark as broken (#407960) 2025-05-18 20:37:53 +08:00
Leona Maroni
5e761e6c10 edbrowse: drop
Unmaintained in Nixpkgs for 3 years

(cherry picked from commit 992bd81dd7)
2025-05-18 12:34:39 +00:00
Martin Weinelt
42ef2213ef [Backport release-25.05] firefox{,-bin}-unwrapped: 138.0.3 -> 138.0.4 (#408337) 2025-05-18 14:23:03 +02:00
Emily
e5f3555a82 [Backport release-25.05] home-assistant-custom-components.dwd: 2024.11.0 -> 2025.5.0 (#408356) 2025-05-18 14:07:59 +02:00
Martin Weinelt
8532614b36 [Backport release-25.05] python3Packages.schema-salad: drop black build-time dependency (#408348) 2025-05-18 13:58:10 +02:00
Martin Weinelt
237d61b1a2 home-assistant-custom-components.dwd: 2024.11.0 -> 2025.5.0
https://github.com/hg1337/homeassistant-dwd/compare/2024.11.0...2025.5.0
(cherry picked from commit 6a4dee9a11)
2025-05-18 11:57:43 +00:00
Martin Weinelt
10a0180429 python3Packages.schema-salad: drop black build-time dependency
(cherry picked from commit 8c51931373)
2025-05-18 11:40:40 +00:00
Aleksana
dd4dcc6ef1 [Backport release-25.05] darling-dmg: fix compilation (#408343) 2025-05-18 19:39:50 +08:00
Aleksana
b538637c39 [Backport release-25.05] tilda: fix build (#408083) 2025-05-18 19:37:41 +08:00
Aleksana
710fc44fe9 [Backport release-25.05] fvwm2: fix build with GCC 14 (#408239) 2025-05-18 19:37:11 +08:00
Luflosi
5397beb766 darling-dmg: fix compilation
See https://github.com/darlinghq/darling-dmg/pull/105 and https://github.com/darlinghq/darling-dmg/issues/104.

(cherry picked from commit f1652b7670)
2025-05-18 11:34:04 +00:00
Adam C. Stephens
ffc785f086 [Backport release-25.05] invidious: 2.20250504.0 -> 2.20250517.0 (#408222) 2025-05-18 07:30:38 -04:00
Leona Maroni
76aa65043b clean: mark as broken 2025-05-18 13:25:11 +02:00
Sizhe Zhao
3429ab3d11 firefox-bin-unwrapped: 138.0.3 -> 138.0.4
Release-notes: https://www.mozilla.org/en-US/firefox/138.0.4/releasenotes/
Security-advisory: https://www.mozilla.org/en-US/security/advisories/mfsa2025-36/
Fixes: CVE-2025-4920, CVE-2025-4921
(cherry picked from commit 6c01b61e60)
2025-05-18 11:23:53 +00:00
Sizhe Zhao
e6c8bfb62b firefox-unwrapped: 138.0.3 -> 138.0.4
Release-notes: https://www.mozilla.org/en-US/firefox/138.0.4/releasenotes/
Security-advisory: https://www.mozilla.org/en-US/security/advisories/mfsa2025-36/
Fixes: CVE-2025-4920, CVE-2025-4921
(cherry picked from commit 8d9cdf2f6c)
2025-05-18 11:23:53 +00:00
Atemu
1e1873f016 [Backport release-25.05] nixos/tests/vaultwarden: fix UI testing (#408121) 2025-05-18 13:06:59 +02:00
Atemu
6840462ad0 [Backport release-25.05] odyssey: fix build (#408324) 2025-05-18 12:51:44 +02:00
Atemu
aba0991370 [Backport release-25.05] monado: port vulkan headers bump compat fix (#408319) 2025-05-18 12:46:50 +02:00
Bu Kun
59764ed369 gnomeExtensions.arcmenu: 63 -> 65
(cherry picked from commit 880af66d0d)
2025-05-18 10:33:23 +00:00
alyaeanyx
a0dbe9449e odyssey: fix build
(cherry picked from commit a4bb668ee9)
2025-05-18 10:24:02 +00:00
Marcus Ramberg
a55b8b1cf7 cloudflare-warp: wrap warp-cli to fix browser opening
(cherry picked from commit 331d67aed2)
2025-05-18 10:23:36 +00:00
Atemu
59100184da [Backport release-25.05] salmon: add missing dependency (#408082) 2025-05-18 12:13:33 +02:00
Atemu
362ee73979 monado: port vulkan headers bump compat fix
(cherry picked from commit a026c010cd)
2025-05-18 10:13:19 +00:00
Atemu
73eeda0809 [Backport release-25.05] text-engine: 0.1.1 -> 0.1.1-unstable-2024-09-16 (#408034) 2025-05-18 12:13:14 +02:00
Atemu
5f2ee6fb08 [Backport release-25.05] nixosTests.curl-impersonate: skip failing test (#408091) 2025-05-18 12:09:59 +02:00
Aleksana
a53115afeb [Backport release-25.05] luminance: fix GSettings schemas (#408310) 2025-05-18 18:07:43 +08:00
Arne Keller
2add6d9950 [Backport release-25.05] trilium-server: fix build error (#408090) 2025-05-18 12:02:37 +02:00
Rishabh5321
17817436eb luminance: fix GSettings schemas
(cherry picked from commit 65fce93bbb)
2025-05-18 09:47:06 +00:00
Aleksana
6d152297e1 [Backport release-25.05] wivrn: patch monado to work with vulkan-headers >= 1.4.310 (#408306) 2025-05-18 17:44:24 +08:00
Aleksana
4eeec4c914 [Backport release-25.05] manticore: drop (#408282) 2025-05-18 17:36:42 +08:00
Aleksana
092c99a903 [Backport release-25.05] mapmap: drop (#408084) 2025-05-18 17:35:44 +08:00
Amadej Kastelic
94384e2b7e wivrn: remove usages of with
(cherry picked from commit c7366e9184)
2025-05-18 09:35:42 +00:00
Amadej Kastelic
4acf56d485 wivrn: patch monado to work with vulkan-headers >= 1.4.310
(cherry picked from commit 1aa6bf6f60)
2025-05-18 09:35:42 +00:00
Sizhe Zhao
c678f46ac1 google-chrome: fix com.google.Chrome.desktop
(cherry picked from commit 6759d61d8d)
2025-05-18 14:42:43 +05:30
Aleksana
4a8e70531c [Backport release-25.05] nightfox-gtk-theme: 0-unstable-2024-11-06 -> 0-unstable-2025-04-24 (#408181) 2025-05-18 16:41:33 +08:00
Aleksana
5ecb4d2bc4 [Backport release-25.05] tokyonight-gtk-theme: 0-unstable-2024-11-06 -> 0-unstable-2025-04-24 (#408180) 2025-05-18 16:35:59 +08:00
Aleksana
8557110d4f [Backport release-25.05] gruvbox-gtk-theme: 0-unstable-2024-11-06 -> 0-unstable-2025-04-24 (#408182) 2025-05-18 16:35:51 +08:00
Léana 江
ba69044785 manticore: drop
(cherry picked from commit abcbae3cfd)
2025-05-18 08:03:22 +00:00
Aleksana
70d033876c [Backport release-25.05] lutris: migrate to the new meson build system (#408279) 2025-05-18 15:57:57 +08:00
K900
b3c1949c16 [Backport release-25.05] Kernel updates for 2025-05-18 (#408281) 2025-05-18 10:43:43 +03:00
K900
07ed702f97 linux_5_15: 5.15.182 -> 5.15.183
(cherry picked from commit 35c0688fae)
2025-05-18 07:43:20 +00:00
K900
9127b92f91 linux_6_1: 6.1.138 -> 6.1.139
(cherry picked from commit 15b8679d3a)
2025-05-18 07:43:20 +00:00
K900
b2341e2739 linux_6_6: 6.6.90 -> 6.6.91
(cherry picked from commit 43a5b3934e)
2025-05-18 07:43:19 +00:00
K900
2f10b980ff linux_6_12: 6.12.28 -> 6.12.29
(cherry picked from commit 2c3f3560ce)
2025-05-18 07:43:19 +00:00
K900
c0a50f51b2 linux_6_14: 6.14.6 -> 6.14.7
(cherry picked from commit c03b00a6b1)
2025-05-18 07:43:19 +00:00
Skythrew
825b7da918 lutris: migrate to the new meson build system
This commit makes the Lutris package use the meson build system, which is more appropriate to build the desktop app.
Indeed, the meson build of Lutris is the only one supporting translations for the desktop app.
However, the presence of the Makefile at the source root is preventing the Nix build system from building the package with meson without overriding the different build phases.

(cherry picked from commit 44cdbd3481)
2025-05-18 07:42:48 +00:00
Jon Seager
a7cecb9ee5 [Backport release-25.05] snapcraft: make SSL certs available during tests (#408129) 2025-05-18 08:17:29 +02:00
Aleksana
32db0a56c7 [Backport release-25.05] debsigs: Add dependency 'ar' and fix path (#408243) 2025-05-18 12:40:23 +08:00
Aleksana
3a90f3e386 [Backport release-25.05] matrix-gtk-theme: 0-unstable-2024-11-06 -> 0-unstable-2025-05-06 (#408179) 2025-05-18 12:40:03 +08:00
Aleksana
bc6942be13 [Backport release-25.05] python3Packages.aiocache: disable time-sensitive tests (#408123) 2025-05-18 12:39:45 +08:00
Aleksana
346c065d05 [Backport release-25.05] shh: rev2 enhancements to path handling, manpages, shell-completion (#407853) 2025-05-18 12:39:14 +08:00
Aleksana
9b3da47873 [Backport release-25.05] python312Packages.roadlib: add missing inputs (#408170) 2025-05-18 12:38:46 +08:00
Peter Membrey
996d332cb7 Add dependency 'ar' and fix path
(cherry picked from commit 0f5c286263)
2025-05-18 04:33:24 +00:00
Aleksana
9065bac3a0 [Backport release-25.05] foliate: 3.2.1 -> 3.3.0 (#408240) 2025-05-18 12:28:30 +08:00
Aleksana
4b9db8d947 [Backport release-25.05] varia: 2025.1.24-1 -> 2025.4.22 (#407855) 2025-05-18 12:03:16 +08:00
R. Ryantm
7620586ee9 foliate: 3.2.1 -> 3.3.0
(cherry picked from commit b5ce85d8c6)
2025-05-18 04:02:57 +00:00
Leah Amelia Chen
75aaf7c003 fvwm2: fix build with GCC 14
ZHF #403336

(cherry picked from commit f3d97d0823)
2025-05-18 04:00:54 +00:00
Aleksana
43a4459b08 [Backport release-25.05] collision: 3.9.0 -> 3.10.0 (#408237) 2025-05-18 11:55:46 +08:00
Aleksana
00193d2b64 [Backport release-25.05] create-react-app: drop (#408235) 2025-05-18 11:55:35 +08:00
sund3RRR
421d714108 collision: 3.9.0 -> 3.10.0
(cherry picked from commit 03b7b645e8)
2025-05-18 03:42:01 +00:00
networkException
6e9a0f103a create-react-app: drop
This tool was only meant to create new projects and has
since been deprecated upstream.

(cherry picked from commit e3b9e54d07)
2025-05-18 03:40:59 +00:00
Bobby Rong
edd6cb2754 [Backport release-25.05] epiphany: Various Pantheon fixes (#408233) 2025-05-18 11:40:46 +08:00
Bobby Rong
53c646a0ab pantheon.elementary-gtk-theme: 8.2.0 -> 8.2.1
https://github.com/elementary/stylesheet/compare/8.2.0...8.2.1

Contains style fix for epiphany 48.

(cherry picked from commit 6906aed53d)
2025-05-18 03:29:04 +00:00
Bobby Rong
d7d0a2ec14 epiphany: Fix startup crash on Pantheon
* gdk_display_manager_get() was called before gtk_init()
* gtk_menu_button_set_icon_name: assertion 'GTK_IS_MENU_BUTTON (menu_button)' failed

(cherry picked from commit 353c718f02)
2025-05-18 03:29:04 +00:00
Bobby Rong
3279ff8d0f [Backport release-25.05] xfce.thunar: 4.20.2 -> 4.20.3 (#408231) 2025-05-18 11:26:08 +08:00
Bobby Rong
32e0688d7d xfce.thunar: 4.20.2 -> 4.20.3
https://gitlab.xfce.org/xfce/thunar/-/compare/thunar-4.20.2...thunar-4.20.3
(cherry picked from commit 9137c96a53)
2025-05-18 03:18:51 +00:00
Gaetan Lepage
33604d16e3 invidious: 2.20250504.0 -> 2.20250517.0
Diff:
https://github.com/iv-org/invidious/compare/v2.20250504.0...v2.20250517.0

Changelog:
https://github.com/iv-org/invidious/blob/v2.20250517.0/CHANGELOG.md
(cherry picked from commit 55245e62aa)
2025-05-18 02:16:27 +00:00
André Lima
0da5e3e7ed gnomeExtensions.applications-menu: fix GMenu import
(cherry picked from commit c77b9c5842)
2025-05-17 23:40:46 +00:00
R. Ryantm
04bb0fac08 gruvbox-gtk-theme: 0-unstable-2024-11-06 -> 0-unstable-2025-04-24
(cherry picked from commit 63b4c7ce84)
2025-05-17 22:44:34 +00:00
R. Ryantm
6b8960c961 nightfox-gtk-theme: 0-unstable-2024-11-06 -> 0-unstable-2025-04-24
(cherry picked from commit b88aca0a1b)
2025-05-17 22:42:53 +00:00
R. Ryantm
4974c03953 tokyonight-gtk-theme: 0-unstable-2024-11-06 -> 0-unstable-2025-04-24
(cherry picked from commit 3d8b9f46f2)
2025-05-17 22:41:12 +00:00
Antonio
b6243a22e8 matrix-gtk-theme: 0-unstable-2024-11-06 -> 0-unstable-2025-05-06
(cherry picked from commit 5c354a3e3d)
2025-05-17 22:39:25 +00:00
Fabian Affolter
863d9cde7b python313Packages.types-lxml: adjust inputs
(cherry picked from commit c8f871d2ba)
2025-05-17 22:24:41 +00:00
Fabian Affolter
d1a06ea3d8 python312Packages.roadlib: add missing inputs
(cherry picked from commit b5b0cecfd2)
2025-05-17 22:20:13 +00:00
Fabian Affolter
cba9b14a51 python312Packages.wheel-inspect: refactor
(cherry picked from commit b3bf51cbb6)
2025-05-17 22:20:02 +00:00
Fabian Affolter
e418f11159 python312Packages.wheel-filename: refactor
(cherry picked from commit 6e7d5974b8)
2025-05-17 22:20:02 +00:00
Fabian Affolter
f447135173 python313Packages.entry-points-txt: refactor
Fix build https://hydra.nixos.org/build/297428192

(cherry picked from commit d961728d54)
2025-05-17 22:20:02 +00:00
Emily
037f2c7692 [Backport release-25.05] maintainers: updated ohheyrj (#408157) 2025-05-17 22:51:47 +01:00
Richard Annand
a9591ff829 maintainers: updated ohheyrj
(cherry picked from commit d97b8fd33a)
2025-05-17 21:41:41 +00:00
Doron Behar
3d56ad5da4 [Backport release-25.05] gnomeExtensions.gsconnect: 58 -> 62 (#408116) 2025-05-18 00:40:11 +03:00
Florian Klink
b45b859d11 [Backport release-25.05] python3Packages.moderngl: fix context detection under NixOS (#408155) 2025-05-18 00:36:52 +03:00
Thomas Watson
1c82291cdd python3Packages.moderngl: fix context detection under NixOS
In certain situations moderngl will also try to directly load
`libGL.so`/`libEGL.so`, and fail to do so. Substitute a direct path like
in glcontext.

(cherry picked from commit f96b36ba52)
2025-05-17 21:36:26 +00:00
Wolfgang Walther
3a0323589f [Backport release-25.05] ci/eval/nix: 2.24 -> ... (#408130) 2025-05-17 21:28:12 +00:00
Wolfgang Walther
c00abe80e0 [Backport release-25.05] ci/eval/compare: manage the "by: package-maintainer" label (#408128) 2025-05-17 21:26:01 +00:00
Martin Weinelt
e96531fcf0 [Backport release-25.05] ty: init at 0.0.1-alpha.5 (#408145) 2025-05-17 23:24:48 +02:00
Wolfgang Walther
439253015c workflows/eval: fix process job with author id argument
(cherry picked from commit 57d8274118)
2025-05-17 23:17:04 +02:00
Benjamin Sparks
71666466ed ty: init at 0.0.1-alpha.5
(cherry picked from commit 73c6a4b92a)
2025-05-17 21:09:46 +00:00
Robert Hensing
b9176e15ca ci/nix: 2.24 -> 2.28
(cherry picked from commit 529143f3d7)
2025-05-17 20:54:30 +00:00
Leah Amelia Chen
4b8b2f3470 snapcraft: make SSL certs available during tests
See https://hydra.nixos.org/build/297090643/nixlog/2

ZHF #403336

(cherry picked from commit 7947814a84)
2025-05-17 20:52:49 +00:00
Winter
f478418afd ci/eval/compare: manage the "by: package-maintainer" label
While OfBorg is still adding these, it takes a much longer time to do so
compared to the eval action. Since we're adding rebuild labels, I think
it'd be nice to just do it within the eval action.

(cherry picked from commit d52066e2b1)
2025-05-17 20:49:33 +00:00
Ramses
ce3af7849d [Backport release-25.05] nixos/specialisation: escape and restrict specialisation names (#408069) 2025-05-17 22:39:49 +02:00
Sarah Clark
4a94acefba python3Packages.aiocache: disable time-sensitive tests on Darwin
(cherry picked from commit d78e808b41)
2025-05-17 20:34:14 +00:00
Sarah Clark
9d17e1645a python3Packages.aiocache: cleanup
(cherry picked from commit 5ac3330d26)
2025-05-17 20:34:14 +00:00
networkException
7cc7b7c639 nixos/tests/vaultwarden: fix UI testing
This patch fixes a failure in the Selenium UI testing
script by waiting for an element to be clickable.
This allows the Angular to render properly.

(cherry picked from commit 94e7e3f350)
2025-05-17 20:23:07 +00:00
R. Ryantm
7f28e17d96 gnomeExtensions.gsconnect: 58 -> 62
(cherry picked from commit 3cc678fad5)
2025-05-17 20:10:51 +00:00
Winter
4a4ef96bf6 [Backport release-25.05] nixos/profiles/nix-builder-vm: allow the system derivation to be substituted (#408109) 2025-05-17 16:10:31 -04:00
Sefa Eyeoglu
ea72416d06 [Backport release-25.05] audiobookshelf: 2.21.0 -> 2.23.0 (#408112) 2025-05-17 22:01:39 +02:00
Adam C. Stephens
18867496f1 audiobookshelf: 2.21.0 -> 2.23.0
https://github.com/advplyr/audiobookshelf/releases/tag/v2.22.0
https://github.com/advplyr/audiobookshelf/releases/tag/v2.23.0
(cherry picked from commit 3a1ff730b0)
2025-05-17 19:50:23 +00:00
Winter
258dca1e95 nixos/profiles/nix-builder-vm: allow the system derivation to be substituted
Consider a user wanting to set up the Linux builder for the first time,
but with a slightly more generous allocation of resources compared to
the default. They'll do something like this:

```
{
  virtualisation.cores = 3;
  virtualisation.darwin-builder = {
    diskSize = 40 * 1024;
    memorySize = 4 * 1024;
  };
}
```

This will fail with an error like this:

```
error: a 'aarch64-linux' with features {} is required to build '/nix/store/3acpgmwqwnk8g2gc5r05ar2lvmn01b8a-builder.pl.drv', but I am a 'aarch64-darwin' with features {apple-virt, benchmark, big-parallel, nixos-test}
```

But why would they have to rebuild the NixOS system?! All they did was
change the arguments passed to QEMU, and nothing those options control
would affect the NixOS configuration itself... right?

`config.system.build.toplevel` is defined with `allowSubstitutes` set to
`false` by default, which makes it so that the toplevel can't be
substituted if Nix is trying to use it "directly." So because the above
example would have to rebuild the VM runner, which references toplevel
directly, Nix refuses to substitute it, unless `always-allow-substitutes
= true` is set as a Nix option. (In the case where the QEMU options
aren't changed at all, Nix just substitutes the runner, which sidesteps
this issue as the runner itself doesn't use toplevel as an input.)

(cherry picked from commit 747c55e702)
2025-05-17 19:40:59 +00:00
emilylange
28d804e625 nixosTests.curl-impersonate: skip failing test
We use a NixOS VM test to execute the upstream tests of curl-impersonate
because they require networking which cannot be mocked easily in the
sandbox.

Of those upstream tests, test_http2_headers spawns nghttpd2, makes
request against it and then tries to parse the logs it emits.
The last step, the parsing of the logs, it extremely fragile and version
dependent. The version of nghttp2 that we carry in nixpkgs is newer than
the one curl-impersonate expects and happens to emit a different log
format.

So to fix the remaining test suite of curl-impersonate, we simply skip
test_http2_headers.

(cherry picked from commit 9266b72424)
2025-05-17 18:40:03 +00:00
Tim Häring
f103e4d695 trilium-server: fix build error
(cherry picked from commit 6e89b5e133)
2025-05-17 18:39:47 +00:00
Martin Weinelt
b7e752c7d9 [Backport release-25.05] evcc: 0.203.5 -> 0.203.6 (#408064) 2025-05-17 20:36:01 +02:00
alyaeanyx
798cf818e8 mapmap: drop
mapmap has been unmaintained for 5 years now, see
https://github.com/mapmapteam/mapmap/blob/develop/README.md.

(cherry picked from commit 15b37c923b)
2025-05-17 18:14:50 +00:00
alyaeanyx
54fd57b389 tilda: fix build
Upstream manually sets the standard to c99 in configure.ac, which makes
the popen and pclose invocations in src/tilda-lock-files.c produce
implicit function declaration errors.

(cherry picked from commit c97f91a5a2)
2025-05-17 18:14:03 +00:00
alyaeanyx
1f0aee9898 salmon: add missing dependency
(cherry picked from commit 21e92ded99)
2025-05-17 18:13:37 +00:00
Wolfgang Walther
442582e6d6 [25.05] workflows/periodic-merge: set custom name for haskell-updates merge (#408072) 2025-05-17 18:09:47 +00:00
Toma
cfc86d51a8 [Backport release-25.05] cinny-desktop: make more dependencies optional, don't double wrap binary (#407852) 2025-05-17 20:09:22 +02:00
Jan Tojnar
189c412728 webkitgtk_6_0: 2.48.1 → 2.48.2
https://github.com/WebKit/WebKit/compare/webkitgtk-2.48.1...webkitgtk-2.48.2
https://webkitgtk.org/2025/05/14/webkitgtk2.48.2-released.html
https://webkitgtk.org/security/WSA-2025-0004.html

CVE-2025-24223, CVE-2025-31204, CVE-2025-31205, CVE-2025-31206, CVE-2025-31215, CVE-2025-31257

(cherry picked from commit dfcb90fcf3)
2025-05-17 18:07:24 +00:00
Yohann Boniface
86dcfbbe9d [Backport release-25.05] pngnq: fix with gcc 14 (#408055) 2025-05-17 20:06:05 +02:00
Toma
73e46c9a84 [Backport release-25.05] rPackages: fix meta.homepage for packages in BiocAnn and BiocExp (#408075) 2025-05-17 20:05:18 +02:00
TomaSajt
13df3e2636 rPackages: fix meta.homepage for packages in BiocAnn and BiocExp
(cherry picked from commit cb44e8f36e)
2025-05-17 18:01:02 +00:00
Wolfgang Walther
8a0d495c13 [Backport release-25.05] ci/eval: allow configuration of the system to eval attrpaths on (#408070) 2025-05-17 17:57:11 +00:00
Wolfgang Walther
442a9a811e workflows/periodic-merge: set custom name for haskell-updates merge
The simple name can lead to confusion. Adding an explicit override to
make it more clear.

(cherry picked from commit 38169112e8)
2025-05-17 19:54:48 +02:00
Maciej Krüger
37f4d53822 [Backport release-25.05] wayfarer: 1.2.4 -> 1.2.4-unstable-2025-04-12 (#408067) 2025-05-17 19:53:11 +02:00
Winter
f309fef2f3 ci/eval: allow configuration of the system to eval attrpaths on
Right now, there are some paths that don't even get exposed to certain
systems (notably Darwin, but some outliers exist for Linux such as the
Darwin-specific Hackage overlay) for one reason or another, usually
because of assertions like `stdenv.isLinux`. To catch these scenarios,
this change implements a way to specify the system to evaluate attrpaths
on, and makes it default to the system that we're evaluating outpaths
for.

(cherry picked from commit 6b18b3d67b)
2025-05-17 17:50:02 +00:00
toborwinner
1b2b3e1ea2 nixos/specialisation: escape and restrict specialisation names
Prevent the specialisation names from containing a forward slash.
Also escape them to allow for spaces in specialisation names.

(cherry picked from commit 2b9fc0ccc5)
2025-05-17 17:48:07 +00:00
Maciej Krüger
27d999ea28 wayfarer: 1.2.4 -> 1.2.4-unstable-2025-04-12
This fixes the package build

(cherry picked from commit 5e15dfdd56)
2025-05-17 17:46:20 +00:00
Martin Weinelt
ac2a1462ea evcc: 0.203.5 -> 0.203.6
https://github.com/evcc-io/evcc/releases/tag/0.203.6
(cherry picked from commit c3954750dd)
2025-05-17 17:36:06 +00:00
R. Ryantm
79071dda94 notmuch-mailmover: 0.6.0 -> 0.7.0
(cherry picked from commit 99655ad7a5)
2025-05-17 17:35:29 +00:00
Grimmauld
aed40c740f pngnq: fix with gcc 14
Various includes are missing.
The zlib include was being patched in before.
The string include is now needed with gcc 14.

(cherry picked from commit f433407a68)
2025-05-17 17:23:37 +00:00
Pavel Sobolev
1201bb64c9 text-engine: remove the json-glib dependency
(cherry picked from commit 25ba6fc463)
2025-05-17 16:06:56 +00:00
Pavel Sobolev
8c7b1e5274 text-engine: 0.1.1 -> 0.1.1-unstable-2024-09-16
(cherry picked from commit 81da8104df)
2025-05-17 16:06:56 +00:00
Pavel Sobolev
221000ded9 text-engine: refactor
(cherry picked from commit 9ba7647102)
2025-05-17 16:06:56 +00:00
Niklas Korz
dba3461752 [Backport release-25.05] scummvm: fix aarch64-darwin ranlib path (#408023) 2025-05-17 17:45:09 +02:00
Emily
06d4b5774d [Backport release-25.05] sourcehut.*: update (#408022) 2025-05-17 17:42:24 +02:00
ash
de09ce1ab6 nixos/doc/rl-2505: Fix wording of users.users subuid allocation note
Co-authored-by: Leona Maroni <dev@leona.is>
(cherry picked from commit 75097de8fb)
2025-05-17 15:36:40 +00:00
Niklas Korz
cd972b65cc scummvm: fix aarch64-darwin ranlib path
(cherry picked from commit a0d202cd8d)
2025-05-17 15:35:58 +00:00
Marcin Serwin
f4668fe0d4 nixos/sourcehut: adapt to new versions
(cherry picked from commit fa148f9b48)
2025-05-17 15:34:17 +00:00
Marcin Serwin
2670b88ba9 srht-gen-oauth-tok: fix html parsing
(cherry picked from commit ea5a3a6d7e)
2025-05-17 15:34:17 +00:00
Marcin Serwin
469317e669 sourcehut.*: use latest sqlalchemy
(cherry picked from commit 1a3b8285af)
2025-05-17 15:34:17 +00:00
Marcin Serwin
95b5581067 sourcehut.todosrht: 0.75.10 -> 0.77.5
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit 8ade1de14b)
2025-05-17 15:34:17 +00:00
Marcin Serwin
2d62b4567b sourcehut.pastesrht: 0.15.4 -> 0.16.1
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit 11aa859305)
2025-05-17 15:34:17 +00:00
Marcin Serwin
8e03048ed3 sourcehut.pagessrht: 0.15.7 -> 0.16.0
Signed-off-by: Marcin Serwin <marcin@serwin.dev>
(cherry picked from commit aa9753baab)
2025-05-17 15:34:17 +00:00
Marcin Serwin
b42dae80f9 sourcehut.metasrht: 0.69.8 -> 0.72.11
(cherry picked from commit 83b3f1d98c)
2025-05-17 15:34:17 +00:00
Marcin Serwin
2caf79ffc1 sourcehut.mansrht: 0.16.5 -> 0.18.1
(cherry picked from commit 0b0a6d144c)
2025-05-17 15:34:17 +00:00
Marcin Serwin
8d5cacf26f sourcehut.listssrht: 0.57.18 -> 0.62.3
(cherry picked from commit b0fdbb362b)
2025-05-17 15:34:17 +00:00
Marcin Serwin
8a3d510d32 sourcehut.hubsrht: 0.17.7 -> 0.20.2
(cherry picked from commit 84bc40a9a4)
2025-05-17 15:34:17 +00:00
Marcin Serwin
634f3f2059 sourcehut.hgsrht: 0.33.0 -> 0.36.1
(cherry picked from commit b23f4dd3c9)
2025-05-17 15:34:17 +00:00
Marcin Serwin
9ea57dd778 sourcehut.gitsrht: 0.85.9 -> 0.88.10
(cherry picked from commit 2200d55432)
2025-05-17 15:34:17 +00:00
Marcin Serwin
4854c2116d sourcehut.buildsrht: 0.89.15 -> 0.95.1
(cherry picked from commit a7e194630a)
2025-05-17 15:34:17 +00:00
Marcin Serwin
b92803f39b sourcehut.scmsrht: 0.22.24 -> 0.22.28
(cherry picked from commit 4c1ad38c74)
2025-05-17 15:34:17 +00:00
Marcin Serwin
00b283d297 sourcehut.srht: 0.71.8 -> 0.76.1
(cherry picked from commit 522711a2c6)
2025-05-17 15:34:16 +00:00
Aleksana
56787b8952 [Backport release-25.05] cde: drop (#408005) 2025-05-17 23:23:37 +08:00
Niklas Korz
3dafab35ed [Backport release-25.05] shibboleth-sp: fix build for Clang >=19 (#407999) 2025-05-17 17:06:40 +02:00
Niklas Korz
72e7dda22d [Backport release-25.05] xalanc: fix Clang 19 and GCC 15 compat (#408003) 2025-05-17 17:04:02 +02:00
Leona Maroni
cfeb72ebc0 cde: drop
Unmaintained for 7 years and broken

(cherry picked from commit 8bc90bcf87)
2025-05-17 14:59:24 +00:00
Niklas Korz
3adc481229 xalanc: fix Clang 19 and GCC 15 compat
(cherry picked from commit 3714001525)
2025-05-17 14:50:50 +00:00
Aleksana
d21ae91816 [25.05] axmldec: mark as broken (#407987) 2025-05-17 22:46:24 +08:00
Benjamin Sparks
dee1799775 shibboleth-sp: fix build for Clang >=19
(cherry picked from commit 4060d5dab7)
2025-05-17 14:45:58 +00:00
Atemu
00082e69e4 [25.05] dbench: mark as broken (#407955) 2025-05-17 16:42:02 +02:00
K900
32f63121a6 [Backport release-25.05] sgrep: drop (#407994) 2025-05-17 17:37:21 +03:00
K900
3865a29a02 [Backport release-25.05] quickbms: drop (#407995) 2025-05-17 17:37:14 +03:00
Benjamin Sparks
97ca458d08 quickbms: drop
(cherry picked from commit 8e888153c6)
2025-05-17 14:36:24 +00:00
Grimmauld
12ade8b9db sgrep: drop
Fails to build with gcc 14 and unmaintained upstream since 1998 [1].

[1] https://www.cs.helsinki.fi/u/jjaakkol/sgrep.html

(cherry picked from commit a160a4c3f9)
2025-05-17 14:36:13 +00:00
Thomas Gerbet
93a889a660 [Backport release-25.05] directvnc: drop (#407934) 2025-05-17 16:33:00 +02:00
Thomas Gerbet
58035462d6 [Backport release-25.05] suidChroot: drop (#407973) 2025-05-17 16:30:44 +02:00
Leona Maroni
5f4e6b02dc axmldec: mark as broken 2025-05-17 16:21:20 +02:00
Martin Weinelt
d20e3f7dbe [Backport release-25.05] kea: disable on darwin (#407946) 2025-05-17 16:18:37 +02:00
Aleksana
d79b77d84f [25.05] python3Packages.push-receiver: mark as broken (#407876) 2025-05-17 22:13:44 +08:00
Aleksana
a10ad4e3d3 afpfs-ng: mark as broken (#407971) 2025-05-17 22:12:17 +08:00
Atemu
16ceb9fce5 [Backport release-25.05] perl540Packages.SDL: fix build (#407894) 2025-05-17 16:03:05 +02:00
Atemu
889b6a5435 [Backport release-25.05] dd_rescue: 1.99.8 -> 1.99.21 (#407909) 2025-05-17 16:02:42 +02:00
isabel
68513a31af [Backport release-25.05] moonlight: 1.3.18 -> 1.3.19 (#407921) 2025-05-17 15:01:42 +01:00
Aleksana
8236f51965 [Backport release-25.05] evolution-ews: fix patch compiler errors (#407976) 2025-05-17 22:00:34 +08:00
Marcel
ce52733508 evolution-ews: fix patch compiler errors
/build/evolution-ews-3.56.1/src/common/e-ews-common-utils.c:211:13: error: 'true' undeclared (first use in this function)
  211 |         if (true) {
      |             ^~~~
/build/evolution-ews-3.56.1/src/common/e-ews-common-utils.c:15:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
   14 | #include "e-ews-common-utils.h"
  +++ |+#include <stdbool.h>
   15 |
/build/evolution-ews-3.56.1/src/common/e-ews-common-utils.c:211:13: note: each undeclared identifier is reported only once for each function it appears in
  211 |         if (true) {
      |             ^~~~

(cherry picked from commit 7128c9546c)
2025-05-17 13:53:40 +00:00
Grimmauld
073a01ae10 suidChroot: drop
The package fails to build with gcc 14.
It has neither maintainer nor homepage link in nixpkgs.
The last commit specifically interacting with `suidChroot` was in 2017,
the last update was in 2015. With no linked repository and no maintenance,
the security of something claiming to be a "Setuid-safe wrapper for chroot" is questionable at best.

(cherry picked from commit 2e6bfdc649)
2025-05-17 13:47:47 +00:00
Leona Maroni
52cc1868e5 afpfs-ng: mark as broken 2025-05-17 15:43:13 +02:00
Leah Amelia Chen
b020a8478b [25.05] libgadu: mark as broken
See #407956
2025-05-17 15:35:04 +02:00
Leona Maroni
d5b2098f59 [Backport release-25.05] python3Packages.pybullet: fix build with GCC 14 (#407893) 2025-05-17 15:29:03 +02:00
Leona Maroni
edbd478b0a dbench: mark as broken 2025-05-17 15:21:40 +02:00
Martin Weinelt
36d055248b [Backport release-25.05] python313Packages.asyncinotify: mark unsupported on darwin (#407940) 2025-05-17 15:08:54 +02:00
Martin Weinelt
b447384d85 [Backport release-25.05] python313Packages.shiboken2: mark broken (#407939) 2025-05-17 15:08:41 +02:00
Martin Weinelt
e2c60e829d [Backport release-25.05] python313Packages.piper-phonemize: fix aarch64-linux build (#407944) 2025-05-17 15:08:06 +02:00
Martin Weinelt
945102941c [Backport release-25.05] python3Packages.slimit: drop (#407942) 2025-05-17 15:08:02 +02:00
Martin Weinelt
ae7af68d65 kea: disable on darwin
Build failure since 2024-12 and I lack interest in debugging this for darwin.

(cherry picked from commit 198377e966)
2025-05-17 13:05:06 +00:00
Adam C. Stephens
88e3cc15e4 [Backport release-25.05] kanidm: add darwin support (#407936) 2025-05-17 09:03:31 -04:00
Martin Weinelt
3e314101b8 python313Packages.piper-phonemize: fix aarch64-linux build
While in the sandbox calls into onnxruntime lead to a coredump.

(cherry picked from commit 5cb66f8889)
2025-05-17 12:59:06 +00:00
Martin Weinelt
0b5b6315dd python3Packages.slimit: drop
(cherry picked from commit 9997a44ddb)
2025-05-17 12:58:52 +00:00
Martin Weinelt
d0b619bf50 pretix: drop dependency on slimit
Was removed some time after 2024.10.

(cherry picked from commit 78029e12b4)
2025-05-17 12:58:52 +00:00
Martin Weinelt
bcbcf2931e python313Packages.vat-moss: disable
Uses the dead and removed cgi battery.

(cherry picked from commit 6fc2efa54e)
2025-05-17 12:58:43 +00:00
Martin Weinelt
3462f52ced python313Packages.asyncinotify: mark unsupported on darwin
```
Check whether the following modules can be imported: asyncinotify
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <lambda>
  File "/nix/store/vfdk6q81hdjqjfiqz8f92hibdck3kmn6-python3-3.12.10/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/nix/store/bk44appr4dabadspjahk3l0ad29vhq8s-python3.12-asyncinotify-4.2.0/lib/python3.12/site-packages/asyncinotify/__init__.py", line 23, in <module>
    from . import _ffi
  File "/nix/store/bk44appr4dabadspjahk3l0ad29vhq8s-python3.12-asyncinotify-4.2.0/lib/python3.12/site-packages/asyncinotify/_ffi.py", line 36, in <module>
    libc.inotify_init.restype = check_return
    ^^^^^^^^^^^^^^^^^
  File "/nix/store/vfdk6q81hdjqjfiqz8f92hibdck3kmn6-python3-3.12.10/lib/python3.12/ctypes/__init__.py", line 392, in __getattr__
    func = self.__getitem__(name)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/vfdk6q81hdjqjfiqz8f92hibdck3kmn6-python3-3.12.10/lib/python3.12/ctypes/__init__.py", line 397, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: dlsym(0x3312f2768, inotify_init): symbol not found
```

(cherry picked from commit 4ca073a957)
2025-05-17 12:58:21 +00:00
Grimmauld
83febaa04d python313Packages.shiboken2: mark broken
The package uses `mkDerivation`+`toPythonModule` in python packages.
This means `disabled` is not an option.

The package already shouldn't work on py 3.12 as per compatibility matrix [1].
While it might be possible to patch this *again*, this poackage is currently a complete mess.

[1] https://wiki.qt.io/Qt_for_Python#Python_compatibility_matrix

(cherry picked from commit 76627c2d55)
2025-05-17 12:57:45 +00:00
Will Gordon
47553f9561 kanidm: add darwin support
Supersedes #402699

(cherry picked from commit 054554bad7)
2025-05-17 12:51:52 +00:00
Grimmauld
ba4dd403c8 directvnc: drop
The package was unmaintained upstream since 2015.
Apart from questionable security (it does not support VNC passwords and is dead upstream),
the build also started to fail since gcc 14.

(cherry picked from commit 529f5be0f6)
2025-05-17 12:51:12 +00:00
Thomas Gerbet
ba44c1f5e5 [Backport release-25.05] brave: 1.78.97 -> 1.78.102 (#407918) 2025-05-17 14:38:23 +02:00
R. Ryantm
3a8de38c27 moonlight: 1.3.18 -> 1.3.19
(cherry picked from commit b94c5fe954)
2025-05-17 12:26:38 +00:00
Sean Buckley
136a017b43 brave: 1.78.97 -> 1.78.102
https://community.brave.com/t/release-channel-1-78-102/618564
(cherry picked from commit 4f97041463)
2025-05-17 12:21:16 +00:00
Martin Weinelt
98b4902624 [Backport release-25.05] home-assistant: 2025.5.1 -> 2025.5.2 (#407841) 2025-05-17 14:04:28 +02:00
Felix Singer
1ba318392e dd_rescue: Set mainProgram to dd_rescue
Signed-off-by: Felix Singer <felixsinger@posteo.net>
(cherry picked from commit 8bf69f4279)
2025-05-17 12:02:50 +00:00
Felix Singer
e9b53bec00 dd_rescue: 1.99.8 -> 1.99.21
Signed-off-by: Felix Singer <felixsinger@posteo.net>
(cherry picked from commit 4fdf69a925)
2025-05-17 12:02:50 +00:00
Grimmauld
e87581acf1 perl540Packages.SDL: fix build
(cherry picked from commit 308a79daab)
2025-05-17 11:11:40 +00:00
Leona Maroni
a94224f33b python3Packages.pybullet: fix build with GCC 14
(cherry picked from commit 295c2bd762)
2025-05-17 11:10:13 +00:00
Aleksana
17f6409a25 [Backport release-25.05] plattenalbum: 2.2.2 -> 2.3.0 (#407864) 2025-05-17 18:18:10 +08:00
Leona Maroni
310d0a163f python3Packages.push-receiver: mark as broken
Issues with protobuf and unmaintained
2025-05-17 12:11:28 +02:00
Martin Weinelt
bd38d2998f [Backport release-25.05] acme: Add csr option (#407854) 2025-05-17 12:10:15 +02:00
Aleksana
47bcfa9279 [Backport release-25.05] curtail: 1.12.0 -> 1.13.0 (#407860) 2025-05-17 17:42:21 +08:00
Aleksana
4098c920bd [Backport release-25.05] ascii-draw: 1.0.0 -> 1.1.0 (#407859) 2025-05-17 17:42:06 +08:00
R. Ryantm
0863c4697f plattenalbum: 2.2.2 -> 2.3.0
(cherry picked from commit c74c886dfd)
2025-05-17 09:38:52 +00:00
R. Ryantm
4bc4ab8a6f fflogs: 8.17.1 -> 8.17.13
(cherry picked from commit 79053f72f4)
2025-05-17 09:36:48 +00:00
R. Ryantm
c7a91607c5 curtail: 1.12.0 -> 1.13.0
(cherry picked from commit 9e08cce04f)
2025-05-17 09:36:20 +00:00
R. Ryantm
714187085b ascii-draw: 1.0.0 -> 1.1.0
(cherry picked from commit d7b9252836)
2025-05-17 09:33:13 +00:00
R. Ryantm
ba0e6ff45d varia: 2025.1.24-1 -> 2025.4.22
(cherry picked from commit 9ea1f044a1)
2025-05-17 09:26:41 +00:00
Lucas Savva
1531a60f75 doc/rl-2505: relnote security.acme changes
(cherry picked from commit 123d134411)
2025-05-17 09:24:50 +00:00
Lucas Savva
6077ac74ae nixos/tests/acme: Add CSR test
(cherry picked from commit eeaa42f670)
2025-05-17 09:24:49 +00:00
C0D3 M4513R
dcc7993ccc acme: Add csr option
Signed-off-by: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com>
(cherry picked from commit 754412b4ae)
2025-05-17 09:24:49 +00:00
Aleksana
848e7b5ee8 [Backport release-25.05] musl-obstack: fix build on darwin (#407846) 2025-05-17 17:18:14 +08:00
Aleksana
5fca624091 [Backport release-25.05] doc/tauri: fix example, make openssl linux-only (#407849) 2025-05-17 17:18:00 +08:00
Aleksana
da83cd318a [Backport release-25.05] whipper: add mainProgram (#407848) 2025-05-17 17:08:50 +08:00
Aleksana
5e1337458e [Backport release-25.05] wayland: Remove meta.mainProgram (#407847) 2025-05-17 17:08:45 +08:00
kuflierl
975f283ba1 shh: rev2 switch to upstreamed patches for strace path fixing, clean up check patch, enable manpages and autocomplete with upstream patches,
update script, make cross-compile possible, make docgen feature and generation optional, add changelog

Signed-off-by: kuflierl <41301536+kuflierl@users.noreply.github.com>
(cherry picked from commit 3dc449dadb)
2025-05-17 09:08:43 +00:00
TomaSajt
fdb1dfbfe6 cinny-desktop: make more dependencies optional, don't double wrap binary
(cherry picked from commit bdefe3b4c3)
2025-05-17 09:08:32 +00:00
Aleksana
34a4af7373 [Backport release-25.05] feishu: add mainProgram (#407845) 2025-05-17 17:08:21 +08:00
Niko Cantero
b280fd97dc matrix-continuwuity: init at 0.5.0-rc.5; nixos/matrix-continuwuity: init
(cherry picked from commit c878ad10fb)
2025-05-17 09:05:49 +00:00
TomaSajt
a105a3b79e doc/tauri: fix example, make openssl linux-only
(cherry picked from commit 0605191248)
2025-05-17 09:04:41 +00:00
Robert Helgesson
0e672d7f1e whipper: add mainProgram
(cherry picked from commit 3e7e1fec67)
2025-05-17 09:04:20 +00:00
Jan Tojnar
04d53b3712 wayland: Remove meta.mainProgram
This has been missed in 921bd99f8d,
when that binary has been split out into an eponymous package.
The package does not contain any executable programs any more.

(cherry picked from commit ba6e8ff3d8)
2025-05-17 09:04:09 +00:00
usertam
2e754a054d musl-obstack: fix build on darwin
(cherry picked from commit dc44a14cd0)
2025-05-17 09:03:57 +00:00
wxt
e1da2e7d9c feishu: add mainProgram
(cherry picked from commit cb441dc8d7)
2025-05-17 09:03:45 +00:00
Martin Weinelt
49521440ea home-assistant.python.pkgs.pytest-homeassistant-custom-component: 0.13.244 -> 0.13.245
https://github.com/MatthewFlamm/pytest-homeassistant-custom-component/blob/refs/tags/0.13.245/CHANGELOG.md
(cherry picked from commit c07e0efd57)
2025-05-17 08:39:39 +00:00
Martin Weinelt
f2fae4bdb8 python313Packages.homeassistant-stubs: 2025.5.1 -> 2025.5.2
https://github.com/KapJI/homeassistant-stubs/releases/tag/2025.5.2
(cherry picked from commit 65d68f45ff)
2025-05-17 08:39:39 +00:00
Martin Weinelt
04909f870d home-assistant: 2025.5.1 -> 2025.5.2
https://github.com/home-assistant/core/releases/tag/2025.5.2
(cherry picked from commit 894d4bc710)
2025-05-17 08:39:39 +00:00
Martin Weinelt
ee4720152f python313Packages.aiodiscover: 2.6.1 -> 2.7.0
https://github.com/bdraco/aiodiscover/releases/tag/v2.7.0
(cherry picked from commit 87b22feba5)
2025-05-17 08:39:39 +00:00
Martin Weinelt
ffac217f45 python313Packages.pysmartthings: 3.2.1 -> 3.2.2
https://github.com/andrewsayre/pysmartthings/releases/tag/v3.2.2
(cherry picked from commit e0d0b2a61b)
2025-05-17 08:39:39 +00:00
Martin Weinelt
3854de6082 python313Packages.pysensibo: 1.1.0 -> 1.2.1
https://github.com/andrey-git/pysensibo/releases/tag/1.2.1
(cherry picked from commit 84d103f9ff)
2025-05-17 08:39:39 +00:00
Martin Weinelt
47694cb024 python313Packages.ical: 9.2.2 -> 9.2.4
https://github.com/allenporter/ical/releases/tag/9.2.4
(cherry picked from commit bad00c9ec5)
2025-05-17 08:39:38 +00:00
Martin Weinelt
488ba64069 python313Packages.deebot-client: 13.1.0 -> 13.2.0
https://github.com/DeebotUniverse/client.py/releases/tag/13.2.0
(cherry picked from commit efe860c6d7)
2025-05-17 08:39:38 +00:00
SchweGELBin
6a66795c9b mautrix-whatsapp: 0.12.0 -> 0.12.1
(cherry picked from commit 5cdb6e4c63)
2025-05-17 08:10:30 +00:00
Arne Keller
2a41154f7a [Backport release-25.05] memos: 0.13.2 -> 0.24.2, move to by-name, adopt (#407826) 2025-05-17 09:14:51 +02:00
kuflierl
3f3d22a7cc memos: 0.13.2 -> 0.24.2, move to by-name, adopt
special thanks to @tecosaur for https://github.com/NixOS/nixpkgs/issues/257131#issuecomment-2643372737, which i used as inspiration for my changes

Co-authored-by: TEC <git@tecosaur.net>
(cherry picked from commit 29373c41f0)
2025-05-17 06:56:10 +00:00
Sarah Clark
3d5992de65 tftui: accept posthog 4
(cherry picked from commit 6174410ae7)
2025-05-16 23:47:44 +00:00
Wolfgang Walther
2e1496bf86 [Backport release-25.05] postgresqlPackages.pg_tle: 1.5.0 -> 1.5.1 (#407723) 2025-05-16 20:51:46 +00:00
R. Ryantm
3fc0ab1767 postgresqlPackages.pg_tle: 1.5.0 -> 1.5.1
(cherry picked from commit 6b52d2e642)
2025-05-16 20:26:49 +00:00
SchweGELBin
e87fc3bfc3 libsignal-ffi: 0.70.0 -> 0.72.1
(cherry picked from commit 9fc2679779)
2025-05-16 19:33:41 +00:00
SchweGELBin
2ff29b5d1f mautrix-signal: 0.8.2 -> 0.8.3
(cherry picked from commit 7ba3fb2cd0)
2025-05-16 19:33:41 +00:00
Mynacol
3bdadfe65b kexec-tools: Set meta.mainProgram to kexec
(cherry picked from commit cb8dcb7793)
2025-05-16 21:23:17 +02:00
Wolfgang Walther
f9e2fbc96b [Backport release-25.05] haskellPackages.postgres-websockets: fix at run-time (#407709) 2025-05-16 19:20:54 +00:00
Wolfgang Walther
1682a0cf73 haskellPackages.postgres-websockets: fix at run-time
Reason for the failure is still unclear and it was not possible to
reproduce outside nixpkgs, yet.

https://github.com/diogob/postgres-websockets/pull/101#issuecomment-2881016449
(cherry picked from commit 4e216d5059)
2025-05-16 19:10:00 +00:00
Vladimír Čunát
c46c1bbaef thunderbird: fix calendar again after icu77 switch (#407684) 2025-05-16 19:49:14 +02:00
Leona Maroni
abf9d678aa beta release 2025-05-16 19:04:43 +02:00
50152 changed files with 1577557 additions and 2039132 deletions

View File

@@ -1,11 +1,11 @@
{
"name": "nixpkgs",
"image": "mcr.microsoft.com/devcontainers/universal:5-linux",
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"features": {
"ghcr.io/devcontainers/features/nix:1": {
// fails in the devcontainer sandbox, enable sandbox via config instead
"multiUser": false,
"packages": "nixpkgs.nixd,nixpkgs.nixfmt",
"packages": "nixpkgs.nixd,nixpkgs.nixfmt-rfc-style",
"useAttributePath": true,
"extraNixConfig": "experimental-features = nix-command flakes,sandbox = true"
}

View File

@@ -23,7 +23,8 @@ insert_final_newline = false
# see https://nixos.org/nixpkgs/manual/#chap-conventions
[*.{bash,css,js,json,lock,md,nix,pl,pm,py,rb,sh,xml}]
# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces
[*.{bash,json,lock,md,nix,pl,pm,py,rb,sh,xml}]
indent_style = space
# Match docbook files, set indent width of one
@@ -31,7 +32,7 @@ indent_style = space
indent_size = 1
# Match json/lockfiles/markdown/nix/ruby files, set indent width of two
[*.{js,json,lock,md,nix,rb}]
[*.{json,lock,md,nix,rb}]
indent_size = 2
# Match all the Bash code in Nix files, set indent width of two
@@ -64,9 +65,6 @@ insert_final_newline = unset
end_of_line = unset
trim_trailing_whitespace = unset
[*.json]
insert_final_newline = unset
[*.lock]
indent_size = unset
@@ -92,13 +90,6 @@ trim_trailing_whitespace = unset
end_of_line = unset
insert_final_newline = unset
# see https://manual.jule.dev/project/code-style.html#indentions
[*.jule]
indent_style = tab
[jule.mod]
insert_final_newline = unset
# Keep this hint at the bottom:
# Please don't add entries for subfolders here.
# Create <subfolder>/.editorconfig instead.

View File

@@ -193,13 +193,6 @@ cffc27daf06c77c0d76bc35d24b929cb9d68c3c9
# nixos/kanidm: inherit lib, nixfmt
8f18393d380079904d072007fb19dc64baef0a3a
# fetchgit, fetchurl, fetchzip:
# format after refactoring with lib.extendMkDerivation (#455994)
aeddd850c6d3485fc1af2edfb111e58141d18dc1
# fetchhg: format after refactoring with lib.extendMkDerivation and make overridable (#423539)
34a5b1eb23129f8fb62c677e3760903f6d43228f
# fetchurl: nixfmt-rfc-style
ce21e97a1f20dee15da85c084f9d1148d84f853b
@@ -268,48 +261,8 @@ a4f7e161b380b35b2f7bc432659a95fd71254ad8
# haskellPackages.hercules-ci-agent (cabal2nix -> nixfmt-rfc-style)
9314da7ee8d2aedfb15193b8c489da51efe52bb5
# haskell-updates: nixfmt-rfc-style
9e296dcf846294e0aa94af7d3235e82eee7fe055
# nix-builder-vm: nixfmt-rfc-style
a034fb50f79816c6738fb48b48503b09ea3b0132
# treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
05580f4b4433fda48fff30f60dfd303d6ee05d21
# nixos/redmine: Get rid of global lib expansions
d7f1102f04c58b2edfc74c9a1d577e3aebfca775
# **/README.md: one sentence per line
3d505c03610b6102af6d870ae3506a151cef1f68
60e35e4ded6e91524364a74b3b4ec233ed9321f2
99f2e655d9db009ee0b4ede3edced5f6c882c7f4
b4532efe93882ae2e3fc579929a42a5a56544146
# emacs: keep elpa/nongnu/melpa package overrides sorted
9f2faf683ed48704aa17f693208a13aa64e22181
# nixfmt 1.0.0
62fe01651911043bd3db0add920af3d2935d9869 # !autorebase nix-shell --run treefmt
5a0711127cd8b916c3d3128f473388c8c79df0da # !autorebase nix-shell --run treefmt
# systemd: nixfmt
b1c5cd3e794cdf89daa5e4f0086274a416a1cded
#nixos/nextcloud: remove with lib usage
b6088b0d8e13e8d18464d78935f0130052784658
f7611cad5154a9096faa26d156a4079577bfae17
# nixf-diagnose
90e7159c559021ac4f4cc1222000f08a91feff69 # !autorebase nix-shell --run treefmt
c283f32d296564fd649ef3ed268c1f1f7b199c49 # !autorebase nix-shell --run treefmt
91a8fee3aaf79348aa2dc1552a29fc1b786c5133 # !autorebase nix-shell --run treefmt
# aliases: keep-sorted
48ce0739044bd6eba83c3a43bd4ad1046399cdad # !autorebase nix-shell --run treefmt
# treewide: clean up 'meta = with' pattern
567e8dfd8eddc5468e6380fc563ab8a27422ab1d
# nixfmt 1.2.0
28096cc5e3d8334fbe1845925f000f8c8c5e0aac # !autorebase nix-shell --run treefmt

48
.gitattributes vendored
View File

@@ -1,26 +1,7 @@
# node/js lock files
**/package-lock.json linguist-generated
**/yarn.nix linguist-generated
**/yarn.lock linguist-generated
# Rust lock files
**/Cargo.lock linguist-generated
pkgs/build-support/rust/**/Cargo.lock -linguist-generated
# NuGet, Gradle and others
**/deps.json linguist-generated
# Ruby lock files
**/gemset.nix linguist-generated
**/Gemfile.lock linguist-generated
# PHP lock files
**/composer.lock linguist-generated
# various package managers and tools
**/deps.nix linguist-generated
**/deps.json linguist-generated
**/deps.toml linguist-generated
**/node-packages.nix linguist-generated
pkgs/applications/editors/emacs-modes/*-generated.nix linguist-generated
pkgs/development/r-modules/*-packages.nix linguist-generated
@@ -37,28 +18,3 @@ nixos/modules/module-list.nix merge=union
# pkgs/top-level/all-packages.nix merge=union
ci/OWNERS linguist-language=CODEOWNERS
# Avoid munging line endings when using Git for Windows, and instead keep files
# using LF line endings. This particularly affects scripts committed in the
# nixpkgs repository.
#
# - `text` without `=auto` would mean "Git should always munge line endings on
# this file so there will never be a CRLF in the repository, and the line
# endings in the working directory should respect the local Git
# configuration."
# - `text=auto` means "Git should try to work out if this file is a text file.
# If it is, it should do the line-ending munging as for `text`, and if it
# isn't, it should leave the file alone."
# - `eol=lf` means "Ignore any local configuration about how line
# endings normally work on this platform. This file should always and only
# have LF line endings in the repo (so if there's a CR in the repo, it's
# meant to be there in addition to any end-of-line mark), and the selected
# attribute is how the file should appear in the working directory."
#
# See https://github.com/NixOS/nixpkgs/issues/423762 for historical context.
* text=auto eol=lf
# Don't force LF line endings for diff/patch files, as they might be correctly
# patching CRLF line endings from an upstream source package.
*.diff !text !eol
*.patch !text !eol

6
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,6 @@
<!--
Please note: This blank issue template is meant for extraordinary issues
that do not fit the templates. Unless you know your issue is relevant to
Nixpkgs and requires the free-form blank issue, please use the issue
templates instead.
-->

View File

@@ -9,9 +9,9 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -20,9 +20,7 @@ body:
> [!TIP]
> For instance, if you were filing a bug against the [`hello`](https://search.nixos.org/packages?channel=unstable&from=0&size=1&buckets=%7B%22package_attr_set%22%3A%5B%22No%20package%20set%22%5D%2C%22package_license_set%22%3A%5B%22GNU%20General%20Public%20License%20v3.0%20or%20later%22%5D%2C%22package_maintainers_set%22%3A%5B%5D%2C%22package_platforms%22%3A%5B%5D%7D&sort=relevance&type=packages&query=hello) package about it failing to launch on ARM Linux, your title would be as follows:
> ```
> hello: fails to launch on aarch64-linux
> ```
> `hello: fails to launch on aarch64-linux`
---
- type: "dropdown"
@@ -32,11 +30,13 @@ body:
description: |
What version of Nixpkgs are you using?
If you are using an older version, please update to the latest stable version and check if the issue persists before continuing this bug report.
> [!IMPORTANT]
> If you are using an older version, please update to the latest stable version and check if the issue persists before continuing this bug report.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
- "- Unstable (25.05)"
- "- Stable (24.11)"
- "- Previous Stable (24.05)"
default: 0
validations:
required: true
@@ -54,7 +54,7 @@ body:
description: "Please include a step-by-step guide for reproducing this issue. Consider writing in concise, numbered bullet points to ensure that Nixpkgs developers can retrace your steps."
validations:
required: true
- type: "textarea"
- type: "input"
id: "expected-behaviour"
attributes:
label: "Expected behaviour"
@@ -100,7 +100,7 @@ body:
label: "Notify maintainers"
description: |
Please mention the people who are in the **Maintainers** list of the offending package. This is done by by searching for the package on the [NixOS Package Search](https://search.nixos.org/packages) and mentioning the people listed under **Maintainers** by prefixing their GitHub usernames with an '@' character. Please add the mentions above the `---` characters in the template below.
value: |2
value: |
---
@@ -117,12 +117,10 @@ body:
options:
- label: "I assert that this is a bug and not a support request."
required: true
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%220.kind%3A+bug%22+-label%3A%226.topic%3A+darwin%22+-label%3A%226.topic%3A+nixos%22). "
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%220.kind%3A+bug%22+-label%3A%226.topic%3A+darwin%22+-label%3A%226.topic%3A+nixos%22). "
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -9,9 +9,9 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -20,9 +20,7 @@ body:
> [!TIP]
> For instance, if you were filing a bug against the [`hello`](https://search.nixos.org/packages?channel=unstable&from=0&size=1&buckets=%7B%22package_attr_set%22%3A%5B%22No%20package%20set%22%5D%2C%22package_license_set%22%3A%5B%22GNU%20General%20Public%20License%20v3.0%20or%20later%22%5D%2C%22package_maintainers_set%22%3A%5B%5D%2C%22package_platforms%22%3A%5B%5D%7D&sort=relevance&type=packages&query=hello) package about it failing to launch on Apple Silicon, your title would be as follows:
> ```
> hello: fails to launch on aarch64-darwin
> ```
> `hello: fails to launch on aarch64-darwin`
---
- type: "dropdown"
@@ -32,11 +30,13 @@ body:
description: |
What version of Nixpkgs are you using?
If you are using an older version, please update to the latest stable version and check if the issue persists before continuing this bug report.
> [!IMPORTANT]
> If you are using an older version, please update to the latest stable version and check if the issue persists before continuing this bug report.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
- "- Unstable (25.05)"
- "- Stable (24.11)"
- "- Previous Stable (24.05)"
default: 0
validations:
required: true
@@ -54,7 +54,7 @@ body:
description: "Please include a step-by-step guide for reproducing this issue. Consider writing in concise, numbered bullet points to ensure that Nixpkgs developers can retrace your steps."
validations:
required: true
- type: "textarea"
- type: "input"
id: "expected-behaviour"
attributes:
label: "Expected behaviour"
@@ -99,7 +99,7 @@ body:
attributes:
label: "Are you using nix-darwin?"
description: |
[`nix-darwin`](https://github.com/nix-darwin/nix-darwin) is a set of NixOS-like modules for macOS systems. Depending on your issue, this information may be relevant.
[`nix-darwin`](https://github.com/LnL7/nix-darwin) is a set of NixOS-like modules for macOS systems. Depending on your issue, this information may be relevant.
options:
- "Yes, I am using nix-darwin."
- "No, I am not using nix-darwin."
@@ -114,7 +114,7 @@ body:
Please mention the people who are in the **Maintainers** list of the offending package. This is done by by searching for the package on the [NixOS Package Search](https://search.nixos.org/packages) and mentioning the people listed under **Maintainers** by prefixing their GitHub usernames with an '@' character. Please add the mentions above the `---` characters in the template below.
If this issue is related to the Darwin packaging architecture as a whole, or is related to the core Darwin frameworks, consider mentioning the `@NixOS/darwin-core` team.
value: |2
value: |
---
@@ -131,12 +131,10 @@ body:
options:
- label: "I assert that this is a bug and not a support request."
required: true
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%220.kind%3A+bug%22+label%3A%226.topic%3A+darwin%22). "
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%220.kind%3A+bug%22+label%3A%226.topic%3A+darwin%22). "
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -9,9 +9,9 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -20,9 +20,7 @@ body:
> [!TIP]
> For instance, if you were filing a bug against the [`systemd-boot`](https://search.nixos.org/options?channel=unstable&show=boot.loader.systemd-boot.enable&from=0&size=1) module about it failing to install [`memtest86`](https://search.nixos.org/options?channel=unstable&show=boot.loader.systemd-boot.memtest86.enable&from=0&size=1), your title would be as follows:
> ```
> nixos/systemd-boot: fails to install memtest86
> ```
> `nixos/systemd-boot: fails to install memtest86`
---
- type: "dropdown"
@@ -32,11 +30,13 @@ body:
description: |
What version of Nixpkgs are you using?
If you are using an older version, please update to the latest stable version and check if the issue persists before continuing this bug report.
> [!IMPORTANT]
> If you are using an older version, please [update to the latest stable version](https://nixos.org/download) and check if the issue persists before continuing this bug report.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
- "- Unstable (25.05)"
- "- Stable (24.11)"
- "- Previous Stable (24.05)"
default: 0
validations:
required: true
@@ -54,7 +54,7 @@ body:
description: "Please include a step-by-step guide for reproducing this issue. Consider writing in concise, numbered bullet points to ensure that Nixpkgs developers can retrace your steps."
validations:
required: true
- type: "textarea"
- type: "input"
id: "expected-behaviour"
attributes:
label: "Expected behaviour"
@@ -103,8 +103,8 @@ body:
Please note that the maintainer attribute name does not always match the maintainer's GitHub username. If that occurs, try looking in [`maintainers/maintainer-list.nix`](https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix) for the maintainer attribute name, and checking if the maintainer has a listed GitHub username.
If in doubt, check the associated package's maintainers. Please add the mentions above the `---` characters.
value: |2
If in doubt, check `git blame` for whoever last touched the module, or check the associated package's maintainers. Please add the mentions above the `---` characters.
value: |
---
@@ -121,12 +121,10 @@ body:
options:
- label: "I assert that this is a bug and not a support request."
required: true
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%220.kind%3A+bug%22+label%3A%226.topic%3A+nixos%22). "
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%220.kind%3A+bug%22+label%3A%226.topic%3A+nixos%22). "
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -9,9 +9,9 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -20,9 +20,7 @@ body:
> [!TIP]
> For instance, if you were filing a build failure against the [`hello`](https://search.nixos.org/packages?channel=unstable&from=0&size=1&buckets=%7B%22package_attr_set%22%3A%5B%22No%20package%20set%22%5D%2C%22package_license_set%22%3A%5B%22GNU%20General%20Public%20License%20v3.0%20or%20later%22%5D%2C%22package_maintainers_set%22%3A%5B%5D%2C%22package_platforms%22%3A%5B%5D%7D&sort=relevance&type=packages&query=hello) package, your title would be as follows:
> ```
> Build failure: hello
> ```
> `Build failure: hello`
---
- type: "dropdown"
@@ -32,13 +30,14 @@ body:
description: |
In what version of Nixpkgs did the build failure occur?
If you are using an older version, please update to the latest stable version and check if the build failure persists before continuing this report.
If you are purposefully trying to build an ancient version of a package in an older Nixpkgs, please coordinate with the [NixOS Archivists](https://matrix.to/#/#archivists:nixos.org).
> [!IMPORTANT]
> If you are using an older version, please update to the latest stable version and check if the build failure persists before continuing this report.
> If you are purposefully trying to build an ancient version of a package in an older Nixpkgs, please coordinate with the [NixOS Archivists](https://matrix.to/#/#archivists:nixos.org).
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
- "- Unstable (25.05)"
- "- Stable (24.11)"
- "- Previous Stable (24.05)"
default: 0
validations:
required: true
@@ -110,7 +109,7 @@ body:
label: "Notify maintainers"
description: |
Please mention the people who are in the **Maintainers** list of the offending package. This is done by by searching for the package on the [NixOS Package Search](https://search.nixos.org/packages) and mentioning the people listed under **Maintainers** by prefixing their GitHub usernames with an '@' character. Please add the mentions above the `---` characters in the template below.
value: |2
value: |
---
@@ -127,12 +126,10 @@ body:
options:
- label: "I assert that this is a bug and not a support request."
required: true
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%220.kind%3A+build+failure%22)."
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%220.kind%3A+build+failure%22). "
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -9,9 +9,9 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -20,9 +20,7 @@ body:
> [!TIP]
> For instance, if you were filing a request against the out of date `hello` package, where the current version in Nixpkgs is 1.0.0, but the latest version upstream is 1.0.1, your title would be as follows:
> ```
> Update Request: hello 1.0.0 → 1.0.1
> ```
> `Update Request: hello 1.0.0 → 1.0.1`
---
- type: "dropdown"
@@ -32,13 +30,14 @@ body:
description: |
What version of Nixpkgs are you using?
If you are using an older or stable version, please update to the latest **unstable** version and check if the package is still out of date.
If the package has been updated in unstable, but you believe the update should be backported to the stable release of Nixpkgs, please file the '**Request: backport to stable**' form instead.
> [!IMPORTANT]
> If you are using an older or stable version, please update to the latest **unstable** version and check if the package is still out of date.
> If the package has been updated in unstable, but you believe the update should be backported to the stable release of Nixpkgs, please file the '**Request: backport to stable**' form instead.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
- "- Unstable (25.05)"
- "- Stable (24.11)"
- "- Previous Stable (24.05)"
default: 0
validations:
required: true
@@ -85,7 +84,7 @@ body:
label: "Notify maintainers"
description: |
Please mention the people who are in the **Maintainers** list of the offending package. This is done by by searching for the package on the [NixOS Package Search](https://search.nixos.org/packages) and mentioning the people listed under **Maintainers** by prefixing their GitHub usernames with an '@' character. Please add the mentions above the `---` characters in the template below.
value: |2
value: |
---
@@ -100,12 +99,10 @@ body:
options:
- label: "I assert that this package update does not yet exist in an [open pull request](https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+is%3Apr+label%3A%228.has%3A+package+%28update%29%22) or in [Nixpkgs Unstable](https://search.nixos.org/packages?channel=unstable)."
required: true
- label: "I assert that this is not a [duplicate of any known issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%229.needs%3A+package+%28update%29%22)."
- label: "I assert that this is not a [duplicate of any known issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%229.needs%3A+package+%28update%29%22)."
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -9,9 +9,9 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -20,9 +20,7 @@ body:
> [!TIP]
> For instance, if you were filing a request against the missing `hello` module, your title would be as follows:
> ```
> Module Request: nixos/hello
> ```
> `Module Request: nixos/hello`
---
- type: "dropdown"
@@ -32,11 +30,13 @@ body:
description: |
What version of Nixpkgs are you using?
If you are using an older or stable version, please update to the latest **unstable** version and check if the module still does not exist before continuing this request.
> [!IMPORTANT]
> If you are using an older or stable version, please update to the latest **unstable** version and check if the module still does not exist before continuing this request.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
- "- Unstable (25.05)"
- "- Stable (24.11)"
- "- Previous Stable (24.05)"
default: 0
validations:
required: true
@@ -60,7 +60,7 @@ body:
label: "Notify maintainers"
description: |
Please mention the people who are in the **Maintainers** list of the offending package. This is done by by searching for the package on the [NixOS Package Search](https://search.nixos.org/packages) and mentioning the people listed under **Maintainers** by prefixing their GitHub usernames with an '@' character. Please add the mentions above the `---` characters in the template below.
value: |2
value: |
---
@@ -75,12 +75,10 @@ body:
options:
- label: "I assert that this module does not yet exist in an [open pull request](https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+is%3Apr+label%3A%228.has%3A+module+%28new%29%22) or in [NixOS Unstable](https://search.nixos.org/options?channel=unstable)."
required: true
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%229.needs%3A+module+%28new%29%22). "
- label: "I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%229.needs%3A+module+%28new%29%22). "
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -9,27 +9,23 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
> [!CAUTION]
> **Before you begin:** Be advised that backports are subject to the [release suitability guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#changes-acceptable-for-releases).
>
> Stable releases of Nixpkgs do not receive breaking changes, which include major package updates that have incompatible API changes and break backwards compatibility. In the [Semantic Versioning standard](https://semver.org/), this is the first version number (1.X.X).
>
> Stable releases of Nixpkgs do not receive breaking changes, which include major package updates that have incompatible API changes and break backwards compatibility. In the [Semantic Versioning standard](https://semver.org/), this is the first version number. (1.X.X)
> Generally, only minor package updates, such as security patches, bug fixes and feature additions (but not removals!) will be considered for backporting. Please read the rules above carefully before filing this backport request.
Welcome to Nixpkgs. Please replace the **`Backport to Stable: PACKAGENAME OLDVERSION → NEWVERSION`** template above with the correct package name (As seen in the [NixOS Package Search](https://search.nixos.org/packages)), the current version of the package in Nixpkgs Stable and the current version of the package in Nixpkgs Unstable.
> [!TIP]
> For instance, if you were filing a request against the out of date `hello` package, where the current version in Nixpkgs Unstable is 1.0.1, but the current version in Nixpkgs Stable is 1.0.0, your title would be as follows:
> ```
> Backport to Stable: hello 1.0.0 → 1.0.1
> ```
> `Backport to Stable: hello 1.0.0 → 1.0.1`
---
- type: "input"
@@ -66,7 +62,7 @@ body:
label: "Notify maintainers"
description: |
Please mention the people who are in the **Maintainers** list of the offending package. This is done by by searching for the package on the [NixOS Package Search](https://search.nixos.org/packages) and mentioning the people listed under **Maintainers** by prefixing their GitHub usernames with an '@' character. Please add the mentions above the `---` characters in the template below.
value: |2
value: |
---
@@ -81,12 +77,10 @@ body:
options:
- label: "I assert that this backport does not yet exist in an [open pull request](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+in%3Atitle+backport)."
required: true
- label: "I assert that this is not a [duplicate of any known issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%229.needs%3A+port+to+stable%22+)."
- label: "I assert that this is not a [duplicate of any known issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+label%3A%229.needs%3A+port+to+stable%22+)."
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -9,9 +9,9 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -20,9 +20,7 @@ body:
> [!TIP]
> For instance, if you were filing an issue against the [`hello`](https://search.nixos.org/packages?channel=unstable&from=0&size=1&buckets=%7B%22package_attr_set%22%3A%5B%22No%20package%20set%22%5D%2C%22package_license_set%22%3A%5B%22GNU%20General%20Public%20License%20v3.0%20or%20later%22%5D%2C%22package_maintainers_set%22%3A%5B%5D%2C%22package_platforms%22%3A%5B%5D%7D&sort=relevance&type=packages&query=hello) package about it not having any NixOS-specific documentation, your title would be as follows:
> ```
> Missing Documentation: hello
> ```
> `Missing Documentation: hello`
---
- type: "textarea"
@@ -48,7 +46,7 @@ body:
label: "Notify maintainers"
description: |
Please mention the people who are in the **Maintainers** list of the offending package. This is done by by searching for the package on the [NixOS Package Search](https://search.nixos.org/packages) and mentioning the people listed under **Maintainers** by prefixing their GitHub usernames with an '@' character. Please add the mentions above the `---` characters in the template below.
value: |2
value: |
---
@@ -63,12 +61,10 @@ body:
options:
- label: "I assert that this request is not already implemented in the latest [NixOS](https://nixos.org/manual/nixos/unstable/) or [Nixpkgs](https://nixos.org/manual/nixpkgs/unstable/) manuals."
required: true
- label: "I assert that this is not a [duplicate of an existing documentation issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%229.needs%3A+documentation%22)."
- label: "I assert that this is not a [duplicate of an existing documentation issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+label%3A%229.needs%3A+documentation%22)."
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -9,9 +9,9 @@ body:
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -20,7 +20,6 @@ body:
> [!NOTE]
> This form is for reporting unreproducible packages. For more information, see the [Reproducible Builds Status](https://reproducible.nixos.org/) page.
>
> To report a package that fails to build entirely, please use the "Build Failure" form instead.
---
@@ -120,7 +119,7 @@ body:
label: "Notify maintainers"
description: |
Please mention the people who are in the **Maintainers** list of the offending package. This is done by by searching for the package on the [NixOS Package Search](https://search.nixos.org/packages) and mentioning the people listed under **Maintainers** by prefixing their GitHub usernames with an '@' character. Please add the mentions above the `---` characters in the template below.
value: |2
value: |
---
@@ -133,12 +132,10 @@ body:
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
options:
- label: "I assert that this is not a [duplicate of any known issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+label%3A%226.topic%3A+reproducible+builds%22)."
- label: "I assert that this is not a [duplicate of any known issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%226.topic%3A+reproducible+builds%22)."
required: true
- label: "I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it."
required: true
- label: "I assert that I have read the [automation/AI policy](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy) and that this issue report complies with it."
required: true
- type: "markdown"
attributes:
value: |

View File

@@ -1,36 +0,0 @@
name: "Request: Nix Package"
description: "Package requests are no longer accepted. Please open a Pull Request with your desired package instead."
title: "Package Request"
labels: ["0.kind: packaging request", "4.workflow: auto-close"]
body:
- type: "markdown"
attributes:
value: |
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos-white.svg">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/logo/nixos.svg" width="400px" alt="NixOS logo">
</picture>
</a>
</p>
Thank you for your interest in packaging new software in Nixpkgs. Unfortunately, to mitigate the unsustainable growth of unmaintained packages, **Nixpkgs is no longer accepting package requests** via Issues.
As a [volunteer community][community], we are always open to new contributors. If you wish to see this package in Nixpkgs, **we encourage you to [contribute] it yourself**, via a Pull Request. Anyone can [become a package maintainer][maintainers]! You can find language-specific packaging information in the [Nixpkgs Manual][nixpkgs]. Should you need any help, please reach out to the community on [Matrix] or [Discourse].
[community]: https://nixos.org/community
[contribute]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#quick-start-to-adding-a-package
[maintainers]: https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md
[nixpkgs]: https://nixos.org/manual/nixpkgs/unstable/
[Matrix]: https://matrix.to/#/#dev:nixos.org
[Discourse]: https://discourse.nixos.org/c/dev/14
---
- type: "checkboxes"
id: "ignored"
attributes:
label: "Issues for new package requests are not accepted. Please open a Pull Request instead."
options:
- label: "I didn't read any of that."

View File

@@ -10,33 +10,41 @@ For new packages please briefly describe the package or provide a link to its ho
<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
- Built on platform:
- Built on platform(s)
- [ ] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- Tested, as applicable:
- [ ] [NixOS tests] in [nixos/tests].
- [ ] [Package tests] at `passthru.tests`.
- [ ] Tests in [lib/tests] or [pkgs/test] for functions and "core" functionality.
- [ ] Ran `nixpkgs-review` on this PR. See [nixpkgs-review usage].
- [ ] Tested basic functionality of all binary files, usually in `./result/bin/`.
- Nixpkgs Release Notes
- [ ] Package update: when the change is major or breaking.
- NixOS Release Notes
- [ ] Module addition: when adding a new NixOS module.
- [ ] Module update: when the change is significant.
- [ ] Fits [CONTRIBUTING.md], [pkgs/README.md], [maintainers/README.md] and other READMEs.
- [ ] Follows the [automation/AI policy].
- For non-Linux: Is sandboxing enabled in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] `sandbox = relaxed`
- [ ] `sandbox = true`
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests)
- 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)
- 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
- [ ] 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)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [25.05 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2505.section.md) (or backporting [24.11](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2411.section.md) and [25.05](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2505.section.md) Release notes)
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
[NixOS tests]: https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests
[Package tests]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests
[nixpkgs-review usage]: https://github.com/Mic92/nixpkgs-review#usage
<!--
To help with the large amounts of pull requests, we would appreciate your
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
[CONTRIBUTING.md]: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md
[automation/AI policy]: https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#automationai-policy
[lib/tests]: https://github.com/NixOS/nixpkgs/blob/master/lib/tests
[maintainers/README.md]: https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md
[nixos/tests]: https://github.com/NixOS/nixpkgs/blob/master/nixos/tests
[pkgs/README.md]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md
[pkgs/test]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/test
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#reviewing-contributions
-->
---
Add a :+1: [reaction] to [pull requests you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[pull requests you find important]: https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,136 +0,0 @@
name: Checkout
description: 'Checkout into trusted / untrusted / pinned folders consistently.'
inputs:
merged-as-untrusted-at:
description: "Whether and which SHA to checkout for the merge commit in the ./nixpkgs/untrusted folder."
target-as-trusted-at:
description: "Whether and which SHA to checkout for the target commit in the ./nixpkgs/trusted folder."
untrusted-pin-bump:
description: "Commit that bumps ci/pinned.json; when set, ./nixpkgs/untrusted and ./nixpkgs/untrusted-pinned are derived from this commit."
runs:
using: composite
steps:
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
MERGED_SHA: ${{ inputs.merged-as-untrusted-at }}
TARGET_SHA: ${{ inputs.target-as-trusted-at }}
PIN_BUMP_SHA: ${{ inputs.untrusted-pin-bump }}
with:
script: |
const { rm, writeFile } = require('node:fs/promises')
const { spawn } = require('node:child_process')
const { join } = require('node:path')
async function run(cmd, ...args) {
return new Promise((resolve, reject) => {
const proc = spawn(cmd, args, {
stdio: 'inherit'
})
proc.on('close', (code) => {
if (code === 0) resolve()
else reject(code)
})
})
}
// These are set automatically by the spare checkout for .github/actions.
// Undo them, otherwise git fetch below will not do anything.
await run('git', 'config', 'unset', 'remote.origin.promisor')
await run('git', 'config', 'unset', 'remote.origin.partialclonefilter')
// Getting the pinned SHA via API allows us to do one single fetch call for all commits.
// Otherwise we would have to fetch merged/target first, read pinned, fetch again.
// A single fetch call comes with a lot less overhead. The fetch takes essentially the
// same time no matter whether its 1, 2 or 3 commits at once.
async function getPinnedSha(ref) {
if (!ref) return undefined
const { content, encoding } = (await github.rest.repos.getContent({
...context.repo,
path: 'ci/pinned.json',
ref,
})).data
const pinned = JSON.parse(Buffer.from(content, encoding).toString())
return pinned.pins.nixpkgs.revision
}
// Getting the pin-bump diff via the API avoids issues with `git fetch`
// thin-packs not having enough base objects to be applied locally.
// Returns a unified diff suitable for `git apply`.
async function getPinBumpDiff(ref) {
const { data } = await github.rest.repos.getCommit({
mediaType: { format: 'diff' },
...context.repo,
ref,
})
return data
}
const pin_bump_sha = process.env.PIN_BUMP_SHA
const commits = [
{
sha: process.env.MERGED_SHA,
path: 'untrusted',
},
{
sha: await getPinnedSha(pin_bump_sha || process.env.MERGED_SHA),
path: 'untrusted-pinned'
},
{
sha: process.env.TARGET_SHA,
path: 'trusted',
},
{
sha: await getPinnedSha(process.env.TARGET_SHA),
path: 'trusted-pinned'
}
].filter(({ sha }) => Boolean(sha))
console.log('Checking out the following commits:', commits)
// Fetching all commits at once is much faster than doing multiple checkouts.
// This would fail without --refetch, because the we had a partial clone before, but changed it above.
await run('git', 'fetch', '--depth=1', '--refetch', 'origin', ...(commits.map(({ sha }) => sha)))
// On Linux, checking out onto tmpfs takes 1s and is faster by at least 10x.
// Currently, on Darwin we can only allocate 3.5GB, which isn't enough.
// See https://github.com/NixOS/nixpkgs/pull/506437
await run('mkdir', 'nixpkgs')
if (process.env.RUNNER_OS === 'Linux') {
await run('sudo', 'mount', '-t', 'tmpfs', 'tmpfs', 'nixpkgs')
}
// Git worktree setup can race when multiple worktrees are created and
// initialized at the same time against one repository. See #511286.
// Keep the setup sequential so shared repo config updates cannot contend.
for (const { sha, path } of commits) {
await run('git', 'worktree', 'add', join('nixpkgs', path), sha, '--no-checkout')
await run('git', '-C', join('nixpkgs', path), 'sparse-checkout', 'disable')
await run('git', '-C', join('nixpkgs', path), 'checkout', '--progress')
}
// Apply pin bump to untrusted worktree
if (pin_bump_sha) {
console.log('Fetching ci/pinned.json bump commit:', pin_bump_sha)
await writeFile('pin-bump.patch', await getPinBumpDiff(pin_bump_sha))
console.log('Applying untrusted ci/pinned.json bump to ./nixpkgs/untrusted')
try {
await run('git', '-C', join('nixpkgs', 'untrusted'), 'apply', '--3way', join('..', '..', 'pin-bump.patch'))
} catch {
core.setFailed([
`Failed to apply ci/pinned.json bump commit ${pin_bump_sha}.`,
`This commit does not apply cleanly onto the untrusted base ${process.env.MERGED_SHA}.`,
`Please rebase the PR or ensure the pin bump is standalone.`
].join(' '))
return
} finally {
await rm('pin-bump.patch')
}
}
console.log('final disk usage:')
await run('df', '-h')

View File

@@ -4,6 +4,4 @@ updates:
directory: "/"
schedule:
interval: "weekly"
labels: []
commit-message:
prefix: ".github"
labels: [ ]

View File

@@ -1,23 +1,23 @@
# This file is used by .github/workflows/bot.yml
# This file is used by .github/workflows/labels.yml
# This version is only run for Pull Requests from development branches like staging-next, haskell-updates or python-updates.
"4.workflow: package set update":
- any:
- head-branch:
- '-updates$'
- head-branch:
- '-updates$'
"4.workflow: staging":
- any:
- head-branch:
- '^staging-next$'
- '^staging-next-'
- head-branch:
- '^staging-next$'
- '^staging-next-'
"6.topic: haskell":
- any:
- head-branch:
- '^haskell-updates$'
- head-branch:
- '^haskell-updates$'
"6.topic: python":
- any:
- head-branch:
- '^python-updates$'
- head-branch:
- '^python-updates$'

View File

@@ -1,47 +1,32 @@
# This file is used by .github/workflows/bot.yml
# This file is used by .github/workflows/labels.yml
# This version uses `sync-labels: false`, meaning that a non-match will NOT remove the label
# keep-sorted start case=no numeric=yes newline_separated=yes skip_lines=1
"6.topic: policy discussion":
- any:
- changed-files:
- any-glob-to-any-file:
- .github/**/*
- CONTRIBUTING.md
- pkgs/README.md
- nixos/README.md
- maintainers/README.md
- lib/README.md
- doc/README.md
- changed-files:
- any-glob-to-any-file:
- .github/**/*
- CONTRIBUTING.md
- pkgs/README.md
- nixos/README.md
- maintainers/README.md
- lib/README.md
- doc/README.md
"8.has: documentation":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/**/*
- nixos/doc/**/*
- changed-files:
- any-glob-to-any-file:
- doc/**/*
- nixos/doc/**/*
"backport release-25.11":
- all:
- changed-files:
- any-glob-to-any-file:
- .github/actions/**/*
- .github/workflows/*
- .github/labeler*.yml
- ci/**/*.*
- maintainers/github-teams.json
- base-branch: ['master']
"backport release-26.05":
- all:
- changed-files:
- any-glob-to-any-file:
- .github/actions/**/*
- .github/workflows/*
- .github/labeler*.yml
- ci/**/*.*
- maintainers/github-teams.json
- base-branch: ['master']
"backport release-24.11":
- any:
- changed-files:
- any-glob-to-any-file:
- .github/workflows/*
- ci/**/*.*
# keep-sorted end

824
.github/labeler.yml vendored

File diff suppressed because it is too large Load Diff

9
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
# Configuration for probot-stale - https://github.com/probot/stale
daysUntilStale: 180
daysUntilClose: false
exemptLabels:
- "1.severity: security"
- "2.status: never-stale"
staleLabel: "2.status: stale"
markComment: false
closeComment: false

View File

@@ -2,76 +2,19 @@
Some architectural notes about key decisions and concepts in our workflows:
- Instead of `pull_request` we use [`pull_request_target`](https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target) for all PR-related workflows.
This has the advantage that those workflows will run without prior approval for external contributors.
- Instead of `pull_request` we use [`pull_request_target`](https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target) for all PR-related workflows. This has the advantage that those workflows will run without prior approval for external contributors.
- Running on `pull_request_target` also optionally provides us with a GH_TOKEN with elevated privileges (write access), which we need to do things like adding labels, requesting reviewers or pushing branches.
**Note about security:** We need to be careful to limit the scope of elevated privileges as much as possible.
Thus they should be lowered to the minimum with `permissions: {}` in every workflow by default.
- Running on `pull_request_target` also optionally provides us with a GH_TOKEN with elevated privileges (write access), which we need to do things like adding labels, requesting reviewers or pushing branches. **Note about security:** We need to be careful to limit the scope of elevated privileges as much as possible. Thus they should be lowered to the minimum with `permissions: {}` in every workflow by default.
- By definition `pull_request_target` runs in the context of the **base** of the pull request.
This means that the workflow files to run will be taken from the base branch, not the PR, and actions/checkout will not checkout the PR, but the base branch, by default.
To protect our secrets, we need to make sure to **never execute code** from the pull request and always evaluate or build nix code from the pull request with the **sandbox enabled**.
- By definition `pull_request_target` runs in the context of the **base** of the pull request. This means, that the workflow files to run will be taken from the base branch, not the PR, and actions/checkout will not checkout the PR, but the base branch, by default. To protect our secrets, we need to make sure to **never execute code** from the pull request and always evaluate or build nix code from the pull request with the **sandbox enabled**.
- To test the pull request's contents, we checkout the "test merge commit".
This is a temporary commit that GitHub creates automatically as "what would happen if this PR was merged into the base branch now?".
The checkout could be done via the virtual branch `refs/pull/<pr-number>/merge`, but doing so would cause failures when this virtual branch doesn't exist (anymore).
This can happen when the PR has conflicts, in which case the virtual branch is not created, or when the PR is getting merged while workflows are still running, in which case the branch won't exist anymore at the time of checkout.
Thus, we use the `prepare` job to check whether the PR is mergeable and the test merge commit exists and only then run the relevant jobs.
- To test the pull request's contents, we checkout the "test merge commit". This is a temporary commit that GitHub creates automatically as "what would happen, if this PR was merged into the base branch now?". The checkout could be done via the virtual branch `refs/pull/<pr-number>/merge`, but doing so would cause failures when this virtual branch doesn't exist (anymore). This can happen when the PR has conflicts, in which case the virtual branch is not created, or when the PR is getting merged while workflows are still running, in which case the branch won't exist anymore at the time of checkout. Thus, we use the `get-merge-commit.yml` workflow to check whether the PR is mergeable and the test merge commit exists and only then run the relevant jobs.
- Various workflows need to make comparisons against the base branch.
In this case, we checkout the parent of the "test merge commit" for best results.
Note that this is not necessarily the same as the default commit that actions/checkout would use, which is also a commit from the base branch (see above), but might be older.
- Various workflows need to make comparisons against the base branch. In this case, we checkout the parent of the "test merge commit" for best results. Note, that this is not necessarily the same as the default commit that actions/checkout would use, which is also a commit from the base branch (see above), but might be older.
## Terminology
- **base commit**: The pull_request_target event's context commit, i.e. the base commit given by GitHub Actions.
Same as `github.event.pull_request.base.sha`.
- **head commit**: The HEAD commit in the pull request's branch.
Same as `github.event.pull_request.head.sha`.
- **merge commit**: The temporary "test merge commit" that GitHub Actions creates and updates for the pull request.
Same as `refs/pull/${{ github.event.pull_request.number }}/merge`.
- **base commit**: The pull_request_target event's context commit, i.e. the base commit given by GitHub Actions. Same as `github.event.pull_request.base.sha`.
- **head commit**: The HEAD commit in the pull request's branch. Same as `github.event.pull_request.head.sha`.
- **merge commit**: The temporary "test merge commit" that GitHub Actions creates and updates for the pull request. Same as `refs/pull/${{ github.event.pull_request.number }}/merge`.
- **target commit**: The base branch's parent of the "test merge commit" to compare against.
## Concurrency Groups
We use [GitHub's Concurrency Groups](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs) to cancel older jobs on pushes to Pull Requests.
When two workflows are in the same group, a newer workflow cancels an older workflow.
Thus, it is important how to construct the group keys:
- Because we want to run jobs for different events at same time, we add `github.event_name` to the key.
This is the case for the `pull_request` which runs on changes to the workflow files to test the new files and the same workflow from the base branch run via `pull_request_event`.
- We don't want workflows of different Pull Requests to cancel each other, so we include `github.event.pull_request.number`.
The [GitHub docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs#example-using-a-fallback-value) show using `github.head_ref` for this purpose, but this doesn't work well with forks: Different users could have the same head branch name in their forks and run CI for their PRs at the same time.
- Sometimes, there is no `pull_request.number`.
To ensure non-PR runs are never cancelled, we add a fallback of `github.run_id`.
This is a unique value for each workflow run.
- Of course, we run multiple workflows at the same time, so we add `github.workflow` to the key.
Otherwise workflows would cancel each other.
- There is a special case for reusable workflows called via `workflow_call` - they will have `github.workflow` set to their parent workflow's name.
Thus, they would cancel each other.
That's why we additionally hardcode the name of the workflow as well.
This results in a key with the following semantics:
```
<running-workflow>-<triggering-workflow>-<triggered-event>-<pull-request/fallback>
```
## Required Status Checks
The "Required Status Checks" branch ruleset is implemented in two top-level workflows: `pull-request-target.yml` and `merge-group.yml`.
The PR workflow defines all checks that need to succeed to add a Pull Request to the Merge Queue.
If no Merge Queue is set up for a branch, the PR workflow defines the checks required to merge into the target branch.
The Merge Group workflow defines all checks that are run as part of the Merge Queue.
Only when these pass, a Pull Request is finally merged into the target branch.
They don't apply when no Merge Queue is set up.
Both workflows work with the same `no PR failures` status check.
This name can never be changed, because it's used in the branch ruleset for these rules.

View File

@@ -9,89 +9,50 @@ on:
pull_request_target:
types: [closed, labeled]
permissions:
contents: read
issues: write # adding the 'has: port to stable' and 'has: backport failed' label
pull-requests: write # creating backport pull requests
defaults:
run:
shell: bash
permissions: {}
jobs:
backport:
name: Backport Pull Request
if: vars.NIXPKGS_CI_CLIENT_ID && github.event.pull_request.merged == true && (github.event.action != 'labeled' || startsWith(github.event.label.name, 'backport'))
runs-on: ubuntu-slim
timeout-minutes: 3
if: vars.NIXPKGS_CI_APP_ID && github.event.pull_request.merged == true && (github.event.action != 'labeled' || startsWith(github.event.label.name, 'backport'))
runs-on: ubuntu-24.04-arm
steps:
# Use a GitHub App to create the PR so that CI gets triggered
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
permission-workflows: write
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ steps.app-token.outputs.token }}
persist-credentials: true
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: gh api /rate_limit | jq
- name: Create backport PRs
id: backport
uses: korthout/backport-action@66065406958f46e82238fd59546f5a99e69e22aa # v4.5.2
uses: korthout/backport-action@436145e922f9561fc5ea157ff406f21af2d6b363 # v3.2.0
with:
# Config README: https://github.com/korthout/backport-action#backport-action
add_author_as_reviewer: true
copy_labels_pattern: 'severity:\ssecurity'
github_token: ${{ steps.app-token.outputs.token }}
pull_description: |-
Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}.
**Before merging, ensure that this backport is [acceptable for the release](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#changes-acceptable-for-releases).**
Even as a non-committer, if you find that it is not acceptable, leave a comment.
> [!TIP]
> If you maintain all packages touched by this pull request, and they are all located under `pkgs/by-name/*`, you can comment **`@NixOS/nixpkgs-merge-bot merge`** to automatically merge this PR using the [`nixpkgs-merge-bot`](https://github.com/NixOS/nixpkgs/blob/master/ci/README.md#nixpkgs-merge-bot).
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: gh api /rate_limit | jq
* [ ] Before merging, ensure that this backport is [acceptable for the release](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#changes-acceptable-for-releases).
* Even as a non-committer, if you find that it is not acceptable, leave a comment.
- name: "Add 'has: port to stable' label"
if: steps.backport.outputs.created_pull_numbers != ''
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
# Not using the app on purpose to avoid triggering another workflow run after adding this label.
script: |
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: [ '8.has: port to stable' ]
})
- name: "Add 'has: failed backport' label"
if: steps.backport.outputs.was_successful == 'false'
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
# Not using the app on purpose to avoid triggering another workflow run after adding this label.
script: |
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: [ '8.has: failed backport' ]
})
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
REPOSITORY: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
run: |
gh api \
--method POST \
/repos/"$REPOSITORY"/issues/"$NUMBER"/labels \
-f "labels[]=8.has: port to stable"

View File

@@ -1,130 +0,0 @@
# WARNING:
# When extending this action, be aware that $GITHUB_TOKEN allows some write
# access to the GitHub API. This means that it should not evaluate user input in
# a way that allows code injection.
name: Bot
on:
schedule:
# Run every 10m
# i.e., at each of the listed minutes, every hour
- cron: '05,15,25,35,45,55 * * * *'
workflow_call:
inputs:
headBranch:
required: true
type: string
secrets:
NIXPKGS_CI_APP_PRIVATE_KEY:
required: true
workflow_dispatch:
concurrency:
# This explicitly avoids using `run_id` for the concurrency key to make sure that only
# *one* scheduled run can run at a time.
group: bot-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number }}
# PR-triggered runs will be cancelled, but scheduled runs will be queued.
cancel-in-progress: ${{ github.event_name != 'schedule' }}
# This is used as fallback without app only.
# This happens when testing in forks without setting up that app.
permissions:
issues: write # managing issue labels and comments
pull-requests: write # managing pull request labels and comments
defaults:
run:
shell: bash
jobs:
run:
runs-on: ubuntu-slim
if: github.event_name != 'schedule' || github.repository_owner == 'NixOS'
env:
# TODO: Remove after 2026-03-04, when Node 24 becomes the default.
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: |
ci/github-script
- name: Install dependencies
run: npm install @actions/artifact@6.2.1 bottleneck@2.19.5
# Use a GitHub App, because it has much higher rate limits: 12,500 instead of 5,000 req / hour.
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_CLIENT_ID
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
permission-administration: read
permission-contents: write
permission-issues: write
permission-members: read
permission-pull-requests: write
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: gh api /rate_limit | jq
- name: Run bot
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token || github.token }}
retries: 3
script: |
require('./ci/github-script/bot.js')({
github,
context,
core,
dry: context.eventName == 'pull_request'
})
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: gh api /rate_limit | jq
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
name: Labels from touched files
if: |
github.event_name == 'pull_request_target' &&
!contains(fromJSON(inputs.headBranch).type, 'development')
with:
repo-token: ${{ steps.app-token.outputs.token || github.token }}
configuration-path: .github/labeler.yml # default
sync-labels: true
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
name: Labels from touched files (no sync)
if: |
github.event_name == 'pull_request_target' &&
!contains(fromJSON(inputs.headBranch).type, 'development')
with:
repo-token: ${{ steps.app-token.outputs.token || github.token }}
configuration-path: .github/labeler-no-sync.yml
sync-labels: false
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0
name: Labels from touched files (development branches)
# Development branches like staging-next, haskell-updates and python-updates get special labels.
# This is to avoid the mass of labels there, which is mostly useless - and really annoying for
# the backport labels.
if: |
github.event_name == 'pull_request_target' &&
contains(fromJSON(inputs.headBranch).type, 'development')
with:
repo-token: ${{ steps.app-token.outputs.token || github.token }}
configuration-path: .github/labeler-development-branches.yml
sync-labels: true
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: gh api /rate_limit | jq

View File

@@ -1,112 +0,0 @@
name: Build
on:
workflow_call:
inputs:
artifact-prefix:
required: true
type: string
baseBranch:
required: true
type: string
mergedSha:
required: true
type: string
targetSha:
required: true
type: string
secrets:
# Should only be provided in the merge queue, not in pull requests,
# where we're evaluating untrusted code.
CACHIX_AUTH_TOKEN_GHA:
required: false
permissions: {}
defaults:
run:
shell: bash
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
name: x86_64-linux
systems: x86_64-linux
builds: [shell, manual-nixos, lib-tests, tarball]
desc: shell, docs, lib, tarball
- runner: ubuntu-24.04-arm
name: aarch64-linux
systems: aarch64-linux
builds: [shell, manual-nixos, manual-nixpkgs]
desc: shell, docs
- runner: macos-14
name: darwin
systems: aarch64-darwin x86_64-darwin
builds: [shell]
desc: shell
name: '${{ matrix.name }}: ${{ matrix.desc }}'
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: .github/actions
- name: Checkout the merge commit
uses: ./.github/actions/checkout
with:
merged-as-untrusted-at: ${{ inputs.mergedSha }}
target-as-trusted-at: ${{ inputs.targetSha }}
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
with:
# Sandbox is disabled on MacOS by default.
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
continue-on-error: true
with:
# The nixpkgs-gha cache should not be trusted or used outside of Nixpkgs and its forks' CI.
name: ${{ vars.CACHIX_NAME || 'nixpkgs-gha' }}
extraPullNames: nixpkgs-gha
authToken: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
pushFilter: '(-source$|-nixpkgs-tarball-)'
- run: nix-env --install -f nixpkgs/trusted-pinned -A nix-build-uncached
- name: Build shell
if: contains(matrix.builds, 'shell')
run: echo "${{ matrix.systems }}" | xargs -n1 nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A shell --argstr system
- name: Build NixOS manual
if: |
contains(matrix.builds, 'manual-nixos') && !cancelled() &&
(contains(fromJSON(inputs.baseBranch).type, 'primary')
|| startsWith(fromJSON(inputs.baseBranch).branch, 'staging-nixos')
)
run: nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A manual-nixos --out-link nixos-manual
- name: Build Nixpkgs manual
if: contains(matrix.builds, 'manual-nixpkgs') && !cancelled()
run: nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A manual-nixpkgs
- name: Build lib tests
if: contains(matrix.builds, 'lib-tests') && !cancelled()
run: nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A lib-tests
- name: Build tarball
if: contains(matrix.builds, 'tarball') && !cancelled()
run: nix-build-uncached nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A tarball
- name: Upload NixOS manual
if: |
contains(matrix.builds, 'manual-nixos') && !cancelled() &&
contains(fromJSON(inputs.baseBranch).type, 'primary')
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ inputs.artifact-prefix }}nixos-manual-${{ matrix.name }}
path: nixos-manual

View File

@@ -0,0 +1,30 @@
name: "Check cherry-picks"
on:
pull_request:
paths:
- .github/workflows/check-cherry-picks.yml
pull_request_target:
branches:
- 'release-**'
- 'staging-**'
- '!staging-next'
permissions: {}
jobs:
check:
name: cherry-pick-check
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
filter: blob:none
- name: Check cherry-picks
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
./maintainers/scripts/check-cherry-picks.sh "$BASE_SHA" "$HEAD_SHA"

43
.github/workflows/check-format.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Check that files are formatted
on:
pull_request:
paths:
- .github/workflows/check-format.yml
pull_request_target:
permissions: {}
jobs:
get-merge-commit:
uses: ./.github/workflows/get-merge-commit.yml
nixos:
name: fmt-check
runs-on: ubuntu-24.04-arm
needs: get-merge-commit
if: needs.get-merge-commit.outputs.mergedSha
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
with:
extra_nix_config: sandbox = true
- name: Check that files are formatted
run: |
# Note that it's fine to run this on untrusted code because:
# - There's no secrets accessible here
# - The build is sandboxed
if ! nix-build ci -A fmt.check; then
echo "Some files are not properly formatted"
echo "Please format them by going to the Nixpkgs root directory and running one of:"
echo " nix-shell --run treefmt"
echo " nix develop --command treefmt"
echo " nix fmt"
echo "Make sure your branch is up to date with master; rebase if not."
echo "If you're having trouble, please ping @NixOS/nix-formatting"
exit 1
fi

40
.github/workflows/check-shell.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: "Check shell"
on:
pull_request:
paths:
- .github/workflows/check-shell.yml
pull_request_target:
paths:
- 'shell.nix'
- 'ci/**'
permissions: {}
jobs:
shell-check:
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
system: x86_64-linux
- runner: ubuntu-24.04-arm
system: aarch64-linux
- runner: macos-13
system: x86_64-darwin
- runner: macos-14
system: aarch64-darwin
name: shell-check-${{ matrix.system }}
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
- name: Build shell
run: nix-build ci -A shell

View File

@@ -1,173 +0,0 @@
name: Check
on:
workflow_call:
inputs:
baseBranch:
required: false
type: string
headBranch:
required: false
type: string
mergedSha:
required: true
type: string
targetSha:
required: true
type: string
secrets:
# Can be provided in pull requests because the job it is used in does
# not evaluate untrusted code.
NIXPKGS_COMMIT_CHECK_APP_PRIVATE_KEY:
required: false
# Can be provided in pull requests because the job it is used in does
# not evaluate untrusted code.
NIXPKGS_MANUAL_EDIT_CHECK_APP_PRIVATE_KEY:
required: false
# Should only be provided in the merge queue, not in pull requests,
# where we're evaluating untrusted code.
CACHIX_AUTH_TOKEN_GHA:
required: false
permissions: {}
defaults:
run:
shell: bash
jobs:
commits:
if: inputs.baseBranch && inputs.headBranch
permissions:
pull-requests: write # submitting PR reviews
runs-on: ubuntu-slim
timeout-minutes: 3
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
path: trusted
sparse-checkout: |
ci/github-script
- name: Install dependencies
run: npm install bottleneck@2.19.5
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: github.event_name != 'pull_request' && vars.NIXPKGS_COMMIT_CHECK_CLIENT_ID
id: app-token
with:
client-id: ${{ vars.NIXPKGS_COMMIT_CHECK_CLIENT_ID }}
private-key: ${{ secrets.NIXPKGS_COMMIT_CHECK_APP_PRIVATE_KEY }}
permission-pull-requests: write
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: gh api /rate_limit | jq
- name: Check commits
id: check
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
TARGETS_STABLE: ${{ fromJSON(inputs.baseBranch).stable && !contains(fromJSON(inputs.headBranch).type, 'development') }}
with:
github-token: ${{ steps.app-token.outputs.token || github.token }}
script: |
const targetsStable = JSON.parse(process.env.TARGETS_STABLE)
require('./trusted/ci/github-script/commits.js')({
github,
context,
core,
dry: context.eventName == 'pull_request',
cherryPicks: context.eventName == 'pull_request' || targetsStable,
})
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: gh api /rate_limit | jq
manual-file-edits:
if: inputs.baseBranch && inputs.headBranch
permissions:
pull-requests: write
runs-on: ubuntu-slim
timeout-minutes: 3
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
path: trusted
sparse-checkout: |
ci/github-script
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: github.event_name != 'pull_request' && vars.NIXPKGS_MANUAL_EDIT_CHECK_CLIENT_ID
id: app-token
with:
client-id: ${{ vars.NIXPKGS_MANUAL_EDIT_CHECK_CLIENT_ID }}
private-key: ${{ secrets.NIXPKGS_MANUAL_EDIT_CHECK_APP_PRIVATE_KEY }}
permission-pull-requests: write
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: gh api /rate_limit | jq
- name: Discourage manual edits to certain files
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token || github.token }}
script: |
require('./trusted/ci/github-script/manual-file-edits.js')({
github,
context,
core,
dry: context.eventName == 'pull_request',
repoPath: 'trusted',
})
- name: Log current API rate limits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token || github.token }}
run: gh api /rate_limit | jq
owners:
runs-on: ubuntu-24.04-arm
timeout-minutes: 5
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: .github/actions
- name: Checkout merge and target commits
uses: ./.github/actions/checkout
with:
merged-as-untrusted-at: ${{ inputs.mergedSha }}
target-as-trusted-at: ${{ inputs.targetSha }}
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
continue-on-error: true
with:
# The nixpkgs-gha cache should not be trusted or used outside of Nixpkgs and its forks' CI.
name: ${{ vars.CACHIX_NAME || 'nixpkgs-gha' }}
extraPullNames: nixpkgs-gha
authToken: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
pushFilter: -source$
- name: Build codeowners validator
run: nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A codeownersValidator
- name: Validate codeowners
env:
OWNERS_FILE: nixpkgs/untrusted/ci/OWNERS
REPOSITORY_PATH: nixpkgs/untrusted
# Omits "owners", which checks whether GitHub handles exist, but fails with nested team
# structures.
CHECKS: "duppatterns,files,syntax"
# Set this to "notowned,avoid-shadowing" to check that all files are owned by somebody
EXPERIMENTAL_CHECKS: "avoid-shadowing"
run: result/bin/codeowners-validator

123
.github/workflows/codeowners-v2.yml vendored Normal file
View File

@@ -0,0 +1,123 @@
# This workflow depends on two GitHub Apps with the following permissions:
# - For checking code owners:
# - Permissions:
# - Repository > Administration: read-only
# - Organization > Members: read-only
# - Install App on this repository, setting these variables:
# - OWNER_RO_APP_ID (variable)
# - OWNER_RO_APP_PRIVATE_KEY (secret)
# - For requesting code owners:
# - Permissions:
# - Repository > Administration: read-only
# - Organization > Members: read-only
# - Repository > Pull Requests: read-write
# - Install App on this repository, setting these variables:
# - OWNER_APP_ID (variable)
# - OWNER_APP_PRIVATE_KEY (secret)
#
# This split is done because checking code owners requires handling untrusted PR input,
# while requesting code owners requires PR write access, and those shouldn't be mixed.
#
# Note that the latter is also used for ./eval.yml requesting reviewers.
name: Codeowners v2
on:
pull_request:
paths:
- .github/workflows/codeowners-v2.yml
pull_request_target:
types: [opened, ready_for_review, synchronize, reopened]
permissions: {}
env:
OWNERS_FILE: ci/OWNERS
# Don't do anything on draft PRs
DRY_MODE: ${{ github.event.pull_request.draft && '1' || '' }}
jobs:
get-merge-commit:
if: github.repository_owner == 'NixOS'
uses: ./.github/workflows/get-merge-commit.yml
# Check that code owners is valid
check:
name: Check
runs-on: ubuntu-24.04-arm
needs: get-merge-commit
if: github.repository_owner == 'NixOS' && needs.get-merge-commit.outputs.mergedSha
steps:
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# Important: Because we use pull_request_target, this checks out the base branch of the PR, not the PR itself.
# We later build and run code from the base branch with access to secrets,
# so it's important this is not the PRs code.
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: base
- name: Build codeowners validator
run: nix-build base/ci -A codeownersValidator
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: vars.OWNER_RO_APP_ID
id: app-token
with:
app-id: ${{ vars.OWNER_RO_APP_ID }}
private-key: ${{ secrets.OWNER_RO_APP_PRIVATE_KEY }}
permission-administration: read
permission-members: read
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
path: pr
- name: Validate codeowners
if: steps.app-token.outputs.token
run: result/bin/codeowners-validator
env:
OWNERS_FILE: pr/${{ env.OWNERS_FILE }}
GITHUB_ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
REPOSITORY_PATH: pr
OWNER_CHECKER_REPOSITORY: ${{ github.repository }}
# Set this to "notowned,avoid-shadowing" to check that all files are owned by somebody
EXPERIMENTAL_CHECKS: "avoid-shadowing"
# Request reviews from code owners
request:
name: Request
runs-on: ubuntu-24.04-arm
if: github.repository_owner == 'NixOS'
steps:
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
# Important: Because we use pull_request_target, this checks out the base branch of the PR, not the PR head.
# This is intentional, because we need to request the review of owners as declared in the base branch.
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: vars.OWNER_APP_ID
id: app-token
with:
app-id: ${{ vars.OWNER_APP_ID }}
private-key: ${{ secrets.OWNER_APP_PRIVATE_KEY }}
permission-administration: read
permission-members: read
permission-pull-requests: write
- name: Build review request package
run: nix-build ci -A requestReviews
- name: Request reviews
if: steps.app-token.outputs.token
run: result/bin/request-code-owner-reviews.sh ${{ github.repository }} ${{ github.event.number }} "$OWNERS_FILE"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}

View File

@@ -1,54 +0,0 @@
name: Comment
on:
issue_comment:
types: [created]
# This is used as fallback without app only.
# This happens when testing in forks without setting up that app.
permissions:
pull-requests: write # adding reactions to comments
defaults:
run:
shell: bash
jobs:
# The `bot` workflow reacts to comments with @NixOS/nixpkgs-merge-bot references, but might only
# pick up a comment after up to 10 minutes. To give the user instant feedback, this job adds
# a reaction to these comments.
react:
name: React with eyes
runs-on: ubuntu-slim
timeout-minutes: 2
if: contains(github.event.comment.body, '@NixOS/nixpkgs-merge-bot merge')
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: |
ci/github-script
# Use the GitHub App to make sure the reaction happens with the same user who will later merge.
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_CLIENT_ID
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
permission-pull-requests: write
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token || github.token }}
retries: 3
script: |
const { handleMergeComment } = require('./ci/github-script/merge.js')
const { body, node_id } = context.payload.comment
await handleMergeComment({
github,
body,
node_id,
reaction: 'EYES',
})

View File

@@ -16,44 +16,34 @@ on:
pull_request_target:
types: [edited]
concurrency:
group: edited-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions: {}
defaults:
run:
shell: bash
jobs:
base:
name: Trigger jobs
runs-on: ubuntu-slim
runs-on: ubuntu-24.04
if: github.event.changes.base.ref.from && github.event.changes.base.ref.from != github.event.pull_request.base.ref
timeout-minutes: 2
steps:
# Use a GitHub App to create the PR so that CI gets triggered
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
# We only need Pull Requests: write here, but the app is also used for backports.
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
permission-pull-requests: write
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
function changeState(state) {
return github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state
})
}
await changeState('closed')
await changeState('open')
- env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
REPOSITORY: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
run: |
gh api \
--method PATCH \
/repos/"$REPOSITORY"/pulls/"$NUMBER" \
-f "state=closed"
gh api \
--method PATCH \
/repos/"$REPOSITORY"/pulls/"$NUMBER" \
-f "state=open"

36
.github/workflows/eval-aliases.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Eval aliases
on:
pull_request:
paths:
- .github/workflows/eval-aliases.yml
pull_request_target:
permissions: {}
jobs:
get-merge-commit:
uses: ./.github/workflows/get-merge-commit.yml
eval-aliases:
name: Eval nixpkgs with aliases enabled
runs-on: ubuntu-24.04-arm
needs: [ get-merge-commit ]
steps:
- name: Check out the PR at the test merge commit
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
path: nixpkgs
- name: Install Nix
uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
with:
extra_nix_config: sandbox = true
- name: Ensure flake outputs on all systems still evaluate
run: nix flake check --all-systems --no-build ./nixpkgs
- name: Query nixpkgs with aliases enabled to check for basic syntax errors
run: |
time nix-env -I ./nixpkgs -f ./nixpkgs -qa '*' --option restrict-eval true --option allow-import-from-derivation false >/dev/null

View File

@@ -1,169 +1,36 @@
name: Eval
on:
workflow_call:
inputs:
artifact-prefix:
required: true
type: string
mergedSha:
required: true
type: string
headSha:
required: false # only required when testVersions is true
type: string
targetSha:
required: true
type: string
systems:
required: true
type: string
testVersions:
required: false
default: false
type: boolean
secrets:
# Can be provided in pull requests because the job it is used in does
# not evaluate untrusted code.
NIXPKGS_BRANCH_CHECK_APP_PRIVATE_KEY:
required: false
# Should only be provided in the merge queue, not in pull requests,
# where we're evaluating untrusted code.
CACHIX_AUTH_TOKEN_GHA:
required: false
pull_request:
paths:
- .github/workflows/eval.yml
pull_request_target:
types: [opened, ready_for_review, synchronize, reopened]
push:
# Keep this synced with ci/request-reviews/dev-branches.txt
branches:
- master
- staging
- release-*
- staging-*
- haskell-updates
- python-updates
permissions: {}
defaults:
run:
shell: bash
jobs:
versions:
if: inputs.testVersions
runs-on: ubuntu-slim
outputs:
versions: ${{ steps.versions.outputs.versions }}
ciPinBumpCommit: ${{ steps.find-pinned-commit.outputs.ciPinBumpCommit }}
ciPinBumpCommitShort: ${{ steps.find-pinned-commit.outputs.ciPinBumpCommitShort }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
path: trusted
sparse-checkout: |
ci/supportedVersions.nix
get-merge-commit:
uses: ./.github/workflows/get-merge-commit.yml
- name: Check out the PR at the test merge commit
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
ref: ${{ inputs.mergedSha }}
path: untrusted
sparse-checkout: |
ci/pinned.json
- name: Find commit that touched ci/pinned.json
id: find-pinned-commit
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
TARGET_SHA: ${{ inputs.targetSha }}
HEAD_SHA: ${{ inputs.headSha }}
with:
script: |
const targetSha = process.env.TARGET_SHA
const headSha = process.env.HEAD_SHA
if (!targetSha || !headSha) {
core.setFailed('Error: Both targetSha and headSha inputs are required when testVersions is true.')
return
}
// Compare the two commits to get the list of commits in between
const comparison = await github.rest.repos.compareCommitsWithBasehead({
...context.repo,
basehead: `${targetSha}...${headSha}`,
})
if(comparison.data.commits.length > 50) {
core.setFailed('Error: Too many commits in comparison, cannot reliably find pinned.json change.')
return
}
const logRateLimit = async (label) => {
const { data } = await github.rest.rateLimit.get()
const { remaining, limit, used } = data.rate
core.info(`[Rate Limit ${label}] ${remaining}/${limit} remaining (${used} used)`)
}
await logRateLimit('before commit filtering')
// Filter commits that modified ci/pinned.json
const commitsModifyingPinned = (
await Promise.all(
comparison.data.commits.map(async (commit) => {
const commitDetails = await github.rest.repos.getCommit({
...context.repo,
ref: commit.sha,
})
const modifiesPinned = commitDetails.data.files?.some(
(file) => file.filename === "ci/pinned.json"
)
return modifiesPinned ? commit.sha : null
})
)
).filter((sha) => sha !== null)
await logRateLimit('after commit filtering')
if (commitsModifyingPinned.length === 0) {
// This should not happen as testVersions should only be true
// when ci/pinned.json was modified in the PR.
core.setFailed("Error: ci/pinned.json was not modified in this PR")
return
} else if (commitsModifyingPinned.length > 1) {
core.setFailed([
"Error: Multiple commits touch ci/pinned.json in this PR:",
...commitsModifyingPinned,
"Please ensure only a single commit modifies ci/pinned.json for accurate version matrix evaluation."
].join("\n"))
return
}
const ciPinBumpCommit = commitsModifyingPinned[0]
core.setOutput("ciPinBumpCommit", ciPinBumpCommit)
core.setOutput("ciPinBumpCommitShort", ciPinBumpCommit.substring(0, 7))
core.info(`Found pinned.json commit: ${ciPinBumpCommit}`)
- name: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- name: Load supported versions
id: versions
run: |
echo "versions=$(trusted/ci/supportedVersions.nix --arg pinnedJson untrusted/ci/pinned.json)" >> "$GITHUB_OUTPUT"
eval:
outpaths:
name: Outpaths
runs-on: ubuntu-24.04-arm
needs: versions
if: ${{ !cancelled() && !failure() }}
needs: [ get-merge-commit ]
strategy:
fail-fast: false
matrix:
system: ${{ fromJSON(inputs.systems) }}
version:
- "" # Default Eval triggering rebuild labels and such.
- ${{ fromJSON(needs.versions.outputs.versions || '[]') }} # Only for ci/pinned.json updates.
# Failures for versioned Evals will be collected in a separate job below
# to not interrupt main Eval's compare step.
continue-on-error: ${{ matrix.version != '' }}
name: ${{ matrix.system }}${{ matrix.version && format(' @ {0} ({1})', matrix.version, needs.versions.outputs.ciPinBumpCommitShort) || '' }}
timeout-minutes: 20
system: ${{ fromJSON(needs.get-merge-commit.outputs.systems) }}
steps:
# This is not supposed to be used and just acts as a fallback.
# Without swap, when Eval runs OOM, it will fail badly with a
# job that is sometimes not interruptible anymore.
# If Eval starts swapping, decrease chunkSize to keep it fast.
- name: Enable swap
run: |
sudo fallocate -l 10G /swap
@@ -171,325 +38,247 @@ jobs:
sudo mkswap /swap
sudo swapon /swap
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Check out the PR at the test merge commit
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
sparse-checkout: .github/actions
- name: Check out the PR at merged and target commits
uses: ./.github/actions/checkout
with:
# For versioned evals, use the target as the untrusted base and apply the pin-bump commit
merged-as-untrusted-at: ${{ matrix.version && inputs.targetSha || inputs.mergedSha }}
untrusted-pin-bump: ${{ matrix.version && needs.versions.outputs.ciPinBumpCommit }}
target-as-trusted-at: ${{ inputs.targetSha }}
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
path: nixpkgs
- name: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
continue-on-error: true
uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
with:
# The nixpkgs-gha cache should not be trusted or used outside of Nixpkgs and its forks' CI.
name: ${{ vars.CACHIX_NAME || 'nixpkgs-gha' }}
extraPullNames: nixpkgs-gha
authToken: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
pushFilter: '(-source|-single-chunk)$'
extra_nix_config: sandbox = true
- name: Evaluate the ${{ matrix.system }} output paths at the merge commit
env:
MATRIX_SYSTEM: ${{ matrix.system }}
MATRIX_VERSION: ${{ matrix.version || 'nixVersions.latest' }}
run: |
nix-build nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A eval.singleSystem \
--argstr evalSystem "$MATRIX_SYSTEM" \
--arg chunkSize 8000 \
--argstr nixPath "$MATRIX_VERSION" \
--out-link merged
# If it uses too much memory, slightly decrease chunkSize.
# Note: Keep the same further down in sync!
- name: Evaluate the ${{ matrix.system }} output paths at the target commit
- name: Evaluate the ${{ matrix.system }} output paths for all derivation attributes
env:
MATRIX_SYSTEM: ${{ matrix.system }}
run: |
TARGET_DRV=$(nix-instantiate nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A eval.singleSystem \
nix-build nixpkgs/ci -A eval.singleSystem \
--argstr evalSystem "$MATRIX_SYSTEM" \
--arg chunkSize 8000 \
--argstr nixPath "nixVersions.latest")
--arg chunkSize 10000
# If it uses too much memory, slightly decrease chunkSize
# Try to fetch this from Cachix a few times, for up to 30 seconds. This avoids running Eval
# twice in the Merge Queue, when a later item finishes Eval at the merge commit earlier.
for _i in {1..6}; do
# Using --max-jobs 0 will cause nix-build to fail if this can't be substituted from cachix.
if nix-build "$TARGET_DRV" --max-jobs 0; then
break
fi
sleep 5
done
# Either fetches from Cachix or runs Eval itself. The fallback is required
# for pull requests into wip-branches without merge queue.
nix-build "$TARGET_DRV" --out-link target
- name: Compare outpaths against the target branch
env:
MATRIX_SYSTEM: ${{ matrix.system }}
run: |
nix-build nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A eval.diff \
--arg beforeDir ./target \
--arg afterDir ./merged \
--argstr evalSystem "$MATRIX_SYSTEM" \
--out-link diff
- name: Upload outpaths diff and stats
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- name: Upload the output paths and eval stats
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ inputs.artifact-prefix }}${{ matrix.version && format('{0}-', matrix.version) || '' }}diff-${{ matrix.system }}
path: diff/*
name: intermediate-${{ matrix.system }}
path: result/*
compare:
process:
name: Process
runs-on: ubuntu-24.04-arm
needs: [eval]
if: ${{ !cancelled() && !failure() }}
permissions:
pull-requests: write # submitting 'wrong branch' reviews
statuses: write # creating 'Eval Summary' commit statuses
timeout-minutes: 5
needs: [ outpaths, get-merge-commit ]
outputs:
targetRunId: ${{ steps.targetRunId.outputs.targetRunId }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: .github/actions
- name: Check out the PR at the target commit
uses: ./.github/actions/checkout
with:
merged-as-untrusted-at: ${{ inputs.mergedSha }}
target-as-trusted-at: ${{ inputs.targetSha }}
- name: Download output paths and eval stats for all systems
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: ${{ inputs.artifact-prefix }}diff-*
path: diff
merge-multiple: true
pattern: intermediate-*
path: intermediate
- name: Check out the PR at the test merge commit
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
fetch-depth: 2
path: nixpkgs
- name: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
with:
extra_nix_config: sandbox = true
- name: Combine all output paths and eval stats
run: |
nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A eval.combine \
--arg diffDir ./diff \
--out-link combined
nix-build nixpkgs/ci -A eval.combine \
--arg resultsDir ./intermediate \
-o prResult
- name: Upload the maintainer list
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- name: Upload the combined results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ inputs.artifact-prefix }}maintainers
path: combined/maintainers.json
name: result
path: prResult/*
- name: Get target run id
if: needs.get-merge-commit.outputs.targetSha
id: targetRunId
run: |
# Get the latest eval.yml workflow run for the PR's target commit
if ! run=$(gh api --method GET /repos/"$REPOSITORY"/actions/workflows/eval.yml/runs \
-f head_sha="$TARGET_SHA" -f event=push \
--jq '.workflow_runs | sort_by(.run_started_at) | .[-1]') \
|| [[ -z "$run" ]]; then
echo "Could not find an eval.yml workflow run for $TARGET_SHA, cannot make comparison"
exit 1
fi
echo "Comparing against $(jq .html_url <<< "$run")"
runId=$(jq .id <<< "$run")
conclusion=$(jq -r .conclusion <<< "$run")
while [[ "$conclusion" == null || "$conclusion" == "" ]]; do
echo "Workflow not done, waiting 10 seconds before checking again"
sleep 10
conclusion=$(gh api /repos/"$REPOSITORY"/actions/runs/"$runId" --jq '.conclusion')
done
if [[ "$conclusion" != "success" ]]; then
echo "Workflow was not successful (conclusion: $conclusion), cannot make comparison"
exit 1
fi
echo "targetRunId=$runId" >> "$GITHUB_OUTPUT"
env:
REPOSITORY: ${{ github.repository }}
TARGET_SHA: ${{ needs.get-merge-commit.outputs.targetSha }}
GH_TOKEN: ${{ github.token }}
- uses: actions/download-artifact@v4
if: steps.targetRunId.outputs.targetRunId
with:
name: result
path: targetResult
github-token: ${{ github.token }}
run-id: ${{ steps.targetRunId.outputs.targetRunId }}
- name: Compare against the target branch
env:
TARGET_SHA: ${{ inputs.mergedSha }}
if: steps.targetRunId.outputs.targetRunId
run: |
git -C nixpkgs/trusted diff --name-only "$TARGET_SHA" \
git -C nixpkgs worktree add ../target ${{ needs.get-merge-commit.outputs.targetSha }}
git -C nixpkgs diff --name-only ${{ needs.get-merge-commit.outputs.targetSha }} \
| jq --raw-input --slurp 'split("\n")[:-1]' > touched-files.json
# Use the target branch to get accurate maintainer info
nix-build nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A eval.compare \
--arg combinedDir ./combined \
nix-build target/ci -A eval.compare \
--arg beforeResultDir ./targetResult \
--arg afterResultDir "$(realpath prResult)" \
--arg touchedFilesJson ./touched-files.json \
--out-link comparison
--argstr githubAuthorId "$AUTHOR_ID" \
-o comparison
cat comparison/step-summary.md >> "$GITHUB_STEP_SUMMARY"
env:
AUTHOR_ID: ${{ github.event.pull_request.user.id }}
- name: Upload the comparison results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- name: Upload the combined results
if: steps.targetRunId.outputs.targetRunId
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ inputs.artifact-prefix }}comparison
name: comparison
path: comparison/*
- name: Add eval summary to commit statuses
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const { readFile } = require('node:fs/promises')
const changed = JSON.parse(await readFile('comparison/changed-paths.json', 'utf-8'))
const removedByKernel = Object.fromEntries(
Object.entries(changed.attrdiffByKernel ?? {}).map(([kernel, diff]) => [
kernel,
diff.removed.length,
]),
)
const description =
'Package: ' + [
`added ${changed.attrdiff.added.length}`,
`removed ${changed.attrdiff.removed.length}`,
`changed ${changed.attrdiff.changed.length}`
].join(', ') +
' — Rebuild: ' + [
`linux ${changed.rebuildCountByKernel.linux}`,
`darwin ${changed.rebuildCountByKernel.darwin}`
].join(', ') +
(
Object.values(removedByKernel).some((count) => count > 0)
? ' — Removed: ' + [
`linux ${removedByKernel.linux ?? 0}`,
`darwin ${removedByKernel.darwin ?? 0}`
].join(', ')
: ''
)
const { serverUrl, repo, runId, payload } = context
const target_url =
`${serverUrl}/${repo.owner}/${repo.repo}/actions/runs/${runId}?pr=${payload.pull_request.number}`
await github.rest.repos.createCommitStatus({
...repo,
sha: payload.pull_request.head.sha,
context: 'Eval Summary',
state: 'success',
description,
target_url
})
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: github.event_name == 'pull_request_target' && vars.NIXPKGS_BRANCH_CHECK_CLIENT_ID
# Separate job to have a very tightly scoped PR write token
tag:
name: Tag
runs-on: ubuntu-24.04-arm
needs: [ get-merge-commit, process ]
if: needs.process.outputs.targetRunId
permissions:
pull-requests: write
statuses: write
steps:
# See ./codeowners-v2.yml, reuse the same App because we need the same permissions
# Can't use the token received from permissions above, because it can't get enough permissions
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: vars.OWNER_APP_ID
id: app-token
with:
client-id: ${{ vars.NIXPKGS_BRANCH_CHECK_CLIENT_ID }}
private-key: ${{ secrets.NIXPKGS_BRANCH_CHECK_APP_PRIVATE_KEY }}
app-id: ${{ vars.OWNER_APP_ID }}
private-key: ${{ secrets.OWNER_APP_PRIVATE_KEY }}
permission-administration: read
permission-members: read
permission-pull-requests: write
# It's fine to reuse this app in the 'pull-request-target / prepare' job,
# because that job has to run before this one.
- name: Request changes if PR is against an inappropriate branch
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- name: Download process result
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
github-token: ${{ steps.app-token.outputs.token || github.token }}
script: |
require('./nixpkgs/trusted/ci/github-script/check-target-branch.js')({
github,
context,
core,
dry: context.eventName == 'pull_request',
})
# Creates a matrix of Eval performance for various versions and systems.
report:
runs-on: ubuntu-slim
needs: [versions, eval]
steps:
- name: Download output paths and eval stats for all versions
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: "*-diff-*"
path: versions
- name: Add version comparison table to job summary
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
ARTIFACT_PREFIX: ${{ inputs.artifact-prefix }}
SYSTEMS: ${{ inputs.systems }}
VERSIONS: ${{ needs.versions.outputs.versions }}
CI_PIN_BUMP_COMMIT: ${{ needs.versions.outputs.ciPinBumpCommit }}
with:
script: |
const { readFileSync } = require('node:fs')
const path = require('node:path')
const prefix = process.env.ARTIFACT_PREFIX
const systems = JSON.parse(process.env.SYSTEMS)
const versions = JSON.parse(process.env.VERSIONS)
const ciPinBumpCommit = process.env.CI_PIN_BUMP_COMMIT
core.summary.addHeading('Lix/Nix version comparison')
core.summary.addRaw(`\n*Evaluated at commit: \`${ciPinBumpCommit}\` (commit that modified ci/pinned.json)*\n`, true)
core.summary.addTable(
[].concat(
[
[{ data: 'Version', header: true }].concat(
systems.map((system) => ({ data: system, header: true })),
),
],
versions.map((version) =>
[{ data: version }].concat(
systems.map((system) => {
try {
const artifact = path.join('versions', `${prefix}${version}-diff-${system}`)
const time = Math.round(
parseFloat(
readFileSync(
path.join(artifact, 'after', system, 'total-time'),
'utf-8',
),
),
)
const diff = JSON.parse(
readFileSync(path.join(artifact, system, 'diff.json'), 'utf-8'),
)
const attrs = []
.concat(diff.added, diff.removed, diff.changed, diff.rebuilds)
// There are some special attributes, which are ignored for rebuilds.
// These only have a single path component, because they lack the `.<system>` suffix.
.filter((attr) => attr.split('.').length > 1)
if (attrs.length > 0) {
core.setFailed(
`${version} on ${system} has changed outpaths!\n` +
`Note: This indicates that commit ${ciPinBumpCommit} ` +
`(which modified ci/pinned.json) also contains other ` +
`changes affecting package outputs. ` +
`Please ensure ci/pinned.json is updated in a standalone commit.`
)
return { data: ':x:' }
}
return { data: time }
} catch {
core.warning(`${version} on ${system} did not produce artifact.`)
return { data: ':warning:' }
}
}),
),
),
),
)
core.summary.addRaw(
'\n*Evaluation time in seconds without downloading dependencies.*',
true,
)
core.summary.addRaw('\n*:warning: Job did not report a result.*', true)
core.summary.addRaw(
'\n*:x: Job produced different outpaths than the target branch.*',
true,
)
core.summary.write()
misc:
if: ${{ github.event_name != 'push' }}
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: .github/actions
- name: Checkout the merge commit
uses: ./.github/actions/checkout
with:
merged-as-untrusted-at: ${{ inputs.mergedSha }}
name: comparison
path: comparison
- name: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
- name: Ensure flake outputs on all systems still evaluate
run: nix flake check --all-systems --no-build './nixpkgs/untrusted?shallow=1'
# Important: This workflow job runs with extra permissions,
# so we need to make sure to not run untrusted code from PRs
- name: Check out Nixpkgs at the base commit
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.get-merge-commit.outputs.targetSha }}
path: base
sparse-checkout: ci
- name: Query nixpkgs with aliases enabled to check for basic syntax errors
- name: Build the requestReviews derivation
run: nix-build base/ci -A requestReviews
- name: Labelling pull request
if: ${{ github.event_name == 'pull_request_target' && github.repository_owner == 'NixOS' }}
run: |
time nix-env -I ./nixpkgs/untrusted -f ./nixpkgs/untrusted -qa '*' --option restrict-eval true --option allow-import-from-derivation false >/dev/null
# Get all currently set labels that we manage
gh api \
/repos/"$REPOSITORY"/issues/"$NUMBER"/labels \
--jq '.[].name | select(startswith("10.rebuild") or . == "11.by: package-maintainer")' \
| sort > before
- name: Ensure NixOS modules meta is valid
# And the labels that should be there
jq -r '.labels[]' comparison/changed-paths.json \
| sort > after
# Remove the ones not needed anymore
while read -r toRemove; do
echo "Removing label $toRemove"
gh api \
--method DELETE \
/repos/"$REPOSITORY"/issues/"$NUMBER"/labels/"$toRemove"
done < <(comm -23 before after)
# And add the ones that aren't set already
while read -r toAdd; do
echo "Adding label $toAdd"
gh api \
--method POST \
/repos/"$REPOSITORY"/issues/"$NUMBER"/labels \
-f "labels[]=$toAdd"
done < <(comm -13 before after)
env:
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
- name: Add eval summary to commit statuses
if: ${{ github.event_name == 'pull_request_target' && github.repository_owner == 'NixOS' }}
run: |
time nix-instantiate -I ./nixpkgs/untrusted --strict --eval --json ./nixpkgs/untrusted/nixos --arg configuration '{}' --attr config.meta --option restrict-eval true --option allow-import-from-derivation false
description=$(jq -r '
"Package: added " + (.attrdiff.added | length | tostring) +
", removed " + (.attrdiff.removed | length | tostring) +
", changed " + (.attrdiff.changed | length | tostring) +
", Rebuild: linux " + (.rebuildCountByKernel.linux | tostring) +
", darwin " + (.rebuildCountByKernel.darwin | tostring)
' <comparison/changed-paths.json)
target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID?pr=$NUMBER"
gh api --method POST \
-H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$GITHUB_REPOSITORY/statuses/$PR_HEAD_SHA" \
-f "context=Eval / Summary" -f "state=success" -f "description=$description" -f "target_url=$target_url"
env:
GH_TOKEN: ${{ github.token }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
NUMBER: ${{ github.event.number }}
- name: Requesting maintainer reviews
if: ${{ steps.app-token.outputs.token && github.repository_owner == 'NixOS' }}
run: |
# maintainers.json contains GitHub IDs. Look up handles to request reviews from.
# There appears to be no API to request reviews based on GitHub IDs
jq -r 'keys[]' comparison/maintainers.json \
| while read -r id; do gh api /user/"$id" --jq .login; done \
| GH_TOKEN=${{ steps.app-token.outputs.token }} result/bin/request-reviewers.sh "$REPOSITORY" "$NUMBER" "$AUTHOR"
env:
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
AUTHOR: ${{ github.event.pull_request.user.login }}
# Don't request reviewers on draft PRs
DRY_MODE: ${{ github.event.pull_request.draft && '1' || '' }}

58
.github/workflows/get-merge-commit.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: Get merge commit
on:
pull_request:
paths:
- .github/workflows/get-merge-commit.yml
workflow_call:
outputs:
mergedSha:
description: "The merge commit SHA"
value: ${{ jobs.resolve-merge-commit.outputs.mergedSha }}
targetSha:
description: "The target commit SHA"
value: ${{ jobs.resolve-merge-commit.outputs.targetSha }}
systems:
description: "The supported systems"
value: ${{ jobs.resolve-merge-commit.outputs.systems }}
permissions: {}
jobs:
resolve-merge-commit:
runs-on: ubuntu-24.04-arm
outputs:
mergedSha: ${{ steps.merged.outputs.mergedSha }}
targetSha: ${{ steps.merged.outputs.targetSha }}
systems: ${{ steps.systems.outputs.systems }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: base
sparse-checkout: ci
- name: Check if the PR can be merged and get the test merge commit
id: merged
env:
GH_TOKEN: ${{ github.token }}
GH_EVENT: ${{ github.event_name }}
run: |
case "$GH_EVENT" in
push)
echo "mergedSha=${{ github.sha }}" >> "$GITHUB_OUTPUT"
;;
pull_request*)
if commits=$(base/ci/get-merge-commit.sh ${{ github.repository }} ${{ github.event.number }}); then
echo -e "Checking the commits:\n$commits"
echo "$commits" >> "$GITHUB_OUTPUT"
else
# Skipping so that no notifications are sent
echo "Skipping the rest..."
fi
;;
esac
- name: Load supported systems
id: systems
run: |
echo "systems=$(jq -c <base/ci/supportedSystems.json)" >> "$GITHUB_OUTPUT"

59
.github/workflows/labels.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
# WARNING:
# When extending this action, be aware that $GITHUB_TOKEN allows some write
# access to the GitHub API. This means that it should not evaluate user input in
# a way that allows code injection.
name: "Label PR"
on:
pull_request_target:
permissions:
contents: read
pull-requests: write
jobs:
labels:
name: label-pr
runs-on: ubuntu-24.04-arm
if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
steps:
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
if: |
github.event.pull_request.head.repo.owner.login != 'NixOS' || !(
github.head_ref == 'haskell-updates' ||
github.head_ref == 'python-updates' ||
github.head_ref == 'staging-next' ||
startsWith(github.head_ref, 'staging-next-')
)
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yml # default
sync-labels: true
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
if: |
github.event.pull_request.head.repo.owner.login != 'NixOS' || !(
github.head_ref == 'haskell-updates' ||
github.head_ref == 'python-updates' ||
github.head_ref == 'staging-next' ||
startsWith(github.head_ref, 'staging-next-')
)
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler-no-sync.yml
sync-labels: false
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
# Development branches like staging-next, haskell-updates and python-updates get special labels.
# This is to avoid the mass of labels there, which is mostly useless - and really annoying for
# the backport labels.
if: |
github.event.pull_request.head.repo.owner.login == 'NixOS' && (
github.head_ref == 'haskell-updates' ||
github.head_ref == 'python-updates' ||
github.head_ref == 'staging-next' ||
startsWith(github.head_ref, 'staging-next-')
)
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler-development-branches.yml
sync-labels: true

34
.github/workflows/lib-tests.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: "Building Nixpkgs lib-tests"
on:
pull_request:
paths:
- .github/workflows/lib-tests.yml
pull_request_target:
paths:
- 'lib/**'
- 'maintainers/**'
permissions: {}
jobs:
get-merge-commit:
uses: ./.github/workflows/get-merge-commit.yml
nixpkgs-lib-tests:
name: nixpkgs-lib-tests
runs-on: ubuntu-24.04
needs: get-merge-commit
if: needs.get-merge-commit.outputs.mergedSha
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
with:
extra_nix_config: sandbox = true
- name: Building Nixpkgs lib-tests
run: |
nix-build ci -A lib-tests

View File

@@ -1,152 +0,0 @@
name: Lint
on:
workflow_call:
inputs:
mergedSha:
required: true
type: string
targetSha:
required: true
type: string
secrets:
# Should only be provided in the merge queue, not in pull requests,
# where we're evaluating untrusted code.
CACHIX_AUTH_TOKEN_GHA:
required: false
permissions: {}
defaults:
run:
shell: bash
jobs:
treefmt:
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: .github/actions
- name: Checkout the merge commit
uses: ./.github/actions/checkout
with:
merged-as-untrusted-at: ${{ inputs.mergedSha }}
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
# TODO: Figure out how to best enable caching for the treefmt job. Cachix won't work well,
# because the cache would be invalidated on every commit - treefmt checks every file.
# Maybe we can cache treefmt's eval-cache somehow.
- name: Check that files are formatted
run: |
# Note that it's fine to run this on untrusted code because:
# - There's no secrets accessible here
# - The build is sandboxed
if ! nix-build nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A fmt.check; then
echo "Some files are not properly formatted"
echo "Please format them by going to the Nixpkgs root directory and running one of:"
echo " nix-shell --run treefmt"
echo " nix develop --command treefmt"
echo " nix fmt"
echo "Make sure your branch is up to date with master; rebase if not."
echo "If you're having trouble, please ping @NixOS/nix-formatting"
exit 1
fi
parse:
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: .github/actions
- name: Checkout the merge commit
uses: ./.github/actions/checkout
with:
merged-as-untrusted-at: ${{ inputs.mergedSha }}
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
continue-on-error: true
with:
# The nixpkgs-gha cache should not be trusted or used outside of Nixpkgs and its forks' CI.
name: ${{ vars.CACHIX_NAME || 'nixpkgs-gha' }}
extraPullNames: nixpkgs-gha
authToken: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
pushFilter: -source$
- name: Parse all nix files
run: |
# Tests multiple versions at once, let's make sure all of them run, so keep-going.
nix-build nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A parse --keep-going
nixpkgs-vet:
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: .github/actions
- name: Checkout merge and target commits
uses: ./.github/actions/checkout
with:
merged-as-untrusted-at: ${{ inputs.mergedSha }}
target-as-trusted-at: ${{ inputs.targetSha }}
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
continue-on-error: true
with:
# The nixpkgs-gha cache should not be trusted or used outside of Nixpkgs and its forks' CI.
name: ${{ vars.CACHIX_NAME || 'nixpkgs-gha' }}
extraPullNames: nixpkgs-gha
authToken: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
pushFilter: -source$
- name: Running nixpkgs-vet
env:
# Force terminal colors to be enabled. The library that `nixpkgs-vet` uses respects https://bixense.com/clicolors/
CLICOLOR_FORCE: 1
run: |
if nix-build nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A nixpkgs-vet --arg base "./nixpkgs/trusted" --arg head "./nixpkgs/untrusted"; then
exit 0
else
exitCode=$?
echo "To run locally: ./ci/nixpkgs-vet.sh $GITHUB_BASE_REF https://github.com/$GITHUB_REPOSITORY.git"
echo "If you're having trouble, ping @NixOS/nixpkgs-vet"
exit "$exitCode"
fi
commits:
# Only check commits if we have access to the pull_request context.
#
# Luckily there's no need to lint commit messages in the Merge Queue, because
# changes to the target branch can't change commit messages on the base branch.
if: ${{ github.event.pull_request.number }}
runs-on: ubuntu-slim
timeout-minutes: 5
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: true # Needed to run git fetch for large PRs.
path: trusted
- name: Check commit messages
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const checkCommitMessages = require('./trusted/ci/github-script/lint-commits.js')
checkCommitMessages({
github,
context,
core,
repoPath: 'trusted',
})

58
.github/workflows/manual-nixos-v2.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: "Build NixOS manual v2"
on:
pull_request:
paths:
- .github/workflows/manual-nixos-v2.yml
pull_request_target:
branches:
- master
paths:
- "nixos/**"
# Also build when the nixpkgs doc changed, since we take things like
# the release notes and some css and js files from there.
# See nixos/doc/manual/default.nix
- "doc/**"
# Build when something in lib changes
# Since the lib functions are used to 'massage' the options before producing the manual
- "lib/**"
permissions: {}
jobs:
nixos:
name: nixos-manual-build
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
system: x86_64-linux
- runner: ubuntu-24.04-arm
system: aarch64-linux
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
with:
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build NixOS manual
id: build-manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true ci -A manual-nixos --argstr system ${{ matrix.system }}
- name: Upload NixOS manual
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nixos-manual-${{ matrix.system }}
path: result/
if-no-files-found: error

37
.github/workflows/manual-nixpkgs-v2.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: "Build Nixpkgs manual v2"
on:
pull_request:
paths:
- .github/workflows/manual-nixpkgs-v2.yml
pull_request_target:
branches:
- master
paths:
- 'doc/**'
- 'lib/**'
- 'pkgs/by-name/ni/nixdoc/**'
permissions: {}
jobs:
nixpkgs:
name: nixpkgs-manual-build
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
with:
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Building Nixpkgs manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true ci -A manual-nixpkgs -A manual-nixpkgs-tests

View File

@@ -1,145 +0,0 @@
name: Merge Group
on:
merge_group:
workflow_call:
inputs:
artifact-prefix:
required: true
type: string
mergedSha:
required: true
type: string
targetSha:
required: true
type: string
permissions: {}
jobs:
prepare:
runs-on: ubuntu-slim
outputs:
baseBranch: ${{ steps.prepare.outputs.base }}
mergedSha: ${{ steps.prepare.outputs.mergedSha }}
targetSha: ${{ steps.prepare.outputs.targetSha }}
systems: ${{ steps.prepare.outputs.systems }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: |
ci/github-script/supportedSystems.js
- id: prepare
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
MERGED_SHA: ${{ inputs.mergedSha }}
TARGET_SHA: ${{ inputs.targetSha }}
with:
script: |
const { classify } = require('./ci/supportedBranches.js')
const supportedSystems = require('./ci/github-script/supportedSystems.js')
const baseBranch = (
context.payload.merge_group?.base_ref ??
context.payload.pull_request.base.ref
).replace(/^refs\/heads\//, '')
const baseClassification = classify(baseBranch)
core.setOutput('base', baseClassification)
core.info('base classification:', baseClassification)
const mergedSha = context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA
core.setOutput('mergedSha', mergedSha)
core.info(`mergedSha: ${mergedSha}`)
const targetSha = context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA
core.setOutput('targetSha', targetSha)
core.info(`targetSha: ${targetSha}`)
const systems = await supportedSystems({ github, context, targetSha })
core.setOutput('systems', systems)
check:
name: Check
needs: [prepare]
uses: ./.github/workflows/check.yml
permissions:
pull-requests: write # cherry-picks: unused in merge queue but required for check workflow
secrets:
CACHIX_AUTH_TOKEN_GHA: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
with:
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
lint:
name: Lint
needs: [prepare]
uses: ./.github/workflows/lint.yml
secrets:
CACHIX_AUTH_TOKEN_GHA: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
with:
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
eval:
name: Eval
needs: [prepare]
uses: ./.github/workflows/eval.yml
# The eval workflow requests these permissions so we must explicitly allow them,
# even though they are unused when working with the merge queue.
permissions:
pull-requests: write # compare: unused in merge queue but required by eval workflow
statuses: write # compare: unused in merge queue but required by eval workflow
secrets:
CACHIX_AUTH_TOKEN_GHA: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
with:
artifact-prefix: ${{ inputs.artifact-prefix }}
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
systems: ${{ needs.prepare.outputs.systems }}
build:
name: Build
needs: [prepare]
uses: ./.github/workflows/build.yml
secrets:
CACHIX_AUTH_TOKEN_GHA: ${{ secrets.CACHIX_AUTH_TOKEN_GHA }}
with:
artifact-prefix: ${{ inputs.artifact-prefix }}
baseBranch: ${{ needs.prepare.outputs.baseBranch }}
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
# This job's only purpose is to create the target for the "Required Status Checks" branch ruleset.
# It "needs" all the jobs that should block the Merge Queue.
unlock:
if: github.event_name != 'pull_request' && always()
# Modify this list to add or remove jobs from required status checks.
needs:
- check
- lint
- eval
- build
runs-on: ubuntu-slim
permissions:
statuses: write # creating 'no PR failures' commit status
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
RESULTS: ${{ toJSON(needs.*.result) }}
with:
script: |
const { serverUrl, repo, runId, payload } = context
const target_url =
`${serverUrl}/${repo.owner}/${repo.repo}/actions/runs/${runId}`
await github.rest.repos.createCommitStatus({
...repo,
sha: payload.merge_group.head_sha,
// WARNING:
// Do NOT change the name of this, otherwise the rule will not catch it anymore.
// This would prevent all PRs from merging.
context: 'no PR failures',
state: JSON.parse(process.env.RESULTS).every(result => result == 'success') ? 'success' : 'error',
target_url,
})

33
.github/workflows/nix-parse-v2.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: "Check whether nix files are parseable v2"
on:
pull_request:
paths:
- .github/workflows/nix-parse-v2.yml
pull_request_target:
permissions: {}
jobs:
get-merge-commit:
uses: ./.github/workflows/get-merge-commit.yml
tests:
name: nix-files-parseable-check
runs-on: ubuntu-24.04-arm
needs: get-merge-commit
if: "needs.get-merge-commit.outputs.mergedSha && !contains(github.event.pull_request.title, '[skip treewide]')"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
with:
extra_nix_config: sandbox = true
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Parse all nix files
run: |
# Tests multiple versions at once, let's make sure all of them run, so keep-going.
nix-build ci -A parse --keep-going

71
.github/workflows/nixpkgs-vet.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
# `nixpkgs-vet` is a tool to vet Nixpkgs: its architecture, package structure, and more.
# Among other checks, it makes sure that `pkgs/by-name` (see `../../pkgs/by-name/README.md`) follows the validity rules outlined in [RFC 140](https://github.com/NixOS/rfcs/pull/140).
# When you make changes to this workflow, please also update `ci/nixpkgs-vet.sh` to reflect the impact of your work to the CI.
# See https://github.com/NixOS/nixpkgs-vet for details on the tool and its checks.
name: Vet nixpkgs
on:
pull_request:
paths:
- .github/workflows/nixpkgs-vet.yml
pull_request_target:
permissions: {}
# We don't use a concurrency group here, because the action is triggered quite often (due to the PR edit trigger), and contributors would get notified on any canceled run.
# There is a feature request for suppressing notifications on concurrency-canceled runs: https://github.com/orgs/community/discussions/13015
jobs:
get-merge-commit:
uses: ./.github/workflows/get-merge-commit.yml
check:
name: nixpkgs-vet
# This needs to be x86_64-linux, because we depend on the tooling being pre-built in the GitHub releases.
runs-on: ubuntu-24.04
# This should take 1 minute at most, but let's be generous. The default of 6 hours is definitely too long.
timeout-minutes: 10
needs: get-merge-commit
if: needs.get-merge-commit.outputs.mergedSha
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
# Fetches the merge commit and its parents
fetch-depth: 2
- name: Checking out target branch
run: |
target=$(mktemp -d)
git worktree add "$target" "$(git rev-parse HEAD^1)"
echo "target=$target" >> "$GITHUB_ENV"
- uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
- name: Fetching the pinned tool
# Update the pinned version using ci/nixpkgs-vet/update-pinned-tool.sh
run: |
# The pinned version of the tooling to use.
toolVersion=$(<ci/nixpkgs-vet/pinned-version.txt)
# Fetch the x86_64-linux-specific release artifact containing the gzipped NAR of the pre-built tool.
toolPath=$(curl -sSfL https://github.com/NixOS/nixpkgs-vet/releases/download/"$toolVersion"/x86_64-linux.nar.gz \
| gzip -cd | nix-store --import | tail -1)
# Adds a result symlink as a GC root.
nix-store --realise "$toolPath" --add-root result
- name: Running nixpkgs-vet
env:
# Force terminal colors to be enabled. The library that `nixpkgs-vet` uses respects https://bixense.com/clicolors/
CLICOLOR_FORCE: 1
run: |
if result/bin/nixpkgs-vet --base "$target" .; then
exit 0
else
exitCode=$?
echo "To run locally: ./ci/nixpkgs-vet.sh $GITHUB_BASE_REF https://github.com/$GITHUB_REPOSITORY.git"
echo "If you're having trouble, ping @NixOS/nixpkgs-vet"
exit "$exitCode"
fi

26
.github/workflows/no-channel.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: "No channel PR"
on:
pull_request:
paths:
- .github/workflows/no-channel.yml
pull_request_target:
permissions: {}
jobs:
fail:
if: |
startsWith(github.event.pull_request.base.ref, 'nixos-') ||
startsWith(github.event.pull_request.base.ref, 'nixpkgs-')
name: "This PR is targeting a channel branch"
runs-on: ubuntu-24.04-arm
steps:
- run: |
cat <<EOF
The nixos-* and nixpkgs-* branches are pushed to by the channel
release script and should not be merged into directly.
Please target the equivalent release-* branch or master instead.
EOF
exit 1

View File

@@ -11,18 +11,14 @@ on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 24 hours
- cron: '0 0 * * *'
- cron: '0 0 * * *'
workflow_dispatch:
permissions: {}
defaults:
run:
shell: bash
jobs:
periodic-merge:
if: github.repository_owner == 'NixOS' || github.event_name == 'workflow_dispatch'
if: github.repository_owner == 'NixOS'
strategy:
# don't fail fast, so that all pairs are tried
fail-fast: false
@@ -31,18 +27,14 @@ jobs:
max-parallel: 1
matrix:
pairs:
- from: release-25.11
into: staging-next-25.11
- from: staging-next-25.11
into: staging-25.11
- from: release-25.11
into: staging-nixos-25.11
- from: release-26.05
into: staging-next-26.05
- from: staging-next-26.05
into: staging-26.05
- from: release-26.05
into: staging-nixos-26.05
- from: release-24.11
into: staging-next-24.11
- from: staging-next-24.11
into: staging-24.11
- from: master
into: staging-next-25.05
- from: staging-next-25.05
into: staging-25.05
- name: merge-base(master,staging) → haskell-updates
from: master staging
into: haskell-updates
@@ -51,36 +43,4 @@ jobs:
from: ${{ matrix.pairs.from }}
into: ${{ matrix.pairs.into }}
name: ${{ matrix.pairs.name || format('{0} → {1}', matrix.pairs.from, matrix.pairs.into) }}
secrets:
NIXPKGS_CI_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
# Resets the target branch of the current haskell-updates PR.
# This makes GitHub hide all the commits that are already part of staging and gives us a much clearer PR view.
haskell-updates:
needs: periodic-merge
runs-on: ubuntu-slim
permissions:
pull-requests: write
steps:
- name: Find PR and update target branch
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
// There will at most be a single haskell-updates PR anyway, so no need to paginate.
await Promise.all(
(
await github.rest.pulls.list({
...context.repo,
state: 'open',
head: `${context.repo.owner}:haskell-updates`,
})
).data.map((pr) =>
github.rest.pulls.update({
...context.repo,
pull_number: pr.number,
// Just updating to the same branch to trigger a UI update.
// This is staging most of the time, but could be staging-next in rare cases.
base: pr.base.ref,
}),
),
)
secrets: inherit

View File

@@ -11,18 +11,14 @@ on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 6 hours
- cron: '0 */6 * * *'
- cron: '0 */6 * * *'
workflow_dispatch:
permissions: {}
defaults:
run:
shell: bash
jobs:
periodic-merge:
if: github.repository_owner == 'NixOS' || github.event_name == 'workflow_dispatch'
if: github.repository_owner == 'NixOS'
strategy:
# don't fail fast, so that all pairs are tried
fail-fast: false
@@ -35,12 +31,9 @@ jobs:
into: staging-next
- from: staging-next
into: staging
- from: master
into: staging-nixos
uses: ./.github/workflows/periodic-merge.yml
with:
from: ${{ matrix.pairs.from }}
into: ${{ matrix.pairs.into }}
name: ${{ format('{0} → {1}', matrix.pairs.from, matrix.pairs.into) }}
secrets:
NIXPKGS_CI_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
secrets: inherit

View File

@@ -11,32 +11,22 @@ on:
description: Target branch to merge into.
required: true
type: string
secrets:
NIXPKGS_CI_APP_PRIVATE_KEY:
required: true
defaults:
run:
shell: bash
jobs:
merge:
runs-on: ubuntu-24.04-arm
timeout-minutes: 5
steps:
# Use a GitHub App to create the PR so that CI gets triggered
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
app-id: ${{ vars.NIXPKGS_CI_APP_ID }}
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Find merge base between two branches
if: contains(inputs.from, ' ')
@@ -60,10 +50,10 @@ jobs:
github_token: ${{ steps.app-token.outputs.token }}
- name: Comment on failure
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
if: ${{ failure() }}
env:
BODY_TEXT: |
Periodic merge from `${{ inputs.from }}` into [`${{ inputs.into }}`](https://github.com/NixOS/nixpkgs/tree/${{ inputs.into }}) has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
gh pr comment 105153 --body "$BODY_TEXT"
with:
issue-number: 105153
body: |
Periodic merge from `${{ inputs.from }}` into `${{ inputs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
token: ${{ steps.app-token.outputs.token }}

View File

@@ -1,169 +0,0 @@
name: PR
on:
pull_request_target:
workflow_call:
inputs:
artifact-prefix:
required: true
type: string
secrets:
NIXPKGS_CI_APP_PRIVATE_KEY:
required: true
NIXPKGS_BRANCH_CHECK_APP_PRIVATE_KEY:
required: true
NIXPKGS_COMMIT_CHECK_APP_PRIVATE_KEY:
required: true
NIXPKGS_MANUAL_EDIT_CHECK_APP_PRIVATE_KEY:
required: true
concurrency:
group: pr-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
prepare:
runs-on: ubuntu-slim
permissions:
pull-requests: write # submitting 'wrong branch' reviews
outputs:
baseBranch: ${{ steps.prepare.outputs.base }}
headBranch: ${{ steps.prepare.outputs.head }}
mergedSha: ${{ steps.prepare.outputs.mergedSha }}
targetSha: ${{ steps.prepare.outputs.targetSha }}
systems: ${{ steps.prepare.outputs.systems }}
touched: ${{ steps.prepare.outputs.touched }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout-cone-mode: true # default, for clarity
sparse-checkout: |
ci/github-script
# It's fine to reuse this app in the 'eval / compare' job,
# because this job has to run before that one.
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: vars.NIXPKGS_BRANCH_CHECK_CLIENT_ID && github.actor != 'dependabot[bot]'
id: app-token
with:
client-id: ${{ vars.NIXPKGS_BRANCH_CHECK_CLIENT_ID }}
private-key: ${{ secrets.NIXPKGS_BRANCH_CHECK_APP_PRIVATE_KEY }}
permission-pull-requests: write
- id: prepare
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token || github.token }}
retries: 10
# The default for this includes code 422, which happens regularly for us when comparing commits:
# 422 - Server Error: Sorry, this diff is taking too long to generate.
# Listing all other values from here to effectively remove 422:
# https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14
retry-exempt-status-codes: 400,401,403,404
script: |
require('./ci/github-script/prepare.js')({
github,
context,
core,
dry: context.eventName == 'pull_request',
})
check:
name: Check
needs: [prepare]
uses: ./.github/workflows/check.yml
permissions:
# cherry-picks
pull-requests: write
secrets:
NIXPKGS_COMMIT_CHECK_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_COMMIT_CHECK_APP_PRIVATE_KEY }}
NIXPKGS_MANUAL_EDIT_CHECK_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_MANUAL_EDIT_CHECK_APP_PRIVATE_KEY }}
with:
baseBranch: ${{ needs.prepare.outputs.baseBranch }}
headBranch: ${{ needs.prepare.outputs.headBranch }}
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
lint:
name: Lint
needs: [prepare]
uses: ./.github/workflows/lint.yml
with:
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
eval:
name: Eval
needs: [prepare]
uses: ./.github/workflows/eval.yml
permissions:
# compare
pull-requests: write
statuses: write
secrets:
NIXPKGS_BRANCH_CHECK_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_BRANCH_CHECK_APP_PRIVATE_KEY }}
with:
artifact-prefix: ${{ inputs.artifact-prefix }}
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
headSha: ${{ github.event.pull_request.head.sha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
systems: ${{ needs.prepare.outputs.systems }}
testVersions: ${{ contains(fromJSON(needs.prepare.outputs.touched), 'pinned') && !contains(fromJSON(needs.prepare.outputs.headBranch).type, 'development') }}
bot:
name: Bot
needs: [prepare, eval]
uses: ./.github/workflows/bot.yml
permissions:
issues: write
pull-requests: write
secrets:
NIXPKGS_CI_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
with:
headBranch: ${{ needs.prepare.outputs.headBranch }}
build:
name: Build
needs: [prepare]
uses: ./.github/workflows/build.yml
with:
artifact-prefix: ${{ inputs.artifact-prefix }}
baseBranch: ${{ needs.prepare.outputs.baseBranch }}
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
# This job's only purpose is to create the target for the "Required Status Checks" branch ruleset.
# It "needs" all the jobs that should block merging a PR.
unlock:
if: github.event_name != 'pull_request' && always()
# Modify this list to add or remove jobs from required status checks.
needs:
- check
- lint
- eval
- build
runs-on: ubuntu-slim
permissions:
statuses: write
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
RESULTS: ${{ toJSON(needs.*.result) }}
with:
script: |
const { serverUrl, repo, runId, payload } = context
const target_url =
`${serverUrl}/${repo.owner}/${repo.repo}/actions/runs/${runId}?pr=${payload.pull_request.number}`
await github.rest.repos.createCommitStatus({
...repo,
sha: payload.pull_request.head.sha,
// WARNING:
// Do NOT change the name of this, otherwise the rule will not catch it anymore.
// This would prevent all PRs from merging.
context: 'no PR failures',
state: JSON.parse(process.env.RESULTS).every(status => status == 'success') ? 'success' : 'error',
target_url,
})

View File

@@ -1,92 +0,0 @@
name: Review
on:
workflow_run:
workflows:
- Reviewed
types: [completed]
# This is used as fallback without app only.
# This happens when testing in forks without setting up that app.
permissions:
pull-requests: write # minimizing dismissed reviews and adding reactions
defaults:
run:
shell: bash
jobs:
process:
runs-on: ubuntu-slim
timeout-minutes: 2
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: |
ci/github-script
# Use the GitHub App to make sure the reaction happens with the same user who will later merge.
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: github.event_name != 'pull_request' && vars.NIXPKGS_CI_CLIENT_ID
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
permission-pull-requests: write
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token || github.token }}
retries: 3
script: |
const { handleMergeComment } = require('./ci/github-script/merge.js')
// PRs from forks don't have any PRs associated by default.
// Thus, we request the PR number with an API call *to* the fork's repo.
// Multiple pull requests can be open from the same head commit, either via
// different base branches or head branches.
const { head_repository, head_sha, repository } = context.payload.workflow_run
await Promise.all(
(await github.paginate(github.rest.repos.listPullRequestsAssociatedWithCommit, {
owner: head_repository.owner.login,
repo: head_repository.name,
commit_sha: head_sha
}))
.filter(pull_request => pull_request.base.repo.id == repository.id)
.map(async (pull_request) =>
Promise.all(
(await github.paginate(github.rest.pulls.listReviews, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pull_request.number
})).map(review => {
// The `check` workflow creates review comments which reviewers
// are encouraged to manually dismiss if they're not relevant.
// When a CI-generated review is dismissed, this job automatically minimizes
// it, preventing it from cluttering the PR.
if (review.user?.login == 'github-actions[bot]' && review.state == 'DISMISSED')
return github.graphql(`
mutation($node_id:ID!) {
minimizeComment(input: {
classifier: RESOLVED,
subjectId: $node_id
})
{ clientMutationId }
}`,
{ node_id: review.node_id }
)
// The `bot` workflow reacts to comments with @NixOS/nixpkgs-merge-bot references, but might only
// pick up a comment after up to 10 minutes. To give the user instant feedback, this job adds
// a reaction to these comments.
return handleMergeComment({
github,
body: review.body,
node_id: review.node_id,
reaction: 'EYES',
})
})
)
)
)

View File

@@ -1,17 +0,0 @@
name: Reviewed
on:
pull_request_review:
types: [submitted, dismissed]
permissions: {}
defaults:
run:
shell: bash
jobs:
trigger:
runs-on: ubuntu-slim
steps:
- run: echo This is a no-op only used as a trigger for workflow_run.

View File

@@ -1,80 +0,0 @@
name: Teams
on:
schedule:
# Every Tuesday at 19:42 (randomly chosen)
- cron: '42 19 * * 1'
workflow_dispatch:
permissions: {}
defaults:
run:
shell: bash
jobs:
sync:
if: github.event_name != 'schedule' || github.repository_owner == 'NixOS'
runs-on: ubuntu-slim
steps:
# Use a GitHub App to create the PR so that CI gets triggered and to
# request team member lists.
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
permission-administration: read
permission-contents: write
permission-members: read
permission-pull-requests: write
- name: Fetch source
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout: |
ci/github-script
maintainers/github-teams.json
- name: Install dependencies
run: npm install bottleneck@2.19.5
- name: Synchronise teams
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
require('./ci/github-script/get-teams.js')({
github,
context,
core,
outFile: "maintainers/github-teams.json"
})
- name: Get GitHub App User Git String
id: user
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
run: |
name="${APP_SLUG}[bot]"
userId=$(gh api "/users/$name" --jq .id)
email="$userId+$name@users.noreply.github.com"
echo "git-string=$name <$email>" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ steps.app-token.outputs.token }}
add-paths: maintainers/github-teams.json
author: ${{ steps.user.outputs.git-string }}
committer: ${{ steps.user.outputs.git-string }}
commit-message: "maintainers/github-teams.json: Automated sync"
branch: pr/github-team-sync
title: "maintainers/github-teams.json: Automated sync"
body: |
This is an automated PR to sync the GitHub teams with access to this repository to the `lib.teams` list.
This PR can be merged without taking any further action.

View File

@@ -1,123 +0,0 @@
name: Test
on:
pull_request:
concurrency:
group: test-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions: {}
jobs:
prepare:
runs-on: ubuntu-slim
outputs:
merge-group: ${{ steps.files.outputs.merge-group }}
mergedSha: ${{ steps.prepare.outputs.mergedSha }}
pr: ${{ steps.files.outputs.pr }}
push: ${{ steps.files.outputs.push }}
targetSha: ${{ steps.prepare.outputs.targetSha }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
sparse-checkout-cone-mode: true # default, for clarity
sparse-checkout: |
ci/github-script
- id: prepare
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
retries: 10
# The default for this includes code 422, which happens regularly for us when comparing commits:
# 422 - Server Error: Sorry, this diff is taking too long to generate.
# Listing all other values from here to effectively remove 422:
# https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/index.ts#L14
retry-exempt-status-codes: 400,401,403,404
script: |
require('./ci/github-script/prepare.js')({
github,
context,
core,
// Review comments will be posted by the main PR workflow on the pull_request_target event.
dry: true,
})
- name: Determine changed files
id: files
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const files = (await github.paginate(github.rest.pulls.listFiles, {
...context.repo,
pull_number: context.payload.pull_request.number,
per_page: 100,
})).map(file => file.filename)
if (files.some(file => [
'.github/workflows/build.yml',
'.github/workflows/check.yml',
'.github/workflows/eval.yml',
'.github/workflows/lint.yml',
'.github/workflows/merge-group.yml',
'.github/workflows/test.yml',
'ci/github-script/supportedSystems.js',
'ci/pinned.json',
'ci/supportedBranches.js',
].includes(file))) core.setOutput('merge-group', true)
if (files.some(file => [
'.github/actions/checkout/action.yml',
'.github/workflows/bot.yml',
'.github/workflows/build.yml',
'.github/workflows/check.yml',
'.github/workflows/eval.yml',
'.github/workflows/lint.yml',
'.github/workflows/pull-request-target.yml',
'.github/workflows/test.yml',
'ci/github-script/bot.js',
'ci/github-script/check-target-branch.js',
'ci/github-script/commits.js',
'ci/github-script/get-pr-commit-details.js',
'ci/github-script/lint-commits.js',
'ci/github-script/merge.js',
'ci/github-script/prepare.js',
'ci/github-script/reviewers.js',
'ci/github-script/reviews.js',
'ci/github-script/supportedSystems.js',
'ci/github-script/withRateLimit.js',
'ci/pinned.json',
'ci/supportedBranches.js',
].includes(file))) core.setOutput('pr', true)
merge-group:
if: needs.prepare.outputs.merge-group
name: Merge Group
needs: [prepare]
uses: ./.github/workflows/merge-group.yml
# Those are actually only used on the merge_group event, but will throw an error if not set.
permissions:
pull-requests: write # unused on pull_request, required by merge-group workflow
statuses: write # unused on pull_request, required by merge-group workflow
with:
artifact-prefix: mg-
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
targetSha: ${{ needs.prepare.outputs.targetSha }}
pr:
if: needs.prepare.outputs.pr
name: PR
needs: [prepare]
uses: ./.github/workflows/pull-request-target.yml
# Those are actually only used on the pull_request_target event, but will throw an error if not set.
permissions:
issues: write # unused on pull_request, required by bot workflow
pull-requests: write # unused on pull_request, required by PR workflow
statuses: write # unused on pull_request, required by PR workflow
secrets:
NIXPKGS_CI_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
NIXPKGS_BRANCH_CHECK_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_BRANCH_CHECK_APP_PRIVATE_KEY }}
NIXPKGS_COMMIT_CHECK_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_COMMIT_CHECK_APP_PRIVATE_KEY }}
NIXPKGS_MANUAL_EDIT_CHECK_APP_PRIVATE_KEY: ${{ secrets.NIXPKGS_MANUAL_EDIT_CHECK_APP_PRIVATE_KEY }}
with:
artifact-prefix: pr-

14
.github/zizmor.yml vendored
View File

@@ -1,14 +0,0 @@
# This file defines the ignore rules for zizmor.
#
# For rules that contain a high number of false positives, prefer listing them here
# instead of adding ignore comments. Note that zizmor cannot ignore by line-within-a-string, so
# there are some ignore items that encompass multiple problems within one `run` block. An issue
# tracking this is at https://github.com/woodruffw/zizmor/issues/648.
#
# For more info, see the documentation: https://woodruffw.github.io/zizmor/usage/#ignoring-results
rules:
dangerous-triggers:
disable: true
secrets-outside-env:
disable: true

View File

@@ -14,32 +14,18 @@ Janne Heß <janne@hess.ooo> <dasJ@users.noreply.github.com>
jopejoe1 <nixpkgs@missing.ninja>
jopejoe1 <nixpkgs@missing.ninja> <johannes@joens.email>
jopejoe1 <nixpkgs@missing.ninja> <34899572+jopejoe1@users.noreply.github.com>
jopejoe1 <nixpkgs@missing.ninja> <jopejoe1@missing.ninja>
jopejoe1 <nixpkgs@missing.ninja> <jopejoe1>
Jörg Thalheim <joerg@thalheim.io> <Mic92@users.noreply.github.com>
Lin Jian <me@linj.tech> <linj.dev@outlook.com>
Lin Jian <me@linj.tech> <75130626+jian-lin@users.noreply.github.com>
Martin Weinelt <hexa@darmstadt.ccc.de> <mweinelt@users.noreply.github.com>
Martin Häcker <spamfaenger@gmx.de> <spamfaenger@gmx.de>
moni <lythe1107@gmail.com> <lythe1107@icloud.com>
Noah Biewesch <dev@noahbiewesch.com> <90870942+trueNAHO@users.noreply.github.com>
quantenzitrone <nix@dev.quantenzitrone.eu>
quantenzitrone <nix@dev.quantenzitrone.eu> <74491719+Quantenzitrone@users.noreply.github.com>
quantenzitrone <nix@dev.quantenzitrone.eu> <74491719+quantenzitrone@users.noreply.github.com>
quantenzitrone <nix@dev.quantenzitrone.eu> <general@dev.quantenzitrone.eu>
quantenzitrone <nix@dev.quantenzitrone.eu> <quantenzitrone@protonmail.com>
R. RyanTM <ryantm-bot@ryantm.com>
Robert Hensing <robert@roberthensing.nl> <roberth@users.noreply.github.com>
Sandro Jäckel <sandro.jaeckel@gmail.com>
Sandro Jäckel <sandro.jaeckel@gmail.com> <sandro.jaeckel@sap.com>
superherointj <5861043+superherointj@users.noreply.github.com>
Tomodachi94 <tomodachi94@protonmail.com> Tomo <68489118+Tomodachi94@users.noreply.github.com>
toastal <toastal@posteo.net>
toastal <toastal@posteo.net> <561087+toastal@users.noreply.github.com>
toastal <toastal@posteo.net> <toastal@protonmail.com>
Vladimír Čunát <v@cunat.cz> <vcunat@gmail.com>
Vladimír Čunát <v@cunat.cz> <vladimir.cunat@nic.cz>
Yifei Sun <ysun@hey.com>
Yifei Sun <ysun@hey.com> StepBroBD <ysun@hey.com>
Yifei Sun <ysun@hey.com> StepBroBD <Hi@StepBroBD.com>
Yifei Sun <ysun@hey.com> <ysun+git@stepbrobd.com>

21
.mergify.yml Normal file
View File

@@ -0,0 +1,21 @@
queue_rules:
# This rule is for https://docs.mergify.com/commands/queue/
# and can be triggered with: @mergifyio queue
- name: default
merge_conditions:
# all github action checks in this list are required to merge a pull request
- check-success=Attributes
- check-success=Check
- check-success=Outpaths (aarch64-darwin)
- check-success=Outpaths (aarch64-linux)
- check-success=Outpaths (x86_64-darwin)
- check-success=Outpaths (x86_64-linux)
- check-success=Process
- check-success=Request
- check-success=editorconfig-check
- check-success=label-pr
- check-success=nix-files-parseable-check
- check-success=nixfmt-check
- check-success=nixpkgs-vet
# queue up to 5 pull requests at a time
batch_size: 5

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
Copyright (c) 2003-2026 Eelco Dolstra and the Nixpkgs/NixOS contributors
Copyright (c) 2003-2025 Eelco Dolstra and the Nixpkgs/NixOS contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -1,9 +1,9 @@
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://brand.nixos.org/logos/nixos-logo-default-gradient-black-regular-horizontal-minimal.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://brand.nixos.org/logos/nixos-logo-default-gradient-white-regular-horizontal-minimal.svg">
<img src="https://brand.nixos.org/logos/nixos-logo-default-gradient-black-regular-horizontal-minimal.svg" width="500px" alt="NixOS logo">
<source media="(prefers-color-scheme: light)" srcset="https://nixos.org/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="NixOS logo">
</picture>
</a>
</p>
@@ -13,8 +13,10 @@
<a href="https://opencollective.com/nixos"><img src="https://opencollective.com/nixos/tiers/supporter/badge.svg?label=supporters&color=brightgreen" alt="Open Collective supporters" /></a>
</p>
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over 140,000 software packages that can be installed with the [Nix](https://nixos.org/nix/) package manager.
It also implements [NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over
120,000 software packages that can be installed with the
[Nix](https://nixos.org/nix/) package manager. It also implements
[NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
# Manuals
@@ -26,13 +28,15 @@ It also implements [NixOS](https://nixos.org/nixos/), a purely-functional Linux
* [Discourse Forum](https://discourse.nixos.org/)
* [Matrix Chat](https://matrix.to/#/#space:nixos.org)
* [NixOS Weekly](https://weekly.nixos.org/)
* [Official wiki](https://wiki.nixos.org/)
* [Community-maintained list of ways to get in touch](https://wiki.nixos.org/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
# Other Project Repositories
The sources of all official Nix-related projects are in the [NixOS organization on GitHub](https://github.com/NixOS/).
Here are some of the main ones:
The sources of all official Nix-related projects are in the [NixOS
organization on GitHub](https://github.com/NixOS/). Here are some of
the main ones:
* [Nix](https://github.com/NixOS/nix) - the purely functional package manager
* [NixOps](https://github.com/NixOS/nixops) - the tool to remotely deploy NixOS machines
@@ -40,37 +44,48 @@ Here are some of the main ones:
* [Nix RFCs](https://github.com/NixOS/rfcs) - the formal process for making substantial changes to the community
* [NixOS homepage](https://github.com/NixOS/nixos-homepage) - the [NixOS.org](https://nixos.org) website
* [hydra](https://github.com/NixOS/hydra) - our continuous integration system
* [NixOS Branding](https://github.com/NixOS/branding) - NixOS branding
* [NixOS Artwork](https://github.com/NixOS/nixos-artwork) - NixOS artwork
# Continuous Integration and Distribution
Nixpkgs and NixOS are built and tested by our continuous integration system, [Hydra](https://hydra.nixos.org/).
Nixpkgs and NixOS are built and tested by our continuous integration
system, [Hydra](https://hydra.nixos.org/).
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for the NixOS 26.05 release](https://hydra.nixos.org/jobset/nixos/release-26.05)
* [Continuous package builds for the NixOS 24.11 release](https://hydra.nixos.org/jobset/nixos/release-24.11)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for the NixOS 26.05 release](https://hydra.nixos.org/job/nixos/release-26.05/tested#tabs-constituents)
* [Tests for the NixOS 24.11 release](https://hydra.nixos.org/job/nixos/release-24.11/tested#tabs-constituents)
Artifacts successfully built with Hydra are published to cache at https://cache.nixos.org/.
When successful build and test criteria are met, the Nixpkgs expressions are distributed via [Nix channels](https://nix.dev/manual/nix/stable/command-ref/nix-channel.html).
Artifacts successfully built with Hydra are published to cache at
https://cache.nixos.org/. When successful build and test criteria are
met, the Nixpkgs expressions are distributed via [Nix
channels](https://nix.dev/manual/nix/stable/command-ref/nix-channel.html).
# Contributing
Nixpkgs is among the most active projects on GitHub.
While thousands of open issues and pull requests might seem like a lot at first, it helps to consider it in the context of the scope of the project.
Nixpkgs describes how to build tens of thousands of pieces of software and implements a Linux distribution.
The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse) page gives a sense of the project activity.
Nixpkgs is among the most active projects on GitHub. While thousands
of open issues and pull requests might seem a lot at first, it helps
consider it in the context of the scope of the project. Nixpkgs
describes how to build tens of thousands of pieces of software and implements a
Linux distribution. The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse)
page gives a sense of the project activity.
Community contributions are always welcome through GitHub Issues and Pull Requests.
Community contributions are always welcome through GitHub Issues and
Pull Requests.
For more information about contributing to the project, please visit the [contributing page](CONTRIBUTING.md).
For more information about contributing to the project, please visit
the [contributing page](CONTRIBUTING.md).
# Donations
The infrastructure for NixOS and related projects is maintained by a nonprofit organization, the [NixOS Foundation](https://nixos.org/nixos/foundation.html).
To ensure the continuity and expansion of the NixOS infrastructure, we are looking for donations to our organization.
The infrastructure for NixOS and related projects is maintained by a
nonprofit organization, the [NixOS
Foundation](https://nixos.org/nixos/foundation.html). To ensure the
continuity and expansion of the NixOS infrastructure, we are looking
for donations to our organization.
You can donate to the NixOS Foundation through [SEPA bank transfers](https://nixos.org/donate.html) or by using Open Collective:
You can donate to the NixOS foundation through [SEPA bank
transfers](https://nixos.org/donate.html) or by using Open Collective:
<a href="https://opencollective.com/nixos#support"><img src="https://opencollective.com/nixos/tiers/supporter.svg?width=890" /></a>
@@ -78,7 +93,9 @@ You can donate to the NixOS Foundation through [SEPA bank transfers](https://nix
Nixpkgs is licensed under the [MIT License](COPYING).
> [!Note]
> MIT license does not apply to the packages built by Nixpkgs, merely to the files in this repository (the Nix expressions, build scripts, NixOS modules, etc.).
It also might not apply to patches included in Nixpkgs, which may be derivative works of the packages to which they apply.
The aforementioned artifacts are all covered by the licenses of the respective packages.
Note: MIT license does not apply to the packages built by Nixpkgs,
merely to the files in this repository (the Nix expressions, build
scripts, NixOS modules, etc.). It also might not apply to patches
included in Nixpkgs, which may be derivative works of the packages to
which they apply. The aforementioned artifacts are all covered by the
licenses of the respective packages.

209
ci/OWNERS
View File

@@ -15,32 +15,26 @@
# CI
/.github/*_TEMPLATE* @SigmaSquadron
/.github/actions @NixOS/nixpkgs-ci
/.github/workflows @NixOS/nixpkgs-ci
/ci @NixOS/nixpkgs-ci
/.github/workflows @NixOS/Security @Mic92 @zowoq @infinisil @azuwis @wolfgangwalther
/.github/workflows/check-format.yml @infinisil @wolfgangwalther
/.github/workflows/codeowners-v2.yml @infinisil @wolfgangwalther
/.github/workflows/nixpkgs-vet.yml @infinisil @philiptaron @wolfgangwalther
/ci @infinisil @philiptaron @NixOS/Security @wolfgangwalther
/ci/OWNERS @infinisil @philiptaron
# Development support
/.editorconfig @Mic92
/.editorconfig @Mic92 @zowoq
/shell.nix @infinisil @NixOS/Security
# Libraries
/lib @infinisil @hsjobeki
/lib/generators.nix @infinisil @hsjobeki
/lib/cli.nix @infinisil @hsjobeki
/lib/debug.nix @infinisil @hsjobeki
/lib/asserts.nix @infinisil @hsjobeki
/lib/systems @alyssais @ericson2314 @NixOS/stdenv
/lib/generators.nix @infinisil @hsjobeki @Profpatsch
/lib/cli.nix @infinisil @hsjobeki @Profpatsch
/lib/debug.nix @infinisil @hsjobeki @Profpatsch
/lib/asserts.nix @infinisil @hsjobeki @Profpatsch
/lib/path/* @infinisil @hsjobeki
/lib/fileset @infinisil @hsjobeki
/maintainers/github-teams.json @infinisil
/maintainers/computed-team-list.nix @infinisil
## Standard environmentrelated libraries
/lib/customisation.nix @alyssais @NixOS/stdenv
/lib/derivations.nix @NixOS/stdenv
/lib/fetchers.nix @alyssais @NixOS/stdenv
/lib/meta.nix @alyssais @NixOS/stdenv
/lib/source-types.nix @alyssais @NixOS/stdenv
/lib/systems @alyssais @NixOS/stdenv
## Libraries / Module system
/lib/modules.nix @infinisil @roberth @hsjobeki
/lib/types.nix @infinisil @roberth @hsjobeki
@@ -56,33 +50,22 @@
/pkgs/top-level/splice.nix @Ericson2314
/pkgs/top-level/release-cross.nix @Ericson2314
/pkgs/top-level/by-name-overlay.nix @infinisil @philiptaron
/pkgs/top-level/config.nix @jopejoe1
/pkgs/top-level/make-tarball.nix @jopejoe1
/pkgs/top-level/packages-config.nix @jopejoe1
/pkgs/top-level/packages-info.nix @jopejoe1
/pkgs/top-level/release-lib.nix @jopejoe1
/pkgs/top-level/release.nix @jopejoe1
/pkgs/stdenv @philiptaron @NixOS/stdenv
/pkgs/stdenv/generic @Ericson2314 @NixOS/stdenv
/pkgs/stdenv/generic/problems.nix @infinisil
/pkgs/test/problems @infinisil
/pkgs/stdenv/generic/check-meta.nix @infinisil @Ericson2314 @adisbladis @NixOS/stdenv
/pkgs/stdenv/generic/meta-types.nix @infinisil @adisbladis @NixOS/stdenv
/pkgs/stdenv/generic/check-meta.nix @Ericson2314 @NixOS/stdenv
/pkgs/stdenv/cross @Ericson2314 @NixOS/stdenv
/pkgs/build-support @philiptaron
/pkgs/build-support/cc-wrapper @Ericson2314
/pkgs/build-support/bintools-wrapper @Ericson2314
/pkgs/build-support/setup-hooks @Ericson2314
/pkgs/build-support/setup-hooks/arrayUtilities @ConnorBaker
/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
/pkgs/by-name/au/auto-patchelf @layus
## Format generators/serializers
/pkgs/pkgs-lib @Stunkymonkey @h7x4
/pkgs/pkgs-lib/formats/json2x @Stunkymonkey @h7x4 @figsoda
# Nixpkgs build-support
/pkgs/build-support/writers @lassulus
/pkgs/build-support/writers @lassulus @Profpatsch
# Nixpkgs make-disk-image
/doc/build-helpers/images/makediskimage.section.md @raitobezarius
@@ -92,9 +75,8 @@
# @raitobezarius is not "code owner", but is listed here to be notified of changes
# pertaining to the Nix package manager.
# i.e. no authority over those files.
# Otherwise keep in-sync with lib.teams.nix.
pkgs/tools/package-management/nix/ @Artturin @Ericson2314 @lovesegfault @Mic92 @philiptaron @roberth @tomberek @xokdvium @raitobezarius
nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lovesegfault @Mic92 @philiptaron @roberth @tomberek @xokdvium @raitobezarius
pkgs/tools/package-management/nix/ @NixOS/nix-team @raitobezarius
nixos/modules/installer/tools/nix-fallback-paths.nix @NixOS/nix-team @raitobezarius
# Nixpkgs documentation
/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
@@ -125,17 +107,15 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo
/nixos/modules/system/activation/bootspec.cue @grahamc @cole-h @raitobezarius
# NixOS Render Docs
/pkgs/by-name/ni/nixos-render-docs @GetPsyched @hsjobeki
/doc/redirects.json @GetPsyched
/nixos/doc/manual/redirects.json @GetPsyched
/pkgs/by-name/ni/nixos-render-docs @fricklerhandwerk @GetPsyched @hsjobeki
/doc/redirects.json @fricklerhandwerk @GetPsyched @hsjobeki
/nixos/doc/manual/redirects.json @fricklerhandwerk @GetPsyched @hsjobeki
# NixOS integration test driver
/nixos/lib/test-driver @tfc
/nixos/lib/testing @tfc
# NixOS QEMU virtualisation
/nixos/modules/virtualisation/qemu-vm.nix @raitobezarius
/nixos/modules/services/backup/libvirtd-autosnapshot.nix @6543
/nixos/modules/virtualisation/qemu-vm.nix @raitobezarius
# ACME
/nixos/modules/security/acme @NixOS/acme
@@ -150,8 +130,7 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo
/nixos/modules/system/boot/loader/systemd-boot @JulienMalka
# Limine
/nixos/modules/system/boot/loader/limine @lzcunt @programmerlexi @johnrtitor
/nixos/tests/limine @johnrtitor
/nixos/modules/system/boot/loader/limine @lzcunt @phip1611 @programmerlexi
# Images and installer media
/nixos/modules/profiles/installation-device.nix @ElvishJerricco
@@ -184,51 +163,42 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo
## common-updater-scripts
/pkgs/common-updater/scripts/update-source-version @jtojnar
# Android tools, libraries, and environments
/pkgs/development/android* @NixOS/android
/pkgs/development/mobile/android* @NixOS/android
/pkgs/applications/editors/android-studio* @NixOS/android
/doc/languages-frameworks/android* @NixOS/android
/pkgs/by-name/an/android* @NixOS/android
# Python-related code and docs
/doc/languages-frameworks/python.section.md @mweinelt @natsukium
/maintainers/scripts/update-python-libraries @mweinelt @natsukium
/pkgs/by-name/up/update-python-libraries @mweinelt @natsukium
/pkgs/development/interpreters/python @mweinelt @natsukium
/pkgs/top-level/python-packages.nix @natsukium
/pkgs/top-level/release-python.nix @natsukium
# CUDA
/pkgs/top-level/cuda-packages.nix @NixOS/cuda-maintainers
/pkgs/top-level/release-cuda.nix @NixOS/cuda-maintainers
/pkgs/development/cuda-modules @NixOS/cuda-maintainers
# ROCm
/pkgs/development/rocm-modules @NixOS/rocm
# Haskell
/doc/languages-frameworks/haskell.section.md @sternenseemann @maralorn @wolfgangwalther
/maintainers/scripts/haskell @sternenseemann @maralorn @wolfgangwalther
/pkgs/development/compilers/ghc @sternenseemann @maralorn @wolfgangwalther
/pkgs/development/compilers/ghc/9.6.6-debian-binary.nix @sternenseemann @maralorn @wolfgangwalther @OPNA2608
/pkgs/development/haskell-modules @sternenseemann @maralorn @wolfgangwalther
/pkgs/test/haskell @sternenseemann @maralorn @wolfgangwalther
/pkgs/top-level/release-haskell.nix @sternenseemann @maralorn @wolfgangwalther
/pkgs/top-level/haskell-packages.nix @sternenseemann @maralorn @wolfgangwalther
# Perl
/pkgs/development/interpreters/perl @stigtsp @marcusramberg
/pkgs/top-level/perl-packages.nix @stigtsp @marcusramberg
/pkgs/development/perl-modules @stigtsp @marcusramberg
/pkgs/development/interpreters/perl @stigtsp @zakame @marcusramberg
/pkgs/top-level/perl-packages.nix @stigtsp @zakame @marcusramberg
/pkgs/development/perl-modules @stigtsp @zakame @marcusramberg
# R
/pkgs/applications/science/math/R @jbedo
/pkgs/development/r-modules @jbedo
# Rust
/pkgs/development/compilers/rust @alyssais @Mic92 @winterqt
/pkgs/build-support/rust @winterqt
/pkgs/development/compilers/rust @alyssais @Mic92 @zowoq @winterqt @figsoda
/pkgs/build-support/rust @zowoq @winterqt @figsoda
/pkgs/build-support/rust/fetch-cargo-vendor* @TomaSajt
/doc/languages-frameworks/rust.section.md @winterqt
/doc/languages-frameworks/rust.section.md @zowoq @winterqt @figsoda
# Tcl
/pkgs/development/interpreters/tcl @fgaz
@@ -239,9 +209,8 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo
# C compilers
/pkgs/development/compilers/gcc
/pkgs/development/compilers/llvm @NixOS/llvm
/pkgs/development/compilers/llvm @alyssais @RossComputerGuy @NixOS/llvm
/pkgs/development/compilers/emscripten @raitobezarius
/doc/toolchains/llvm.chapter.md @NixOS/llvm
/doc/languages-frameworks/emscripten.section.md @raitobezarius
# Audio
@@ -251,10 +220,7 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @Artturin @Ericson2314 @lo
/nixos/tests/snapcast.nix @mweinelt
# Browsers
/pkgs/build-support/build-mozilla-mach @mweinelt
/pkgs/applications/networking/browsers/firefox/update.nix
/pkgs/applications/networking/browsers/firefox/packages/firefox.nix @mweinelt
/pkgs/applications/networking/browsers/firefox/packages/firefox-esr-*.nix @mweinelt
/pkgs/applications/networking/browsers/firefox @mweinelt
/pkgs/applications/networking/browsers/chromium @emilylange @networkException
/nixos/tests/chromium.nix @emilylange @networkException
@@ -271,21 +237,23 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/pkgs/top-level/java-packages.nix @NixOS/java
# Jetbrains
/pkgs/applications/editors/jetbrains @leona-ya @theCapypara
/pkgs/applications/editors/jetbrains @edwtjo @leona-ya @theCapypara
# Licenses
/lib/licenses @alyssais @emilazy @jopejoe1
/lib/licenses.nix @alyssais
# Qt
/pkgs/development/libraries/qt-5 @K900 @NickCao @SuperSandro2000
/pkgs/development/libraries/qt-6 @K900 @NickCao @SuperSandro2000
/pkgs/development/libraries/qt-5 @K900 @NickCao @SuperSandro2000 @ttuegel
/pkgs/development/libraries/qt-6 @K900 @NickCao @SuperSandro2000 @ttuegel
# KDE Frameworks 5
/pkgs/development/libraries/kde-frameworks @K900 @NickCao @SuperSandro2000
# KDE / Plasma 5
/pkgs/applications/kde @K900 @NickCao @SuperSandro2000 @ttuegel
/pkgs/desktops/plasma-5 @K900 @NickCao @SuperSandro2000 @ttuegel
/pkgs/development/libraries/kde-frameworks @K900 @NickCao @SuperSandro2000 @ttuegel
# KDE / Plasma 6
/pkgs/kde @K900 @NickCao @SuperSandro2000
/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000
/pkgs/kde @K900 @NickCao @SuperSandro2000 @ttuegel
/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000 @ttuegel
# PostgreSQL and related stuff
/pkgs/by-name/po/postgresqlTestHook @NixOS/postgres
@@ -300,6 +268,13 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/nixos/modules/services/databases/mysql.nix @6543
/nixos/modules/services/backup/mysql-backup.nix @6543
# Hardened profile & related modules
/nixos/modules/profiles/hardened.nix @joachifm
/nixos/modules/security/lock-kernel-modules.nix @joachifm
/nixos/modules/security/misc.nix @joachifm
/nixos/tests/hardened.nix @joachifm
/pkgs/os-specific/linux/kernel/hardened/ @fabianhjr @joachifm
# Home Automation
/nixos/modules/services/home-automation/home-assistant.nix @mweinelt
/nixos/modules/services/home-automation/zigbee2mqtt.nix @mweinelt
@@ -308,16 +283,6 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/pkgs/servers/home-assistant @mweinelt
/pkgs/by-name/es/esphome @mweinelt
# Linux kernel
/doc/packages/linux.section.md @NixOS/linux-kernel
/lib/kernel.nix @NixOS/linux-kernel
/nixos/doc/manual/configuration/linux-kernel.chapter.md @NixOS/linux-kernel
/nixos/modules/system/boot/kernel.nix @NixOS/linux-kernel
/nixos/tests/kernel-generic/ @NixOS/linux-kernel
/pkgs/build-support/kernel/ @NixOS/linux-kernel
/pkgs/os-specific/linux/kernel/ @NixOS/linux-kernel
/pkgs/top-level/linux-kernels.nix @NixOS/linux-kernel
# Network Time Daemons
/pkgs/by-name/ch/chrony @thoughtpolice
/pkgs/by-name/nt/ntp @thoughtpolice
@@ -344,20 +309,16 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/pkgs/build-support/dlang @jtbx @TomaSajt
# Dhall
/pkgs/development/dhall-modules @Gabriella439
/pkgs/development/interpreters/dhall @Gabriella439
# Agda
/pkgs/build-support/agda @NixOS/agda
/pkgs/top-level/agda-packages.nix @NixOS/agda
/pkgs/development/libraries/agda @NixOS/agda
/doc/languages-frameworks/agda.section.md @NixOS/agda
/nixos/tests/agda @NixOS/agda
/pkgs/development/dhall-modules @Gabriella439 @Profpatsch
/pkgs/development/interpreters/dhall @Gabriella439 @Profpatsch
# Idris
/pkgs/development/idris-modules @Infinisil
/pkgs/development/compilers/idris2 @mattpolzin
# Bazel
/pkgs/development/tools/build-managers/bazel @Profpatsch
# NixOS modules for e-mail and dns services
/nixos/modules/services/mail/mailman.nix @peti
/nixos/modules/services/mail/postfix.nix @peti
@@ -382,33 +343,31 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
# VimPlugins
/pkgs/applications/editors/vim/plugins @NixOS/neovim
## nvim-treesitter
/pkgs/applications/editors/vim/plugins/nvim-treesitter/overrides.nix @NixOS/neovim @figsoda
/pkgs/applications/editors/vim/plugins/utils/nvim-treesitter @NixOS/neovim @figsoda
# VsCode Extensions
/pkgs/applications/editors/vscode/extensions
# PHP interpreter, packages, extensions, tests and documentation
/doc/languages-frameworks/php.section.md @aanderse @ma27 @talyz
/nixos/tests/php @aanderse @ma27 @talyz
/pkgs/build-support/php/build-pecl.nix @aanderse @ma27 @talyz
/pkgs/development/interpreters/php @jtojnar @aanderse @ma27 @talyz
/pkgs/development/php-packages @aanderse @ma27 @talyz
/pkgs/top-level/php-packages.nix @jtojnar @aanderse @ma27 @talyz
/doc/languages-frameworks/php.section.md @aanderse @drupol @globin @ma27 @talyz
/nixos/tests/php @aanderse @drupol @globin @ma27 @talyz
/pkgs/build-support/php/build-pecl.nix @aanderse @drupol @globin @ma27 @talyz
/pkgs/build-support/php @drupol
/pkgs/development/interpreters/php @jtojnar @aanderse @drupol @globin @ma27 @talyz
/pkgs/development/php-packages @aanderse @drupol @globin @ma27 @talyz
/pkgs/top-level/php-packages.nix @jtojnar @aanderse @drupol @globin @ma27 @talyz
# Docker tools
/pkgs/build-support/docker @roberth @jhol
/nixos/tests/docker-tools* @roberth @jhol
/doc/build-helpers/images/dockertools.section.md @roberth @jhol
/pkgs/build-support/docker @roberth
/nixos/tests/docker-tools* @roberth
/doc/build-helpers/images/dockertools.section.md @roberth
# Blockchains
/pkgs/applications/blockchains @mmahut @RaghavSood
# Go
/doc/languages-frameworks/go.section.md @kalbasit @katexochen @Mic92
/pkgs/build-support/go @kalbasit @katexochen @Mic92
/pkgs/development/compilers/go @kalbasit @katexochen @Mic92
/doc/languages-frameworks/go.section.md @kalbasit @katexochen @Mic92 @zowoq
/pkgs/build-support/go @kalbasit @katexochen @Mic92 @zowoq
/pkgs/development/compilers/go @kalbasit @katexochen @Mic92 @zowoq
# GNOME
/pkgs/desktops/gnome @jtojnar
@@ -429,9 +388,8 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/pkgs/applications/networking/cluster/terraform-providers @zowoq
# Forgejo
nixos/modules/services/misc/forgejo.* @adamcstephens @bendlas @christoph-heiss @emilylange @nycodeghg @pyrox0 @tebriel
pkgs/by-name/fo/forgejo/ @adamcstephens @bendlas @christoph-heiss @emilylange @nycodeghg @pyrox0 @tebriel
nixos/tests/forgejo.nix @adamcstephens @bendlas @christoph-heiss @emilylange @nycodeghg @pyrox0 @tebriel
nixos/modules/services/misc/forgejo.nix @adamcstephens @bendlas @emilylange
pkgs/by-name/fo/forgejo/ @adamcstephens @bendlas @emilylange
# Dotnet
/pkgs/build-support/dotnet @corngood
@@ -441,11 +399,9 @@ nixos/tests/forgejo.nix @adamcstephens @bendlas @christoph-heiss @
# Node.js
/pkgs/build-support/node/build-npm-package @winterqt
/pkgs/build-support/node/prefetch-npm-deps @winterqt
/pkgs/build-support/node/fetch-npm-deps @winterqt
/doc/languages-frameworks/javascript.section.md @winterqt
/pkgs/development/tools/pnpm @Scrumplex @gepbird
/pkgs/build-support/node/fetch-pnpm-deps @Scrumplex @gepbird
/pkgs/test/pnpm @Scrumplex @gepbird
# OCaml
/pkgs/build-support/ocaml @ulrikstrid
@@ -458,8 +414,8 @@ nixos/tests/forgejo.nix @adamcstephens @bendlas @christoph-heiss @
/pkgs/os-specific/linux/zfs @adamcstephens @amarshall
# Zig
/pkgs/development/compilers/zig @RossComputerGuy
/doc/hooks/zig.section.md @RossComputerGuy
/pkgs/development/compilers/zig @figsoda @RossComputerGuy
/doc/hooks/zig.section.md @figsoda @RossComputerGuy
# Buildbot
nixos/modules/services/continuous-integration/buildbot @Mic92 @zowoq
@@ -487,7 +443,7 @@ pkgs/by-name/lx/lxc* @adamcstephens
/pkgs/desktops/expidus @RossComputerGuy
# GNU Tar & Zip
/pkgs/by-name/gn/gnutar @RossComputerGuy
/pkgs/tools/archivers/gnutar @RossComputerGuy
/pkgs/by-name/zi/zip @RossComputerGuy
# SELinux
@@ -502,7 +458,7 @@ pkgs/by-name/lx/lxc* @adamcstephens
# Darwin
/pkgs/by-name/ap/apple-sdk @NixOS/darwin-core
/pkgs/os-specific/darwin @NixOS/darwin-core
/pkgs/os-specific/darwin/apple-source-releases @NixOS/darwin-core
/pkgs/stdenv/darwin @NixOS/darwin-core
# BEAM
@@ -511,28 +467,11 @@ pkgs/development/interpreters/erlang/ @NixOS/beam
pkgs/development/interpreters/elixir/ @NixOS/beam
pkgs/development/interpreters/lfe/ @NixOS/beam
# Authelia
pkgs/by-name/au/authelia/ @06kellyjac @nicomem
# OctoDNS
pkgs/by-name/oc/octodns/ @anthonyroussel
# Teleport
/pkgs/build-support/teleport @arianvp @justinas @sigma @tomberek @techknowlogick @JuliusFreudenberger
pkgs/by-name/te/teleport* @arianvp @justinas @sigma @tomberek @techknowlogick @JuliusFreudenberger
pkgs/by-name/te/teleport* @arianvp @justinas @sigma @tomberek @freezeboy @techknowlogick @JuliusFreudenberger
# Warp-terminal
pkgs/by-name/wa/warp-terminal/ @emilytrau @imadnyc @FlameFlag @johnrtitor
# Nim
/doc/languages-frameworks/nim.section.md @NixOS/nim
/pkgs/build-support/build-nim-package.nix @NixOS/nim
/pkgs/build-support/build-nim-sbom.nix @NixOS/nim
/pkgs/top-level/nim-overrides.nix @NixOS/nim
# Radicle
/pkgs/build-support/fetchradicle/ @NixOS/radicle
/pkgs/build-support/fetchradiclepatch/ @NixOS/radicle
# Zellij plugins
/pkgs/by-name/ze/zellij/plugins/ @PerchunPak
pkgs/by-name/wa/warp-terminal/ @emilytrau @imadnyc @donteatoreo @johnrtitor

View File

@@ -6,101 +6,80 @@ This is in contrast with [`maintainers/scripts`](../maintainers/scripts) which i
## Pinned Nixpkgs
CI may need certain packages from Nixpkgs.
In order to ensure that the needed packages are generally available without building, [`pinned.json`](./pinned.json) contains a pinned Nixpkgs version tested by Hydra.
In order to ensure that the needed packages are generally available without building,
[`pinned-nixpkgs.json`](./pinned-nixpkgs.json) contains a pinned Nixpkgs version tested by Hydra.
Run [`update-pinned.sh`](./update-pinned.sh) to update it.
## GitHub specific code
Some of the code is specific to GitHub.
This code is currently spread out over multiple places and written in both Bash and JavaScript.
The goal is to eventually have all GitHub specific code in `ci/github-script` and written in JavaScript via `actions/github-script`.
A lot of code has already been migrated, but some Bash code still remains.
New CI features need to be introduced in JavaScript, not Bash.
## Nixpkgs merge bot
The Nixpkgs merge bot empowers package maintainers by enabling them to merge PRs related to their own packages.
It serves as a bridge for maintainers to quickly respond to user feedback, facilitating a more self-reliant approach.
Especially when considering there are roughly 20 maintainers for every committer, this bot is a game-changer.
Following [RFC 172], the merge bot was originally implemented as a [python webapp](https://github.com/NixOS/nixpkgs-merge-bot), which has now been integrated into [`ci/github-script/bot.js`](./github-script/bot.js) and [`ci/github-script/merge.js`](./github-script/merge.js).
### Using the merge bot
To merge a PR, maintainers can simply comment:
```gfm
@NixOS/nixpkgs-merge-bot merge
```
The next time the bot runs it will verify the below constraints, then (if satisfied) merge the PR.
The merge bot will reference [#306934](https://github.com/NixOS/nixpkgs/issues/306934) on PRs it merges successfully, [#305350](https://github.com/NixOS/nixpkgs/issues/305350) for unsuccessful attempts, or [#371492](https://github.com/NixOS/nixpkgs/issues/371492) if an error occurs.
These issues effectively list PRs the merge bot has interacted with.
### Merge bot constraints
To ensure security and a focused utility, the bot adheres to specific limitations:
- The PR targets one of the [development branches](#branch-classification).
- The PR only touches files of packages located under `pkgs/by-name/*`.
- The PR is either:
- approved by a [committer][@NixOS/nixpkgs-committers].
- backported via label.
- opened by a [committer][@NixOS/nixpkgs-committers].
- opened by [@r-ryantm](https://nix-community.github.io/nixpkgs-update/r-ryantm/).
- The user attempting to merge is a member of [@NixOS/nixpkgs-maintainers].
- The user attempting to merge is a maintainer of all packages touched by the PR.
### Approving merge bot changes
Changes to the bot can usually be approved by the [@NixOS/nixpkgs-ci] team, as with other CI changes.
However, additional acknowledgement from the [@NixOS/nixpkgs-core] team is required for changes to what the merge bot will merge, who is eligible to use the merge bot, or similar changes in scope.
Run [`update-pinned-nixpkgs.sh`](./update-pinned-nixpkgs.sh) to update it.
## `ci/nixpkgs-vet.sh BASE_BRANCH [REPOSITORY]`
Runs the [`nixpkgs-vet` tool](https://github.com/NixOS/nixpkgs-vet) on the HEAD commit, closely matching what CI does.
This can't do exactly the same as CI, because CI needs to rely on GitHub's server-side Git history to compute the mergeability of PRs before the check can be started.
Runs the [`nixpkgs-vet` tool](https://github.com/NixOS/nixpkgs-vet) on the HEAD commit, closely matching what CI does. This can't do exactly the same as CI, because CI needs to rely on GitHub's server-side Git history to compute the mergeability of PRs before the check can be started.
In turn, when contributors are running this tool locally, we don't want to have to push commits to test them, and we can also rely on the local Git history to do the mergeability check.
Arguments:
- `BASE_BRANCH`: The base branch to use, e.g. master or release-24.05
- `REPOSITORY`: The repository from which to fetch the base branch.
Defaults to <https://github.com/NixOS/nixpkgs.git>.
- `REPOSITORY`: The repository from which to fetch the base branch. Defaults to <https://github.com/NixOS/nixpkgs.git>.
# Branch classification
## `ci/nixpkgs-vet`
For the purposes of CI, branches in the NixOS/nixpkgs repository are classified as follows:
This directory contains scripts and files used and related to [`nixpkgs-vet`](https://github.com/NixOS/nixpkgs-vet/), which the CI uses to implement `pkgs/by-name` checks, along with many other Nixpkgs architecture rules.
See also the [CI GitHub Action](../.github/workflows/nixpkgs-vet.yml).
- **Channel** branches
- `nixos-` or `nixpkgs-` prefix
- Are only updated from `master` or `release-` branches, when hydra passes.
- Otherwise not worked on, Pull Requests are not allowed.
- Long-lived, no deletion, no force push.
- **Primary development** branches
- `release-` prefix and `master`
- Pull Requests required.
- Long-lived, no deletion, no force push.
- **Secondary development** branches
- `staging-` prefix and `haskell-updates`
- Pull Requests normally required, except when merging development branches into each other.
- Long-lived, no deletion, no force push.
- **Work-In-Progress** branches
- `backport-`, `revert-` and `wip-` prefixes.
- Deprecated: All other branches, not matched by channel/development.
- Pull Requests are optional.
- Short-lived, force push allowed, deleted after merge.
## `ci/nixpkgs-vet/update-pinned-tool.sh`
Some branches also have a version component, which is either `unstable` or `YY.MM`.
Updates the pinned [`nixpkgs-vet` tool](https://github.com/NixOS/nixpkgs-vet) in [`ci/nixpkgs-vet/pinned-version.txt`](./nixpkgs-vet/pinned-version.txt) to the latest [release](https://github.com/NixOS/nixpkgs-vet/releases).
`ci/supportedBranches.js` is a script imported by CI to classify the base and head branches of a Pull Request.
This classification will then be used to skip certain jobs.
This script can also be run locally to print basic test cases.
Each release contains a pre-built `x86_64-linux` version of the tool which is used by CI.
This script currently needs to be called manually when the CI tooling needs to be updated.
[@NixOS/nixpkgs-maintainers]: https://github.com/orgs/NixOS/teams/nixpkgs-maintainers
[@NixOS/nixpkgs-committers]: https://github.com/orgs/NixOS/teams/nixpkgs-committers
[@NixOS/nixpkgs-ci]: https://github.com/orgs/NixOS/teams/nixpkgs-ci
[@NixOS/nixpkgs-core]: https://github.com/orgs/NixOS/teams/nixpkgs-core
[RFC 172]: https://github.com/NixOS/rfcs/pull/172
Why not just build the tooling right from the PRs Nixpkgs version?
- Because it allows CI to check all PRs, even if they would break the CI tooling.
- Because it makes the CI check very fast, since no Nix builds need to be done, even for mass rebuilds.
- Because it improves security, since we don't have to build potentially untrusted code from PRs.
The tool only needs a very minimal Nix evaluation at runtime, which can work with [readonly-mode](https://nixos.org/manual/nix/stable/command-ref/opt-common.html#opt-readonly-mode) and [restrict-eval](https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-restrict-eval).
## `get-merge-commit.sh GITHUB_REPO PR_NUMBER`
Check whether a PR is mergeable and return the test merge commit as
[computed by GitHub](https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests) and its parent.
Arguments:
- `GITHUB_REPO`: The repository of the PR, e.g. `NixOS/nixpkgs`
- `PR_NUMBER`: The PR number, e.g. `1234`
Exit codes:
- 0: The PR can be merged, the hashes of the test merge commit and the target commit are returned on stdout
- 1: The PR cannot be merged because it's not open anymore
- 2: The PR cannot be merged because it has a merge conflict
- 3: The merge commit isn't being computed, GitHub is likely having internal issues, unknown if the PR is mergeable
### Usage
This script is implemented as a reusable GitHub Actions workflow, and can be used as follows:
```yaml
on: pull_request_target
# We need a token to query the API, but it doesn't need any special permissions
permissions: {}
jobs:
get-merge-commit:
# use the relative path of the get-merge-commit workflow yaml here
uses: ./.github/workflows/get-merge-commit.yml
build:
name: Build
runs-on: ubuntu-24.04
needs: get-merge-commit
steps:
- uses: actions/checkout@<VERSION>
# Add this to _all_ subsequent steps to skip them
if: needs.get-merge-commit.outputs.mergedSha
with:
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
- ...
```

View File

@@ -20,7 +20,7 @@ buildGoModule {
})
# Undoes part of the above PR: We don't want to require write access
# to the repository, that's only needed for GitHub's native CODEOWNERS.
# Furthermore, it removes an unnecessary check from the code
# Furthermore, it removes an unneccessary check from the code
# that breaks tokens generated for GitHub Apps.
./permissions.patch
# Allows setting a custom CODEOWNERS path using the OWNERS_FILE env var

View File

@@ -1,34 +1,33 @@
let
pinned = (builtins.fromJSON (builtins.readFile ./pinned.json)).pins;
pinnedNixpkgs = builtins.fromJSON (builtins.readFile ./pinned-nixpkgs.json);
in
{
system ? builtins.currentSystem,
nixpkgs ? null,
nixPath ? "nixVersions.latest",
}:
let
nixpkgs' =
if nixpkgs == null then
fetchTarball {
inherit (pinned.nixpkgs) url;
sha256 = pinned.nixpkgs.hash;
url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgs.rev}.tar.gz";
sha256 = pinnedNixpkgs.sha256;
}
else
nixpkgs;
pkgs = import nixpkgs' {
inherit system;
# Nixpkgs generally — and CI specifically — do not use aliases,
# because we want to ensure they are not load-bearing.
allowAliases = false;
config = { };
overlays = [ ];
};
fmt =
let
treefmtNixSrc = fetchTarball {
inherit (pinned.treefmt-nix) url;
sha256 = pinned.treefmt-nix.hash;
# Master at 2025-02-12
url = "https://github.com/numtide/treefmt-nix/archive/4f09b473c936d41582dd744e19f34ec27592c5fd.tar.gz";
sha256 = "051vh6raskrxw5k6jncm8zbk9fhbzgm1gxpq9gm5xw1b6wgbgcna";
};
treefmtEval = (import treefmtNixSrc).evalModule pkgs {
# Important: The auto-rebase script uses `git filter-branch --tree-filter`,
@@ -47,110 +46,19 @@ let
programs.actionlint.enable = true;
programs.biome = {
enable = true;
# Disable settings validation because its inputs are liable to hash mismatch
validate.enable = false;
settings.formatter = {
useEditorconfig = true;
};
settings.javascript.formatter = {
quoteStyle = "single";
semicolons = "asNeeded";
};
settings.json.formatter.enabled = false;
};
settings.formatter.biome.excludes = [
"*.min.js"
"pkgs/*"
];
programs.keep-sorted.enable = true;
# This uses nixfmt underneath, the default formatter for Nix code.
# This uses nixfmt-rfc-style underneath,
# the default formatter for Nix code.
# See https://github.com/NixOS/nixfmt
programs.nixfmt = {
enable = true;
package = pkgs.nixfmt;
};
programs.yamlfmt = {
enable = true;
settings.formatter = {
retain_line_breaks = true;
};
};
settings.formatter.yamlfmt.excludes = [
# Aligns comments with whitespace
"pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml"
# TODO: Fix formatting for auto-generated file
"pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml"
];
programs.nixf-diagnose = {
enable = true;
ignore = [
# Rule names can currently be looked up here:
# https://github.com/nix-community/nixd/blob/main/libnixf/src/Basic/diagnostic.py
# TODO: Remove the following and fix things.
"sema-unused-def-lambda-noarg-formal"
"sema-unused-def-lambda-witharg-arg"
"sema-unused-def-lambda-witharg-formal"
"sema-unused-def-let"
# Keep this rule, because we have `lib.or`.
"or-identifier"
# TODO: remove after outstanding prelude diagnostics issues are fixed:
# https://github.com/nix-community/nixd/issues/761
# https://github.com/nix-community/nixd/issues/762
"sema-primop-removed-prefix"
"sema-primop-overridden"
"sema-constant-overridden"
"sema-primop-unknown"
];
};
settings.formatter.nixf-diagnose = {
# Ensure nixfmt cleans up after nixf-diagnose.
priority = -1;
excludes = [
# Auto-generated; violates sema-extra-with
# Can only sensibly be removed when --auto-fix supports multiple fixes at once:
# https://github.com/inclyc/nixf-diagnose/issues/13
"pkgs/servers/home-assistant/component-packages.nix"
# https://github.com/nix-community/nixd/issues/708
"nixos/maintainers/scripts/azure-new/examples/basic/system.nix"
];
};
programs.nixfmt.enable = true;
settings.formatter.editorconfig-checker = {
command = "${pkgs.lib.getExe pkgs.editorconfig-checker}";
options = [
"-disable-indent-size"
# TODO: Remove this once this upstream issue is fixed:
# https://github.com/editorconfig-checker/editorconfig-checker/issues/505
"-disable-charset"
];
options = [ "-disable-indent-size" ];
includes = [ "*" ];
priority = 1;
};
# TODO: Upstream this into treefmt-nix eventually:
# https://github.com/numtide/treefmt-nix/issues/387
settings.formatter.markdown-code-runner = {
command = pkgs.lib.getExe pkgs.markdown-code-runner;
options =
let
config = pkgs.writers.writeTOML "markdown-code-runner-config" {
presets.nixfmt = {
language = "nix";
command = [ (pkgs.lib.getExe pkgs.nixfmt) ];
};
};
in
[ "--config=${config}" ];
includes = [ "*.md" ];
};
programs.zizmor.enable = true;
};
fs = pkgs.lib.fileset;
nixFilesSrc = fs.toSource {
@@ -165,41 +73,21 @@ let
};
in
rec {
{
inherit pkgs fmt;
requestReviews = pkgs.callPackage ./request-reviews { };
codeownersValidator = pkgs.callPackage ./codeowners-validator { };
# FIXME(lf-): it might be useful to test other Nix implementations
# (nixVersions.stable and Lix) here somehow at some point to ensure we don't
# have eval divergence.
eval = pkgs.callPackage ./eval {
nix = pkgs.lib.getAttrFromPath (pkgs.lib.splitString "." nixPath) pkgs;
};
eval = pkgs.callPackage ./eval { };
# CI jobs
lib-tests = import ../lib/tests/release.nix { inherit pkgs; };
manual-nixos = (import ../nixos/release.nix { }).manual.${system} or null;
manual-nixpkgs = (import ../doc { inherit pkgs; });
nixpkgs-vet = pkgs.callPackage ./nixpkgs-vet.nix {
nix = pkgs.nixVersions.latest;
};
manual-nixpkgs = (import ../pkgs/top-level/release.nix { }).manual;
manual-nixpkgs-tests = (import ../pkgs/top-level/release.nix { }).manual.tests;
parse = pkgs.lib.recurseIntoAttrs {
nix_latest = pkgs.callPackage ./parse.nix { nix = pkgs.nixVersions.latest; };
nix_2_28 = pkgs.callPackage ./parse.nix { nix = pkgs.nixVersions.nix_2_28; };
latest = pkgs.callPackage ./parse.nix { nix = pkgs.nixVersions.latest; };
lix = pkgs.callPackage ./parse.nix { nix = pkgs.lix; };
lix_latest = pkgs.callPackage ./parse.nix { nix = pkgs.lixPackageSets.latest.lix; };
minimum = pkgs.callPackage ./parse.nix { nix = pkgs.nixVersions.minimum; };
};
shell = import ../shell.nix { inherit nixpkgs system; };
tarball = import ../pkgs/top-level/make-tarball.nix {
# Mirrored from top-level release.nix:
nixpkgs = {
outPath = pkgs.lib.cleanSource ../.;
revCount = 1234;
shortRev = "abcdef";
revision = "0000000000000000000000000000000000000000";
};
officialRelease = false;
inherit pkgs lib-tests;
nix = pkgs.nixVersions.latest;
};
}

View File

@@ -2,47 +2,20 @@
The code in this directory is used by the [eval.yml](../../.github/workflows/eval.yml) GitHub Actions workflow to evaluate the majority of Nixpkgs for all PRs, effectively making sure that when the development branches are processed by Hydra, no evaluation failures are encountered.
Furthermore it also allows local evaluation using:
Furthermore it also allows local evaluation using
```
nix-build ci -A eval.baseline
nix-build ci -A eval.full \
--max-jobs 4 \
--cores 2 \
--arg chunkSize 10000 \
--arg evalSystems '["x86_64-linux" "aarch64-darwin"]'
```
The two most important arguments are:
- `--arg evalSystems`: The set of systems for which `nixpkgs` should be evaluated.
Defaults to the [supported systems](../../pkgs/top-level/release-supported-systems.json) for the branch.
Example: `--arg evalSystems '["x86_64-linux" "aarch64-darwin"]'`
- `--arg quickTest`: Enables testing a single chunk of the current system only for quick iteration.
Example: `--arg quickTest true`
- `--max-jobs`: The maximum number of derivations to run at the same time. Only each [supported system](../supportedSystems.json) gets a separate derivation, so it doesn't make sense to set this higher than that number.
- `--cores`: The number of cores to use for each job. Recommended to set this to the amount of cores on your system divided by `--max-jobs`.
- `chunkSize`: The number of attributes that are evaluated simultaneously on a single core. Lowering this decreases memory usage at the cost of increased evaluation time. If this is too high, there won't be enough chunks to process them in parallel, and will also increase evaluation time.
- `evalSystems`: The set of systems for which `nixpkgs` should be evaluated. Defaults to the four official platforms (`x86_64-linux`, `aarch64-linux`, `x86_64-darwin` and `aarch64-darwin`).
The following arguments can be used to fine-tune performance:
- `--max-jobs`: The maximum number of derivations to run at the same time.
Only each supported system gets a separate derivation, so it doesn't make sense to set this higher than that number.
- `--cores`: The number of cores to use for each job.
Recommended to set this to the number of cores on your system divided by `--max-jobs`.
- `--arg chunkSize`: The number of attributes that are evaluated simultaneously on a single core.
Lowering this decreases memory usage at the cost of increased evaluation time.
If this is too high, there won't be enough chunks to process them in parallel, and will also increase evaluation time.
The default is 5000.
Example: `--arg chunkSize 10000`
A good default is to set `chunkSize` to 10000, which leads to about 3.6GB max memory usage per core, so suitable for fully utilising machines with 4 cores and 16GB memory, 8 cores and 32GB memory or 16 cores and 64GB memory.
Note that 16GB memory is the recommended minimum, while with less than 8GB memory evaluation time suffers greatly.
## Local eval with rebuilds / comparison
To compare two commits locally, first run the following on the baseline commit:
```
nix-build ci -A eval.baseline --out-link baseline
```
Then, on the commit with your changes:
```
nix-build ci -A eval.full --arg baseline ./baseline
```
Keep in mind to otherwise pass the same set of arguments for both commands (`evalSystems`, `quickTest`, `chunkSize`).
Running this command will evaluate the difference between the baseline statistics and the ones at the time of running the command.
From that difference, it will produce a human-readable report in `$out/step-summary.md`.
If no packages were added or removed, then performance statistics will also be generated as part of this report.

View File

@@ -1,85 +0,0 @@
# This expression will, as efficiently as possible, dump a
# *superset* of all attrpaths of derivations which might be
# part of a release on *any* platform.
#
# This expression runs single-threaded under all current Nix
# implementations, but much faster and with much less memory
# used than ./outpaths.nix itself.
#
# Once you have the list of attrnames you can split it up into
# $NUM_CORES batches and evaluate the outpaths separately for each
# batch, in parallel.
#
# To dump the attrnames:
#
# nix-instantiate --eval --strict --json ci/eval/attrpaths.nix -A names
#
{
lib ? import (path + "/lib"),
trace ? false,
path ? ./../..,
extraNixpkgsConfigJson ? "{}",
}:
let
# TODO: Use mapAttrsToListRecursiveCond when this PR lands:
# https://github.com/NixOS/nixpkgs/pull/395160
justAttrNames =
path: value:
let
result =
if path == [ "AAAAAASomeThingsFailToEvaluate" ] || !(lib.isAttrs value) then
[ ]
else if lib.isDerivation value then
[ path ]
else
lib.pipe value [
(lib.mapAttrsToList (
name: value:
lib.addErrorContext "while evaluating package set attribute path '${
lib.showAttrPath (path ++ [ name ])
}'" (justAttrNames (path ++ [ name ]) value)
))
lib.concatLists
];
in
lib.traceIf trace "** ${lib.showAttrPath path}" result;
outpaths = import ./outpaths.nix {
inherit path;
extraNixpkgsConfig = builtins.fromJSON extraNixpkgsConfigJson;
attrNamesOnly = true;
};
paths = [
# Some of the following are based on variants, which are disabled with `attrNamesOnly = true`.
# Until these have been removed from release.nix / hydra, we manually add them to the list.
[
"pkgsLLVM"
"stdenv"
]
[
"pkgsArocc"
"stdenv"
]
[
"pkgsZig"
"stdenv"
]
[
"pkgsStatic"
"stdenv"
]
[
"pkgsMusl"
"stdenv"
]
]
++ justAttrNames [ ] outpaths;
names = map lib.showAttrPath paths;
in
{
inherit paths names;
}

View File

@@ -1,47 +0,0 @@
# This turns ./outpaths.nix into chunks of a fixed size.
{
lib ? import ../../lib,
path ? ../..,
# The file containing all available attribute paths, which are split into chunks here
attrpathFile,
chunkSize,
myChunk,
includeBroken,
systems,
extraNixpkgsConfigJson,
}:
let
attrpaths = lib.importJSON attrpathFile;
myAttrpaths = lib.sublist (chunkSize * myChunk) chunkSize attrpaths;
unfiltered = import ./outpaths.nix {
inherit path;
inherit includeBroken systems;
extraNixpkgsConfig = builtins.fromJSON extraNixpkgsConfigJson;
};
# Turns the unfiltered recursive attribute set into one that is limited to myAttrpaths
filtered =
let
recurse =
index: paths: attrs:
lib.mapAttrs (
name: values:
if attrs ? ${name} then
if lib.any (value: lib.length value <= index + 1) values then
attrs.${name}
else
recurse (index + 1) values attrs.${name}
# Make sure nix-env recurses as well
// {
recurseForDerivations = true;
}
else
null
) (lib.groupBy (a: lib.elemAt a index) paths);
in
recurse 0 myAttrpaths unfiltered;
in
filtered

View File

@@ -1,15 +1,12 @@
import argparse
import json
import numpy as np
import os
import pandas as pd
from dataclasses import asdict, dataclass
from pathlib import Path
from scipy.stats import ttest_rel
from tabulate import tabulate
from typing import Final
import pandas as pd
import numpy as np
from pathlib import Path
# Define metrics of interest (can be expanded as needed)
METRIC_PREFIXES = ("nr", "gc")
def flatten_data(json_data: dict) -> dict:
"""
@@ -25,293 +22,133 @@ def flatten_data(json_data: dict) -> dict:
"gc.heapSize": 5404549120
...
See https://github.com/NixOS/nix/blob/187520ce88c47e2859064704f9320a2d6c97e56e/src/libexpr/eval.cc#L2846
for the ultimate source of this data.
Args:
json_data (dict): JSON data containing metrics.
Returns:
dict: Flattened metrics with keys as metric names.
"""
flat_metrics = {}
for key, value in json_data.items():
# This key is duplicated as `time.cpu`; we keep that copy.
if key == "cpuTime":
continue
if isinstance(value, (int, float)):
flat_metrics[key] = value
elif isinstance(value, dict):
for subkey, subvalue in value.items():
assert isinstance(subvalue, (int, float)), subvalue
flat_metrics[f"{key}.{subkey}"] = subvalue
else:
assert isinstance(value, (float, int, dict)), (
f"Value `{value}` has unexpected type"
)
for k, v in json_data.items():
if isinstance(v, (int, float)):
flat_metrics[k] = v
elif isinstance(v, dict):
for sub_k, sub_v in v.items():
flat_metrics[f"{k}.{sub_k}"] = sub_v
return flat_metrics
def load_all_metrics(path: Path) -> dict:
def load_all_metrics(directory: Path) -> dict:
"""
Loads all stats JSON files in the specified file or directory and extracts metrics.
These stats JSON files are created by Nix when the `NIX_SHOW_STATS` environment variable is set.
If the provided path is a directory, it must have the structure $path/$system/$stats,
where $path is the provided path, $system is some system from `lib.systems.doubles.*`,
and $stats is a stats JSON file.
If the provided path is a file, it is a stats JSON file.
Loads all stats JSON files in the specified directory and extracts metrics.
Args:
path (Path): Directory containing JSON files or a stats JSON file.
directory (Path): Directory containing JSON files.
Returns:
dict: Dictionary with filenames as keys and extracted metrics as values.
"""
metrics = {}
if path.is_dir():
for system_dir in path.iterdir():
assert system_dir.is_dir()
for system_dir in directory.iterdir():
assert system_dir.is_dir()
for chunk_output in system_dir.iterdir():
for chunk_output in system_dir.iterdir():
with chunk_output.open() as f:
data = json.load(f)
metrics[f"{system_dir.name}/${chunk_output.name}"] = flatten_data(data)
else:
with path.open() as f:
metrics[path.name] = flatten_data(json.load(f))
return metrics
def dataframe_to_markdown(df: pd.DataFrame) -> str:
df = df.sort_values(by=df.columns[0], ascending=True)
markdown_lines = []
def metric_table_name(name: str, explain: bool) -> str:
"""
Returns the name of the metric, plus a footnote to explain it if needed.
"""
return f"{name}[^{name}]" if explain else name
# Header (get column names and format them)
header = '\n| ' + ' | '.join(df.columns) + ' |'
markdown_lines.append(header)
markdown_lines.append("| - " * (len(df.columns)) + "|") # Separator line
# Iterate over rows to build Markdown rows
for _, row in df.iterrows():
# TODO: define threshold for highlighting
highlight = False
fmt = lambda x: f"**{x}**" if highlight else f"{x}"
# Check for no change and NaN in p_value/t_stat
row_values = []
for val in row:
if isinstance(val, float) and np.isnan(val): # For NaN values in p-value or t-stat
row_values.append("-") # Custom symbol for NaN
elif isinstance(val, float) and val == 0: # For no change (mean_diff == 0)
row_values.append("-") # Custom symbol for no change
else:
row_values.append(fmt(f"{val:.4f}" if isinstance(val, float) else str(val)))
markdown_lines.append('| ' + ' | '.join(row_values) + ' |')
return '\n'.join(markdown_lines)
METRIC_EXPLANATION_FOOTNOTE: Final[str] = """
[^time.cpu]: Number of seconds of CPU time accounted by the OS to the Nix evaluator process. On UNIX systems, this comes from [`getrusage(RUSAGE_SELF)`](https://man7.org/linux/man-pages/man2/getrusage.2.html).
[^time.gc]: Number of seconds of CPU time accounted by the Boehm garbage collector to performing GC.
[^time.gcFraction]: What fraction of the total CPU time is accounted towards performing GC.
[^gc.cycles]: Number of times garbage collection has been performed.
[^gc.heapSize]: Size in bytes of the garbage collector heap.
[^gc.totalBytes]: Size in bytes of all allocations in the garbage collector.
[^envs.bytes]: Size in bytes of all `Env` objects allocated by the Nix evaluator. These are almost exclusively created by [`nix-env`](https://nix.dev/manual/nix/stable/command-ref/nix-env.html).
[^list.bytes]: Size in bytes of all [lists](https://nix.dev/manual/nix/stable/language/syntax.html#list-literal) allocated by the Nix evaluator.
[^sets.bytes]: Size in bytes of all [attrsets](https://nix.dev/manual/nix/stable/language/syntax.html#list-literal) allocated by the Nix evaluator.
[^symbols.bytes]: Size in bytes of all items in the Nix evaluator symbol table.
[^values.bytes]: Size in bytes of all values allocated by the Nix evaluator.
[^envs.number]: The count of all `Env` objects allocated.
[^nrAvoided]: The number of thunks avoided being created.
[^nrExprs]: The number of expression objects ever created.
[^nrFunctionCalls]: The number of function calls ever made.
[^nrLookups]: The number of lookups into an attrset ever made.
[^nrOpUpdateValuesCopied]: The number of attrset values copied in the process of merging attrsets.
[^nrOpUpdates]: The number of attrsets merge operations (`//`) performed.
[^nrPrimOpCalls]: The number of function calls to primops (Nix builtins) ever made.
[^nrThunks]: The number of [thunks](https://nix.dev/manual/nix/latest/language/evaluation.html#laziness) ever made. A thunk is a delayed computation, represented by an expression reference and a closure.
[^sets.number]: The number of attrsets ever made.
[^symbols.number]: The number of symbols ever added to the symbol table.
[^values.number]: The number of values ever made.
[^envs.elements]: The number of values contained within an `Env` object.
[^list.concats]: The number of list concatenation operations (`++`) performed.
[^list.elements]: The number of values contained within a list.
[^sets.elements]: The number of values contained within an attrset.
[^sizes.Attr]: Size in bytes of the `Attr` type.
[^sizes.Bindings]: Size in bytes of the `Bindings` type.
[^sizes.Env]: Size in bytes of the `Env` type.
[^sizes.Value]: Size in bytes of the `Value` type.
"""
@dataclass(frozen=True)
class PairwiseTestResults:
updated: pd.DataFrame
equivalent: pd.DataFrame
@staticmethod
def tabulate(table, headers) -> str:
return tabulate(
table, headers, tablefmt="github", floatfmt=".4f", missingval="-"
)
def updated_to_markdown(self, explain: bool) -> str:
assert not self.updated.empty
# Header (get column names and format them)
return self.tabulate(
headers=[str(column) for column in self.updated.columns],
table=[
[
# The metric acts as its own footnote name
metric_table_name(row["metric"], explain),
# Check for no change and NaN in p_value/t_stat
*[
None if np.isnan(val) or np.allclose(val, 0) else val
for val in row[1:]
],
]
for _, row in self.updated.iterrows()
],
)
def equivalent_to_markdown(self, explain: bool) -> str:
assert not self.equivalent.empty
return self.tabulate(
headers=[str(column) for column in self.equivalent.columns],
table=[
[
# The metric acts as its own footnote name
metric_table_name(row["metric"], explain),
row["value"],
]
for _, row in self.equivalent.iterrows()
],
)
def to_markdown(self, explain: bool) -> str:
result = ""
if not self.equivalent.empty:
result += "## Unchanged values\n\n"
result += self.equivalent_to_markdown(explain)
if not self.updated.empty:
result += ("\n\n" if result else "") + "## Updated values\n\n"
result += self.updated_to_markdown(explain)
if explain:
result += METRIC_EXPLANATION_FOOTNOTE
return result
@dataclass(frozen=True)
class Equivalent:
metric: str
value: float
@dataclass(frozen=True)
class Comparison:
metric: str
mean_before: float
mean_after: float
mean_diff: float
mean_pct_change: float
@dataclass(frozen=True)
class ComparisonWithPValue(Comparison):
p_value: float
t_stat: float
def metric_sort_key(name: str) -> str:
if name in ("time.cpu", "time.gc", "time.gcFraction"):
return (1, name)
elif name.startswith("gc"):
return (2, name)
elif name.endswith(("bytes", "Bytes")):
return (3, name)
elif name.startswith("nr") or name.endswith("number"):
return (4, name)
else:
return (5, name)
def perform_pairwise_tests(
before_metrics: dict, after_metrics: dict
) -> PairwiseTestResults:
def perform_pairwise_tests(before_metrics: dict, after_metrics: dict) -> pd.DataFrame:
common_files = sorted(set(before_metrics) & set(after_metrics))
all_keys = sorted(
{
metric_keys
for file_metrics in before_metrics.values()
for metric_keys in file_metrics.keys()
},
key=metric_sort_key,
)
all_keys = sorted({ metric_keys for file_metrics in before_metrics.values() for metric_keys in file_metrics.keys() })
updated = []
equivalent = []
results = []
for key in all_keys:
before_vals = []
after_vals = []
before_vals, after_vals = [], []
for fname in common_files:
if key in before_metrics[fname] and key in after_metrics[fname]:
before_vals.append(before_metrics[fname][key])
after_vals.append(after_metrics[fname][key])
if len(before_vals) == 0:
continue
if len(before_vals) >= 2:
before_arr = np.array(before_vals)
after_arr = np.array(after_vals)
before_arr = np.array(before_vals)
after_arr = np.array(after_vals)
diff = after_arr - before_arr
# If there's no difference, add it all to the equivalent output.
if np.allclose(diff, 0):
equivalent.append(Equivalent(metric=key, value=before_vals[0]))
else:
diff = after_arr - before_arr
pct_change = 100 * diff / before_arr
t_stat, p_val = ttest_rel(after_arr, before_arr)
result = Comparison(
metric=key,
mean_before=np.mean(before_arr),
mean_after=np.mean(after_arr),
mean_diff=np.mean(diff),
mean_pct_change=np.mean(pct_change),
)
results.append({
"metric": key,
"mean_before": np.mean(before_arr),
"mean_after": np.mean(after_arr),
"mean_diff": np.mean(diff),
"mean_%_change": np.mean(pct_change),
"p_value": p_val,
"t_stat": t_stat
})
# If there are enough values to perform a t-test, do so.
if len(before_vals) > 1:
t_stat, p_val = ttest_rel(after_arr, before_arr)
result = ComparisonWithPValue(
**asdict(result), p_value=p_val, t_stat=t_stat
)
updated.append(result)
return PairwiseTestResults(
updated=pd.DataFrame(map(asdict, updated)),
equivalent=pd.DataFrame(map(asdict, equivalent)),
)
def main():
parser = argparse.ArgumentParser(
description="Performance comparison of Nix evaluation statistics"
)
parser.add_argument(
"--explain", action="store_true", help="Explain the evaluation statistics"
)
parser.add_argument(
"before", help="File or directory containing baseline (data before)"
)
parser.add_argument(
"after", help="File or directory containing comparison (data after)"
)
options = parser.parse_args()
before_stats = Path(options.before)
after_stats = Path(options.after)
before_metrics = load_all_metrics(before_stats)
after_metrics = load_all_metrics(after_stats)
pairwise_test_results = perform_pairwise_tests(before_metrics, after_metrics)
markdown_table = pairwise_test_results.to_markdown(explain=options.explain)
print(markdown_table)
df = pd.DataFrame(results).sort_values("p_value")
return df
if __name__ == "__main__":
main()
before_dir = os.environ.get("BEFORE_DIR")
after_dir = os.environ.get("AFTER_DIR")
if not before_dir or not after_dir:
print("Error: Environment variables 'BEFORE_DIR' and 'AFTER_DIR' must be set.")
exit(1)
before_stats = Path(before_dir) / "stats"
after_stats = Path(after_dir) / "stats"
# This may happen if the pull request target does not include PR#399720 yet.
if not before_stats.exists():
print("⚠️ Skipping comparison: stats directory is missing in the target commit.")
exit(0)
# This should never happen, but we're exiting gracefully anyways
if not after_stats.exists():
print("⚠️ Skipping comparison: stats directory missing in current PR evaluation.")
exit(0)
before_metrics = load_all_metrics(before_stats)
after_metrics = load_all_metrics(after_stats)
df1 = perform_pairwise_tests(before_metrics, after_metrics)
markdown_table = dataframe_to_markdown(df1)
print(markdown_table)

View File

@@ -1,71 +1,26 @@
{
callPackage,
lib,
jq,
runCommand,
writeText,
python3,
stdenvNoCC,
makeWrapper,
codeowners,
...
}:
let
python = python3.withPackages (ps: [
ps.numpy
ps.pandas
ps.scipy
ps.tabulate
]);
cmp-stats = stdenvNoCC.mkDerivation {
pname = "cmp-stats";
version = lib.trivial.release;
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/cmp-stats
cp ${./cmp-stats.py} "$out/share/cmp-stats/cmp-stats.py"
makeWrapper ${python.interpreter} "$out/bin/cmp-stats" \
--add-flags "$out/share/cmp-stats/cmp-stats.py"
runHook postInstall
'';
meta = {
description = "Performance comparison of Nix evaluation statistics";
license = lib.licenses.mit;
mainProgram = "cmp-stats";
maintainers = with lib.maintainers; [ philiptaron ];
};
};
in
{
combinedDir,
beforeResultDir,
afterResultDir,
touchedFilesJson,
ownersFile ? ../../OWNERS,
githubAuthorId,
byName ? false,
}:
let
# Usually we expect a derivation, but when evaluating in multiple separate steps, we pass
# nix store paths around. These need to be turned into (fake) derivations again to track
# dependencies properly.
# We use two steps for evaluation, because we compare results from two different checkouts.
# CI additionalls spreads evaluation across multiple workers.
combined = if lib.isDerivation combinedDir then combinedDir else lib.toDerivation combinedDir;
/*
Derivation that computes which packages are affected (added, changed or removed) between two revisions of nixpkgs.
Note: "platforms" are "x86_64-linux", "aarch64-darwin", ...
---
Inputs:
- beforeDir, afterDir: The evaluation result from before and after the change.
- beforeResultDir, afterResultDir: The evaluation result from before and after the change.
They can be obtained by running `nix-build -A ci.eval.full` on both revisions.
---
@@ -74,42 +29,13 @@ let
{
attrdiff: {
added: ["package1"],
changed: ["package2", "package3", "package4"],
changed: ["package2", "package3"],
removed: ["package4"],
},
attrdiffByKernel: {
darwin: {
added: [],
changed: ["package2", "package4"],
removed: ["package4"],
},
linux: {
added: ["package1"],
changed: ["package3", "package4"],
removed: [],
},
},
attrdiffByPlatform: {
aarch64-darwin: {
added: [],
changed: ["package2"],
removed: ["package4"],
},
aarch64-linux: {
added: ["package1"],
changed: ["package3"],
removed: [],
},
x86_64-linux: {
added: [],
changed: ["package4"],
removed: [],
},
},
labels: {
"10.rebuild-darwin: 1-10": true,
"10.rebuild-linux: 1-10": true
},
labels: [
"10.rebuild-darwin: 1-10",
"10.rebuild-linux: 1-10"
],
rebuildsByKernel: {
darwin: ["package1", "package2"],
linux: ["package1", "package2", "package3"]
@@ -140,103 +66,98 @@ let
Example: { name = "python312Packages.numpy"; platform = "x86_64-linux"; }
*/
inherit (import ./utils.nix { inherit lib; })
diff
groupByKernel
convertToPackagePlatformAttrs
groupAttrdiffByKernel
groupAttrdiffByPlatform
groupByPlatform
extractPackageNames
getLabels
;
# Attrs
# - keys: "added", "changed", "removed" and "rebuilds"
# - values: lists of `packagePlatformPath`s
diffAttrs = builtins.fromJSON (builtins.readFile "${combined}/combined-diff.json");
getAttrs =
dir:
let
raw = builtins.readFile "${dir}/outpaths.json";
# The file contains Nix paths; we need to ignore them for evaluation purposes,
# else there will be a "is not allowed to refer to a store path" error.
data = builtins.unsafeDiscardStringContext raw;
in
builtins.fromJSON data;
beforeAttrs = getAttrs beforeResultDir;
afterAttrs = getAttrs afterResultDir;
rebuildsPackagePlatformAttrs = convertToPackagePlatformAttrs diffAttrs.rebuilds;
# Attrs
# - keys: "added", "changed" and "removed"
# - values: lists of `packagePlatformPath`s
diffAttrs = diff beforeAttrs afterAttrs;
rebuilds = diffAttrs.added ++ diffAttrs.changed;
rebuildsPackagePlatformAttrs = convertToPackagePlatformAttrs rebuilds;
changed-paths =
let
attrdiff = lib.mapAttrs (_: extractPackageNames) {
inherit (diffAttrs) added changed removed;
};
attrdiffByPlatform = groupAttrdiffByPlatform {
inherit (diffAttrs) added changed removed;
};
attrdiffByKernel = groupAttrdiffByKernel {
inherit (diffAttrs) added changed removed;
};
rebuildsByPlatform = groupByPlatform rebuildsPackagePlatformAttrs;
rebuildsByKernel = groupByKernel rebuildsPackagePlatformAttrs;
rebuildCountByKernel = lib.mapAttrs (
kernel: kernelRebuilds: lib.length kernelRebuilds
) rebuildsByKernel;
rebuildNames = extractPackageNames diffAttrs.rebuilds;
in
writeText "changed-paths.json" (
builtins.toJSON {
inherit attrdiff attrdiffByKernel attrdiffByPlatform;
attrdiff = lib.mapAttrs (_: extractPackageNames) diffAttrs;
inherit
rebuildsByPlatform
rebuildsByKernel
rebuildCountByKernel
;
labels =
getLabels rebuildCountByKernel
# Sets "10.rebuild-*-stdenv" label to whether the "stdenv" attribute was changed.
// lib.mapAttrs' (
kernel: rebuilds: lib.nameValuePair "10.rebuild-${kernel}-stdenv" (lib.elem "stdenv" rebuilds)
) rebuildsByKernel
// {
"10.rebuild-nixos-tests" =
lib.elem "nixosTests.simple-container" rebuildNames || lib.elem "nixosTests.simple-vm" rebuildNames;
};
(getLabels rebuildCountByKernel)
# Adds "10.rebuild-*-stdenv" label if the "stdenv" attribute was changed
++ lib.mapAttrsToList (kernel: _: "10.rebuild-${kernel}-stdenv") (
lib.filterAttrs (_: kernelRebuilds: kernelRebuilds ? "stdenv") rebuildsByKernel
)
# Adds the "11.by: package-maintainer" label if all of the packages directly
# changed are maintained by the PR's author. (https://github.com/NixOS/ofborg/blob/df400f44502d4a4a80fa283d33f2e55a4e43ee90/ofborg/src/tagger.rs#L83-L88)
++ lib.optional (
maintainers ? ${githubAuthorId}
&& lib.all (lib.flip lib.elem maintainers.${githubAuthorId}) (
lib.flatten (lib.attrValues maintainers)
)
) "11.by: package-maintainer";
}
);
getMaintainers = callPackage ./maintainers.nix { };
inherit
(getMaintainers {
affectedAttrPaths = map (a: a.packagePath) (
convertToPackagePlatformAttrs (diffAttrs.changed ++ diffAttrs.removed)
);
changedFiles = lib.importJSON touchedFilesJson;
})
users
teams
packages
;
maintainers = import ./maintainers.nix {
changedattrs = lib.attrNames (lib.groupBy (a: a.name) rebuildsPackagePlatformAttrs);
changedpathsjson = touchedFilesJson;
inherit byName;
};
in
runCommand "compare"
{
# Don't depend on -dev outputs to reduce closure size for CI.
nativeBuildInputs = map lib.getBin [
nativeBuildInputs = [
jq
cmp-stats
codeowners
];
users = builtins.toJSON users;
teams = builtins.toJSON teams;
packages = builtins.toJSON (lib.map (lib.concatStringsSep ".") packages);
passAsFile = [
"users"
"teams"
"packages"
(python3.withPackages (
ps: with ps; [
numpy
pandas
scipy
]
))
];
maintainers = builtins.toJSON maintainers;
passAsFile = [ "maintainers" ];
env = {
BEFORE_DIR = "${beforeResultDir}";
AFTER_DIR = "${afterResultDir}";
};
}
''
mkdir $out
cp ${changed-paths} $out/changed-paths.json
{
echo
echo "# Packages"
echo
jq -r -f ${./generate-step-summary.jq} < ${changed-paths}
} >> $out/step-summary.md
if jq -e '(.attrdiff.added | length == 0) and (.attrdiff.removed | length == 0)' "${changed-paths}" > /dev/null; then
# Chunks have changed between revisions
@@ -251,7 +172,7 @@ runCommand "compare"
echo
} >> $out/step-summary.md
cmp-stats --explain ${combined}/before/stats ${combined}/after/stats >> $out/step-summary.md
python3 ${./cmp-stats.py} >> $out/step-summary.md
else
# Package chunks are the same in both revisions
@@ -266,44 +187,7 @@ runCommand "compare"
} >> $out/step-summary.md
fi
jq -r '.[]' "${touchedFilesJson}" > ./touched-files
readarray -t touchedFiles < ./touched-files
echo "This PR touches ''${#touchedFiles[@]} files"
jq -r -f ${./generate-step-summary.jq} < ${changed-paths} >> $out/step-summary.md
# TODO: Move ci/OWNERS to Nix and produce owners.json instead of owners.txt.
touch "$out/owners.txt"
for file in "''${touchedFiles[@]}"; do
result=$(codeowners --file "${ownersFile}" "$file")
# Remove the file prefix and trim the surrounding spaces
read -r owners <<< "''${result#"$file"}"
if [[ "$owners" == "(unowned)" ]]; then
echo "File $file is unowned"
continue
fi
echo "File $file is owned by $owners"
# Split up multiple owners, separated by arbitrary amounts of spaces
IFS=" " read -r -a entries <<< "$owners"
for entry in "''${entries[@]}"; do
# GitHub technically also supports Emails as code owners,
# but we can't easily support that, so let's not
if [[ ! "$entry" =~ @(.*) ]]; then
echo -e "\e[33mCodeowner \"$entry\" for file $file is not valid: Must start with \"@\"\e[0m"
# Don't fail, because the PR for which this script runs can't fix it,
# it has to be fixed in the base branch
continue
fi
# The first regex match is everything after the @
entry=''${BASH_REMATCH[1]}
echo "$entry" >> "$out/owners.txt"
done
done
cp "$usersPath" "$out/maintainers.json"
cp "$teamsPath" "$out/teams.json"
cp "$packagesPath" "$out/packages.json"
cp "$maintainersPath" "$out/maintainers.json"
''

View File

@@ -1,67 +1,78 @@
# Figure out which maintainers (users/teams) are relevant for a PR:
# - All maintainers that can be linked directly to changedFiles
# - Maintainers of affectedAttrPaths if a file directly related to the attribute is in changedFiles
#
# Files and attributes are linked in various ways:
# - pkgs/by-name/<attr>/* is linked to pkgs.<attr>
# - The file position of various attributes of pkgs.<attr>
# - Explicitly specified file positions in derivations
#
# Test with
# nix-instantiate --eval --strict --json test.nix -A result | jq
#
# Empty list as an output means success
# Dependencies coming from the CI-pinned Nixpkgs
# Almost directly vendored from https://github.com/NixOS/ofborg/blob/5a4e743f192fb151915fcbe8789922fa401ecf48/ofborg/src/maintainers.nix
{
lib,
}:
# Function arguments
{
# Files that were changed
# Type: ListOf (Nixpkgs-root-relative path)
changedFiles,
# Attributes whose value was affected by the change
# Type: ListOf (ListOf String)
affectedAttrPaths,
# Nixpkgs used to check maintainers. Customisable for testing
pkgs ? import ../../.. {
system = "x86_64-linux";
# We should never try to ping maintainers through package aliases, this can only lead to errors.
# One example case is, where an attribute is a throw alias, but then re-introduced in a PR.
# This would trigger the throw. By disabling aliases, we can fallback gracefully below.
config.allowAliases = false;
overlays = [ ];
},
changedattrs,
changedpathsjson,
byName ? false,
}:
let
nixpkgsRoot = toString ../../.. + "/";
stripNixpkgsRootFromKeys = lib.mapAttrs' (
file: value: lib.nameValuePair (lib.removePrefix nixpkgsRoot file) value
);
pkgs = import ../../.. {
system = "x86_64-linux";
config = { };
overlays = [ ];
};
inherit (pkgs) lib;
moduleMeta = (pkgs.nixos { }).config.meta;
changedpaths = builtins.fromJSON (builtins.readFile changedpathsjson);
# Currently just nixos module maintainers, but in the future we can use this for code owners too
fileUsers = stripNixpkgsRootFromKeys moduleMeta.maintainers;
fileTeams = stripNixpkgsRootFromKeys moduleMeta.teams;
anyMatchingFile =
filename: builtins.any (changed: lib.strings.hasSuffix changed filename) changedpaths;
anyMatchingFile = filename: lib.any (lib.hasPrefix filename) changedFiles;
anyMatchingFiles = files: builtins.any anyMatchingFile files;
anyMatchingFiles = files: lib.any anyMatchingFile files;
enrichedAttrs = builtins.map (name: {
path = lib.splitString "." name;
name = name;
}) changedattrs;
validPackageAttributes = builtins.filter (
pkg:
if (lib.attrsets.hasAttrByPath pkg.path pkgs) then
(
let
value = lib.attrsets.attrByPath pkg.path null pkgs;
in
if (builtins.tryEval value).success then
if value != null then true else builtins.trace "${pkg.name} exists but is null" false
else
builtins.trace "Failed to access ${pkg.name} even though it exists" false
)
else
builtins.trace "Failed to locate ${pkg.name}." false
) enrichedAttrs;
attrsWithPackages = builtins.map (
pkg: pkg // { package = lib.attrsets.attrByPath pkg.path null pkgs; }
) validPackageAttributes;
attrsWithMaintainers = builtins.map (
pkg:
let
meta = pkg.package.meta or { };
in
pkg
// {
# TODO: Refactor this so we can ping entire teams instead of the individual members.
# Note that this will require keeping track of GH team IDs in "maintainers/teams.nix".
maintainers = meta.maintainers or [ ];
}
) attrsWithPackages;
relevantFilenames =
drv:
(lib.unique (
map (pos: lib.removePrefix nixpkgsRoot pos.file) (
lib.filter (x: x != null) [
(drv.meta.maintainersPosition or null)
(drv.meta.teamsPosition or null)
(lib.unsafeGetAttrPos "src" drv)
(lib.unsafeGetAttrPos "pname" drv)
(lib.unsafeGetAttrPos "version" drv)
]
++ lib.optionals (drv ? meta.position) [
(lib.lists.unique (
builtins.map (pos: lib.strings.removePrefix (toString ../..) pos.file) (
builtins.filter (x: x != null) [
((drv.meta or { }).maintainersPosition or null)
((drv.meta or { }).teamsPosition or null)
(builtins.unsafeGetAttrPos "src" drv)
# broken because name is always set by stdenv:
# # A hack to make `nix-env -qa` and `nix search` ignore broken packages.
# # TODO(@oxij): remove this assert when something like NixOS/nix#1771 gets merged into nix.
# name = assert validity.handled; name + lib.optionalString
#(builtins.unsafeGetAttrPos "name" drv)
(builtins.unsafeGetAttrPos "pname" drv)
(builtins.unsafeGetAttrPos "version" drv)
# Use ".meta.position" for cases when most of the package is
# defined in a "common" section and the only place where
# reference to the file with a derivation the "pos"
@@ -71,89 +82,31 @@ let
# "pkgs/tools/package-management/nix/default.nix:155"
# We transform it to the following:
# { file = "pkgs/tools/package-management/nix/default.nix"; }
{ file = lib.head (lib.splitString ":" drv.meta.position); }
{ file = lib.head (lib.splitString ":" (drv.meta.position or "")); }
]
)
));
relevantAffectedAttrPaths = lib.filter (
attrPath:
# Some packages might be reported as changed on a different platform, but
# not even have an attribute on the platform the maintainers are requested on.
# Fallback to `null` for these to filter them out
let
package = lib.attrByPath attrPath null pkgs;
in
package != null && anyMatchingFiles (relevantFilenames package)
) affectedAttrPaths;
attrsWithFilenames = builtins.map (
pkg: pkg // { filenames = relevantFilenames pkg.package; }
) attrsWithMaintainers;
# Extract attributes that changed from by-name paths.
# This allows pinging reviewers for pure refactors.
changedByNameAttrPaths = lib.pipe changedFiles [
(lib.filter (changed: lib.hasPrefix "pkgs/by-name/" changed))
(map (lib.splitString "/"))
# Filters out e.g. pkgs/by-name/README.md
(lib.filter (path: lib.length path > 3))
(map (path: lib.elemAt path 3))
(map lib.singleton)
# Filter out new packages
(lib.filter (attrPath: lib.hasAttrByPath attrPath pkgs))
];
attrsWithModifiedFiles = builtins.filter (pkg: anyMatchingFiles pkg.filenames) attrsWithFilenames;
# An attribute can appear in affected *and* touched
attrPathsToGetMaintainersFor = lib.unique (relevantAffectedAttrPaths ++ changedByNameAttrPaths);
listToPing = lib.concatMap (
pkg:
builtins.map (maintainer: {
id = maintainer.githubId;
inherit (maintainer) github;
packageName = pkg.name;
dueToFiles = pkg.filenames;
}) pkg.maintainers
) attrsWithModifiedFiles;
attrPathEntities = lib.concatMap (
attrPath:
let
package = lib.getAttrFromPath attrPath pkgs;
in
# meta.maintainers also contains all individual team members.
# We only want to ping individuals if they're added individually as maintainers, not via teams.
userPings { inherit attrPath; } (package.meta.nonTeamMaintainers or [ ])
++ lib.concatMap (teamPings { inherit attrPath; }) (package.meta.teams or [ ])
) attrPathsToGetMaintainersFor;
byMaintainer = lib.groupBy (ping: toString ping.${if byName then "github" else "id"}) listToPing;
changedFileEntities = lib.concatMap (
file:
userPings { inherit file; } (fileUsers.${file} or [ ])
++ lib.concatMap (teamPings { inherit file; }) (fileTeams.${file} or [ ])
) changedFiles;
userPings =
context:
map (maintainer: {
type = "user";
userId = maintainer.githubId;
inherit context;
});
teamPings =
context: team:
if team ? githubId then
[
{
type = "team";
teamId = team.githubId;
inherit context;
}
]
else
userPings context team.members;
byType = lib.groupBy (ping: ping.type) (attrPathEntities ++ changedFileEntities);
byUser = lib.pipe (byType.user or [ ]) [
(lib.groupBy (ping: toString ping.userId))
(lib.mapAttrs (_user: lib.map (pkg: pkg.context)))
];
byTeam = lib.pipe (byType.team or [ ]) [
(lib.groupBy (ping: toString ping.teamId))
(lib.mapAttrs (_team: lib.map (pkg: pkg.context)))
];
packagesPerMaintainer = lib.attrsets.mapAttrs (
maintainer: packages: builtins.map (pkg: pkg.packageName) packages
) byMaintainer;
in
{
users = byUser;
teams = byTeam;
packages = attrPathsToGetMaintainersFor;
}
packagesPerMaintainer

View File

@@ -1,311 +0,0 @@
{
pkgs ? import ../../.. {
config = { };
overlays = [ ];
},
lib ? pkgs.lib,
}:
let
fun = import ./maintainers.nix { inherit lib; };
utils = import ./utils.nix { inherit lib; };
mockPkgs =
{
packages ? [ ],
modules ? [ ],
githubTeams ? true,
}:
lib.updateManyAttrsByPath
(lib.imap0 (i: p: {
path = p;
update = _: {
meta.maintainersPosition.file = lib.concatStringsSep "/" p;
meta.nonTeamMaintainers = [ { githubId = i; } ];
meta.teams =
if githubTeams then [ { githubId = i + 100; } ] else [ { members = [ { githubId = i + 100; } ]; } ];
};
}) packages)
{
nixos =
{ }:
{
config.meta.maintainers = lib.listToAttrs (
lib.imap0 (i: m: lib.nameValuePair m [ { githubId = i; } ]) modules
);
config.meta.teams = lib.listToAttrs (
lib.imap0 (
i: m:
lib.nameValuePair m (
if githubTeams then [ { githubId = i + 100; } ] else [ { members = [ { githubId = i + 100; } ]; } ]
)
) modules
);
};
};
tests = {
testEmpty = {
expr = fun {
pkgs = mockPkgs { };
changedFiles = [ ];
affectedAttrPaths = [ ];
};
expected = {
packages = [ ];
teams = { };
users = { };
};
};
testNonExistentAffected = {
expr = fun {
pkgs = mockPkgs { };
changedFiles = [ "a" ];
affectedAttrPaths = [ [ "b" ] ];
};
expected = {
packages = [ ];
teams = { };
users = { };
};
};
testIrrelevantAffected = {
expr = fun {
pkgs = mockPkgs {
packages = [ [ "b" ] ];
};
changedFiles = [ "a" ];
affectedAttrPaths = [ [ "b" ] ];
};
expected = {
packages = [ ];
teams = { };
users = { };
};
};
testRelevantAffected = {
expr = fun {
pkgs = mockPkgs {
packages = [ [ "b" ] ];
};
# Also tests that subpaths work
changedFiles = [ "b/c" ];
affectedAttrPaths = [ [ "b" ] ];
};
expected = {
packages = [ [ "b" ] ];
teams."100" = [
{ attrPath = [ "b" ]; }
];
users."0" = [
{ attrPath = [ "b" ]; }
];
};
};
testRelevantAffectedNonGitHub = {
expr = fun {
pkgs = mockPkgs {
packages = [ [ "b" ] ];
githubTeams = false;
};
changedFiles = [ "b/c" ];
affectedAttrPaths = [ [ "b" ] ];
};
expected = {
packages = [ [ "b" ] ];
teams = { };
users."0" = [
{ attrPath = [ "b" ]; }
];
users."100" = [
{ attrPath = [ "b" ]; }
];
};
};
testByNameChanged = {
expr = fun {
pkgs = mockPkgs {
packages = [ [ "hello" ] ];
};
changedFiles = [ "pkgs/by-name/he/hello/sources.json" ];
affectedAttrPaths = [ ];
};
expected = {
packages = [ [ "hello" ] ];
teams."100" = [
{ attrPath = [ "hello" ]; }
];
users."0" = [
{ attrPath = [ "hello" ]; }
];
};
};
testByNameNonExistentChanged = {
expr = fun {
pkgs = mockPkgs {
packages = [ ];
};
# Happens when a new package was added to pkgs/by-name
changedFiles = [ "pkgs/by-name/he/hello/sources.json" ];
affectedAttrPaths = [ ];
};
expected = {
packages = [ ];
teams = { };
users = { };
};
};
testByNameReadmeChanged = {
expr = fun {
pkgs = mockPkgs {
packages = [ [ "hello" ] ];
};
changedFiles = [ "pkgs/by-name/README.md" ];
affectedAttrPaths = [ ];
};
expected = {
packages = [ ];
teams = { };
users = { };
};
};
testNoDuplicates = {
expr = fun {
pkgs = mockPkgs {
packages = [ [ "hello" ] ];
};
changedFiles = [
"hello"
"pkgs/by-name/he/hello/sources.json"
];
affectedAttrPaths = [ [ "hello" ] ];
};
expected = {
packages = [ [ "hello" ] ];
teams."100" = [
{ attrPath = [ "hello" ]; }
];
users."0" = [
{ attrPath = [ "hello" ]; }
];
};
};
testModuleMaintainers = {
expr = fun {
pkgs = mockPkgs {
modules = [ "a" ];
};
changedFiles = [ "a" ];
affectedAttrPaths = [ ];
};
expected = {
packages = [ ];
teams."100" = [
{ file = "a"; }
];
users."0" = [
{ file = "a"; }
];
};
};
testModuleMaintainersNonGithub = {
expr = fun {
pkgs = mockPkgs {
modules = [ "a" ];
githubTeams = false;
};
changedFiles = [ "a" ];
affectedAttrPaths = [ ];
};
expected = {
packages = [ ];
teams = { };
users."100" = [
{ file = "a"; }
];
users."0" = [
{ file = "a"; }
];
};
};
testGroupAttrdiffByPlatform = {
expr = utils.groupAttrdiffByPlatform {
added = [
"new-tool.aarch64-linux"
"new-tool.x86_64-darwin"
];
changed = [
"updated-tool.x86_64-darwin"
"shared-tool.x86_64-darwin"
];
removed = [
"removed-tool.aarch64-darwin"
"shared-tool.aarch64-darwin"
];
};
expected = {
aarch64-darwin = {
added = [ ];
changed = [ ];
removed = [
"removed-tool"
"shared-tool"
];
};
aarch64-linux = {
added = [ "new-tool" ];
changed = [ ];
removed = [ ];
};
x86_64-darwin = {
added = [ "new-tool" ];
changed = [
"shared-tool"
"updated-tool"
];
removed = [ ];
};
};
};
testGroupAttrdiffByKernel = {
expr =
let
grouped = utils.groupAttrdiffByKernel {
added = [
"new-tool.aarch64-linux"
"new-tool.x86_64-darwin"
];
changed = [
"updated-tool.x86_64-darwin"
"shared-tool.x86_64-darwin"
];
removed = [
"removed-tool.aarch64-darwin"
"shared-tool.aarch64-darwin"
];
};
in
lib.mapAttrs (_: diff: lib.mapAttrs (_: lib.sort lib.lessThan) diff) grouped;
expected = {
darwin = {
added = [ "new-tool" ];
changed = [
"shared-tool"
"updated-tool"
];
removed = [
"removed-tool"
"shared-tool"
];
};
linux = {
added = [ "new-tool" ];
changed = [ ];
removed = [ ];
};
};
};
};
in
{
result = lib.runTests tests;
}

View File

@@ -22,7 +22,7 @@ rec {
splittedPath = lib.splitString "." packagePlatformPath;
# ["python312Packages" "numpy" "aarch64-linux"] -> ["python312Packages" "numpy"]
packagePath = lib.init splittedPath;
packagePath = lib.sublist 0 (lib.length splittedPath - 1) splittedPath;
# "python312Packages.numpy"
name = lib.concatStringsSep "." packagePath;
@@ -66,7 +66,7 @@ rec {
*/
convertToPackagePlatformAttrs =
packagePlatformPaths:
builtins.filter (x: x != null) (map convertToPackagePlatformAttr packagePlatformPaths);
builtins.filter (x: x != null) (builtins.map convertToPackagePlatformAttr packagePlatformPaths);
/*
Converts a list of `packagePlatformPath`s directly to a list of (unique) package names
@@ -91,7 +91,33 @@ rec {
let
packagePlatformAttrs = convertToPackagePlatformAttrs (uniqueStrings packagePlatformPaths);
in
uniqueStrings (map (p: p.name) packagePlatformAttrs);
uniqueStrings (builtins.map (p: p.name) packagePlatformAttrs);
/*
Computes the key difference between two attrs
{
added: [ <keys only in the second object> ],
removed: [ <keys only in the first object> ],
changed: [ <keys with different values between the two objects> ],
}
*/
diff =
let
filterKeys = cond: attrs: lib.attrNames (lib.filterAttrs cond attrs);
in
old: new: {
added = filterKeys (n: _: !(old ? ${n})) new;
removed = filterKeys (n: _: !(new ? ${n})) old;
changed = filterKeys (
n: v:
# Filter out attributes that don't exist anymore
(new ? ${n})
# Filter out attributes that are the same as the new value
&& (v != (new.${n}))
) old;
};
/*
Group a list of `packagePlatformAttr`s by platforms
@@ -151,51 +177,7 @@ rec {
lib.genAttrs [ "linux" "darwin" ] filterKernel;
/*
Group an attrdiff-style mapping by a derived key such as platform or kernel.
Turns
{
added = [ "new-tool.aarch64-linux" "new-tool.x86_64-darwin" ];
changed = [ "updated-tool.x86_64-darwin" "shared-tool.x86_64-darwin" ];
removed = [ "removed-tool.aarch64-darwin" "shared-tool.aarch64-darwin" ];
}
into
{
aarch64-darwin = {
added = [ ];
changed = [ ];
removed = [ "removed-tool" "shared-tool" ];
};
aarch64-linux = {
added = [ "new-tool" ];
changed = [ ];
removed = [ ];
};
x86_64-darwin = {
added = [ "new-tool" ];
changed = [ "shared-tool" "updated-tool" ];
removed = [ ];
};
}
when used with `groupByPlatform`.
*/
groupAttrdiffBy =
grouper: attrdiff:
let
groupedByKind = lib.mapAttrs (
_: packagePlatformPaths:
grouper (convertToPackagePlatformAttrs (uniqueStrings packagePlatformPaths))
) attrdiff;
groups = uniqueStrings (lib.flatten (map builtins.attrNames (lib.attrValues groupedByKind)));
in
lib.genAttrs groups (group: lib.mapAttrs (_: byGroup: byGroup.${group} or [ ]) groupedByKind);
groupAttrdiffByPlatform = groupAttrdiffBy groupByPlatform;
groupAttrdiffByKernel = groupAttrdiffBy groupByKernel;
/*
Maps an attrs of `kernel - rebuild counts` mappings to an attrs of labels
Maps an attrs of `kernel - rebuild counts` mappings to a list of labels
Turns
{
@@ -203,37 +185,54 @@ rec {
darwin = 1;
}
into
{
"10.rebuild-darwin: 1" = true;
"10.rebuild-darwin: 1-10" = true;
"10.rebuild-darwin: 11-100" = false;
# [...]
"10.rebuild-darwin: 1" = false;
"10.rebuild-darwin: 1-10" = false;
"10.rebuild-linux: 11-100" = true;
# [...]
}
[
"10.rebuild-darwin: 1"
"10.rebuild-darwin: 1-10"
"10.rebuild-linux: 11-100"
]
*/
getLabels =
rebuildCountByKernel:
lib.mergeAttrsList (
lib.concatLists (
lib.mapAttrsToList (
kernel: rebuildCount:
let
range = from: to: from <= rebuildCount && (to == null || rebuildCount <= to);
numbers =
if rebuildCount == 0 then
[ "0" ]
else if rebuildCount == 1 then
[
"1"
"1-10"
]
else if rebuildCount <= 10 then
[ "1-10" ]
else if rebuildCount <= 100 then
[ "11-100" ]
else if rebuildCount <= 500 then
[ "101-500" ]
else if rebuildCount <= 1000 then
[
"501-1000"
"501+"
]
else if rebuildCount <= 2500 then
[
"1001-2500"
"501+"
]
else if rebuildCount <= 5000 then
[
"2501-5000"
"501+"
]
else
[
"5001+"
"501+"
];
in
lib.mapAttrs' (number: lib.nameValuePair "10.rebuild-${kernel}: ${number}") {
"0" = range 0 0;
"1" = range 1 1;
"1-10" = range 1 10;
"11-100" = range 11 100;
"101-500" = range 101 500;
"501-1000" = range 501 1000;
"501+" = range 501 null;
"1001-2500" = range 1001 2500;
"2501-5000" = range 2501 5000;
"5001+" = range 5001 null;
}
lib.forEach numbers (number: "10.rebuild-${kernel}: ${number}")
) rebuildCountByKernel
);
}

View File

@@ -1,33 +1,14 @@
# Evaluates all the accessible paths in nixpkgs.
# *This only builds on Linux* since it requires the Linux sandbox isolation to
# be able to write in various places while evaluating inside the sandbox.
#
# This file is used by nixpkgs CI (see .github/workflows/eval.yml) as well as
# being used directly as an entry point in Lix's CI (in `flake.nix` in the Lix
# repo).
#
# If you know you are doing a breaking API change, please ping the nixpkgs CI
# maintainers and the Lix maintainers (`nix eval -f . lib.teams.lix`).
{
callPackage,
lib,
runCommand,
writeShellScript,
symlinkJoin,
busybox,
writeText,
linkFarm,
time,
procps,
nixVersions,
jq,
nix,
}:
{
# The number of attributes per chunk, see ./README.md for more info.
chunkSize ? 5000,
# Whether to just evaluate a single chunk for quick testing
quickTest ? false,
# Don't try to eval packages marked as broken.
includeBroken ? false,
# Customize the config used to evaluate nixpkgs
extraNixpkgsConfig ? { },
python3,
}:
let
@@ -37,24 +18,21 @@ let
root = ../..;
fileset = unions (
map (lib.path.append ../..) [
".version"
"ci/eval/attrpaths.nix"
"ci/eval/chunk.nix"
"ci/eval/outpaths.nix"
"default.nix"
"doc"
"lib"
"maintainers"
"modules"
"nixos"
"pkgs"
".version"
"ci/supportedSystems.json"
]
);
};
supportedSystems = builtins.fromJSON (
builtins.readFile ../../pkgs/top-level/release-supported-systems.json
);
nix = nixVersions.latest;
supportedSystems = builtins.fromJSON (builtins.readFile ../supportedSystems.json);
attrpathsSuperset =
{
@@ -63,10 +41,9 @@ let
runCommand "attrpaths-superset.json"
{
src = nixpkgs;
# Don't depend on -dev outputs to reduce closure size for CI.
nativeBuildInputs = map lib.getBin [
busybox
nativeBuildInputs = [
nix
time
];
}
''
@@ -75,13 +52,13 @@ let
export GC_INITIAL_HEAP_SIZE=4g
command time -f "Attribute eval done [%MKB max resident, %Es elapsed] %C" \
nix-instantiate --eval --strict --json --show-trace \
"$src/ci/eval/attrpaths.nix" \
"$src/pkgs/top-level/release-attrpaths-superset.nix" \
-A paths \
-I "$src" \
--argstr extraNixpkgsConfigJson ${lib.escapeShellArg (builtins.toJSON extraNixpkgsConfig)} \
--option restrict-eval true \
--option allow-import-from-derivation false \
--option eval-system "${evalSystem}" > $out/paths.json
--option eval-system "${evalSystem}" \
--arg enableWarnings false > $out/paths.json
'';
singleSystem =
@@ -89,9 +66,15 @@ let
# The system to evaluate.
# Note that this is intentionally not called `system`,
# because `--argstr system` would only be passed to the ci/default.nix file!
evalSystem ? builtins.currentSystem,
evalSystem,
# The path to the `paths.json` file from `attrpathsSuperset`
attrpathFile ? "${attrpathsSuperset { inherit evalSystem; }}/paths.json",
# The number of attributes per chunk, see ./README.md for more info.
chunkSize,
checkMeta ? true,
includeBroken ? true,
# Whether to just evaluate a single chunk for quick testing
quickTest ? false,
}:
let
singleChunk = writeShellScript "single-chunk" ''
@@ -101,30 +84,25 @@ let
system=$3
outputDir=$4
# Default is 5, higher values effectively disable the warning.
# This randomly breaks Eval.
export GC_LARGE_ALLOC_WARN_INTERVAL=1000
export NIX_SHOW_STATS=1
export NIX_SHOW_STATS_PATH="$outputDir/stats/$myChunk"
echo "Chunk $myChunk on $system start"
set +e
command time -o "$outputDir/timestats/$myChunk" \
-f "Chunk $myChunk on $system done [%MKB max resident, %Es elapsed] %C" \
nix-env -f "${nixpkgs}/ci/eval/chunk.nix" \
nix-env -f "${nixpkgs}/pkgs/top-level/release-attrpaths-parallel.nix" \
--eval-system "$system" \
--option restrict-eval true \
--option allow-import-from-derivation false \
--query --available \
--out-path --json \
--meta \
--no-name --attr-path --out-path \
--show-trace \
--arg chunkSize "$chunkSize" \
--arg myChunk "$myChunk" \
--arg attrpathFile "${attrpathFile}" \
--arg systems "[ \"$system\" ]" \
--arg checkMeta ${lib.boolToString checkMeta} \
--arg includeBroken ${lib.boolToString includeBroken} \
--argstr extraNixpkgsConfigJson ${lib.escapeShellArg (builtins.toJSON extraNixpkgsConfig)} \
-I ${nixpkgs} \
-I ${attrpathFile} \
> "$outputDir/result/$myChunk" \
@@ -145,17 +123,15 @@ let
in
runCommand "nixpkgs-eval-${evalSystem}"
{
# Don't depend on -dev outputs to reduce closure size for CI.
nativeBuildInputs = map lib.getBin [
busybox
jq
nativeBuildInputs = [
nix
time
procps
jq
];
env = {
inherit evalSystem chunkSize;
};
__structuredAttrs = true;
unsafeDiscardReferences.out = true;
}
''
export NIX_STATE_DIR=$(mktemp -d)
@@ -171,20 +147,20 @@ let
chunkCount=$(( (attrCount - 1) / chunkSize + 1 ))
echo "Chunk count: $chunkCount"
mkdir -p $out/${evalSystem}
mkdir $out
# Record and print stats on free memory and swap in the background
(
while true; do
availMemory=$(free -m | grep Mem | awk '{print $7}')
freeSwap=$(free -m | grep Swap | awk '{print $4}')
echo "Available memory: $(( availMemory )) MiB, free swap: $(( freeSwap )) MiB"
availMemory=$(free -b | grep Mem | awk '{print $7}')
freeSwap=$(free -b | grep Swap | awk '{print $4}')
echo "Available memory: $(( availMemory / 1024 / 1024 )) MiB, free swap: $(( freeSwap / 1024 / 1024 )) MiB"
if [[ ! -f "$out/${evalSystem}/min-avail-memory" ]] || (( availMemory < $(<$out/${evalSystem}/min-avail-memory) )); then
echo "$availMemory" > $out/${evalSystem}/min-avail-memory
if [[ ! -f "$out/min-avail-memory" ]] || (( availMemory < $(<$out/min-avail-memory) )); then
echo "$availMemory" > $out/min-avail-memory
fi
if [[ ! -f $out/${evalSystem}/min-free-swap ]] || (( freeSwap < $(<$out/${evalSystem}/min-free-swap) )); then
echo "$freeSwap" > $out/${evalSystem}/min-free-swap
if [[ ! -f $out/min-free-swap ]] || (( availMemory < $(<$out/min-free-swap) )); then
echo "$freeSwap" > $out/min-free-swap
fi
sleep 4
done
@@ -200,127 +176,99 @@ let
mkdir "$chunkOutputDir"/{result,stats,timestats,stderr}
seq -w 0 "$seq_end" |
command time -f "%e" -o "$out/${evalSystem}/total-time" \
command time -f "%e" -o "$out/total-time" \
xargs -I{} -P"$cores" \
${singleChunk} "$chunkSize" {} "$evalSystem" "$chunkOutputDir"
cp -r "$chunkOutputDir"/stats $out/${evalSystem}/stats-by-chunk
cp -r "$chunkOutputDir"/stats $out/stats-by-chunk
if (( chunkSize * chunkCount != attrCount )); then
# A final incomplete chunk would mess up the stats, don't include it
rm "$chunkOutputDir"/stats/"$seq_end"
fi
cat "$chunkOutputDir"/result/* | jq -s 'add | map_values(.outputs)' > $out/${evalSystem}/paths.json
cat "$chunkOutputDir"/result/* | jq -s 'add | map_values(.meta)' > $out/${evalSystem}/meta.json
cat "$chunkOutputDir"/result/* > $out/paths
'';
diff = callPackage ./diff.nix { };
combine =
{
diffDir,
resultsDir,
}:
runCommand "combined-eval"
runCommand "combined-result"
{
# Don't depend on -dev outputs to reduce closure size for CI.
nativeBuildInputs = map lib.getBin [
nativeBuildInputs = [
jq
];
}
''
mkdir -p $out
# Combine output paths from all systems
cat ${diffDir}/*/diff.json | jq -s '
reduce .[] as $item ({}; {
added: (.added + $item.added),
changed: (.changed + $item.changed),
removed: (.removed + $item.removed),
rebuilds: (.rebuilds + $item.rebuilds)
})
' > $out/combined-diff.json
# Transform output paths to JSON
cat ${resultsDir}/*/paths |
jq --sort-keys --raw-input --slurp '
split("\n") |
map(select(. != "") | split(" ") | map(select(. != ""))) |
map(
{
key: .[0],
value: .[1] | split(";") | map(split("=") |
if length == 1 then
{ key: "out", value: .[0] }
else
{ key: .[0], value: .[1] }
end) | from_entries}
) | from_entries
' > $out/outpaths.json
# Combine maintainers from all systems
cat ${diffDir}/*/maintainers.json | jq -s '
add | group_by(.package) | map({
key: .[0].package,
value: map(.maintainers) | flatten | unique
}) | from_entries
' > $out/maintainers.json
mkdir -p $out/stats
mkdir -p $out/before/stats
for d in ${diffDir}/before/*; do
cp -r "$d"/stats-by-chunk $out/before/stats/$(basename "$d")
done
mkdir -p $out/after/stats
for d in ${diffDir}/after/*; do
cp -r "$d"/stats-by-chunk $out/after/stats/$(basename "$d")
for d in ${resultsDir}/*; do
cp -r "$d"/stats-by-chunk $out/stats/$(basename "$d")
done
'';
compare = callPackage ./compare { };
baseline =
{
# Whether to evaluate on a specific set of systems, by default all are evaluated
evalSystems ? if quickTest then [ "x86_64-linux" ] else supportedSystems,
}:
symlinkJoin {
name = "nixpkgs-eval-baseline";
paths = map (
evalSystem:
singleSystem {
inherit evalSystem;
}
) evalSystems;
};
compare = import ./compare {
inherit
lib
jq
runCommand
writeText
supportedSystems
python3
;
};
full =
{
# Whether to evaluate on a specific set of systems, by default all are evaluated
evalSystems ? if quickTest then [ "x86_64-linux" ] else supportedSystems,
baseline,
# What files have been touched? Defaults to none; use the expression below to calculate it.
# ```
# git diff --name-only --merge-base master HEAD \
# | jq --raw-input --slurp 'split("\n")[:-1]' > touched-files.json
# ```
touchedFilesJson ? builtins.toFile "touched-files.json" "[ ]",
# The number of attributes per chunk, see ./README.md for more info.
chunkSize,
quickTest ? false,
}:
let
diffs = symlinkJoin {
name = "nixpkgs-eval-diffs";
paths = map (
evalSystem:
diff {
inherit evalSystem;
beforeDir = baseline;
afterDir = singleSystem {
inherit evalSystem;
};
}
) evalSystems;
};
comparisonReport = compare {
combinedDir = combine { diffDir = diffs; };
inherit touchedFilesJson;
};
results = linkFarm "results" (
map (evalSystem: {
name = evalSystem;
path = singleSystem {
inherit quickTest evalSystem chunkSize;
};
}) evalSystems
);
in
comparisonReport;
combine {
resultsDir = results;
};
in
{
inherit
attrpathsSuperset
singleSystem
diff
combine
compare
# The above three are used by separate VMs in a GitHub workflow,
# while the below are intended for testing on a single local machine
baseline
# while the below is intended for testing on a single local machine
full
;
}

View File

@@ -1,111 +0,0 @@
{
lib,
runCommand,
writeText,
}:
{
beforeDir,
afterDir,
evalSystem,
}:
let
# Usually we expect a derivation, but when evaluating in multiple separate steps, we pass
# nix store paths around. These need to be turned into (fake) derivations again to track
# dependencies properly.
# We use two steps for evaluation, because we compare results from two different checkouts.
# CI additionalls spreads evaluation across multiple workers.
before = if lib.isDerivation beforeDir then beforeDir else lib.toDerivation beforeDir;
after = if lib.isDerivation afterDir then afterDir else lib.toDerivation afterDir;
/*
Computes the key difference between two attrs
{
added: [ <keys only in the second object> ],
removed: [ <keys only in the first object> ],
changed: [ <keys with different values between the two objects> ],
rebuilds: [ <keys in the second object with values not present at all in first object> ],
}
*/
diff =
old: new:
let
filterKeys = cond: attrs: lib.attrNames (lib.filterAttrs cond attrs);
oldOutputs = lib.pipe old [
(lib.mapAttrsToList (_: lib.attrValues))
lib.concatLists
(lib.flip lib.genAttrs (_: true))
];
in
{
added = filterKeys (n: _: !(old ? ${n})) new;
removed = filterKeys (n: _: !(new ? ${n})) old;
changed = filterKeys (
n: v:
# Filter out attributes that don't exist anymore
(new ? ${n})
# Filter out attributes that are the same as the new value
&& (v != (new.${n}))
) old;
# A "rebuild" is every attrpath ...
rebuilds = filterKeys (
_: pkg:
# ... that has at least one output ...
lib.any (
output:
# ... which has not been built in "old" already.
!(oldOutputs ? ${output})
) (lib.attrValues pkg)
) new;
};
getAttrs =
dir:
let
raw = builtins.readFile "${dir}/${evalSystem}/paths.json";
# The file contains Nix paths; we need to ignore them for evaluation purposes,
# else there will be a "is not allowed to refer to a store path" error.
data = builtins.unsafeDiscardStringContext raw;
in
builtins.fromJSON data;
beforeAttrs = getAttrs before;
afterAttrs = getAttrs after;
diffAttrs = diff beforeAttrs afterAttrs;
diffJson = writeText "diff.json" (builtins.toJSON diffAttrs);
# The maintainer list is not diffed, but just taken as is, to provide a map
# of maintainers on the target branch. A list of GitHub IDs is sufficient for
# all our purposes and reduces size massively.
meta = lib.importJSON "${after}/${evalSystem}/meta.json";
maintainers = lib.pipe meta [
(lib.mapAttrsToList (
k: v: {
# splits off the platform suffix
package = lib.pipe k [
(lib.splitString ".")
lib.init
(lib.concatStringsSep ".")
];
maintainers = map (m: m.githubId) v.maintainers or [ ];
}
))
# Some paths don't have a platform suffix, those will appear with an empty package here.
(lib.filter ({ package, maintainers }: package != "" && maintainers != [ ]))
];
maintainersJson = writeText "maintainers.json" (builtins.toJSON maintainers);
in
runCommand "diff" { } ''
mkdir -p $out/${evalSystem}
cp -r --no-preserve=mode ${before} $out/before
cp -r --no-preserve=mode ${after} $out/after
# JSON files will be processed above explicitly, so avoid copying over
# the source files to keep the artifacts smaller.
find $out/before $out/after -iname '*.json' -delete
cp ${diffJson} $out/${evalSystem}/diff.json
cp ${maintainersJson} $out/${evalSystem}/maintainers.json
''

View File

@@ -1,115 +0,0 @@
#!/usr/bin/env nix-shell
# When using as a callable script, passing `--argstr path some/path` overrides $PWD.
#!nix-shell -p nix -i "nix-env -qaP --no-name --out-path -f ci/eval/outpaths.nix"
{
includeBroken ? true, # set this to false to exclude meta.broken packages from the output
path ? ./../..,
# used by ./attrpaths.nix
attrNamesOnly ? false,
# Set this to `null` to build for builtins.currentSystem only
systems ? builtins.fromJSON (
builtins.readFile (path + "/pkgs/top-level/release-supported-systems.json")
),
# Customize the config used to evaluate nixpkgs
extraNixpkgsConfig ? { },
}:
let
lib = import (path + "/lib");
nixpkgsJobs =
import (path + "/pkgs/top-level/release.nix")
# Compromise: accuracy vs. resources needed for evaluation.
{
inherit attrNamesOnly;
supportedSystems = if systems == null then [ builtins.currentSystem ] else systems;
nixpkgsArgs = {
config = {
allowAliases = false;
allowBroken = includeBroken;
allowUnfree = true;
allowInsecurePredicate = x: true;
allowVariants = !attrNamesOnly;
checkMeta = true;
# Silence the `x86_64-darwin` deprecation warning.
allowDeprecatedx86_64Darwin = true;
handleEvalIssue =
reason: errormsg:
let
fatalErrors = [
"unknown-meta"
"broken-outputs"
];
in
if builtins.elem reason fatalErrors then
abort errormsg
# hydra does not build unfree packages, so tons of them are broken yet not marked meta.broken.
else if
!includeBroken
&& builtins.elem reason [
"broken"
"unfree"
]
then
throw "broken"
else if builtins.elem reason [ "unsupported" ] then
throw "unsupported"
else
true;
inHydra = true;
}
// extraNixpkgsConfig;
__allowFileset = false;
};
};
nixosJobs = import (path + "/nixos/release.nix") {
inherit attrNamesOnly;
supportedSystems = lib.filter (lib.hasSuffix "-linux") (
if systems == null then [ builtins.currentSystem ] else systems
);
};
recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; };
# release-lib leaves recurseForDerivations as empty attrmaps;
# that would break nix-env and we also need to recurse everywhere.
tweak = lib.mapAttrs (
name: val:
if name == "recurseForDerivations" then
true
else if lib.isAttrs val && val.type or null != "derivation" then
recurseIntoAttrs (tweak val)
else
val
);
# Some of these contain explicit references to platform(s) we want to avoid;
# some even (transitively) depend on ~/.nixpkgs/config.nix (!)
blacklist = [
"tarball"
"metrics"
"manual"
"darwin-tested"
"unstable"
"stdenvBootstrapTools"
"moduleSystem"
"lib-tests" # these just confuse the output
];
in
tweak (
(removeAttrs nixpkgsJobs blacklist)
// {
nixosTests = lib.filterAttrs (
name: _: name == "simple-container" || name == "simple-vm"
) nixosJobs.tests;
}
)

65
ci/get-merge-commit.sh Executable file
View File

@@ -0,0 +1,65 @@
#!/usr/bin/env bash
# See ./README.md for docs
set -euo pipefail
log() {
echo "$@" >&2
}
if (( $# < 2 )); then
log "Usage: $0 GITHUB_REPO PR_NUMBER"
exit 99
fi
repo=$1
prNumber=$2
# Retry the API query this many times
retryCount=5
# Start with 5 seconds, but double every retry
retryInterval=5
while true; do
log "Checking whether the pull request can be merged"
prInfo=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/$repo/pulls/$prNumber")
# Non-open PRs won't have their mergeability computed no matter what
state=$(jq -r .state <<< "$prInfo")
if [[ "$state" != open ]]; then
log "PR is not open anymore"
exit 1
fi
mergeable=$(jq -r .mergeable <<< "$prInfo")
if [[ "$mergeable" == "null" ]]; then
if (( retryCount == 0 )); then
log "Not retrying anymore. It's likely that GitHub is having internal issues: check https://www.githubstatus.com/"
exit 3
else
(( retryCount -= 1 )) || true
# null indicates that GitHub is still computing whether it's mergeable
# Wait a couple seconds before trying again
log "GitHub is still computing whether this PR can be merged, waiting $retryInterval seconds before trying again ($retryCount retries left)"
sleep "$retryInterval"
(( retryInterval *= 2 )) || true
fi
else
break
fi
done
if [[ "$mergeable" == "true" ]]; then
log "The PR can be merged"
mergedSha="$(jq -r .merge_commit_sha <<< "$prInfo")"
echo "mergedSha=$mergedSha"
targetSha="$(gh api "/repos/$repo/commits/$mergedSha" --jq '.parents[0].sha')"
echo "targetSha=$targetSha"
else
log "The PR has a merge conflict"
exit 2
fi

View File

@@ -1,3 +0,0 @@
[run]
indent_style = space
indent_size = 2

View File

@@ -1,2 +0,0 @@
node_modules
step-summary.md

View File

@@ -1,2 +0,0 @@
package-lock-only = true
save-exact = true

View File

@@ -1,17 +0,0 @@
# GitHub specific CI scripts
This folder contains [`actions/github-script`](https://github.com/actions/github-script)-based JavaScript code.
It provides a `nix-shell` environment to run and test these actions locally.
To run any of the scripts locally:
- Enter `nix-shell` in `./ci/github-script`.
- Ensure `gh` is authenticated.
## Check commits
Run `./run commits OWNER REPO PR`, where OWNER is your username or "NixOS", REPO is the name of your fork or "nixpkgs" and PR is the number of the pull request to check.
## Labeler
Run `./run labels OWNER REPO`, where OWNER is your username or "NixOS" and REPO the name of your fork or "nixpkgs".

View File

@@ -1,825 +0,0 @@
module.exports = async ({ github, context, core, dry }) => {
const path = require('node:path')
const { DefaultArtifactClient } = await import('@actions/artifact')
const { readFile, writeFile } = require('node:fs/promises')
const withRateLimit = require('./withRateLimit.js')
const { classify } = require('../supportedBranches.js')
const { handleMerge } = require('./merge.js')
const { handleReviewers } = require('./reviewers.js')
const artifactClient = new DefaultArtifactClient()
// Detect if running in a fork (not NixOS/nixpkgs)
const isFork = context.repo.owner !== 'NixOS'
const orgId = (
await github.rest.orgs.get({
org: context.repo.owner,
})
).data.id
async function downloadMaintainerMap(branch) {
let run
const commits = (
await github.rest.repos.listCommits({
...context.repo,
sha: branch,
// We look at 10 commits to find a maintainer map, but this is an arbitrary number. The
// head commit might not have a map, if the queue was bypassed to merge it. This happens
// frequently on staging-esque branches. The branch with the highest chance of getting
// 10 consecutive bypassing commits is the stable staging-next branch. Luckily, this
// also means that the number of PRs open towards that branch is very low, so falling
// back to slightly imprecise maintainer data from master only has a marginal effect.
per_page: 10,
})
).data
for (const commit of commits) {
const run = (
await github.rest.actions.listWorkflowRuns({
...context.repo,
workflow_id: 'merge-group.yml',
status: 'success',
exclude_pull_requests: true,
per_page: 1,
head_sha: commit.sha,
})
).data.workflow_runs[0]
if (!run) continue
const artifact = (
await github.rest.actions.listWorkflowRunArtifacts({
...context.repo,
run_id: run.id,
name: 'maintainers',
})
).data.artifacts[0]
if (!artifact || artifact.expired) continue
await artifactClient.downloadArtifact(artifact.id, {
findBy: {
repositoryName: context.repo.repo,
repositoryOwner: context.repo.owner,
token: core.getInput('github-token'),
},
path: path.resolve(path.join('branches', branch)),
expectedHash: artifact.digest,
})
return JSON.parse(
await readFile(
path.resolve(path.join('branches', branch, 'maintainers.json')),
'utf-8',
),
)
}
// We get here when none of the 10 commits we looked at contained a maintainer map.
// For the master branch, we don't have any fallback options, so we error out.
// In forks without merge-group history, return empty map to allow testing.
if (branch === 'master') {
if (isFork) {
core.warning(
'No maintainer map found. Using empty map (expected in forks without merge-group history).',
)
return {}
}
throw new Error('No maintainer map found.')
}
// For other branches, we select a suitable fallback below.
const { stable, version } = classify(branch)
const release = `release-${version}`
if (stable && branch !== release) {
// Only fallback to the release branch from *other* stable branches.
// Explicitly avoids infinite recursion.
return await getMaintainerMap(release)
} else {
// Falling back to master as last resort.
// This can either be the case for unstable staging-esque or wip branches,
// or for the primary stable branch (release-XX.YY).
return await getMaintainerMap('master')
}
}
// Simple cache for maintainer maps to avoid downloading the same artifacts
// over and over again. Ultimately returns a promise, so the result must be
// awaited for.
const maintainerMaps = {}
function getMaintainerMap(branch) {
if (!maintainerMaps[branch]) {
maintainerMaps[branch] = downloadMaintainerMap(branch)
}
return maintainerMaps[branch]
}
// Caching the list of team members saves API requests when running the bot on the schedule and
// processing many PRs at once.
const members = {}
function getTeamMembers(team_slug) {
if (context.eventName === 'pull_request') {
// We have no chance of getting a token in the pull_request context with the right
// permissions to access the members endpoint below. Thus, we're pretending to have
// no members. This is OK; because this is only for the Test workflow, not for
// real use.
return []
}
// Forks don't have NixOS teams, return empty list
if (isFork) {
return []
}
if (!members[team_slug]) {
members[team_slug] = github.paginate(github.rest.teams.listMembersInOrg, {
org: context.repo.owner,
team_slug,
per_page: 100,
})
}
return members[team_slug]
}
// Caching users saves API requests when running the bot on the schedule and processing
// many PRs at once. It also helps to encapsulate the special logic we need, because
// actions/github doesn't support that endpoint fully, yet.
const users = {}
function getUser(id) {
if (!users[id]) {
users[id] = github
.request({
method: 'GET',
url: '/user/{id}',
id,
})
.then((resp) => resp.data)
.catch((e) => {
// User may have deleted their account
if (e.status === 404) return null
throw e
})
}
return users[id]
}
// Same for teams
const teams = {}
function getTeam(id) {
if (!teams[id]) {
teams[id] = github
.request({
method: 'GET',
url: '/organizations/{orgId}/team/{id}',
orgId,
id,
})
.then((resp) => resp.data)
.catch((e) => {
// Team may have been deleted
if (e.status === 404) return null
throw e
})
}
return teams[id]
}
async function handlePullRequest({ item, stats, events }) {
const log = (k, v) => core.info(`PR #${item.number} - ${k}: ${v}`)
const pull_number = item.number
// This API request is important for the merge-conflict label, because it triggers the
// creation of a new test merge commit. This is needed to actually determine the state of a PR.
const pull_request = (
await github.rest.pulls.get({
...context.repo,
pull_number,
})
).data
log('author', pull_request.user?.login)
const maintainers = await getMaintainerMap(pull_request.base.ref)
const merge_bot_eligible = await handleMerge({
github,
context,
core,
log,
dry,
pull_request,
events,
maintainers,
getTeamMembers,
getUser,
})
// Check for any human reviews other than the PR author, GitHub actions and other GitHub apps.
const reviews = (
await github.graphql(
`query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
# Unlikely that there's ever more than 100 reviews, so let's not bother,
# but once https://github.com/actions/github-script/issues/309 is resolved,
# it would be easy to enable pagination.
reviews(first: 100) {
nodes {
state
user: author {
# Only get users, no bots
... on User {
login
# Set the id field in the resulting JSON to GraphQL's databaseId
# databaseId in GraphQL-land is the same as id in REST-land
id: databaseId
}
}
onBehalfOf(first: 100) {
nodes {
slug
}
}
}
}
}
}
}`,
{
owner: context.repo.owner,
repo: context.repo.repo,
pr: pull_number,
},
)
).repository.pullRequest.reviews.nodes.filter(
(r) =>
// The `... on User` makes it such that .login only exists for users,
// but we still need to filter the others out.
// Accounts could be deleted as well, so don't count them.
r.user?.login &&
// Also exclude author reviews, can't request their review in any case
r.user.id !== pull_request.user?.id,
)
const approvals = new Set(
reviews
.filter((review) => review.state === 'APPROVED')
.map((review) => review.user?.id),
)
// After creation of a Pull Request, `merge_commit_sha` will be null initially:
// The very first merge commit will only be calculated after a little while.
// To avoid labeling the PR as conflicted before that, we wait a few minutes.
// This is intentionally less than the time that Eval takes, so that the label job
// running after Eval can indeed label the PR as conflicted if that is the case.
const merge_commit_sha_valid =
Date.now() - new Date(pull_request.created_at) > 3 * 60 * 1000
const prLabels = {
// We intentionally don't use the mergeable or mergeable_state attributes.
// Those have an intermediate state while the test merge commit is created.
// This doesn't work well for us, because we might have just triggered another
// test merge commit creation by request the pull request via API at the start
// of this function.
// The attribute merge_commit_sha keeps the old value of null or the hash *until*
// the new test merge commit has either successfully been created or failed so.
// This essentially means we are updating the merge conflict label in two steps:
// On the first pass of the day, we just fetch the pull request, which triggers
// the creation. At this stage, the label is likely not updated, yet.
// The second pass will then read the result from the first pass and set the label.
'2.status: merge conflict':
merge_commit_sha_valid && !pull_request.merge_commit_sha,
'2.status: merge-bot eligible': merge_bot_eligible,
'12.approvals: 1': approvals.size === 1,
'12.approvals: 2': approvals.size === 2,
'12.approvals: 3+': approvals.size >= 3,
'12.first-time contribution': [
'NONE',
'FIRST_TIMER',
'FIRST_TIME_CONTRIBUTOR',
].includes(pull_request.author_association),
}
const { id: run_id, conclusion } =
(
await github.rest.actions.listWorkflowRuns({
...context.repo,
workflow_id: 'pull-request-target.yml',
event: 'pull_request_target',
exclude_pull_requests: true,
head_sha: pull_request.head.sha,
})
).data.workflow_runs[0] ??
// TODO: Remove this after 2026-02-01, at which point all pr.yml artifacts will have expired.
(
await github.rest.actions.listWorkflowRuns({
...context.repo,
// In older PRs, we need pr.yml instead of pull-request-target.yml.
workflow_id: 'pr.yml',
event: 'pull_request_target',
exclude_pull_requests: true,
head_sha: pull_request.head.sha,
})
).data.workflow_runs[0] ??
{}
// Newer PRs might not have run Eval to completion, yet.
// Older PRs might not have an eval.yml workflow, yet.
// In either case we continue without fetching an artifact on a best-effort basis.
log('Last eval run', run_id ?? '<n/a>')
if (conclusion === 'success') {
Object.assign(prLabels, {
// We only set this label if the latest eval run was successful, because if it was not, it
// *could* have requested reviewers. We will let the PR author fix CI first, before "escalating"
// this PR to "needs: reviewer".
// Since the first Eval run on a PR always sets rebuild labels, the same PR will be "recently
// updated" for the next scheduled run. Thus, this label will still be set within a few minutes
// after a PR is created, if required.
// Note that a "requested reviewer" disappears once they have given a review, so we check
// existing reviews, too.
'9.needs: reviewer':
!pull_request.draft &&
pull_request.requested_reviewers.length === 0 &&
reviews.length === 0,
})
}
const artifact =
run_id &&
(
await github.rest.actions.listWorkflowRunArtifacts({
...context.repo,
run_id,
name: 'comparison',
})
).data.artifacts[0]
// Instead of checking the boolean artifact.expired, we will give us a minute to
// actually download the artifact in the next step and avoid that race condition.
// Older PRs, where the workflow run was already eval.yml, but the artifact was not
// called "comparison", yet, will skip the download.
const expired =
!artifact ||
new Date(artifact?.expires_at ?? 0) < new Date(Date.now() + 60 * 1000)
log('Artifact expires at', artifact?.expires_at ?? '<n/a>')
if (!expired) {
stats.artifacts++
await artifactClient.downloadArtifact(artifact.id, {
findBy: {
repositoryName: context.repo.repo,
repositoryOwner: context.repo.owner,
token: core.getInput('github-token'),
},
path: path.resolve(pull_number.toString()),
expectedHash: artifact.digest,
})
const changedPaths = JSON.parse(
await readFile(`${pull_number}/changed-paths.json`, 'utf-8'),
)
const evalLabels = changedPaths.labels
// Fetch all PR commits to check their messages for package patterns
const prCommits = await github.paginate(github.rest.pulls.listCommits, {
...context.repo,
pull_number,
per_page: 100,
})
const commitSubjects = prCommits.map(
(c) => c.commit.message.split('\n')[0],
)
// Label new package PRs: "packagename: init at X.Y.Z"
// Exclude NixOS module commits like "nixos/timekpr: init at 0.5.8"
const newPackagePattern = /^(?<!nixos\/)\S+: init at\b/
const hasNewPackages = changedPaths.attrdiff?.added?.length > 0
const commitsIndicateNewPackage = commitSubjects.some((msg) =>
newPackagePattern.test(msg),
)
evalLabels['8.has: package (new)'] =
hasNewPackages && commitsIndicateNewPackage
// Label package update PRs: "packagename: X.Y.Z -> A.B.C"
// Matches versions like: 1.2.3, 0-unstable-2024-01-15, 1.3rc1, alpha, unstable
// Exclude NixOS module commits like "nixos/ncps: types.str -> types.path"
const updatePackagePattern =
/^(?<!nixos\/)\S+: [\w.-]*\d[\w.-]* (->|→) [\w.-]*\d[\w.-]*$/
const commitsIndicateUpdate = commitSubjects.some((msg) =>
updatePackagePattern.test(msg),
)
evalLabels['8.has: package (update)'] = commitsIndicateUpdate
// TODO: Get "changed packages" information from list of changed by-name files
// in addition to just the Eval results, to make this work for these packages
// when Eval results have expired as well.
let packages
try {
packages = JSON.parse(
await readFile(`${pull_number}/packages.json`, 'utf-8'),
)
} catch (e) {
if (e.code !== 'ENOENT') throw e
// TODO: Remove this fallback code once all old artifacts without packages.json
// have expired. This should be the case in ~ February 2026.
packages = Array.from(
new Set(
Object.values(
JSON.parse(
await readFile(`${pull_number}/maintainers.json`, 'utf-8'),
),
).flat(1),
),
)
}
Object.assign(prLabels, evalLabels, {
'11.by: package-maintainer':
Boolean(packages.length) &&
packages.every((pkg) =>
maintainers[pkg]?.includes(pull_request.user.id),
),
'12.approved-by: package-maintainer': packages.some((pkg) =>
maintainers[pkg]?.some((m) => approvals.has(m)),
),
})
if (!pull_request.draft) {
let owners = []
try {
// TODO: Create owner map similar to maintainer map.
owners = (await readFile(`${pull_number}/owners.txt`, 'utf-8')).split(
'\n',
)
} catch (e) {
// Older artifacts don't have the owners.txt, yet.
if (e.code !== 'ENOENT') throw e
}
let team_maintainers = []
try {
team_maintainers = Object.keys(
JSON.parse(await readFile(`${pull_number}/teams.json`, 'utf-8')),
).map((id) => parseInt(id))
} catch (e) {
// Older artifacts don't have the teams.json, yet.
if (e.code !== 'ENOENT') throw e
}
// We set this label earlier already, but the current PR state can be very different
// after handleReviewers has requested reviews, so update it in this case to prevent
// this label from flip-flopping.
prLabels['9.needs: reviewer'] = await handleReviewers({
github,
context,
core,
log,
dry,
pull_request,
reviews,
// TODO: Use maintainer map instead of the artifact.
user_maintainers: Object.keys(
JSON.parse(
await readFile(`${pull_number}/maintainers.json`, 'utf-8'),
),
).map((id) => parseInt(id)),
team_maintainers,
owners,
getUser,
getTeam,
})
}
}
return prLabels
}
// Returns true if the issue was closed. In this case, the labeling does not need to
// continue for this issue. Returns false if no action was taken.
async function handleAutoClose(item) {
const issue_number = item.number
if (item.labels.some(({ name }) => name === '0.kind: packaging request')) {
const body = [
'Thank you for your interest in packaging new software in Nixpkgs. Unfortunately, to mitigate the unsustainable growth of unmaintained packages, **Nixpkgs is no longer accepting package requests** via Issues.',
'',
'As a [volunteer community][community], we are always open to new contributors. If you wish to see this package in Nixpkgs, **we encourage you to [contribute] it yourself**, via a Pull Request. Anyone can [become a package maintainer][maintainers]! You can find language-specific packaging information in the [Nixpkgs Manual][nixpkgs]. Should you need any help, please reach out to the community on [Matrix] or [Discourse].',
'',
'[community]: https://nixos.org/community',
'[contribute]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#quick-start-to-adding-a-package',
'[maintainers]: https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md',
'[nixpkgs]: https://nixos.org/manual/nixpkgs/unstable/',
'[Matrix]: https://matrix.to/#/#dev:nixos.org',
'[Discourse]: https://discourse.nixos.org/c/dev/14',
].join('\n')
core.info(`Issue #${item.number}: auto-closed`)
if (!dry) {
await github.rest.issues.createComment({
...context.repo,
issue_number,
body,
})
await github.rest.issues.update({
...context.repo,
issue_number,
state: 'closed',
state_reason: 'not_planned',
})
}
return true
}
return false
}
async function handle({ item, stats }) {
try {
const log = (k, v, skip) => {
core.info(`#${item.number} - ${k}: ${v}${skip ? ' (skipped)' : ''}`)
return skip
}
log('Last updated at', item.updated_at)
log('URL', item.html_url)
const issue_number = item.number
const itemLabels = {}
const events = await github.paginate(
github.rest.issues.listEventsForTimeline,
{
...context.repo,
issue_number,
per_page: 100,
},
)
const latest_event_at = new Date(
events
.filter(({ event }) =>
[
// These events are hand-picked from:
// https://docs.github.com/en/rest/using-the-rest-api/issue-event-types?apiVersion=2022-11-28
// Each of those causes a PR/issue to *not* be considered as stale anymore.
// Most of these use created_at.
'assigned',
'commented', // uses updated_at, because that could be > created_at
'committed', // uses committer.date
...(item.labels.some(({ name }) => name === '5.scope: tracking')
? ['cross-referenced']
: []),
'head_ref_force_pushed',
'milestoned',
'pinned',
'ready_for_review',
'renamed',
'reopened',
'review_dismissed',
'review_requested',
'reviewed', // uses submitted_at
'unlocked',
'unmarked_as_duplicate',
].includes(event),
)
.map(
({ created_at, updated_at, committer, submitted_at }) =>
new Date(
updated_at ?? created_at ?? submitted_at ?? committer.date,
),
)
// Reverse sort by date value. The default sort() sorts by string representation, which is bad for dates.
.sort((a, b) => b - a)
.at(0) ?? item.created_at,
)
log('latest_event_at', latest_event_at.toISOString())
const stale_at = new Date(new Date().setDate(new Date().getDate() - 180))
const is_stale = latest_event_at < stale_at
if (item.pull_request || context.payload.pull_request) {
// No need to compute merge commits for stale PRs over and over again.
// This increases the repo size on GitHub's side unnecessarily and wastes
// a lot of API requests, too. Any relevant change will result in the
// stale status to change and thus pick up the PR again for labeling.
if (!is_stale) {
stats.prs++
Object.assign(
itemLabels,
await handlePullRequest({ item, stats, events }),
)
}
} else {
stats.issues++
if (item.labels.some(({ name }) => name === '4.workflow: auto-close')) {
// If this returns true, the issue was closed. In this case we return, to not
// label the issue anymore. Most importantly this avoids unlabeling stale issues
// which are closed via auto-close.
if (await handleAutoClose(item)) return
}
}
// Create a map (Label -> Boolean) of all currently set labels.
// Each label is set to True and can be disabled later.
const before = Object.fromEntries(
(
await github.paginate(github.rest.issues.listLabelsOnIssue, {
...context.repo,
issue_number,
})
).map(({ name }) => [name, true]),
)
Object.assign(itemLabels, {
'2.status: stale': !before['1.severity: security'] && is_stale,
})
const after = Object.assign({}, before, itemLabels)
// No need for an API request, if all labels are the same.
const hasChanges = Object.keys(after).some(
(name) => (before[name] ?? false) !== after[name],
)
if (log('Has label changes', hasChanges, !hasChanges)) return
// Skipping labeling on a pull_request event, because we have no privileges.
const labels = Object.entries(after)
.filter(([, value]) => value)
.map(([name]) => name)
if (log('Set labels', labels, dry)) return
await github.rest.issues.setLabels({
...context.repo,
issue_number,
labels,
})
} catch (cause) {
throw new Error(`Labeling #${item.number} failed.`, { cause })
}
}
// Controls level of parallelism. Applies to both the number of concurrent requests
// as well as the number of concurrent workers going through the list of PRs.
// We'll only boost concurrency when we're running many PRs in parallel on a schedule,
// but not for single PRs. This avoids things going wild, when we accidentally make
// too many API requests on treewides.
const maxConcurrent = context.payload.pull_request ? 1 : 20
await withRateLimit({ github, core, maxConcurrent }, async (stats) => {
if (context.payload.pull_request) {
await handle({ item: context.payload.pull_request, stats })
} else {
const lastRun = (
await github.rest.actions.listWorkflowRuns({
...context.repo,
workflow_id: 'bot.yml',
event: 'schedule',
status: 'success',
exclude_pull_requests: true,
per_page: 1,
})
).data.workflow_runs[0]
const cutoff = new Date(
Math.max(
// Go back as far as the last successful run of this workflow to make sure
// we are not leaving anyone behind on GHA failures.
// Defaults to go back 1 hour on the first run.
new Date(
lastRun?.created_at ?? Date.now() - 1 * 60 * 60 * 1000,
).getTime(),
// Go back max. 1 day to prevent hitting all API rate limits immediately,
// when GH API returns a wrong workflow by accident.
Date.now() - 24 * 60 * 60 * 1000,
),
)
core.info(`cutoff timestamp: ${cutoff.toISOString()}`)
const updatedItems = await github.paginate(
github.rest.search.issuesAndPullRequests,
{
q: [
`repo:"${context.repo.owner}/${context.repo.repo}"`,
'is:open',
`updated:>=${cutoff.toISOString()}`,
].join(' AND '),
per_page: 100,
// TODO: Remove after 2025-11-04, when it becomes the default.
advanced_search: true,
},
)
let cursor
// No workflow run available the first time.
if (lastRun) {
// The cursor to iterate through the full list of issues and pull requests
// is passed between jobs as an artifact.
const artifact = (
await github.rest.actions.listWorkflowRunArtifacts({
...context.repo,
run_id: lastRun.id,
name: 'pagination-cursor',
})
).data.artifacts[0]
// If the artifact is not available, the next iteration starts at the beginning.
if (artifact && !artifact.expired) {
stats.artifacts++
const { downloadPath } = await artifactClient.downloadArtifact(
artifact.id,
{
findBy: {
repositoryName: context.repo.repo,
repositoryOwner: context.repo.owner,
token: core.getInput('github-token'),
},
expectedHash: artifact.digest,
},
)
cursor = await readFile(path.resolve(downloadPath, 'cursor'), 'utf-8')
}
}
// From GitHub's API docs:
// GitHub's REST API considers every pull request an issue, but not every issue is a pull request.
// For this reason, "Issues" endpoints may return both issues and pull requests in the response.
// You can identify pull requests by the pull_request key.
const allItems = await github.rest.issues.listForRepo({
...context.repo,
state: 'open',
sort: 'created',
direction: 'asc',
per_page: 100,
after: cursor,
})
// Regex taken and comment adjusted from:
// https://github.com/octokit/plugin-paginate-rest.js/blob/8e5da25f975d2f31dda6b8b588d71f2c768a8df2/src/iterator.ts#L36-L41
// `allItems.headers.link` format:
// <https://api.github.com/repositories/4542716/issues?page=3&per_page=100&after=Y3Vyc29yOnYyOpLPAAABl8qNnYDOvnSJxA%3D%3D>; rel="next",
// <https://api.github.com/repositories/4542716/issues?page=1&per_page=100&before=Y3Vyc29yOnYyOpLPAAABl8xFV9DOvoouJg%3D%3D>; rel="prev"
// Sets `next` to undefined if "next" URL is not present or `link` header is not set.
const next = ((allItems.headers.link ?? '').match(
/<([^<>]+)>;\s*rel="next"/,
) ?? [])[1]
if (next) {
cursor = new URL(next).searchParams.get('after')
const uploadPath = path.resolve('cursor')
await writeFile(uploadPath, cursor, 'utf-8')
if (dry) {
core.info(`pagination-cursor: ${cursor} (upload skipped)`)
} else {
// No stats.artifacts++, because this does not allow passing a custom token.
// Thus, the upload will not happen with the app token, but the default github.token.
await artifactClient.uploadArtifact(
'pagination-cursor',
[uploadPath],
path.resolve('.'),
{
retentionDays: 1,
},
)
}
}
// Some items might be in both search results, so filtering out duplicates as well.
const items = []
.concat(updatedItems, allItems.data)
.filter(
(thisItem, idx, arr) =>
idx ===
arr.findIndex((firstItem) => firstItem.number === thisItem.number),
)
// Instead of handling all items in parallel we set up some workers to handle the queue
// with more controlled parallelism. This avoids problems with `pull_request` fetched at
// the beginning getting out of date towards the end, because it took the whole job 20
// minutes or more to go through 100's of PRs.
await Promise.all(
Array.from({ length: maxConcurrent }, async () => {
while (true) {
const item = items.pop()
if (!item) break
try {
await handle({ item, stats })
} catch (e) {
core.setFailed(`${e.message}\n${e.cause.stack}`)
}
}
}),
)
}
})
}

View File

@@ -1,221 +0,0 @@
/// @ts-check
// TODO: should this be combined with the branch checks in prepare.js?
// They do seem quite similar, but this needs to run after eval,
// and prepare.js obviously doesn't.
const { classify, split } = require('../supportedBranches.js')
const { readFile } = require('node:fs/promises')
const { postReview, dismissReviews } = require('./reviews.js')
const reviewKey = 'check-target-branch'
/**
* @param {{
* github: InstanceType<import('@actions/github/lib/utils').GitHub>,
* context: import('@actions/github/lib/context').Context
* core: import('@actions/core')
* dry: boolean
* }} CheckTargetBranchProps
*/
async function checkTargetBranch({ github, context, core, dry }) {
/**
* @type {{
* attrdiff: {
* added: string[],
* changed: string[],
* removed: string[],
* },
* attrdiffByKernel: Record<string, {
* added: string[],
* changed: string[],
* removed: string[],
* }>,
* attrdiffByPlatform: Record<string, {
* added: string[],
* changed: string[],
* removed: string[],
* }>,
* labels: Record<string, boolean>,
* rebuildCountByKernel: Record<string, number>,
* rebuildsByKernel: Record<string, string[]>,
* rebuildsByPlatform: Record<string, string[]>,
* }}
*/
const changed = JSON.parse(
await readFile('comparison/changed-paths.json', 'utf-8'),
)
const pull_number = context.payload.pull_request?.number
if (!pull_number) {
core.warning(
'Skipping checkTargetBranch: no pull_request number (is this being run as part of a merge group?)',
)
return
}
const prInfo = (
await github.rest.pulls.get({
...context.repo,
pull_number,
})
).data
const base = prInfo.base.ref
const head = prInfo.head.ref
const baseClassification = classify(base)
const headClassification = classify(head)
// Don't run on, e.g., staging-nixos to master merges.
if (headClassification.type.includes('development')) {
core.info(
`Skipping checkTargetBranch: PR is from a development branch (${head})`,
)
await dismissReviews({
github,
context,
core,
dry,
reviewKey,
})
return
}
// Don't run on PRs against staging branches, wip branches, haskell-updates, etc.
if (!baseClassification.type.includes('primary')) {
core.info(
`Skipping checkTargetBranch: PR is against a non-primary base branch (${base})`,
)
await dismissReviews({
github,
context,
core,
dry,
reviewKey,
})
return
}
const maxRebuildCount = Math.max(
...Object.values(changed.rebuildCountByKernel),
)
const rebuildsAllTests =
changed.attrdiff.changed.includes('nixosTests.simple-container') ||
changed.attrdiff.changed.includes('nixosTests.simple-vm')
// https://github.com/NixOS/nixpkgs/pull/521157
// These should go to master and release-xx.xx when backported
let isExemptKernelUpdate = false
if (prInfo.changed_files === 1) {
const changedFiles = (
await github.rest.pulls.listFiles({
...context.repo,
pull_number,
})
).data
isExemptKernelUpdate =
changedFiles.length === 1 &&
changedFiles[0].filename ===
'pkgs/os-specific/linux/kernel/xanmod-kernels.nix'
}
// https://github.com/NixOS/nixpkgs/pull/483194#issuecomment-3793393218
const isExemptHomeAssistantUpdate =
maxRebuildCount <= 1500 && head === 'wip-home-assistant'
core.info(
[
`checkTargetBranch: this PR:`,
` * causes ${maxRebuildCount} rebuilds`,
` * ${rebuildsAllTests ? 'rebuilds' : 'does not rebuild'} all NixOS tests`,
` * ${isExemptKernelUpdate ? 'is' : 'is not'} an exempt kernel update`,
` * ${isExemptHomeAssistantUpdate ? 'is' : 'is not'} an exempt home-assistant update`,
].join('\n'),
)
if (
maxRebuildCount >= 1000 &&
!isExemptHomeAssistantUpdate &&
!isExemptKernelUpdate
) {
const desiredBranch =
base === 'master' ? 'staging' : `staging-${split(base).version}`
const body = [
`The PR's base branch is set to \`${base}\`, but this PR causes ${maxRebuildCount} rebuilds.`,
'It is therefore considered a mass rebuild.',
`Please [change the base branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request) to [the right base branch for your changes](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#branch-conventions) (probably \`${desiredBranch}\`).`,
].join('\n')
await postReview({
github,
context,
core,
dry,
body,
event: 'REQUEST_CHANGES',
reviewKey,
})
} else if (rebuildsAllTests && !isExemptKernelUpdate) {
let branchText
if (base === 'master' && maxRebuildCount >= 500) {
branchText = '(probably either `staging-nixos` or `staging`)'
} else if (base === 'master') {
branchText = '(probably `staging-nixos`)'
} else if (maxRebuildCount >= 500) {
branchText = `(probably either \`staging-nixos-${split(base).version}\` or \`staging-${split(base).version}\`)`
} else {
branchText = `(probably \`staging-nixos-${split(base).version}\`)`
}
const body = [
`The PR's base branch is set to \`${base}\`, but this PR rebuilds all NixOS tests.`,
base === 'master' && maxRebuildCount >= 500
? `Since this PR also causes ${maxRebuildCount} rebuilds, it may also be considered a mass rebuild.`
: '',
`Please [change the base branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request) to [the right base branch for your changes](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#branch-conventions) ${branchText}.`,
].join('\n')
await postReview({
github,
context,
core,
dry,
body,
event: 'REQUEST_CHANGES',
reviewKey,
})
} else if (
maxRebuildCount >= 500 &&
!isExemptKernelUpdate &&
!isExemptHomeAssistantUpdate
) {
const stagingBranch =
base === 'master' ? 'staging' : `staging-${split(base).version}`
const body = [
`The PR's base branch is set to \`${base}\`, and this PR causes ${maxRebuildCount} rebuilds.`,
`Please consider whether this PR causes a mass rebuild according to [our conventions](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#branch-conventions).`,
`If it does cause a mass rebuild, please [change the base branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request) to [the right base branch for your changes](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#branch-conventions) (probably \`${stagingBranch}\`).`,
`If it does not cause a mass rebuild, this message can be ignored.`,
].join('\n')
await postReview({
github,
context,
core,
dry,
body,
event: 'REQUEST_CHANGES',
reviewKey,
})
} else {
core.info('checkTargetBranch: this PR is against an appropriate branch.')
await dismissReviews({
github,
context,
core,
dry,
reviewKey,
})
}
}
module.exports = checkTargetBranch

View File

@@ -1,322 +0,0 @@
module.exports = async ({ github, context, core, dry, cherryPicks }) => {
const { execFileSync } = require('node:child_process')
const { classify } = require('../supportedBranches.js')
const withRateLimit = require('./withRateLimit.js')
const { dismissReviews, postReview } = require('./reviews.js')
const reviewKey = 'check-commits'
await withRateLimit({ github, core }, async (stats) => {
stats.prs = 1
const pull_number = context.payload.pull_request.number
const job_url =
context.runId &&
(
await github.paginate(github.rest.actions.listJobsForWorkflowRun, {
...context.repo,
run_id: context.runId,
per_page: 100,
})
).find(({ name }) => name.endsWith('Check / commits')).html_url +
'?pr=' +
pull_number
async function extract({ sha, commit }) {
const noCherryPick = Array.from(
commit.message.matchAll(/^Not-cherry-picked-because: (.*)$/gm),
).at(0)
if (noCherryPick)
return {
sha,
commit,
severity: 'important',
message: `${sha} is not a cherry-pick, because: ${noCherryPick[1]}. Please review this commit manually.`,
type: 'no-cherry-pick',
}
// Using the last line with "cherry" + hash, because a chained backport
// can result in multiple of those lines. Only the last one counts.
const cherry = Array.from(
commit.message.matchAll(/cherry.*([0-9a-f]{40})/g),
).at(-1)
if (!cherry)
return {
sha,
commit,
severity: 'warning',
message: `Couldn't locate the cherry-picked commit's hash in the commit message of ${sha}.`,
type: 'no-commit-hash',
}
const original_sha = cherry[1]
let branches
try {
branches = (
await github.request({
// This is an undocumented endpoint to fetch the branches a commit is part of.
// There is no equivalent in neither the REST nor the GraphQL API.
// The endpoint itself is unlikely to go away, because GitHub uses it to display
// the list of branches on the detail page of a commit.
url: `https://github.com/${context.repo.owner}/${context.repo.repo}/branch_commits/${original_sha}`,
headers: {
accept: 'application/json',
},
})
).data.branches
.map(({ branch }) => branch)
.filter((branch) => classify(branch).type.includes('development'))
} catch (e) {
// For some unknown reason a 404 error comes back as 500 without any more details in a GitHub Actions runner.
// Ignore these to return a regular error message below.
if (![404, 500].includes(e.status)) throw e
}
if (!branches?.length)
return {
sha,
commit,
severity: 'error',
message: `${original_sha} given in ${sha} not found in any pickable branch.`,
}
return {
sha,
commit,
original_sha,
}
}
function diff({ sha, commit, original_sha }) {
const diff = execFileSync('git', [
'-C',
__dirname,
'range-diff',
'--no-color',
'--ignore-all-space',
'--no-notes',
// 100 means "any change will be reported"; 0 means "no change will be reported"
'--creation-factor=100',
`${original_sha}~..${original_sha}`,
`${sha}~..${sha}`,
])
.toString()
.split('\n')
// First line contains commit SHAs, which we'll print separately.
.slice(1)
// # The output of `git range-diff` is indented with 4 spaces, but we'll control indentation manually.
.map((line) => line.replace(/^ {4}/, ''))
if (!diff.some((line) => line.match(/^[+-]{2}/)))
return {
sha,
commit,
severity: 'info',
message: `${original_sha} is highly similar to ${sha}.`,
}
const colored_diff = execFileSync('git', [
'-C',
__dirname,
'range-diff',
'--color',
'--no-notes',
'--creation-factor=100',
`${original_sha}~..${original_sha}`,
`${sha}~..${sha}`,
]).toString()
return {
sha,
commit,
diff,
colored_diff,
severity: 'warning',
message: `Difference between ${sha} and original ${original_sha} may warrant inspection.`,
type: 'diff',
}
}
// For now we short-circuit the list of commits when cherryPicks should not be checked.
// This will not run any checks, but still trigger the "dismiss reviews" part below.
const commits = !cherryPicks
? []
: await github.paginate(github.rest.pulls.listCommits, {
...context.repo,
pull_number,
})
const extracted = await Promise.all(commits.map(extract))
const fetch = extracted
.filter(({ severity }) => !severity)
.flatMap(({ sha, original_sha }) => [sha, original_sha])
if (fetch.length > 0) {
// Fetching all commits we need for diff at once is much faster than any other method.
execFileSync('git', [
'-C',
__dirname,
'fetch',
'--depth=2',
'origin',
...fetch,
])
}
const results = extracted.map((result) =>
result.severity ? result : diff(result),
)
// Log all results without truncation, with better highlighting and all whitespace changes to the job log.
results.forEach(({ sha, commit, severity, message, colored_diff }) => {
core.startGroup(`Commit ${sha}`)
core.info(`Author: ${commit.author.name} ${commit.author.email}`)
core.info(`Date: ${new Date(commit.author.date)}`)
switch (severity) {
case 'error':
core.error(message)
break
case 'warning':
core.warning(message)
break
default:
core.info(message)
}
core.endGroup()
if (colored_diff) core.info(colored_diff)
})
// Only create step summary below in case of warnings or errors.
// Also clean up older reviews, when all checks are good now.
// An empty results array will always trigger this condition, which is helpful
// to clean up reviews created by the prepare step when on the wrong branch.
if (results.every(({ severity }) => severity === 'info')) {
await dismissReviews({ github, context, dry, reviewKey })
return
}
// In the case of "error" severity, we also fail the job.
// Those should be considered blocking and not be dismissable via review.
if (results.some(({ severity }) => severity === 'error'))
process.exitCode = 1
core.summary.addRaw(
'This report is automatically generated by the `PR / Check / cherry-pick` CI workflow.',
true,
)
core.summary.addEOL()
core.summary.addRaw(
"Some of the commits in this PR require the author's and reviewer's attention.",
true,
)
core.summary.addEOL()
if (results.some(({ type }) => type === 'no-commit-hash')) {
core.summary.addRaw(
'Please follow the [backporting guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#how-to-backport-pull-requests) and cherry-pick with the `-x` flag.',
true,
)
core.summary.addRaw(
'This requires changes to the unstable `master` and `staging` branches first, before backporting them.',
true,
)
core.summary.addEOL()
core.summary.addRaw(
'Occasionally, commits are not cherry-picked at all, for example when updating minor versions of packages which have already advanced to the next major on unstable.',
true,
)
core.summary.addRaw(
'These commits can optionally be marked with a `Not-cherry-picked-because: <reason>` footer.',
true,
)
core.summary.addEOL()
}
if (results.some(({ type }) => type === 'diff')) {
core.summary.addRaw(
'Sometimes it is not possible to cherry-pick exactly the same patch.',
true,
)
core.summary.addRaw(
'This most frequently happens when resolving merge conflicts.',
true,
)
core.summary.addRaw(
'The range-diff will help to review the resolution of conflicts.',
true,
)
core.summary.addEOL()
}
core.summary.addRaw(
'If you need to merge this PR despite the warnings, please [dismiss](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review) this review shortly before merging.',
true,
)
results.forEach(({ severity, message, diff }) => {
if (severity === 'info') return
// The docs for markdown alerts only show examples with markdown blockquote syntax, like this:
// > [!WARNING]
// > message
// However, our testing shows that this also works with a `<blockquote>` html tag, as long as there
// is an empty line:
// <blockquote>
//
// [!WARNING]
// message
// </blockquote>
// Whether this is intended or just an implementation detail is unclear.
core.summary.addRaw('<blockquote>')
core.summary.addRaw(
`\n\n[!${{ important: 'IMPORTANT', warning: 'WARNING', error: 'CAUTION' }[severity]}]`,
true,
)
core.summary.addRaw(`${message}`, true)
if (diff) {
// Limit the output to 10k bytes and remove the last, potentially incomplete line, because GitHub
// comments are limited in length. The value of 10k is arbitrary with the assumption, that after
// the range-diff becomes a certain size, a reviewer is better off reviewing the regular diff in
// GitHub's UI anyway, thus treating the commit as "new" and not cherry-picked.
// Note: if multiple commits are close to the limit, this approach could still lead to a comment
// that's too long. We think this is unlikely to happen, and so don't deal with it explicitly.
const truncated = []
let total_length = 0
for (line of diff) {
total_length += line.length
if (total_length > 10000) {
truncated.push('', '[...truncated...]')
break
} else {
truncated.push(line)
}
}
core.summary.addRaw('<details><summary>Show diff</summary>')
core.summary.addRaw('\n\n``````````diff', true)
core.summary.addRaw(truncated.join('\n'), true)
core.summary.addRaw('``````````', true)
core.summary.addRaw('</details>')
}
core.summary.addRaw('</blockquote>')
})
if (job_url)
core.summary.addRaw(
`\n\n_Hint: The full diffs are also available in the [runner logs](${job_url}) with slightly better highlighting._`,
)
const body = core.summary.stringify()
core.summary.write()
// Posting a review could fail for very long comments. This can only happen with
// multiple commits all hitting the truncation limit for the diff. If you ever hit
// this case, consider just splitting up those commits into multiple PRs.
await postReview({ github, context, core, dry, body, reviewKey })
})
}

View File

@@ -1,117 +0,0 @@
// @ts-check
const { promisify } = require('node:util')
const execFile = promisify(require('node:child_process').execFile)
/**
* @typedef {{
* subject: string,
* sha: string,
* author: { name: string, email: string },
* committer: { name: string, email: string}
* changedPaths: string[],
* changedPathSegments: Set<string>,
* }} Commit
*/
/**
* @param {{
* args: string[]
* core: import('@actions/core'),
* quiet?: boolean,
* repoPath?: string,
* }} RunGitProps
*/
async function runGit({ args, repoPath, core, quiet }) {
if (repoPath) {
args = ['-C', repoPath, ...args]
}
if (!quiet) {
core.info(`About to run \`git ${args.map((s) => `'${s}'`).join(' ')}\``)
}
return await execFile('git', args)
}
/**
* Gets the SHA, subject and changed files for each commit in the given PR.
*
* Don't use GitHub API at all: the "list commits on PR" endpoint has a limit
* of 250 commits and doesn't return the changed files.
*
* @param {{
* core: import('@actions/core'),
* pr: Awaited<ReturnType<InstanceType<import('@actions/github/lib/utils').GitHub>["rest"]["pulls"]["get"]>>["data"]
* repoPath?: string,
* }} GetCommitMessagesForPRProps
*
* @returns {Promise<Commit[]>}
*/
async function getCommitDetailsForPR({ core, pr, repoPath }) {
await runGit({
args: ['fetch', `--depth=1`, 'origin', pr.base.sha],
repoPath,
core,
})
await runGit({
args: ['fetch', `--depth=${pr.commits + 1}`, 'origin', pr.head.sha],
repoPath,
core,
})
const shas = (
await runGit({
args: [
'rev-list',
`--max-count=${pr.commits}`,
`${pr.base.sha}..${pr.head.sha}`,
],
repoPath,
core,
})
).stdout
.split('\n')
.map((s) => s.trim())
.filter(Boolean)
return Promise.all(
shas.map(async (sha) => {
// Subject, author name, author email, committer name, committer email (all tab-seperated)
// then a blank line, then filenames.
const result = (
await runGit({
args: [
'log',
'--format=%s\t%aN\t%aE\t%cN\t%cE',
'--name-only',
'-1',
sha,
],
repoPath,
core,
quiet: true,
})
).stdout.split('\n')
const [subject, authorName, authorEmail, committerName, committerEmail] =
result[0].split('\t')
const changedPaths = result.slice(2, -1)
const changedPathSegments = new Set(
changedPaths.flatMap((path) => path.split('/')),
)
return {
sha,
subject,
author: { name: authorName, email: authorEmail },
committer: { name: committerName, email: committerEmail },
changedPaths,
changedPathSegments,
}
}),
)
}
module.exports = { getCommitDetailsForPR }

View File

@@ -1,85 +0,0 @@
const excludeTeams = [
/^voters.*$/,
/^nixpkgs-maintainers$/,
/^nixpkgs-committers$/,
]
module.exports = async ({ github, context, core, outFile }) => {
const withRateLimit = require('./withRateLimit.js')
const { writeFileSync } = require('node:fs')
const org = context.repo.owner
const result = {}
await withRateLimit({ github, core }, async () => {
// Turn an Array of users into an Object, mapping user.login -> user.id
function makeUserSet(users) {
// Sort in-place and build result by mutation
users.sort((a, b) => (a.login > b.login ? 1 : -1))
return users.reduce((acc, user) => {
acc[user.login] = user.id
return acc
}, {})
}
// Process a list of teams and append to the result variable
async function processTeams(teams) {
for (const team of teams) {
core.notice(`Processing team ${team.slug}`)
if (!excludeTeams.some((regex) => team.slug.match(regex))) {
const members = makeUserSet(
await github.paginate(github.rest.teams.listMembersInOrg, {
org,
team_slug: team.slug,
role: 'member',
}),
)
const maintainers = makeUserSet(
await github.paginate(github.rest.teams.listMembersInOrg, {
org,
team_slug: team.slug,
role: 'maintainer',
}),
)
result[team.slug] = {
description: team.description,
id: team.id,
maintainers,
members,
name: team.name,
}
}
await processTeams(
await github.paginate(github.rest.teams.listChildInOrg, {
org,
team_slug: team.slug,
}),
)
}
}
const teams = await github.paginate(github.rest.repos.listTeams, {
...context.repo,
})
await processTeams(teams)
})
// Sort the teams by team name
const sorted = Object.keys(result)
.sort()
.reduce((acc, key) => {
acc[key] = result[key]
return acc
}, {})
const json = `${JSON.stringify(sorted, null, 2)}\n`
if (outFile) {
writeFileSync(outFile, json)
} else {
console.log(json)
}
}

View File

@@ -1,223 +0,0 @@
// @ts-check
const { classify } = require('../supportedBranches.js')
const { getCommitDetailsForPR } = require('./get-pr-commit-details.js')
/** @typedef {import('./get-pr-commit-details.js').Commit} Commit */
/**
* @param {{
* github: InstanceType<import('@actions/github/lib/utils').GitHub>,
* context: typeof import('@actions/github').context,
* core: import('@actions/core'),
* repoPath?: string,
* }} LintCommitsProps
*/
async function lintCommits({ github, context, core, repoPath }) {
// This check should only be run when we have the pull_request context.
const pull_number = context.payload.pull_request?.number
if (!pull_number) {
core.info('This is not a pull request. Skipping checks.')
return
}
const pr = (
await github.rest.pulls.get({
...context.repo,
pull_number,
})
).data
const baseBranchType = classify(
pr.base.ref.replace(/^refs\/heads\//, ''),
).type
const headBranchType = classify(
pr.head.ref.replace(/^refs\/heads\//, ''),
).type
if (
baseBranchType.includes('development') &&
headBranchType.includes('development') &&
pr.base.repo.id === pr.head.repo?.id
) {
// This matches, for example, PRs from NixOS:staging-next to NixOS:master, or vice versa.
// Ignore them: we should only care about PRs introducing *new* commits.
// We still want to run on PRs from, e.g., Someone:master to NixOS:master, though.
core.info(
'This PR is from one development branch to another. Skipping checks.',
)
return
}
const commits = await getCommitDetailsForPR({ core, pr, repoPath })
await checkCommitMessages({ commits, core })
await checkCommitMetadata({ commits, core })
}
/**
* @param {{
* commits: Commit[],
* core: import('@actions/core'),
* }} CheckCommitMessagesProps
*/
async function checkCommitMessages({ commits, core }) {
const failures = new Set()
const conventionalCommitTypes = [
'build',
'chore',
'ci',
'doc',
'docs',
'feat',
'feature',
'fix',
'perf',
'refactor',
'style',
'test',
]
/**
* @param {string[]} types e.g. ["fix", "feat"]
* @param {string?} sha commit hash
*/
function makeConventionalCommitRegex(types, sha = null) {
core.info(
`${
sha
? `Conventional commit types for ${sha?.slice(0, 16)}`
: 'Default conventional commit types'
}: ${JSON.stringify(types)}`,
)
return new RegExp(`^(${types.join('|')})!?(\\(.*\\))?!?:`)
}
// Optimize for the common case that we don't have path segments with the
// same name as a conventional commit type.
const fullConventionalCommitRegex = makeConventionalCommitRegex(
conventionalCommitTypes,
)
for (const commit of commits) {
const logMsgStart = `Commit ${commit.sha}'s message's subject ("${commit.subject}")`
// If we have a commit `perf: ...`, and we touch a file containing the path
// segment "perf", we don't want to flag this.
const filteredTypes = conventionalCommitTypes.filter(
(type) => !commit.changedPathSegments.has(type),
)
const conventionalCommitRegex =
filteredTypes.length === conventionalCommitTypes.length
? fullConventionalCommitRegex
: makeConventionalCommitRegex(filteredTypes, commit.sha)
if (!commit.subject.includes(': ')) {
core.error(
`${logMsgStart} was detected as not meeting our guidelines because ` +
'it does not contain a colon followed by a whitespace. ' +
'There are likely other issues as well.',
)
failures.add(commit.sha)
}
if (commit.subject.endsWith('.')) {
core.error(
`${logMsgStart} was detected as not meeting our guidelines because ` +
'it ends in a period. There may be other issues as well.',
)
failures.add(commit.sha)
}
const fixups = ['amend!', 'fixup!', 'squash!']
if (fixups.some((s) => commit.subject.startsWith(s))) {
core.error(
`${logMsgStart} was detected as not meeting our guidelines because ` +
`it begins with "${fixups.find((s) => commit.subject.startsWith(s))}". ` +
'Did you forget to run `git rebase -i --autosquash`?',
)
failures.add(commit.sha)
}
if (conventionalCommitRegex.test(commit.subject)) {
core.error(
`${logMsgStart} was detected as not meeting our guidelines because ` +
'it seems to use conventional commit (conventionalcommits.org) ' +
'formatting. Nixpkgs has its own, different, commit message ' +
'formatting standards.',
)
failures.add(commit.sha)
}
if (!failures.has(commit.sha)) {
core.info(`${logMsgStart} passed our automated checks!`)
}
}
if (failures.size !== 0) {
core.error(
'Please review the guidelines at ' +
'<https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions>, ' +
'as well as the applicable area-specific guidelines linked there.',
)
core.setFailed('Committers: merging is discouraged.')
}
}
/**
* @param {{
* commits: Commit[],
* core: import('@actions/core'),
* }} CheckGitFieldsProps
*/
async function checkCommitMetadata({ commits, core }) {
const failures = new Set()
/** @type {(s: string) => boolean} */
const isEmail = (s) => /^.+@.*$/.test(s)
for (const commit of commits) {
if (!commit.author.name) {
core.error(`Commit ${commit.sha} author's name field is missing`)
failures.add(commit.sha)
}
if (!commit.author.email || !isEmail(commit.author.email)) {
core.error(
`Commit ${commit.sha} author's email field is missing or invalid`,
)
failures.add(commit.sha)
}
if (!commit.committer.name) {
core.error(`Commit ${commit.sha} committer's name field is missing`)
failures.add(commit.sha)
}
if (!commit.committer.email || !isEmail(commit.committer.email)) {
core.error(
`Commit ${commit.sha} committer's email field is missing or invalid`,
)
failures.add(commit.sha)
}
if (!failures.has(commit.sha)) {
core.info(
`Commit ${commit.sha}'s git fields passed our automated checks!`,
)
}
}
if (failures.size !== 0) {
core.error(
'Please add the missing commit fields. ' +
'You can use the noreply email address generated for you by GitHub ' +
'(https://docs.github.com/en/account-and-profile/reference/email-addresses-reference#your-noreply-email-address) ' +
"if you'd like.",
)
core.setFailed('Committers: merging is discouraged.')
}
}
module.exports = lintCommits

View File

@@ -1,95 +0,0 @@
// @ts-check
const { classify } = require('../supportedBranches.js')
const { getCommitDetailsForPR } = require('./get-pr-commit-details')
/**
* @param {{
* github: InstanceType<import('@actions/github/lib/utils').GitHub>,
* context: import('@actions/github/lib/context').Context,
* core: import('@actions/core'),
* repoPath?: string,
* dry: boolean,
* }} CheckManualFileEditsProps
*/
async function checkManualFileEdits({ github, context, core, repoPath, dry }) {
const { dismissReviews, postReview } = require('./reviews.js')
const reviewKey = 'manual-file-edits'
const pull_number = context.payload.pull_request?.number
if (!pull_number) {
core.info('This is not a pull request. Skipping checks.')
return
}
const pr = (
await github.rest.pulls.get({
...context.repo,
pull_number,
})
).data
if (pr.user.login.endsWith('[bot]')) {
core.info('This is a bot, so these checks do not apply.')
return
}
const baseBranchType = classify(
pr.base.ref.replace(/^refs\/heads\//, ''),
).type
const headBranchType = classify(
pr.head.ref.replace(/^refs\/heads\//, ''),
).type
if (
baseBranchType.includes('development') &&
headBranchType.includes('development') &&
pr.base.repo.id === pr.head.repo?.id
) {
// This matches, for example, PRs from NixOS:staging-next to NixOS:master, or vice versa.
// Ignore them: we should only care about PRs introducing *new* commits.
// We still want to run on PRs from, e.g., Someone:master to NixOS:master, though.
core.info(
'This PR is from one development branch to another. Skipping checks.',
)
return
}
const details = await getCommitDetailsForPR({ core, pr, repoPath })
if (
details.some(({ changedPaths }) =>
changedPaths.includes('maintainers/github-teams.json'),
)
) {
postReview({
github,
context,
core,
dry,
event: 'REQUEST_CHANGES',
body: [
'maintainers/github-teams.json is supposed to accurately reflect the state of the teams in GitHub.\n',
'Therefore, it should not be edited manually.\n',
'All changes to teams listed in maintainers/github-teams.json should be performed in GitHub by a team maintainer.\n',
"Team maintainers are listed in the github-teams.json file and in GitHub's UI.\n",
'If there is no team maintainer available, an org owner can make the needed change, please contact one by',
'following the instructions at https://github.com/NixOS/org/blob/main/doc/github-org-owners.md#how-to-contact-the-team.\n',
'Thank you!',
].reduce(
(prev, curr) => prev + (!prev || prev.endsWith('\n') ? '' : ' ') + curr,
'',
),
reviewKey,
})
} else {
dismissReviews({
github,
context,
core,
dry,
reviewKey,
})
}
}
module.exports = checkManualFileEdits

View File

@@ -1,354 +0,0 @@
const { classify } = require('../supportedBranches.js')
function runChecklist({
committers,
events,
files,
pull_request,
log,
maintainers,
user,
userIsMaintainer,
}) {
const allByName = files.every(
({ filename }) =>
filename.startsWith('pkgs/by-name/') && filename.split('/').length > 4,
)
const packages = files
.filter(({ filename }) => filename.startsWith('pkgs/by-name/'))
.map(({ filename }) => filename.split('/')[3])
.filter(Boolean)
const eligible = !packages.length
? new Set()
: packages
.map((pkg) => new Set(maintainers[pkg]))
.reduce((acc, cur) => acc?.intersection(cur) ?? cur)
const approvals = new Set(
events
.filter(
({ event, state, commit_id }) =>
event === 'reviewed' &&
state === 'approved' &&
// Only approvals for the current head SHA count, otherwise authors could push
// bad code between the approval and the merge.
commit_id === pull_request.head.sha,
)
.map(({ user }) => user?.id)
// Some users have been deleted, so filter these out.
.filter(Boolean),
)
const checklist = {
'PR targets a [development branch](https://github.com/NixOS/nixpkgs/blob/-/ci/README.md#branch-classification).':
classify(pull_request.base.ref).type.includes('development'),
'PR touches only files of packages in `pkgs/by-name/`.': allByName,
'PR is at least one of:': {
'Approved by a [committer](https://github.com/orgs/NixOS/teams/nixpkgs-committers).':
committers.intersection(approvals).size > 0,
'Backported via label.':
pull_request.user.login === 'nixpkgs-ci[bot]' &&
pull_request.head.ref.startsWith('backport-'),
'Opened by a [committer](https://github.com/orgs/NixOS/teams/nixpkgs-committers).':
committers.has(pull_request.user.id),
'Opened by [@r-ryantm](https://nix-community.github.io/nixpkgs-update/r-ryantm/).':
pull_request.user.login === 'r-ryantm',
},
'PR is not a draft': !pull_request.draft,
}
if (user) {
checklist[
`${user.login} is a member of [@NixOS/nixpkgs-maintainers](https://github.com/orgs/NixOS/teams/nixpkgs-maintainers).`
] = userIsMaintainer
if (allByName) {
// We can only determine the below, if all packages are in by-name, since
// we can't reliably relate changed files to packages outside by-name.
checklist[
`${user.login} is a maintainer of all touched packages on the ${pull_request.base.ref} branch.`
] = eligible.has(user.id)
}
} else {
// This is only used when no user is passed, i.e. for labeling.
checklist['PR has maintainers eligible to merge.'] = eligible.size > 0
}
const result = Object.values(checklist).every((v) =>
typeof v === 'boolean' ? v : Object.values(v).some(Boolean),
)
log('checklist', JSON.stringify(checklist))
log('eligible', JSON.stringify(Array.from(eligible)))
log('result', result)
return {
checklist,
eligible,
result,
}
}
// The merge command must be on a separate line and not within codeblocks or html comments.
// Codeblocks can have any number of ` larger than 3 to open/close. We only look at code
// blocks that are not indented, because the later regex wouldn't match those anyway.
function hasMergeCommand(body) {
return (body ?? '')
.replace(/<!--.*?-->/gms, '')
.replace(/(^`{3,})[^`].*?\1/gms, '')
.match(/^@NixOS\/nixpkgs-merge-bot merge\s*$/m)
}
async function handleMergeComment({ github, body, node_id, reaction }) {
if (!hasMergeCommand(body)) return
await github.graphql(
`mutation($node_id: ID!, $reaction: ReactionContent!) {
addReaction(input: {
content: $reaction,
subjectId: $node_id
})
{ clientMutationId }
}`,
{ node_id, reaction },
)
}
async function handleMerge({
github,
context,
core,
log,
dry,
pull_request,
events,
maintainers,
getTeamMembers,
getUser,
}) {
const pull_number = pull_request.number
const committers = new Set(
(await getTeamMembers('nixpkgs-committers')).map(({ id }) => id),
)
const files = (
await github.rest.pulls.listFiles({
...context.repo,
pull_number,
per_page: 100,
})
).data
// Early exit to prevent treewides from using up a lot of API requests (and time!) to list
// all the files in the pull request. For now, the merge-bot will not work when 100 or more
// files are touched in a PR - which should be more than fine.
// TODO: Find a more efficient way of downloading all the *names* of the touched files,
// including an early exit when the first non-by-name file is found.
if (files.length >= 100) return false
// Only look through comments *after* the latest (force) push.
const lastPush = events.findLastIndex(
({ event, sha, commit_id }) =>
['committed', 'head_ref_force_pushed'].includes(event) &&
(sha ?? commit_id) === pull_request.head.sha,
)
const comments = events.slice(lastPush + 1).filter(
({ event, body, user, node_id }) =>
['commented', 'reviewed'].includes(event) &&
hasMergeCommand(body) &&
// Ignore comments where the user has been deleted already.
user &&
// Ignore comments which had already been responded to by the bot.
(dry ||
!events.some(
({ event, body }) =>
['commented'].includes(event) &&
// We're only testing this hidden reference, but not the author of the comment.
// We'll just assume that nobody creates comments with this marker on purpose.
// Additionally checking the author is quite annoying for local debugging.
body.match(new RegExp(`^<!-- comment: ${node_id} -->$`, 'm')),
)),
)
async function merge() {
if (dry) {
core.info(`Merging #${pull_number}... (dry)`)
return ['Merge completed (dry)']
}
// Using GraphQL mutations instead of the REST /merge endpoint, because the latter
// doesn't work with Merge Queues. We now have merge queues enabled on all development
// branches, so we don't need a fallback for regular merges.
try {
const resp = await github.graphql(
`mutation($node_id: ID!, $sha: GitObjectID) {
enqueuePullRequest(input: {
expectedHeadOid: $sha,
pullRequestId: $node_id
})
{
clientMutationId,
mergeQueueEntry { mergeQueue { url } }
}
}`,
{ node_id: pull_request.node_id, sha: pull_request.head.sha },
)
log('merge', 'Queued for merge')
return [
`:heavy_check_mark: [Queued](${resp.enqueuePullRequest.mergeQueueEntry.mergeQueue.url}) for merge (#306934)`,
]
} catch (e) {
log('Enqueuing failed', e.response.errors[0].message)
}
// If required status checks are not satisfied, yet, the above will fail. In this case
// we can enable auto-merge. We could also only use auto-merge, but this often gets
// stuck for no apparent reason.
try {
await github.graphql(
`mutation($node_id: ID!, $sha: GitObjectID) {
enablePullRequestAutoMerge(input: {
expectedHeadOid: $sha,
pullRequestId: $node_id
})
{ clientMutationId }
}`,
{ node_id: pull_request.node_id, sha: pull_request.head.sha },
)
log('merge', 'Auto-merge enabled')
return [
`:heavy_check_mark: Enabled Auto Merge (#306934)`,
'',
'> [!TIP]',
'> Sometimes GitHub gets stuck after enabling Auto Merge. In this case, leaving another approval should trigger the merge.',
]
} catch (e) {
log('Auto Merge failed', e.response.errors[0].message)
throw new Error(e.response.errors[0].message)
}
}
for (const comment of comments) {
log('comment', comment.node_id)
async function react(reaction) {
if (dry) {
core.info(`Reaction ${reaction} on ${comment.node_id} (dry)`)
return
}
await handleMergeComment({
github,
body: comment.body,
node_id: comment.node_id,
reaction,
})
}
async function isMaintainer(username) {
try {
return (
(
await github.rest.teams.getMembershipForUserInOrg({
org: context.repo.owner,
team_slug: 'nixpkgs-maintainers',
username,
})
).data.state === 'active'
)
} catch (e) {
if (e.status === 404) return false
else throw e
}
}
const { result, eligible, checklist } = runChecklist({
committers,
events,
files,
pull_request,
log,
maintainers,
user: comment.user,
userIsMaintainer: await isMaintainer(comment.user.login),
})
const body = [
`<!-- comment: ${comment.node_id} -->`,
`@${comment.user.login} wants to merge this PR.`,
'',
'Requirements to merge this PR with `@NixOS/nixpkgs-merge-bot merge`:',
...Object.entries(checklist).flatMap(([msg, res]) =>
typeof res === 'boolean'
? `- :${res ? 'white_check_mark' : 'x'}: ${msg}`
: [
`- :${Object.values(res).some(Boolean) ? 'white_check_mark' : 'x'}: ${msg}`,
...Object.entries(res).map(
([msg, res]) =>
` - ${res ? ':white_check_mark:' : ':white_large_square:'} ${msg}`,
),
],
),
'',
]
if (eligible.size > 0 && !eligible.has(comment.user.id)) {
const users = await Promise.all(
Array.from(eligible, async (id) => (await getUser(id)).login),
)
body.push(
'> [!TIP]',
'> Maintainers eligible to merge are:',
...users.map((login) => `> - ${login}`),
'',
)
}
if (result) {
await react('ROCKET')
try {
body.push(...(await merge()))
} catch (e) {
// Remove the HTML comment with node_id reference to allow retrying this merge on the next run.
body.shift()
body.push(`:x: Merge failed with: ${e} (#371492)`)
}
} else {
await react('THUMBS_DOWN')
body.push(':x: Pull Request could not be merged (#305350)')
}
if (dry) {
core.info(body.join('\n'))
} else {
await github.rest.issues.createComment({
...context.repo,
issue_number: pull_number,
body: body.join('\n'),
})
}
if (result) break
}
const { result } = runChecklist({
committers,
events,
files,
pull_request,
log,
maintainers,
})
// Returns a boolean, which indicates whether the PR is merge-bot eligible in principle.
// This is used to set the respective label in bot.js.
return result
}
module.exports = {
handleMerge,
handleMergeComment,
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +0,0 @@
{
"private": true,
"//": [
"Keep `@actions/core` and `@actions/github` in sync with",
"https://github.com/actions/github-script/blob/main/package.json.",
"Keep `@actions/artifact` and `bottleneck` in sync with",
"`.github/workflows/bot.yml`."
],
"dependencies": {
"@actions/artifact": "6.2.1",
"@actions/core": "1.10.1",
"@actions/github": "9.1.0",
"bottleneck": "2.19.5",
"commander": "14.0.3"
}
}

View File

@@ -1,239 +0,0 @@
const { classify } = require('../supportedBranches.js')
const { postReview, dismissReviews } = require('./reviews.js')
const reviewKey = 'prepare'
const supportedSystems = require('./supportedSystems.js')
module.exports = async ({ github, context, core, dry }) => {
const pull_number = context.payload.pull_request.number
for (const retryInterval of [5, 10, 20, 40, 80]) {
core.info('Checking whether the pull request can be merged...')
const prInfo = (
await github.rest.pulls.get({
...context.repo,
pull_number,
})
).data
if (prInfo.state !== 'open') throw new Error('PR is not open anymore.')
if (prInfo.mergeable == null) {
core.info(
`GitHub is still computing whether this PR can be merged, waiting ${retryInterval} seconds before trying again...`,
)
await new Promise((resolve) => setTimeout(resolve, retryInterval * 1000))
continue
}
const { base, head } = prInfo
const baseClassification = classify(base.ref)
core.setOutput('base', baseClassification)
console.log('base classification:', baseClassification)
const headClassification =
base.repo.full_name === head.repo.full_name
? classify(head.ref)
: // PRs from forks are always considered WIP.
{ type: ['wip'] }
core.setOutput('head', headClassification)
console.log('head classification:', headClassification)
if (baseClassification.type.includes('channel')) {
const { stable, version } = baseClassification
const correctBranch = stable ? `release-${version}` : 'master'
const body = [
'The `nixos-*` and `nixpkgs-*` branches are pushed to by the channel release script and should not be merged into directly.',
'',
`Please target \`${correctBranch}\` instead.`,
].join('\n')
await postReview({ github, context, core, dry, body, reviewKey })
throw new Error('The PR targets a channel branch.')
}
if (headClassification.type.includes('wip')) {
// In the following, we look at the git history to determine the base branch that
// this Pull Request branched off of. This is *supposed* to be the branch that it
// merges into, but humans make mistakes. Once that happens we want to error out as
// early as possible.
// To determine the "real base", we are looking at the merge-base of primary development
// branches and the head of the PR. The merge-base which results in the least number of
// commits between that base and head is the real base. We can query for this via GitHub's
// REST API. There can be multiple candidates for the real base with the same number of
// commits. In this case we pick the "best" candidate by a fixed ordering of branches,
// as defined in ci/supportedBranches.js.
//
// These requests take a while, when comparing against the wrong release - they need
// to look at way more than 10k commits in that case. Thus, we try to minimize the
// number of requests across releases:
// - First, we look at the primary development branches only: master and release-xx.yy.
// The branch with the fewest commits gives us the release this PR belongs to.
// - We then compare this number against the relevant staging branches for this release
// to find the exact branch that this belongs to.
// All potential development branches
const branches = (
await github.paginate(github.rest.repos.listBranches, {
...context.repo,
per_page: 100,
})
).map(({ name }) => classify(name))
// All stable primary development branches from latest to oldest.
const releases = branches
.filter(({ stable, type }) => type.includes('primary') && stable)
.sort((a, b) => b.version.localeCompare(a.version))
async function mergeBase({ branch, order, version }) {
const { data } = await github.rest.repos.compareCommitsWithBasehead({
...context.repo,
basehead: `${branch}...${head.sha}`,
// Pagination for this endpoint is about the commits listed, which we don't care about.
per_page: 1,
// Taking the second page skips the list of files of this changeset.
page: 2,
})
return {
branch,
order,
version,
commits: data.total_commits,
sha: data.merge_base_commit.sha,
}
}
// Multiple branches can be OK at the same time, if the PR was created of a merge-base,
// thus storing as array.
let candidates = [await mergeBase(classify('master'))]
for (const release of releases) {
const nextCandidate = await mergeBase(release)
if (candidates[0].commits === nextCandidate.commits)
candidates.push(nextCandidate)
if (candidates[0].commits > nextCandidate.commits)
candidates = [nextCandidate]
// The number 10000 is principally arbitrary, but the GitHub API returns this value
// when the number of commits exceeds it in reality. The difference between two stable releases
// is certainly more than 10k commits, thus this works for us as well: If we're targeting
// a wrong release, the number *will* be 10000.
if (candidates[0].commits < 10000) break
}
core.info(`This PR is for NixOS ${candidates[0].version}.`)
// Secondary development branches for the selected version only.
const secondary = branches.filter(
({ branch, type, version }) =>
type.includes('secondary') && version === candidates[0].version,
)
// Make sure that we always check the current target as well, even if its a WIP branch.
secondary.push(classify(base.ref))
for (const branch of secondary) {
const nextCandidate = await mergeBase(branch)
if (candidates[0].commits === nextCandidate.commits)
candidates.push(nextCandidate)
if (candidates[0].commits > nextCandidate.commits)
candidates = [nextCandidate]
}
// If the current branch is among the candidates, this is always better than any other,
// thus sorting at -1.
candidates = candidates
.map((candidate) =>
candidate.branch === base.ref
? { ...candidate, order: -1 }
: candidate,
)
.sort((a, b) => a.order - b.order)
const best = candidates.at(0)
core.info('The base branches for this PR are:')
core.info(`github: ${base.ref}`)
core.info(
`candidates: ${candidates.map(({ branch }) => branch).join(',')}`,
)
core.info(`best candidate: ${best.branch}`)
if (best.branch !== base.ref) {
const current = await mergeBase(classify(base.ref))
const body = [
`The PR's base branch is set to \`${current.branch}\`, but ${current.commits === 10000 ? 'at least 10000' : current.commits - best.commits} commits from the \`${best.branch}\` branch are included. Make sure you know the [right base branch for your changes](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#branch-conventions), then:`,
`- If the changes should go to the \`${best.branch}\` branch, [change the base branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request).`,
`- If the changes should go to the \`${current.branch}\` branch, rebase your PR onto the correct merge-base:`,
' ```bash',
` # git rebase --onto $(git merge-base upstream/${current.branch} HEAD) $(git merge-base upstream/${best.branch} HEAD)`,
` git rebase --onto ${current.sha} ${best.sha}`,
` git push --force-with-lease`,
' ```',
].join('\n')
await postReview({
github,
context,
core,
dry,
body,
event: 'REQUEST_CHANGES',
reviewKey,
})
} else {
await dismissReviews({ github, context, core, dry, reviewKey })
}
}
let mergedSha, targetSha
if (prInfo.mergeable) {
core.info('The PR can be merged.')
mergedSha = prInfo.merge_commit_sha
targetSha = (
await github.rest.repos.getCommit({
...context.repo,
ref: prInfo.merge_commit_sha,
})
).data.parents[0].sha
} else {
core.warning('The PR has a merge conflict.')
mergedSha = head.sha
targetSha = (
await github.rest.repos.compareCommitsWithBasehead({
...context.repo,
basehead: `${base.sha}...${head.sha}`,
})
).data.merge_base_commit.sha
}
core.info(
`Checking the commits:\nmerged: ${mergedSha}\ntarget: ${targetSha}`,
)
core.setOutput('mergedSha', mergedSha)
core.setOutput('targetSha', targetSha)
const systems = await supportedSystems({ github, context, targetSha })
core.setOutput('systems', systems)
const files = (
await github.paginate(github.rest.pulls.listFiles, {
...context.repo,
pull_number: context.payload.pull_request.number,
per_page: 100,
})
).map((file) => file.filename)
const touched = []
if (files.includes('ci/pinned.json')) touched.push('pinned')
core.setOutput('touched', touched)
return
}
throw new Error(
"Not retrying anymore. It's likely that GitHub is having internal issues: check https://www.githubstatus.com.",
)
}

View File

@@ -1,188 +0,0 @@
async function handleReviewers({
github,
context,
core,
log,
dry,
pull_request,
reviews,
user_maintainers,
team_maintainers,
owners,
getUser,
getTeam,
}) {
const pull_number = pull_request.number
// Users that the PR has already reached, e.g. they've left a review or have been requested for one
const users_reached = new Set([
...pull_request.requested_reviewers.map(({ login }) => login.toLowerCase()),
...reviews.map(({ user }) => user.login.toLowerCase()),
])
log('reviewers - users_reached', Array.from(users_reached).join(', '))
// Same for teams
const teams_reached = new Set([
...pull_request.requested_teams.map(({ slug }) => slug.toLowerCase()),
...reviews.flatMap(({ onBehalfOf }) =>
onBehalfOf.nodes.map(({ slug }) => slug.toLowerCase()),
),
])
log('reviewers - teams_reached', Array.from(teams_reached).join(', '))
// Early sanity check, before we start making any API requests. The list of maintainers
// does not have duplicates so the only user to filter out from this list would be the
// PR author. Therefore, we check for a limit of 15+1, where 15 is the limit we check
// further down again.
// This is to protect against huge treewides consuming all our API requests for no
// reason.
if (user_maintainers.length + team_maintainers.length > 16) {
core.warning('Too many potential reviewers, skipping review requests.')
// Return a boolean on whether the "needs: reviewers" label should be set.
return users_reached.size === 0 && teams_reached.size === 0
}
// Users that should be reached
var users_to_reach = new Set([
...(
await Promise.all(
user_maintainers.map(async (id) => {
const user = await getUser(id)
// User may have deleted their account
return user?.login?.toLowerCase()
}),
)
).filter(Boolean),
...owners
.filter((handle) => handle && !handle.includes('/'))
.map((handle) => handle.toLowerCase()),
])
// We can't request a review from the author.
.difference(new Set([pull_request.user?.login.toLowerCase()]))
// Filter users to repository collaborators. If they're not, they can't be requested
// for review. In that case, they probably missed their invite to the maintainers team.
users_to_reach = new Set(
(
await Promise.all(
Array.from(users_to_reach, async (username) => {
// TODO: Restructure this file to only do the collaborator check for those users
// who were not already part of a team. Being a member of a team makes them
// collaborators by definition.
try {
await github.rest.repos.checkCollaborator({
...context.repo,
username,
})
return username
} catch (e) {
if (e.status !== 404) throw e
core.warning(
`PR #${pull_number}: User ${username} cannot be requested for review because they don't exist or are not a repository collaborator, ignoring. They probably missed the automated invite to the maintainers team (see <https://github.com/NixOS/nixpkgs/issues/234293>).`,
)
}
}),
)
).filter(Boolean),
)
log('reviewers - users_to_reach', Array.from(users_to_reach).join(', '))
// Similar for teams
var teams_to_reach = new Set([
...(
await Promise.all(
team_maintainers.map(async (id) => {
const team = await getTeam(id)
// Team may have been deleted
return team?.slug?.toLowerCase()
}),
)
).filter(Boolean),
...owners
.map((handle) => handle.split('/'))
.filter(
([org, slug]) =>
org.toLowerCase() === context.repo.owner.toLowerCase() && slug,
)
.map(([, slug]) => slug.toLowerCase()),
])
teams_to_reach = new Set(
(
await Promise.all(
Array.from(teams_to_reach, async (slug) => {
try {
await github.rest.teams.checkPermissionsForRepoInOrg({
org: context.repo.owner,
team_slug: slug,
owner: context.repo.owner,
repo: context.repo.repo,
})
return slug
} catch (e) {
if (e.status !== 404) throw e
core.warning(
`PR #${pull_number}: Team ${slug} cannot be requested for review because it doesn't exist or has no repository permissions, ignoring. Probably wasn't added to the nixpkgs-maintainers team (see https://github.com/NixOS/nixpkgs/tree/master/maintainers#maintainer-teams)`,
)
}
}),
)
).filter(Boolean),
)
log('reviewers - teams_to_reach', Array.from(teams_to_reach).join(', '))
if (users_to_reach.size + teams_to_reach.size > 15) {
core.warning(
`Too many reviewers (users: ${Array.from(users_to_reach).join(', ')}, teams: ${Array.from(teams_to_reach).join(', ')}), skipping review requests.`,
)
// Return a boolean on whether the "needs: reviewers" label should be set.
return users_reached.size === 0 && teams_reached.size === 0
}
// We don't want to rerequest reviews from people who already reviewed or were requested
const users_not_yet_reached = Array.from(
users_to_reach.difference(users_reached),
)
log('reviewers - users_not_yet_reached', users_not_yet_reached.join(', '))
// We don't want to rerequest reviews from teams who already reviewed or were requested
const teams_not_yet_reached = Array.from(
teams_to_reach.difference(teams_reached),
)
log('reviewers - teams_not_yet_reached', teams_not_yet_reached.join(', '))
if (
users_not_yet_reached.length === 0 &&
teams_not_yet_reached.length === 0
) {
log('Has reviewer changes', 'false (skipped)')
} else if (dry) {
core.info(
`Requesting user reviewers for #${pull_number}: ${users_not_yet_reached.join(', ')} (dry)`,
)
core.info(
`Requesting team reviewers for #${pull_number}: ${teams_not_yet_reached.join(', ')} (dry)`,
)
} else {
// We had tried the "request all reviewers at once" thing in the past, but it didn't work out:
// https://github.com/NixOS/nixpkgs/commit/034613f860fcd339bd2c20c8f6bc259a2f9dc034
// If we're hitting API errors here again, we'll need to investigate - and possibly reverse
// course.
await github.rest.pulls.requestReviewers({
...context.repo,
pull_number,
reviewers: users_not_yet_reached,
team_reviewers: teams_not_yet_reached,
})
}
// Return a boolean on whether the "needs: reviewers" label should be set.
return (
users_not_yet_reached.length === 0 &&
teams_not_yet_reached.length === 0 &&
users_reached.size === 0 &&
teams_reached.size === 0
)
}
module.exports = {
handleReviewers,
}

View File

@@ -1,271 +0,0 @@
// @ts-check
const eventToState = {
COMMENT: 'COMMENTED',
REQUEST_CHANGES: 'CHANGES_REQUESTED',
}
// Use substring checks in order to allow testing in forks
// Usernames must also end in "[bot]"
const reviewUsers = [
'github-actions',
'nixpkgs-ci',
'branch-check',
'commit-check',
'manual-edit',
]
/**
* @typedef {InstanceType<import('@actions/github/lib/utils').GitHub>} GitHub
* @typedef {typeof import('@actions/github').context} Context
*
* @typedef {Awaited<ReturnType<GitHub['rest']['pulls']['listReviews']>>['data'][number]} Review
* @typedef {Review & { user: NonNullable<Review['user']> }} ReviewWithNonNullUser
*/
/**
* @param {{
* github: GitHub,
* context: Context,
* core: import('@actions/core'),
* dry: boolean,
* reviewKey?: string,
* }} DismissReviewsProps
*/
async function dismissReviews({ github, context, core, dry, reviewKey }) {
const pull_number = context.payload.pull_request?.number
if (!pull_number) {
core.warning('dismissReviews called outside of pull_request context')
return
}
if (dry) {
return
}
const allReviews = await github.paginate(github.rest.pulls.listReviews, {
...context.repo,
pull_number,
})
const reviews = /** @type {ReviewWithNonNullUser[]} */ (
allReviews.filter(
(review) =>
review.user &&
review.state !== 'DISMISSED' &&
review.user.login.endsWith('[bot]') &&
reviewUsers.some((substr) => review.user?.login.includes(substr)),
)
)
const reviewsByUser = reviews.reduce(
(prev, curr) => {
if (!(curr.user.login in prev)) {
prev[curr.user.login] = []
}
prev[curr.user.login].push(curr)
return prev
},
/** @type {Record<string, ReviewWithNonNullUser[]> } */ ({}),
)
const commentRegex = new RegExp(
/<!-- nixpkgs review key: (.*)(?:; resolved: .*)? -->/,
)
const reviewKeyRegex = new RegExp(
`<!-- (nixpkgs review key: ${reviewKey})(?:; resolved: .*)? -->`,
)
const commentResolvedRegex = new RegExp(
/<!-- nixpkgs review key: .*; resolved: true -->/,
)
let reviewsToMinimize = reviews
const /** @type {ReviewWithNonNullUser[]} */ reviewsToDismiss = []
const /** @type {ReviewWithNonNullUser[]} */ reviewsToResolve = []
if (reviewKey && reviews.every((review) => commentRegex.test(review.body))) {
reviewsToMinimize = reviews.filter((review) =>
reviewKeyRegex.test(review.body),
)
}
for (const reviewsForUser of Object.values(reviewsByUser)) {
// Make sure that we don't dismiss all reviews by a user if they
// have any reviews we don't want to dismiss.
if (
reviewsForUser.every(
(review) =>
commentResolvedRegex.test(review.body) ||
(reviewKey && reviewKeyRegex.test(review.body)) ||
// If we are called by check-commits and the review body is clearly
// from `commits.js`, then we can safely dismiss the review.
// This helps with pre-existing reviews (before the comments were added).
(reviewKey &&
reviewKey === 'check-commits' &&
review.body.includes('PR / Check / cherry-pick')),
)
) {
reviewsToDismiss.push(
...reviewsForUser.filter(
(review) => review.state === 'CHANGES_REQUESTED',
),
)
} else {
reviewsToResolve.push(
...reviewsForUser.filter(
(review) =>
review.state === 'CHANGES_REQUESTED' &&
!commentResolvedRegex.test(review.body) &&
reviewsToMinimize.some(
(toMinimize) => toMinimize.node_id === review.node_id,
),
),
)
}
}
await Promise.all([
...reviewsToMinimize.map(async (review) =>
github.graphql(
`mutation($node_id:ID!) {
minimizeComment(input: {
classifier: OUTDATED,
subjectId: $node_id
})
{ clientMutationId }
}`,
{ node_id: review.node_id },
),
),
...reviewsToDismiss.map(async (review) =>
github.rest.pulls.dismissReview({
...context.repo,
pull_number,
review_id: review.id,
message: 'Review dismissed automatically',
}),
),
...reviewsToResolve.map(async (review) =>
github.rest.pulls.updateReview({
...context.repo,
pull_number,
review_id: review.id,
body: review.body.replace(
reviewKeyRegex,
`<!-- nixpkgs review key: ${reviewKey}; resolved: true -->`,
),
}),
),
])
}
/**
* @param {{
* github: GitHub,
* context: Context,
* core: import('@actions/core'),
* dry: boolean,
* body: string,
* event: keyof eventToState,
* reviewKey: string,
* }} PostReviewProps
*/
async function postReview({
github,
context,
core,
dry,
body,
event = 'REQUEST_CHANGES',
reviewKey,
}) {
const pull_number = context.payload.pull_request?.number
if (!pull_number) {
core.warning('postReview called outside of pull_request context')
return
}
const reviewKeyRegex = new RegExp(
`<!-- (nixpkgs review key: ${reviewKey})(?:; resolved: .*)? -->`,
)
const reviewKeyComment = `<!-- nixpkgs review key: ${reviewKey}; resolved: false -->`
body = body + '\n\n' + reviewKeyComment
const reviews = (
await github.paginate(github.rest.pulls.listReviews, {
...context.repo,
pull_number,
})
).filter(
(review) =>
review.user &&
review.state !== 'DISMISSED' &&
review.user.login.endsWith('[bot]') &&
reviewUsers.some((substr) => review.user?.login.includes(substr)),
)
/** @type {null | Review} */
let pendingReview
const matchingReviews = reviews.filter((review) =>
reviewKeyRegex.test(review.body),
)
if (matchingReviews.length === 0) {
pendingReview = null
} else if (
matchingReviews.length === 1 &&
matchingReviews[0].state === eventToState[event]
) {
pendingReview = matchingReviews[0]
} else {
await dismissReviews({
github,
context,
core,
dry,
reviewKey,
})
pendingReview = null
}
if (dry) {
if (pendingReview)
core.info(`pending review found: ${pendingReview.html_url}`)
else core.info('no pending review found')
core.info(body)
} else {
if (pendingReview) {
await Promise.all([
github.rest.pulls.updateReview({
...context.repo,
pull_number,
review_id: pendingReview.id,
body,
}),
github.graphql(
`mutation($node_id:ID!) {
unminimizeComment(input: {
subjectId: $node_id
})
{ clientMutationId }
}`,
{ node_id: pendingReview.node_id },
),
])
} else {
await github.rest.pulls.createReview({
...context.repo,
pull_number,
event,
body,
})
}
}
}
module.exports = {
dismissReviews,
postReview,
}

View File

@@ -1,130 +0,0 @@
#!/usr/bin/env -S node --import ./run
import { execSync } from 'node:child_process'
import { closeSync, mkdtempSync, openSync, rmSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { program } from 'commander'
import * as core from '@actions/core'
import { getOctokit } from '@actions/github'
async function run(action, owner, repo, pull_number, options = {}) {
const token = execSync('gh auth token', { encoding: 'utf-8' }).trim()
const github = getOctokit(token)
const payload = !pull_number ? {} : {
pull_request: (await github.rest.pulls.get({
owner,
repo,
pull_number,
})).data
}
process.env['INPUT_GITHUB-TOKEN'] = token
closeSync(openSync('step-summary.md', 'w'))
process.env.GITHUB_STEP_SUMMARY = 'step-summary.md'
await action({
github,
context: {
payload,
repo: {
owner,
repo,
},
},
core,
dry: true,
...options,
})
}
program
.command('prepare')
.description('Prepare relevant information of a pull request.')
.argument('<owner>', 'Owner of the GitHub repository to check (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to check (Example: nixpkgs)')
.argument('<pr>', 'Number of the Pull Request to check')
.option('--no-dry', 'Make actual modifications')
.action(async (owner, repo, pr, options) => {
const prepare = (await import('./prepare.js')).default
await run(prepare, owner, repo, pr, options)
})
program
.command('commits')
.description('Check commit structure of a pull request.')
.argument('<owner>', 'Owner of the GitHub repository to check (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to check (Example: nixpkgs)')
.argument('<pr>', 'Number of the Pull Request to check')
.option('--no-cherry-picks', 'Do not expect cherry-picks.')
.action(async (owner, repo, pr, options) => {
const commits = (await import('./commits.js')).default
await run(commits, owner, repo, pr, options)
})
program
.command('bot')
.description('Run automation on pull requests and issues.')
.argument('<owner>', 'Owner of the GitHub repository to label (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to label (Example: nixpkgs)')
.argument('[pr]', 'Number of the Pull Request to label')
.option('--no-dry', 'Make actual modifications')
.action(async (owner, repo, pr, options) => {
const bot = (await import('./bot.js')).default
const tmp = mkdtempSync(join(tmpdir(), 'github-script-'))
try {
process.env.GITHUB_WORKSPACE = tmp
process.chdir(tmp)
await run(bot, owner, repo, pr, options)
} finally {
rmSync(tmp, { recursive: true })
}
})
program
.command('get-teams')
.description('Fetch the list of teams with GitHub and output it to a file')
.argument('<owner>', 'Owner of the GitHub repository to label (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to label (Example: nixpkgs)')
.argument('[outFile]', 'Path to the output file (Example: github-teams.json). If not set, prints to stdout')
.action(async (owner, repo, outFile, options) => {
const getTeams = (await import('./get-teams.js')).default
await run(getTeams, owner, repo, undefined, { ...options, outFile })
})
program
.command('lint-commits')
.description('Lint for common errors in commit messages')
.argument('<owner>', 'Owner of the GitHub repository to run on (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to run on (Example: nixpkgs)')
.argument('<pr>', 'Number of the Pull Request to run on')
.action(async (owner, repo, pr, options) => {
const checkCommitMessages = (await import('./lint-commits.js')).default
await run(checkCommitMessages, owner, repo, pr, options)
})
program
.command('check-target-branch')
.description('Check that the PR is made against the correct branch')
.argument('<owner>', 'Owner of the GitHub repository to run on (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to run on (Example: nixpkgs)')
.argument('<pr>', 'Number of the Pull Request to run on')
.action(async (owner, repo, pr, options) => {
const checkCommitMessages = (await import('./check-target-branch.js')).default
await run(checkCommitMessages, owner, repo, pr, options)
})
program
.command('manual-file-edits')
.description("Error when files that shouldn't be edited manually are")
.argument('<owner>', 'Owner of the GitHub repository to run on (Example: NixOS)')
.argument('<repo>', 'Name of the GitHub repository to run on (Example: nixpkgs)')
.argument('<pr>', 'Number of the Pull Request to run on')
.action(async (owner, repo, pr, options) => {
const checkManualFileEdits = (await import('./manual-file-edits.js')).default
await run(checkManualFileEdits, owner, repo, pr, options)
})
await program.parse()

View File

@@ -1,25 +0,0 @@
{
system ? builtins.currentSystem,
pkgs ? (import ../. { inherit system; }).pkgs,
}:
pkgs.callPackage (
{
gh,
importNpmLock,
mkShell,
nodejs,
}:
mkShell {
packages = [
gh
importNpmLock.hooks.linkNodeModulesHook
nodejs
];
npmDeps = importNpmLock.buildNodeModules {
npmRoot = ./.;
inherit nodejs;
};
}
) { }

View File

@@ -1,10 +0,0 @@
module.exports = async ({ github, context, targetSha }) => {
const { content, encoding } = (
await github.rest.repos.getContent({
...context.repo,
path: 'pkgs/top-level/release-supported-systems.json',
ref: targetSha,
})
).data
return JSON.parse(Buffer.from(content, encoding).toString())
}

View File

@@ -1,63 +0,0 @@
module.exports = async ({ github, core, maxConcurrent = 1 }, callback) => {
const Bottleneck = require('bottleneck')
const stats = {
issues: 0,
prs: 0,
requests: 0,
artifacts: 0,
}
// Rate-Limiting and Throttling, see for details:
// https://github.com/octokit/octokit.js/issues/1069#throttling
// https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api
const allLimits = new Bottleneck({
// Avoid concurrent requests
maxConcurrent,
// Will be updated with first `updateReservoir()` call below.
reservoir: 0,
})
// Pause between mutative requests
const writeLimits = new Bottleneck({ minTime: 1000 }).chain(allLimits)
github.hook.wrap('request', async (request, options) => {
// Requests to a different host do not count against the rate limit.
if (options.url.startsWith('https://github.com')) return request(options)
// Requests to the /rate_limit endpoint do not count against the rate limit.
if (options.url === '/rate_limit') return request(options)
// Search requests are in a different resource group, which allows 30 requests / minute.
// We do less than a handful each run, so not implementing throttling for now.
if (options.url.startsWith('/search/')) return request(options)
stats.requests++
if (['POST', 'PUT', 'PATCH', 'DELETE'].includes(options.method))
return writeLimits.schedule(request.bind(null, options))
else return allLimits.schedule(request.bind(null, options))
})
async function updateReservoir() {
let response
try {
response = await github.rest.rateLimit.get()
} catch (err) {
core.error(`Failed updating reservoir:\n${err}`)
// Keep retrying on failed rate limit requests instead of exiting the script early.
return
}
// Always keep 1000 spare requests for other jobs to do their regular duty.
// They normally use below 100, so 1000 is *plenty* of room to work with.
const reservoir = Math.max(0, response.data.resources.core.remaining - 1000)
core.info(`Updating reservoir to: ${reservoir}`)
allLimits.updateSettings({ reservoir })
}
await updateReservoir()
// Update remaining requests every minute to account for other jobs running in parallel.
const reservoirUpdater = setInterval(updateReservoir, 60 * 1000)
try {
await callback(stats)
} finally {
clearInterval(reservoirUpdater)
core.notice(
`Processed ${stats.prs} PRs, ${stats.issues} Issues, made ${stats.requests + stats.artifacts} API requests and downloaded ${stats.artifacts} artifacts.`,
)
}
}

View File

@@ -1,60 +0,0 @@
{
lib,
nix,
nixpkgs-vet,
runCommand,
}:
{
base ? ../.,
head ? ../.,
}:
let
filtered =
with lib.fileset;
path:
toSource {
fileset = difference (gitTracked path) (unions [
(path + /.github)
(path + /ci)
]);
root = path;
};
filteredBase = filtered base;
filteredHead = filtered head;
in
runCommand "nixpkgs-vet"
{
nativeBuildInputs = [
nixpkgs-vet
];
env.NIXPKGS_VET_NIX_PACKAGE = nix;
}
''
export NIX_STATE_DIR=$(mktemp -d)
$NIXPKGS_VET_NIX_PACKAGE/bin/nix-store --init
nixpkgs-vet --base ${filteredBase} ${filteredHead}
# TODO: Upstream into nixpkgs-vet, see:
# https://github.com/NixOS/nixpkgs-vet/issues/164
badFiles=$(find ${filteredHead}/pkgs -type f -name '*.nix' -print | xargs grep -l '^[^#]*<nixpkgs/' || true)
if [[ -n $badFiles ]]; then
echo "Nixpkgs is not allowed to use <nixpkgs> to refer to itself."
echo "The offending files:"
echo "$badFiles"
exit 1
fi
# TODO: Upstream into nixpkgs-vet, see:
# https://github.com/NixOS/nixpkgs-vet/issues/166
conflictingPaths=$(find ${filteredHead} | awk '{ print $1 " " tolower($1) }' | sort -k2 | uniq -D -f 1 | cut -d ' ' -f 1)
if [[ -n $conflictingPaths ]]; then
echo "Files in nixpkgs must not vary only by case."
echo "The offending paths:"
echo "$conflictingPaths"
exit 1
fi
touch $out
''

View File

@@ -61,6 +61,11 @@ trace "Done"
trace -n "Merging base branch into the HEAD commit in $tmp/merged.. "
git -C "$tmp/merged" merge -q --no-edit "$baseSha"
trace -e "\e[34m$(git -C "$tmp/merged" rev-parse HEAD)\e[0m"
trace -n "Reading pinned nixpkgs-vet version from pinned-version.txt.. "
toolVersion=$(<"$tmp/merged/ci/nixpkgs-vet/pinned-version.txt")
trace -e "\e[34m$toolVersion\e[0m"
trace -n "Building tool.. "
nix-build https://github.com/NixOS/nixpkgs-vet/tarball/"$toolVersion" -o "$tmp/tool" -A build
trace "Running nixpkgs-vet.."
nix-build ci -A nixpkgs-vet --arg base "$tmp/base" --arg head "$tmp/merged"
"$tmp/tool/bin/nixpkgs-vet" --base "$tmp/base" "$tmp/merged"

View File

@@ -0,0 +1 @@
0.1.4

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq curl
set -o pipefail -o errexit -o nounset
trace() { echo >&2 "$@"; }
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
repository=NixOS/nixpkgs-vet
pin_file=$SCRIPT_DIR/pinned-version.txt
trace -n "Fetching latest release of $repository.. "
latestRelease=$(curl -sSfL \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/"$repository"/releases/latest)
latestVersion=$(jq .tag_name -r <<< "$latestRelease")
trace "$latestVersion"
trace "Updating $pin_file"
echo "$latestVersion" > "$pin_file"

Some files were not shown because too many files have changed in this diff Show More