Compare commits

..

723 Commits

Author SHA1 Message Date
Jörg Thalheim
d529175648 Backport Rust 1.38 to 19.09 (#70735)
Backport Rust 1.38 to 19.09
2019-10-09 15:07:06 +01:00
Vladimír Čunát
43dabca49e Merge #68730: opencpn: 5.0.0 -> unstable-2019-05-15
This unbreaks the build.

(cherry picked from commit 3f39ab6d53)
2019-10-09 14:30:29 +02:00
Fabian Möller
88bbb3c809 nixos/systemd: fix broken tmpfiles.d symlinks
(cherry picked from commit 996d846726)
2019-10-09 11:39:27 +02:00
Robert Scott
f7c5e7a73c pythonPackages.pandas: 0.25.0 -> 0.25.1
(cherry picked from commit 8044cf3668)
2019-10-09 10:31:21 +02:00
Jonathan Ringer
b6347cb2ea racerd: 2019-03-20 -> 2019-09-02
(cherry picked from commit 02795b4ed5)
2019-10-09 10:17:03 +02:00
Tor Hedin Brønner
2714c28f1a librsvg: 2.44.14 → 2.46.0
rsvg-view was removed so GTK is not needed anymore

(cherry picked from commit 02585db25b)
2019-10-09 10:11:44 +02:00
Vladimír Čunát
2a5bfda3f4 go: apply upstream patch
This should fix the tests almost always failing on Hydra for i686.

(cherry picked from commit d8218de5c5)
/cc ZHF #68361.
2019-10-09 08:58:46 +02:00
Linus Heckemann
d7f1e21fd9 Merge pull request #70832 from srhb/fixup-kea-from-1909-mariadb-divergence
19.09: Fixup kea for unique 19.09 mariadb changes
2019-10-09 08:58:18 +02:00
Sarah Brofeldt
f1b5bba0e1 kea: Use mysql.connector-c.dev for build bins 2019-10-09 08:27:03 +02:00
talyz
25757b66e1 nixos/gitlab: Only create the database when databaseHost is unset
Make sure that we don't create a database if we're not going to
connect to it. Also, fix the assertion that usernames be equal to only
trig when peer authentication is used (databaseHost == "").

(cherry picked from commit 58a7502421)
2019-10-09 02:17:15 +02:00
talyz
81940044c3 nixos/gitlab: Fix evaluation failure when postgresql is disabled
config.services.postgresql.package is only defined when the postgresql
service is activated, which means we fail to evaluate when
databaseCreateLocally == false. Fix this by using the default
postgresql package when the postgresql service is disabled.

(cherry picked from commit ec958d46ac)
2019-10-09 02:17:12 +02:00
talyz
bdd898b3e0 nixos/gitlab: Clean up the initializers on start
The initializers directory is populated with files from the gitlab
distribution on start, but old files will be left in the state folder
even if they're removed from the distribution, which can lead to
startup failures. Fix this by always purging the directory on start
before populating it.

(cherry picked from commit c6efa9fd2d)
2019-10-09 02:17:04 +02:00
talyz
2af3ede7b7 nixos/gitlab: Fix state directory permissions
Since the preStart script is no longer running in privileged mode, we
reassign the files in the state directory and its config subdirectory
to the user we're running as. This is done by splitting the preStart
script into a privileged and an unprivileged part where the privileged
part does the reassignment.

Also, delete the database.yml symlink if it exists, since we want to
create a real file in its place.

Fixes #68696.

(cherry picked from commit 0f8133d633)
2019-10-09 02:16:59 +02:00
talyz
e6fa97f0e0 gitlab: Add myself to list of maintainers
(cherry picked from commit c115d4df88)
2019-10-09 02:16:46 +02:00
talyz
1babda4c26 gitlab: 12.3.4 -> 12.3.5
(cherry picked from commit 9be76d0b6a)
2019-10-09 02:16:43 +02:00
talyz
fdba7dd399 gitlab: Refactor for new repo structure
GitLab recently restructured their repos; whereas previously they had
one gitlab-ce and one gitlab-ee repo, they're now one and the
same. All proprietary components are put into the ee subdirectory -
removing it gives us the foss / community version of GitLab. For more
info, see
https://about.gitlab.com/2019/02/21/merging-ce-and-ee-codebases/

This gives us the opportunity to simplify things quite a bit, since we
don't have to keep track of two separate versions of either the base
data or rubyEnv.

(cherry picked from commit afa3abf632)
2019-10-09 02:16:37 +02:00
talyz
d7a3aaad56 gitlab: Build frontend assets from source
Instead of extracting prebuilt assets from the debian build, build
them from the source. This should give faster package updates and
reduces the amount of data needed to be downloaded by more than 500MB.

(cherry picked from commit 59324d1fb9)
2019-10-09 02:16:32 +02:00
talyz
cc2ddcd6bc gitlab-shell: Split patch into ruby and go parts
Split the remove-hardcoded-locations patch into two separate patches,
one for the ruby package and one for the go package. This is clearer
and results in fewer rebuilds.

(cherry picked from commit 09e657efea)
2019-10-09 02:16:28 +02:00
talyz
7e65ab142f gitlab: 12.1.6 -> 12.3.4
- Update GitLab to 12.3.4

- Update update.py to cope with the new upstream repository structure

- Refactor gitlab-shell to use buildGoPackage and bundlerEnv for
  dependencies

- Refactor gitlab-workhorse to use buildGoPackage for dependencies

- Make update.py able to update gitlab-shell and gitlab-workhorse
  dependencies

- Various fixes necessary for update to work

(cherry picked from commit f3eb063ecf)
2019-10-09 02:16:24 +02:00
worldofpeace
0e1950c5a7 xfce4-12.xfce4-vala-panel-appmenu-plugin: fix eval
(cherry picked from commit 9acb145da3)
2019-10-08 12:33:42 -04:00
Linus Heckemann
724dbda1e0 multiple packages: fix reference to mysql headers
These broke in ce2bb4de26

cc @ttuegel
2019-10-08 17:35:04 +02:00
Linus Heckemann
4a03ddd08d nixos/tests/{ferm,networking}: fix eval with networkd
The networking.virtual test does not work with networkd yet, for
multiple reasons:

- network-online.target is not reached, because tun0 and tap0 are
  considered as required for online but _not_ brought up or assigned
  the configured addresses
- the commands later in the test rely on some units from the scripted
  network setup

cc @fpletz networkd exper
cc @globin we looked at this together

(cherry picked from commit a3a441cd87)
2019-10-08 17:17:14 +02:00
worldofpeace
8b4fbb8d31 ultastar-manager: use qt5's mkDerivation
(cherry picked from commit ee8032c3c3)
2019-10-08 07:18:12 -04:00
worldofpeace
24d8fb80c0 ultrastar-creator: use qt5's mkDerivation
(cherry picked from commit de3f49275e)
2019-10-08 07:18:08 -04:00
Linus Heckemann
a3e11be675 gdal_2: fix build 2019-10-08 12:57:23 +02:00
Linus Heckemann
e55266f5d0 gdal: fix build 2019-10-08 12:47:02 +02:00
Jörg Thalheim
fd15379003 thunderbird: fix build with rustc 1.38
(cherry picked from commit fca2e1cb5a)
2019-10-08 12:23:39 +02:00
Jörg Thalheim
0426d8fd51 rustc: remove test related patches/code
Tests have been disabled since over a year and now the
code starts to bit-rot. As it seems unlikely that they
will come back in near future, let's just remove it.

(cherry picked from commit 173d5a4e6e)
2019-10-08 12:23:24 +02:00
Eelco Dolstra
2c0963fabc rustc: 1.37.0 -> 1.38.0
(cherry picked from commit 9c0968fd81)
2019-10-08 12:23:19 +02:00
Eelco Dolstra
962a6c0667 Revert "rustc: Provide compiler-rt sources"
This reverts commit b7a8280312. It's no
longer needed with Rust 1.38.

(cherry picked from commit adb15c3a63)
2019-10-08 12:23:16 +02:00
Eelco Dolstra
5a98192f4f Revive systemd.coredump.enable
(cherry picked from commit 37c22b9d30)
2019-10-08 12:21:12 +02:00
Eelco Dolstra
5d1649a047 Revert "nixos/doc: re-format"
This reverts commit ea6e8775bd. The new
format is not an improvement.

(cherry picked from commit b0ccd6dd16)

(Also synced rl-19.09.xml with master.)
2019-10-08 12:21:12 +02:00
Eelco Dolstra
1475797aa3 awscli: Get rid of runtime -dev dependencies
(cherry picked from commit c8bc18bcc2)
2019-10-08 12:21:12 +02:00
Eelco Dolstra
f0cd4e4464 libotr: Use multiple outputs
(cherry picked from commit 760bcf678e)
2019-10-08 12:21:12 +02:00
Eelco Dolstra
9287221f4e rtl8812au, rtl8821au: Prevent runtime dependency on kernel.dev
(cherry picked from commit 711cbb9117)
2019-10-08 12:21:12 +02:00
Linus Heckemann
f6544d618f pythonPackages.pytaglib,supervisor: unmark broken 2019-10-08 11:51:09 +02:00
Linus Heckemann
c19cf65261 libguestfs: unmark broken 2019-10-08 11:39:56 +02:00
Linus Heckemann
793a2fe1e8 pythonPackages: fix incorrectly broken packages 2019-10-08 11:23:37 +02:00
Linus Heckemann
1e9cc5b984 treewide: undo some incorrect mark-as-brokens 2019-10-08 11:23:15 +02:00
Linus Heckemann
904f14b2be Merge pull request #70384 from mayflower/anonscm-19.09
Anonscm 19.09
2019-10-08 10:54:52 +02:00
Tim Steinbach
c96bd67803 linux: 4.9.195 -> 4.9.196 2019-10-07 18:03:29 -04:00
Tim Steinbach
57dd876cfc linux: 4.4.195 -> 4.4.196 2019-10-07 18:03:28 -04:00
Tim Steinbach
0477e3406a linux: 4.19.77 -> 4.19.78 2019-10-07 18:03:28 -04:00
Tim Steinbach
cbac5e256a linux: 4.14.147 -> 4.14.148 2019-10-07 18:03:28 -04:00
Tim Steinbach
8aeeb87b8e linux: 5.3.4 -> 5.3.5 2019-10-07 18:03:19 -04:00
Alyssa Ross
5b93ae127a linux: drop non-LTS versioned kernel attributes
Quoting the release manual:

> Remove attributes that we know we will not be able to support,
> especially if there is a stable alternative. E.g. Check that our Linux
> kernels' projected end-of-life are after our release projected
> end-of-life
2019-10-07 20:17:35 +00:00
ysander
0b427f5086 solaar: track latest release and set correct repo owner
Update project homepage

Drop 'unstable' package name attribute

(cherry picked from commit 84d4243ccc)
2019-10-07 20:42:18 +02:00
Joachim F
0c488c9d30 Merge pull request #70516 from joachifm/feat/remove-bclr-for-19.09
Remove blcr for 19.09
2019-10-07 18:15:59 +00:00
Linus Heckemann
e675498026 treewide: mark some broken stuff as broken (WIP) 2019-10-07 13:45:19 -04:00
Jonathan Ringer
75ecca47db pythonPackages.supervisor: fix tests
(cherry picked from commit 5d761d985b)
2019-10-07 13:45:19 -04:00
Vladimír Čunát
949395239d Merge branch 'staging-19.09' into release-19.09 2019-10-07 17:56:32 +02:00
Vladimír Čunát
c922d88299 Merge #70618: linuxPackages.virtualBoxGuestAdditions: fix build
(cherry picked from commit b7b8e1f2e7)
2019-10-07 17:51:02 +02:00
Linus Heckemann
e9f56dd979 19.09 notes: document timesyncd issue
See #64922.

(cherry picked from commit 25a36477c8)
2019-10-07 16:51:41 +02:00
Samuel Leathers
325c40739e nixos/manual: update 19.03 -> 19.09 in upgrading section
(cherry picked from commit 4d25ec0caf)
2019-10-07 16:45:09 +02:00
Samuel Leathers
250751b88c README: Update to 19.09
(cherry picked from commit bdf4441d64)
2019-10-07 16:45:09 +02:00
Vladimír Čunát
ca7b676339 knot-resolver: 4.2.1 -> 4.2.2 (tiny bugfix)
https://gitlab.labs.nic.cz/knot/knot-resolver/tags/v4.2.2
(cherry picked from commit 39049dbd37)
2019-10-07 14:54:05 +02:00
Robin Gloster
1cb925e8a1 nixos-generate-config: add useDHCP per interface
This sets networking.useDHCP to false and for all interfaces found the
per-interface useDHCP to true. This replicates the current default
behaviour and prepares for the switch to networkd.

(cherry picked from commit 5ee383ea8c)
2019-10-07 11:35:09 +02:00
Robin Gloster
da9e914b6c networking.useDHCP: add release notes and docs
(cherry picked from commit e862dd6373)
2019-10-07 11:35:09 +02:00
Robin Gloster
907bb84e4b networking.useDHCP: disallow for networkd
This setting will be removed with the switch to systemd-networkd. The
use of per interface config is encouraged instead.

(cherry picked from commit c26c6241ea)
2019-10-07 11:35:09 +02:00
Jonathan Ringer
f364b997a1 pythonPackages.cufflinks: 0.15 -> 0.16
ZHF #68361

(cherry picked from commit 7d297e4591)
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2019-10-07 01:49:47 -07:00
Jonathan Ringer
dbc6baadca pythonPackages.chart-studio: init at 1.0.0
ZHF #68361

(cherry picked from commit ceefed0723)
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2019-10-07 01:49:14 -07:00
geistesk
cc25b7a7bd zncModules.fish: fix build
ZHF #68361

(cherry picked from commit 8c9c942e90)
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2019-10-07 01:24:27 -07:00
Thomas Depierre
4c6b739fd7 doc/beam: rebar3-open is now removed (#70523)
(cherry picked from commit 0ce30f8c67)
2019-10-06 22:08:19 -04:00
Dmitry Kalinkin
aded58688e ghc modules: use permanent urls
This is a backport of dbb72303b ('ghc modules: use specific commit ...')

cc #70546
2019-10-06 21:41:41 -04:00
Thomas Tuegel
a8d71d3859 pim-data-exporter: Add missing dependencies
(cherry picked from commit d6bbc18708)
2019-10-06 20:02:31 -04:00
Franz Pletz
a0b69c12e2 Merge pull request #70532 from risicle/ris-varnish-6.2.1-r19.09
[r19.09] varnish6: 6.2.0 -> 6.2.1, fixing CVE-2019-15892
2019-10-06 21:41:26 +00:00
Symphorien Gibol
8244f41f10 nixos/xfce4-14: add xfce4-volumed-pulse when not using the desktop
xfce4-volumed-pulse is not abandoned, but is superseded by a panel
plugin which is not available when not using the desktop.

Fixes: volume up/down keys support
(cherry picked from commit d9cac95878)
2019-10-06 16:50:50 -04:00
Robert Scott
db8676117f varnish6: 6.2.0 -> 6.2.1 (security)
fixes CVE-2019-15892
2019-10-06 16:22:09 +01:00
Renaud
4382a14321 Merge pull request #70307 from srhb/backport-k8s-1909
kubernetes: 1.15.3 -> 1.15.4
2019-10-06 16:23:54 +02:00
Joachim Fasting
f89dbe188a linuxPackages.blcr: remove
blcr is only supported for pre v4 kernels.

(cherry picked from commit 83ffa1457b)
2019-10-06 12:11:59 +02:00
Joachim Fasting
0e7e613f44 nixos/blcr: remove
(cherry picked from commit 923c449e9b)
2019-10-06 12:11:54 +02:00
Vladimír Čunát
3976563ad9 Merge #69463: bird2: 2.0.5 -> 2.0.6 (security)
Fixes CVE-2019-16159.  I haven't tested running it,
but the changes in NEWS seem quite small.

(cherry picked from commit 54acf550fa)
2019-10-06 10:53:23 +02:00
Vladimír Čunát
26cebb4b3d bird, bird6: 1.6.6 -> 1.6.8 (security)
I haven't tested running them, but the bumps are almost exclusively
bugfixes, in particular CVE-2019-16159.

(cherry picked from commit 13886ac10e)
2019-10-06 10:53:14 +02:00
Peter Simons
1326d6432a Merge pull request #70185 from NixOS/revert-67355-19.09
Revert "nixos/desktop-managers/xterm: Disable by default" [19.09]
2019-10-05 21:38:22 +02:00
Albert Safin
26dfb4f86b nixos/doc: fix manpage format
Spaces inside <refname> cause stray double underscore in generated manual pages.

Fixes #70468

(cherry picked from commit 0eaf29433e)
2019-10-05 13:42:49 -04:00
Tim Steinbach
95aa1b3c8b linux: 5.3.2 -> 5.3.4 2019-10-05 10:59:19 -04:00
Tim Steinbach
4aa3504910 linux: 5.2.18 -> 5.2.19 2019-10-05 10:59:18 -04:00
Tim Steinbach
da71a886cd linux: 4.9.194 -> 4.9.195 2019-10-05 10:59:18 -04:00
Tim Steinbach
22c2fa17c5 linux: 4.4.194 -> 4.4.195 2019-10-05 10:59:17 -04:00
Tim Steinbach
3c115d8769 linux: 4.19.76 -> 4.19.77 2019-10-05 10:59:17 -04:00
Tim Steinbach
b9f54b2d23 linux: 4.14.146 -> 4.14.147 2019-10-05 10:59:17 -04:00
Nikolay Amiantov
5f51f818cb cntk: partially unbreak
* Use GCC 7 to unbreak the build;
* Mark CUDA build as broken due to cub incompatibility.

(cherry picked from commit de171ba0c6)
2019-10-05 16:19:08 +03:00
R. RyanTM
72f9bc5d17 signal-cli: 0.6.2 -> 0.6.3
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/signal-cli/versions

(cherry picked from commit b31e2832b5)
2019-10-05 15:11:56 +02:00
R. RyanTM
06df4a79f4 libfilezilla: 0.18.1 -> 0.18.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/libfilezilla/versions

(cherry picked from commit 6c55dc2828)
2019-10-05 14:54:00 +02:00
Maximilian Bosch
1735d77242 libcouchbase: fix build
This applies an upstream fix from libcouchbase to fix a timeout issue
with openssl 1.1.

See also https://hydra.nixos.org/build/102495724

ZHF #68361

(cherry picked from commit fd41a333d8)
2019-10-05 08:29:41 -04:00
Elis Hirwing
63b18e7576 php72: 7.2.22 -> 7.2.23
Changelog: https://www.php.net/ChangeLog-7.php#7.2.23
(cherry picked from commit b5f73124e4)
2019-10-05 14:14:03 +02:00
Elis Hirwing
6ae771e8d5 php73: 7.3.9 -> 7.3.10
Changelog: https://www.php.net/ChangeLog-7.php#7.3.10
(cherry picked from commit c1e531bf5e)
2019-10-05 14:14:03 +02:00
Quentin Vaucher
1281668f4a ephemeral: 5.3.0 -> 5.4.0
(cherry picked from commit 5a547851b1)
2019-10-05 07:30:55 -04:00
Quentin Vaucher
cdc37e5d6d timetable: 1.0.8 -> 1.0.9
(cherry picked from commit 2691337a68)
2019-10-05 07:26:22 -04:00
elseym
4bd651df48 documize: introduce state directory
(cherry picked from commit 93fa16f939)
2019-10-05 13:22:03 +02:00
Vladimír Čunát
bd5b390287 Merge #70423: libpng12: 1.2.57 -> 1.2.59 (release-19.09) 2019-10-05 11:37:07 +02:00
worldofpeace
6a35f11361 nixos/gnome3: copy gnome-shell override
Without this these default settings overrides to gnome-shell
don't appear to be used completely.

(cherry picked from commit eb14b000e5)
2019-10-04 22:55:23 -04:00
Martin Milata
358337d609 libpng12: 1.2.57 -> 1.2.59
CVE-2017-12652

(cherry picked from commit 12f31b7366)
2019-10-05 01:50:12 +02:00
Maximilian Bosch
c2fd152c98 nim: build with nodejs v10
As in 8fcbbc94ef we build `nim` with
NodeJS v10 to avoid eval errors since nodejs v11 got removed as it's
been EOLed by upstream.
2019-10-04 21:06:41 +02:00
Maximilian Bosch
973530c8b6 Revert "Revert "nodejs-11_x: remove""
This reverts commit 699e081a60.
2019-10-04 20:37:06 +02:00
Timo Kaufmann
33cf7a8fcd Merge pull request #70412 from timokau/sage-add-pager-19.09
sage: add pager to environment
2019-10-04 18:27:32 +00:00
Timo Kaufmann
28e8f30dae sage: add pager to environment
Temporary fixup while waiting for an upstream fix.

(cherry picked from commit cbe12344ca)
2019-10-04 20:19:58 +02:00
Timo Kaufmann
699e081a60 Revert "nodejs-11_x: remove"
This reverts commit 3a12434b93.

The commit broke eval since the removed attribute is still in use.
2019-10-04 20:19:58 +02:00
Maximilian Bosch
4e3230f719 sourcehut: mark as broken
There were several custom python dependencies broken. I decided to
modify the `sourcehut` expression as it wouldn't even evaluate without
nodejs-11_x I didn't manage to get it building.

(cherry picked from commit 594378ceea)
2019-10-04 18:25:30 +02:00
Maximilian Bosch
3a12434b93 nodejs-11_x: remove
Package is EOLed by upstream: https://github.com/nodejs/Release

Fixes #69008

(cherry picked from commit 334641d112)
2019-10-04 18:25:29 +02:00
Maximilian Bosch
28a0caef8f python3Packages.asyncpg: fix hash
The hash to the patch is broken, even with the original revision
which adds asyncpg (ee2161c5e8). As the
downloaded patch seems fine, I guess that it was generated with
`nix-prefetch-url` (the hashes for `fetchpatch` usually differ) and the
issue wasn't found as the fixed-output-derivation was already in the
contributor's store.

See https://hydra.nixos.org/build/102495795

ZHF #68361

(cherry picked from commit 7c74ebd2a6)
2019-10-04 18:25:29 +02:00
Linus Heckemann
862f05cb00 Revert "grub: 2.02 -> 2.04-rc1"
This reverts commit df4d0fab2f.

See #61718 for rationale.
2019-10-04 15:09:18 +02:00
Linus Heckemann
4eb9725522 Revert "grub2: 2.04-rc1 -> 2.04 (#67622)"
This reverts commit 8ba94a8fe8.

See #61718 for rationale.
2019-10-04 15:09:01 +02:00
worldofpeace
0dc92e096d libmediaart: apply patch to fix gnome-music crash
See https://bugzilla.gnome.org/show_bug.cgi?id=792272

(cherry picked from commit 85b7d89892)
2019-10-04 08:46:19 -04:00
Linus Heckemann
d5639a07de treewide: fix dead anonscm.debian.org links 2019-10-04 12:48:09 +02:00
Linus Heckemann
4b7a1231f1 diffoscope: get source from upstream tarball
anonscm.debian.org is dead
2019-10-04 12:47:32 +02:00
Linus Heckemann
3d81600b6c ipsecTools: ship patch directly
No longer available since anonscm.debian.org is shut
down (#39927). Replacement obtained from OpenSUSE source package
http://download.opensuse.org/repositories/openSUSE:/Factory/standard/src/ipsec-tools-0.8.2-9.6.src.rpm
2019-10-04 12:45:17 +02:00
Linus Heckemann
4b4790f28f desmume: copy debian patches
Obtained from
http://deb.debian.org/debian/pool/main/d/desmume/desmume_0.9.11-3.diff.gz
since desmume never moved to salsa.debian.org (previously on
anonscm.debian.org as a subversion repo)
2019-10-04 12:45:17 +02:00
Jonathan Ringer
5aa46b6bdb python3Packages.lammps-cython: fix tests
ZHF #68361

(cherry picked from commit 2aaea01b2b)
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2019-10-04 01:11:38 -07:00
Jonathan Ringer
4a10b030ce Revert "racerd: 2019-03-20 -> 2019-09-02"
8e1ce32f49 fixes the build for rustc v1.38, but breaks it otherwise

This reverts commit 8e1ce32f49.
2019-10-04 00:43:52 -07:00
Vladimír Čunát
58eac16818 unbound: 1.9.3 -> 1.9.4
This only fixes CVE-2019-16866 (DoS, minor one IMHO)
https://www.nlnetlabs.nl/projects/unbound/security-advisories/#vulnerability-in-parsing-notify-queries

(cherry picked from commit dc322c76d6)
2019-10-04 09:39:18 +02:00
worldofpeace
3ba0d9f75c opera: use autoPatchelfHook, use wrapGAppsHook
Fixes #70322

(cherry picked from commit 68543580f4)
2019-10-03 12:09:39 -04:00
Nikolay Amiantov
7949b4f90e python2.pkgs.mkrose: mark as broken
It supports only Python 3 now.

(cherry picked from commit 2dfb002a9b)
2019-10-03 18:25:32 +03:00
Nikolay Amiantov
b98fdaf535 gnome15: mark as broken
It doesn't support Python 3 and newer versions of libraries are Python 2-only.

(cherry picked from commit 0c02ecaea2)
2019-10-03 18:25:31 +03:00
Jonathan Ringer
8e1ce32f49 racerd: 2019-03-20 -> 2019-09-02
(cherry picked from commit 02795b4ed5)
2019-10-03 08:49:18 -05:00
WilliButz
a7d57a967a grafana: 6.4.0 -> 6.4.1
(cherry picked from commit dbdb787cce)
2019-10-03 14:38:38 +02:00
Domen Kožar
dde4512da9 cachix: fix package 2019-10-03 11:30:32 +02:00
Maximilian Bosch
5d4d45f717 python3Packages.asdf: 2.3.3 -> 2.4.2
Bump to fix the broken build of the package:

* Disable doctest as they're currently broken in our test env
* Loosen version constraint for `semantic_version` as it was only
  introduced to work around some deprecation warnings[1]

See also: https://hydra.nixos.org/build/102480957

ZHF #68361

[1] 3446ae072b

(cherry picked from commit 06041fd174)
2019-10-03 11:08:12 +02:00
Enno Lohmeier
014afee914 pythonPackages.bleach: add implicit setuptools dependency
Fixes error on `python -c "import bleach"`

(cherry picked from commit 31c4f79289)
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2019-10-03 01:14:56 -07:00
Johan Thomsen
73becf99d2 kubernetes: 1.15.3 -> 1.15.4
(cherry picked from commit b21a3356f0)
Backport of #69044
2019-10-03 09:25:38 +02:00
Jonathan Ringer
810a56870b pythonPackages.trackpy: disable plot tests
ZHF #68361

(cherry picked from commit 64205fa108)
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2019-10-02 21:05:33 -07:00
Dmitry Kalinkin
f5b52d2ad8 sourcehut: use recurseIntoAttrs
(cherry picked from commit c83db0cc53)
2019-10-02 23:48:31 -04:00
worldofpeace
77b5a1965f nixos/networkmanager: remove basePackages option
This option in now completely useless.
All the default configs for these packages
already have GNOME features default,

(cherry picked from commit 9bc8169695)
2019-10-02 21:34:36 -04:00
worldofpeace
ae35fe9cb3 nixos/gnome-settings-daemon: drop package option
After some thought, it doesn't make sense for this module to be shared.

(cherry picked from commit 68ab37aa44)
2019-10-02 21:34:36 -04:00
Silvan Mosberger
4f0e6ee518 nixos/nix-daemon: Prevent network warning when checking config
Since version 2.3 (https://github.com/NixOS/nix/pull/2949 which was
cherry-picked to master) Nix issues a warning when --no-net wasn't
passed and there is no network interface. This commit adds the --no-net
flag to the nix.conf check such that no warning is issued.

(cherry picked from commit e463c7cd75)
2019-10-03 01:21:00 +02:00
Trolli Schmittlauch
5e0b687ac0 corebird: move deprecation warning to aliases and release notes
(cherry picked from commit 45a9542a37)
2019-10-02 19:12:05 -04:00
Trolli Schmittlauch
b919677835 corebird: drop package due to discontinuation, recommend cawbird as alternative
(cherry picked from commit f855e588b7)
2019-10-02 19:12:02 -04:00
Trolli Schmittlauch
8349643269 cawbird: init at 1.0.1
Cawbird is a fork of the discontinued Corebird Twitter client.

Co-Authored-By: Jon <jonringer@users.noreply.github.com>
(cherry picked from commit e1c7d20793)
2019-10-02 19:11:58 -04:00
Silvan Mosberger
482ba41d6e lib.mkRemovedOptionModule: Show replacement for option usage too
Previously mkRemovedOptionModule would only show the replacement
instructions when the removed option was *defined*. With this change, it
also does so when an option is *used*.

This is essential for options that are only intended to be used such as
`security.acme.directory`, whose replacement instructions would never
trigger without this change because almost everybody only uses the
option and isn't defining it.

(cherry picked from commit ebb136da9f)
2019-10-02 23:13:19 +02:00
R. RyanTM
1f65fe630b xterm: 348 -> 349
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/xterm/versions

(cherry picked from commit 3062ec7f3e)
2019-10-02 21:55:51 +02:00
Pierre Bourdon
e0a544ccfc vulnix: add missing setuptools dependency
More #68314 related breakage.

(cherry picked from commit 01aa4bb7cb)
2019-10-02 08:57:55 -04:00
Mario Rodas
85289edbd9 ruby_2_6: 2.6.4 -> 2.6.5
Changelog: https://www.ruby-lang.org/en/news/2019/10/01/ruby-2-6-5-released/
(cherry picked from commit 4ee22f3a9c)
2019-10-02 10:43:54 +00:00
Mario Rodas
cb9cea0e96 ruby_2_5: 2.5.6 -> 2.5.7
Changelog: https://www.ruby-lang.org/en/news/2019/10/01/ruby-2-5-7-released/
(cherry picked from commit 5e76e7b430)
2019-10-02 10:43:53 +00:00
Mario Rodas
0c02d01479 ruby_2_4: 2.4.7 -> 2.4.9
Changelog:
- https://www.ruby-lang.org/en/news/2019/10/01/ruby-2-4-8-released/
- https://www.ruby-lang.org/en/news/2019/10/02/ruby-2-4-9-released/

(cherry picked from commit 5ed9d8b8aa)
2019-10-02 10:43:49 +00:00
Nikolay Amiantov
bb7c495f2e tensorflow: add OpenGL path to find libcudart
(cherry picked from commit 1c429acbff)
2019-10-02 10:34:43 +03:00
Nikolay Amiantov
433022f307 libtensorflow: add meta
(cherry picked from commit 4947ddf347)
2019-10-02 10:34:43 +03:00
Nikolay Amiantov
be0688dba4 tensorflow: fix CUDA build using wrong GCC
(cherry picked from commit 46b7933d9a)
2019-10-02 10:34:43 +03:00
pacien
59211d576a exim: 4.92.2 -> 4.92.3
security update: CVE-2019-16928

(cherry picked from commit aaa1ba3700)

cc #70074
2019-10-02 09:32:47 +02:00
Ambroz Bizjak
8aac337d71 nvidia-x11: Make vulkan library path absolute for >= 435.
The original file contains just a library name, which does not work when LD_LIBRARY_PATH does not contain /run/opengl-driver/lib, as is the case in unstable NixOS.

Fixes https://github.com/NixOS/nixpkgs/issues/69264

(cherry picked from commit d156b2b619)
2019-10-02 10:10:55 +03:00
adisbladis
20e214bd23 pythonPackages.pyrsistent: 0.15.2 -> 0.15.4
ZHF #68361

(cherry picked from commit 0f8d1129b1)
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2019-10-01 23:11:06 -07:00
Jonathan Ringer
15bc013a10 pythonPackage.cli-helpers: disable python2 tests
ZHF #68361

(cherry picked from commit 7eed92a7ac)
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2019-10-01 22:53:48 -07:00
Matthew Bauer
d079834907 kwallet-pam: wrap pam_kwallet_init
This needs a compatible env as kwalletd daemon. Need to wrap it to
correct this.

Fixes #68316

(cherry picked from commit a296cc254f)
2019-10-01 22:05:58 -04:00
worldofpeace
584181e4c7 Merge pull request #70183 from etu/1909-transifex-client-setuptools
[19.09] transifex-client: Add missing setuptools dependency
2019-10-02 01:12:42 +00:00
Tobias Bora
9d4759dda0 owncloud-client: Use qt5's own mkDerivation (#70187)
(cherry picked from commit e120e00d54)

cc #70187
2019-10-01 17:50:03 -04:00
Nikolay Amiantov
e97e6ae183 buildBazelPackage: remove rules_cc
It's a new builtin dependency from Bazel 0.29.

(cherry picked from commit 280f17c893)
2019-10-02 00:48:39 +03:00
WilliButz
d1ab8913ac grafana: 6.3.6 -> 6.4.0
(cherry picked from commit 79b99099cf)
2019-10-01 23:17:27 +02:00
pacien
445ea37ef7 riot-desktop: 1.4.0 -> 1.4.1
(cherry picked from commit 7a82c74afe)
2019-10-01 22:30:16 +02:00
pacien
e326c4f603 riot-web: 1.4.0 -> 1.4.1
(cherry picked from commit bdd869352f)
2019-10-01 22:30:16 +02:00
Matthew Bauer
c6de3b05e3 Merge pull request #70195 from obsidiansystems/lib-more-arm
lib: Add armv7a-linux to doubles.nix
2019-10-01 13:34:29 -04:00
Maximilian Bosch
2fc4fabd6c svgbob: fix build
See https://hydra.nixos.org/build/102480738

Bumping to latest version (which is 0.4.2 according to Cargo.lock) fixes
the build error. As no dependency changes happened, cargoSha256 doesn't
need to be updated.

ZHF #68361

(cherry picked from commit b5204d9f5f)
2019-10-01 19:15:58 +02:00
Matthew Bauer
eafcb18d73 Revert "nixos/desktop-managers/xterm: Disable by default"
This reverts commit f140dfb161.
This reverts commit cf56cefd95.
This reverts commit 456c42c3e8.
2019-10-01 11:39:27 -04:00
Victor SENE
000a9108ae nexcloud: 16.0.4 -> 16.0.5
(cherry picked from commit 70d08871da)
2019-10-01 17:36:31 +02:00
Elis Hirwing
d7c9be97ea transifex-client: Add missing setuptools dependency
(cherry picked from commit d1a8006b89)
2019-10-01 17:33:52 +02:00
Tim Steinbach
1e3be238f6 linux: 5.3.1 -> 5.3.2 2019-10-01 08:06:02 -04:00
Tim Steinbach
2a66f189cd linux: 5.2.17 -> 5.2.18 2019-10-01 08:06:02 -04:00
Tim Steinbach
4c50dc3cee linux: 4.19.75 -> 4.19.76 2019-10-01 08:06:02 -04:00
Maximilian Bosch
e61638d768 python3Packages.pytaglib: fix build
Applied several patches to fix the test suite on python 2.7 and to
properly install the `pyprinttags` executable. Also switched to the
GitHub source for now as the PyPI tarball was wrongly packaged and
didn't contain the `pyprinttags.py` script (see the last two patches for
further reference).

See also https://hydra.nixos.org/build/102493330

ZHF #68361

(cherry picked from commit c7164ea3c4)
2019-10-01 13:56:06 +02:00
Maximilian Bosch
c0fcb53d9b python3Packages.scikit-build: fix build
Build broke as it's attempted to run the cmake configure-phase which
won't work as this package uses cmake, but builds via a `setup.py`
rather than a `CMakeLists.txt`.

ZHF #68361

(cherry picked from commit f8c6b826d4)
2019-10-01 11:12:15 +02:00
Jonathan Ringer
8d7f2c7f3e pythonPackages.premailer: fix build
(cherry picked from commit 17287938ab)
2019-10-01 09:24:36 +02:00
Dima
8ef6192d2a epson-escpr2: 1.0.29 -> 1.1.1
The build was failing because the source rpm does not exist
on epsons servers anymore.

Thus bumping it to an existing version
https://hydra.nixos.org/build/101990975/nixlog/5

(cherry picked from commit e33810594d)
2019-10-01 01:36:49 -04:00
worldofpeace
aaa1739e0a blueman: no optional networkmanager
blueman declares NetworkManager gi bindings
as a required runtime dependency [0]

Fixes #69555

[0]: 531da47b06/Dependencies.md

(cherry picked from commit fcb84c5534)
2019-10-01 01:29:07 -04:00
Samuel Dionne-Riel
0fc13aad1f quassel: Fix use of mkDerivation
The `with stdenv;` would override the `mkDerivation` to be the regular
one, instead of the libsForQt5 one.

This simply removes the dangerous use of the all-encompassing `with`,
and prefers using a more precise inherit for `lib`.

See #65399

Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
(cherry picked from commit c52b5b8a5d)
2019-10-01 01:25:08 -04:00
worldofpeace
2ed7dfe245 Merge pull request #70065 from worldofpeace/libproxy-19.09/fixbuild
[19.09] libproxy: build with spidermonkey_60
2019-10-01 04:44:40 +00:00
R. RyanTM
6bce1acd26 roundcube: 1.3.9 -> 1.3.10
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/roundcube/versions

(cherry picked from commit ad166725f1)
2019-09-30 20:56:02 +02:00
worldofpeace
44f8f39734 libproxy: build with spidermonkey_60 2019-09-30 11:18:39 -04:00
Robin Gloster
00f495f973 mkRemovedOptionModule: assert on removed options
We don't want to ignore config that can mess up machines. In general
this should always fail evaluation, as you think you are changing
behaviour and don't, which can easily create run-time errors we can
catch early.

(cherry picked from commit b08b0bcbbe)
2019-09-30 16:54:46 +02:00
Thomas Tuegel
9e8e87fa9b Merge pull request #70025 from ttuegel/closure-size--staging-19.09
More closure size improvements for NixOS 19.09
2019-09-30 08:52:20 -05:00
Vladimír Čunát
89509ca9e4 Merge branch 'staging-19.09' into release-19.09
Almost all is rebuilt now, no mass regressions in there:
https://hydra.nixos.org/eval/1545643
2019-09-30 13:31:01 +02:00
Jan Tojnar
92a51ddc8f zbar: clean up (#68389)
zbar: clean up
(cherry picked from commit 8752ff2254)
2019-09-30 05:39:21 -05:00
Thomas Tuegel
686237e0a4 Revert "zbar: Use multiple outputs"
This reverts commit 3837059961.
2019-09-30 05:38:23 -05:00
Franz Pletz
ad36169300 nixos/systemd: pick more upstream tmpfiles confs
In #68792 it was discovered that /dev/fuse doesn't have
wordl-read-writeable permissions anymore. The cause of this is that the
tmpfiles examples in systemd were reorganized and split into more files.
We thus lost some of the configuration we were depending on.

In this commit some of the new tmpfiles configuration that are
applicable to us are added which also makes wtmp/lastlog in the pam
module not necessary anymore.

Rationale for the new tmpfile configs:

  - `journal-nowcow.conf`: Contains chattr +C for journald logs which
  makes sense on copy-on-write filesystems like Btrfs. Other filesystems
  shouldn't do anything funny when that flag is set.

  - `static-nodes-permissions.conf`: Contains some permission overrides
  for some device nodes like audio, loop, tun, fuse and kvm.

  - `systemd-nspawn.conf`: Makes sure `/var/lib/machines` exists and old
  snapshots are properly removed.

  - `systemd-tmp.conf`: Removes systemd services related private tmp
  folders and temporary coredump files.

  - `var.conf`: Creates some useful directories in `/var` which we would
  create anyway at some point. Also includes
  `/var/log/{wtmp,btmp,lastlog}`.

Fixes #68792.

(cherry picked from commit 0dc4fe0a44)
2019-09-30 12:14:42 +02:00
Maximilian Bosch
105189c6ce Merge pull request #70048 from etu/1909-phpcbf
[19.09] phpPackages.phpcbf: 3.4.2 -> 3.5.0
2019-09-30 12:07:20 +02:00
Maximilian Bosch
b1967e37cb phpPackages.phpcbf: 3.4.2 -> 3.5.0
(cherry picked from commit 096f03e414)
2019-09-30 07:21:08 +02:00
Maximilian Bosch
7a3083fef8 Merge pull request #70003 from etu/1909-php-cs
[19.09] phpPackages.phpcs: 3.4.2 -> 3.5.0
2019-09-29 23:22:16 +02:00
Jonathan Ringer
88730466d7 pythonPackages.xapian: disable smoketests
(cherry picked from commit 24b364e0b5)
2019-09-29 23:18:28 +02:00
Thomas Tuegel
ce2bb4de26 mariadb.connector-c: Use multiple outputs to reduce closure size 2019-09-29 12:17:25 -05:00
Jonathan Ringer
21a88397e1 pythonPackages.shodan: 1.14.0 -> 1.17.0
(cherry picked from commit fb41b3d9e6)
2019-09-29 15:42:24 +01:00
Jonathan Ringer
e1b962d05b pythonPackages.supervisor: 3.3.5 -> 4.0.4
(cherry picked from commit f08d4f78e4)
2019-09-29 15:39:55 +01:00
Martin Weinelt
83665e31dd nixos/tests/ferm: wait for DAD timeout before testing
The test has recently been failing due to the IPv6 address
on the server still being in the tentative state, when the
client sends its first request. The server will not start
using the IPv6 address until DAD has completed.

Scripted networking seems not to wait for DAD completion
before completing network-online.target, so let's switch
to networkd instead, which does.

(cherry picked from commit 1fb3818440)
2019-09-29 15:30:28 +01:00
Jonathan Ringer
fb2ea4fa6a pythonPackages.streamz: 0.5.1 -> 0.5.2
(cherry picked from commit 8d306d599a)
2019-09-29 08:14:36 -05:00
Maximilian Bosch
0f663efc2c phpPackages.phpcs: 3.4.2 -> 3.5.0
(cherry picked from commit 5e4de799bd)
2019-09-29 12:25:50 +02:00
Vladimír Čunát
d5bdf71e05 Merge branch 'release-19.09' into staging-19.09 2019-09-29 12:17:11 +02:00
Jonathan Ringer
e3930fd416 pythonPackages.azure: mark as broken
(cherry picked from commit 1d7a33e11b)
2019-09-29 11:50:42 +02:00
R. RyanTM
8f9f4b3d0b python37Packages.identify: 1.4.5 -> 1.4.7
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-identify/versions

(cherry picked from commit 97b48dcad5)
2019-09-29 11:50:42 +02:00
R. RyanTM
391b7150f6 python37Packages.bidict: 0.18.0 -> 0.18.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-bidict/versions

(cherry picked from commit 7f470e14d4)
2019-09-29 11:50:42 +02:00
R. RyanTM
18fc004694 python37Packages.clikit: 0.3.1 -> 0.3.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-clikit/versions

(cherry picked from commit 6a7bd00e77)
2019-09-29 11:50:42 +02:00
R. RyanTM
7c6698a9cc python37Packages.azure-cli-telemetry: 1.0.2 -> 1.0.3
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-azure-cli-telemetry/versions

(cherry picked from commit d8f8782efb)
2019-09-29 11:50:42 +02:00
R. RyanTM
b150754725 python37Packages.holoviews: 1.12.3 -> 1.12.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-holoviews/versions

(cherry picked from commit 6b060f3b5f)
2019-09-29 11:50:42 +02:00
R. RyanTM
3b6a67e7df python37Packages.pex: 1.6.8 -> 1.6.11
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-pex/versions

(cherry picked from commit 301523922d)
2019-09-29 11:50:41 +02:00
R. RyanTM
7d68fa1f99 python37Packages.pomegranate: 0.11.0 -> 0.11.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-pomegranate/versions

(cherry picked from commit 5f074f3a49)
2019-09-29 11:49:12 +02:00
R. RyanTM
35dcbb0a95 python37Packages.lark-parser: 0.7.3 -> 0.7.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-lark-parser/versions

(cherry picked from commit 2e77b1c31d)
2019-09-29 11:49:12 +02:00
R. RyanTM
223fdc60bf python37Packages.Wand: 0.5.6 -> 0.5.7
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-wand/versions

(cherry picked from commit 2390a52ec7)
2019-09-29 11:49:12 +02:00
R. RyanTM
b716ed2d05 python37Packages.qtconsole: 4.5.2 -> 4.5.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-qtconsole/versions

(cherry picked from commit cd860e4306)
2019-09-29 11:49:12 +02:00
R. RyanTM
c64c7ef9a8 python37Packages.radio_beam: 0.3.1 -> 0.3.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-radio_beam/versions

(cherry picked from commit 0a9b241587)
2019-09-29 11:49:12 +02:00
R. RyanTM
7ca9201e92 python37Packages.rasterio: 1.0.25 -> 1.0.28
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-rasterio/versions

(cherry picked from commit 342ecaefd7)
2019-09-29 11:49:12 +02:00
R. RyanTM
4007e74d00 python27Packages.tilestache: 1.51.13 -> 1.51.14
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python2.7-tilestache/versions

(cherry picked from commit e8e68cff3c)
2019-09-29 11:49:12 +02:00
R. RyanTM
3d8c069a3c python37Packages.tld: 0.9.3 -> 0.9.6
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-tld/versions

(cherry picked from commit 16452f1823)
2019-09-29 11:49:12 +02:00
R. RyanTM
a0beccc95e python37Packages.twine: 1.13.0 -> 1.15.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-twine/versions

(cherry picked from commit a1fffa983a)
2019-09-29 11:47:29 +02:00
Jonathan Ringer
b362635a6d python3Packages.cnvkit: fix build
(cherry picked from commit f25e8a6d78)
2019-09-29 11:29:58 +02:00
Jonathan Ringer
b845ef5f79 python3Packages.joblib: add setuptools dependency
(cherry picked from commit d564733dd9)
2019-09-29 11:22:41 +02:00
Jonathan Ringer
5dddd05a2d python3Packages.opt-einsum: 2.3.2 -> 3.0.1
(cherry picked from commit 3a63bee154)
2019-09-29 11:21:04 +02:00
Jonathan Ringer
925402e33f pythonPackages.opt-einsum: fix build
(cherry picked from commit 6524733382)
2019-09-29 11:21:04 +02:00
Jonathan Ringer
e27095992f python3Packages.pytorch: fix build
(cherry picked from commit 02648a6cc1)
2019-09-29 11:21:04 +02:00
Frederik Rietdijk
158f41a1b7 python: zerorpc: 0.6.1 -> 0.6.3
(cherry picked from commit 0d956a673d)
2019-09-29 11:03:13 +02:00
Frederik Rietdijk
88c45dce33 pybitmessage: fix build
- use setuptools
- use msgpack instead of msgpack-python

(cherry picked from commit 7408c39d20)
2019-09-29 11:03:13 +02:00
Frederik Rietdijk
f63cbc3bb6 python: get rid of msgpack-python, fixes #48864
We already have msgpack, which is the same. Building a Python env with
`spacy` resulted in a collision between an `.so` provided through both
`msgpack` and `msgpack-python`.

I don't know why `transitional = True` was set. These kind of things
should be documented!

(cherry picked from commit 22aef72ff1)
2019-09-29 11:03:12 +02:00
Daniël de Kok
1886d82676 pythonPackages.spacy: fix import error
Importing spacy fails with:

ModuleNotFoundError: No module named 'pkg_resources

spaCy probably worked before because a dependency had setuptools as a
propagated dependency. This change adds setuptools to spacy's
propogatedBuildInputs.

Tested with the en_core_web_sm model.

(cherry picked from commit d2ccabaeea)
2019-09-29 11:03:12 +02:00
worldofpeace
5b46f56d17 eolie: 0.9.60 -> 0.9.63
(cherry picked from commit 4a7964614f)
2019-09-29 01:47:31 -04:00
worldofpeace
d41fd60f85 lollypop: correct search-provider wrapping
(cherry picked from commit 8f9135f511)
2019-09-29 01:43:06 -04:00
Jonathan Ringer
3f25baa604 pythonPackage.datatable: 0.8.0 -> 0.9.0
(cherry picked from commit beae056884)
2019-09-29 03:34:10 +02:00
Jonathan Ringer
e0ffa0fd39 pythonPackages.lightgbm: fix build
(cherry picked from commit eb8bd784b1)
2019-09-29 03:04:09 +02:00
Maximilian Bosch
f20bc852a5 Merge pull request #69633 from avdv/backport-mucommander-69280
mucommander: 0.9.2 -> 0.9.3-3
2019-09-29 02:35:48 +02:00
Thomas Tuegel
3837059961 zbar: Use multiple outputs 2019-09-28 17:33:56 -05:00
worldofpeace
548d0b73f2 syncthingtray-minimal: rename from syncthingtray-minumal 2019-09-28 16:15:52 -04:00
nyanloutre
7f8e4170c5 ledger-live-desktop: 1.12.0 -> 1.15.0
built with appimageTools.wrapType2 instead of wrapping appimage-run

(cherry picked from commit 3ceb8d5990)
2019-09-28 16:10:06 -04:00
worldofpeace
a69421758f dbus: set datadir again
Fixes #69404
2019-09-28 16:10:05 -04:00
Mario Rodas
ecf719c2df wabt: 1.0.11 -> 1.0.12
(cherry picked from commit b289915b37)
2019-09-28 22:07:30 +02:00
Mario Rodas
1719446448 gitAndTools.hub: 2.12.4 -> 2.12.7
(cherry picked from commit be7bc49504)
2019-09-28 22:01:39 +02:00
Maximilian Bosch
794cf39f13 prometheus-wireguard-exporter: 3.1.0 -> 3.1.1
https://github.com/MindFlavor/prometheus_wireguard_exporter/releases/tag/3.1.1

This release adds a flag `-l` which takes an address where the exporter
is available. The default is `0.0.0.0` (previously, `0.0.0.0` was used
by default).

Please note that there are no dependency changes in Cargo and therefore
the cargo hash didn't change.

(cherry picked from commit beb59b76cf)
2019-09-28 20:56:51 +02:00
Vladimír Čunát
96b4d60468 nixos network-interfaces.nix: fixup after the last change
TL;DR: ipv6 tests were broken (probably the privacy-extension stuff)
https://github.com/NixOS/nixpkgs/pull/68227#issuecomment-536159177

(cherry picked from commit 4c07c0fdf0)
2019-09-28 19:34:09 +02:00
Jon
ec3e790970 python3Packages.flit: fix tests and packaging (#69546)
* python3Packages.flit: fix tests

* python: fix flit setup hook

(cherry picked from commit 28af6ac647)
2019-09-28 18:59:48 +02:00
Vladimír Čunát
f97286bba3 Merge #69492: thunderbird*: 68.1.0 -> 68.1.1
(cherry picked from commit a005d2e63a)
Re-tested both on 19.09.
2019-09-28 14:07:44 +02:00
Thomas Tuegel
29c1c19370 Merge pull request #69642 from ttuegel/bug--staging-19.09--hdf5
hdf5: Fix dependencies and flavors with multiple outputs
2019-09-28 06:10:39 -05:00
Vladimír Čunát
8d8b98c6c6 Merge #69700: libX11: upstream patch to fix cross-compilation
(cherry picked from commit 52af1d0930)
2019-09-28 09:53:14 +02:00
Maximilian Bosch
6ed74804ef minitube: 2.9 -> 3.2
https://flavio.tordini.org/minitube-3-2
https://flavio.tordini.org/minitube-3-1
https://flavio.tordini.org/minitube-3-0
(cherry picked from commit 6fd3fea4db)
2019-09-28 03:32:41 +02:00
pacien
5681d02257 riot-desktop: 1.3.5 -> 1.4.0
(cherry picked from commit ec0d11a72f)
2019-09-27 21:23:19 -04:00
pacien
a6c9a6acb2 riot-web: 1.3.5 -> 1.4.0
(cherry picked from commit 07891afccf)
2019-09-27 21:23:15 -04:00
pacien
44d55e15ed riot-desktop: 1.3.3 -> 1.3.5
(cherry picked from commit e32515aa92)
2019-09-27 21:23:12 -04:00
pacien
8675cb2369 riot-web: 1.3.3 -> 1.3.5
(cherry picked from commit 8e09b940f8)
2019-09-27 21:23:09 -04:00
xrelkd
277ec48009 youtube-dl: 2019.09.12.1 -> 2019.09.28
(cherry picked from commit b7c5073f72)
2019-09-27 21:14:01 -04:00
Maximilian Bosch
23cc33e2df kitty: 0.14.5 -> 0.14.6
https://sw.kovidgoyal.net/kitty/changelog.html#id1
(cherry picked from commit 04d6fa1385)
2019-09-28 02:56:01 +02:00
R. RyanTM
86449987e7 kitty: 0.14.3 -> 0.14.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/kitty/versions

(cherry picked from commit c03a40a13c)
2019-09-28 02:55:57 +02:00
worldofpeace
5a0048ac5c nixos/gdm: update description
GDM isn't dangerous anymore in NixOS.

(cherry picked from commit e4cce87fba)
2019-09-27 18:41:43 -04:00
R. RyanTM
974bbd1217 ibus-engines.typing-booster-unwrapped: 2.6.4 -> 2.6.6
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/ibus-typing-booster/versions

(cherry picked from commit 62c55bc701)
2019-09-27 20:11:24 +02:00
Tim Steinbach
c79f3d80b8 linux: 5.3 -> 5.3.1
(cherry picked from commit e331f65c93)
2019-09-27 19:31:16 +02:00
Svein Ove Aas
e2d76a988d zfs: 0.8.1 -> 0.8.2
(cherry picked from commit f6a894475c)
2019-09-27 19:31:12 +02:00
John Ericson
ff0bbc2646 ghcHEAD: 8.9.20190601 -> 8.9.20190924
Also close pointless diff with 8.8.1.

(cherry picked from commit b55854c0b4)
2019-09-27 17:25:51 +00:00
WilliButz
bd1e843bde atlassian-jira: 8.4.0 -> 8.4.1
(cherry picked from commit 39d7eeb5c0)
2019-09-27 16:42:23 +02:00
R. RyanTM
d9baefa3ff atlassian-jira: 8.3.2 -> 8.4.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/atlassian-jira/versions

(cherry picked from commit a8dc4e39db)
2019-09-27 16:42:22 +02:00
Florian Klink
9c9bd273c3 linuxPackages.virtualboxGuestAdditions: apply mp-r0drv-linux.c patch
These don't use a the virtualbox sources, but an iso as src, and we need
to add the kernel 5.3 patch aswell.

As for some reason the source files are present on the .iso with Windows
Line endings (sic!), call dos2unix first.

Unfortunately, we can't use the same kernel-5.3-fix.patch as virtualbox
itself, as some files are missing and paths are different.

(cherry picked from commit 61f0f8d607)
2019-09-27 15:47:54 +02:00
Thomas Tuegel
eeb6ee96ef hdf5: Fix flavored builds with multiple outputs 2019-09-27 05:53:14 -05:00
Thomas Tuegel
475c9de274 tables: Fix build with multiple hdf5 outputs 2019-09-27 04:48:01 -05:00
Thomas Tuegel
e7ae9ded9e netcdf4: Fix build with multiple hdf5 outputs 2019-09-27 04:47:41 -05:00
Vladimír Čunát
76348091e6 knot-resolver: 4.2.0 -> 4.2.1 (bugfixes)
https://gitlab.labs.nic.cz/knot/knot-resolver/tags/v4.2.1
(cherry picked from commit 4b656c7447)
2019-09-27 10:50:12 +02:00
Craige McWhirter
cc424bd8d4 nixos/doc: Clarify wireless examples
This commits makes it clearer to a novice reader how to configure several
diferent types of SSID connections that were otherwise obscurely documented

Resolves #66650

(cherry picked from commit cce7486deb)
2019-09-27 03:28:56 -04:00
Claudio Bley
c32862ddb1 mucommander: 0.9.2 -> 0.9.3-3
Mucommander 0.9.3-3 was released in January 2019.

* comment out `proguard.enabled = ...` in build.gradle
* use Gradle 4.10 (upstream uses 4.8)
* fix version in build.gradle
2019-09-27 08:07:23 +02:00
Michael Weiss
bf949a8e80 Merge pull request #69586 from primeos/signal-desktop-backport
[19.09] signal-desktop: 1.27.2 -> 1.27.3 (backport)
2019-09-27 00:02:11 +02:00
R. RyanTM
13d0504bba gradio: 7.2 -> 7.3
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/gradio/versions

(cherry picked from commit e146b13944)
2019-09-26 23:47:21 +02:00
R. RyanTM
0a61ecc353 git-secret: 0.2.6 -> 0.3.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/git-secret/versions

(cherry picked from commit db7433dd77)
2019-09-26 23:43:40 +02:00
R. RyanTM
bb6a49bd92 git-quick-stats: 2.0.8 -> 2.0.9
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/git-quick-stats/versions

(cherry picked from commit 29a7877a08)
2019-09-26 23:40:43 +02:00
Lily Ballard
5851328a8e macvim: fix compatibility with Xcode 11
This fixes several Xcode 11 incompatibilities with MacVim, including an
issue where it wasn't inheriting the deployment target correctly to
begin with.

(cherry picked from commit 4563496375)
2019-09-26 22:24:04 +01:00
Michael Weiss
256f6d58a5 signal-desktop: 1.27.2 -> 1.27.3
(cherry picked from commit 6f3b44baa4)
Reason: Avoid an expired (unusable) release in the stable release
(Signal-Desktop releases expire after 90 days).
2019-09-26 22:38:51 +02:00
Maximilian Bosch
466d24c6e5 python3Packages.python-hosts: 0.4.5 -> 0.4.7
Also fixes the build: https://hydra.nixos.org/build/101987213

ZHF #68361

(cherry picked from commit 991f825f2d)
2019-09-26 21:16:41 +02:00
Jonathan Ringer
17f344a32b pgadmin: fix build
(cherry picked from commit 16c55d22cc)
2019-09-26 20:47:13 +02:00
Maximilian Bosch
49e3011049 git-cola: build application with python3 by default
(cherry picked from commit 460e603852)
2019-09-26 20:37:57 +02:00
R. RyanTM
8826c1c8a2 git-cola: 3.4 -> 3.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/git-cola/versions

(cherry picked from commit 305d811a2d)
2019-09-26 20:33:21 +02:00
Maximilian Bosch
9691c53afc documize-community: 3.3.0 -> 3.3.1
https://github.com/documize/community/releases/tag/v3.3.1
(cherry picked from commit 07846b02f7)
2019-09-26 18:17:14 +02:00
Johan Thomsen
f841e48c90 ceph: 14.2.3 -> 14.2.4
(cherry picked from commit 7a61cd29bd)
Backport of #69518
2019-09-26 18:02:06 +02:00
R. RyanTM
428941438e gitAndTools.diff-so-fancy: 1.2.6 -> 1.2.7
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/diff-so-fancy/versions

(cherry picked from commit ea356329ca)
2019-09-26 17:49:20 +02:00
R. RyanTM
e1dd8301e1 python37Packages.dlib: 19.17 -> 19.18
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-dlib/versions

(cherry picked from commit 3a73ebdb38)
2019-09-26 17:11:14 +02:00
Gabriel Ebner
055810902d electron-cash: use wrapQtApp
(cherry picked from commit 0838bc0ed5)
2019-09-26 16:34:29 +02:00
Thomas Tuegel
1943028786 Merge pull request #69427 from ttuegel/closure-size/qt-staging-19.09
Reduce closure size of Qt applications (backport)
2019-09-26 08:31:59 -05:00
R. RyanTM
db73b295ca clib: 1.8.1 -> 1.11.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/clib/versions

(cherry picked from commit 4f1a4ba3cb)
2019-09-26 13:20:06 +02:00
volth
ee08175952 'udev' needs absolute path to 'echo'
(cherry picked from commit 8b93e5c8a4)
2019-09-26 12:28:51 +02:00
volth
4dceeaad80 network-interfaces.nix: escape '.' in interface names passed to sysctl
(cherry picked from commit efccc442d9)
2019-09-26 12:28:51 +02:00
Frederik Rietdijk
cc37ffc627 Merge release-19.09 into staging-19.09 2019-09-26 10:54:04 +02:00
Bjørn Forsman
b30f86ffc6 retroarch: 1.7.5 -> 1.7.8.4
Fixes missing GUI elements.

(cherry picked from commit bf7a1d6afe)
2019-09-26 08:12:55 +02:00
Bjørn Forsman
60493b43cb xdg-utils: add missing perl dependencies
Or else `xdg-screensaver suspend <WINDOW_ID>` fails with errors like:

  Can't locate Net/DBus.pm in @INC [...]

This increases the closure of xdg-utils from 53 MiB to 119 MiB.

(The issue was found when testing retroarch.)

(cherry picked from commit e584eba7f8)
2019-09-26 08:12:54 +02:00
worldofpeace
5c72219eb3 xfce4-14.tumbler: manually wrap
(cherry picked from commit 28a7e8fb75)
2019-09-25 22:48:42 -04:00
Maximilian Bosch
78d05675a4 prometheus-wireguard-exporter: 3.0.1 -> 3.1.0
Although this is a minor release, this only contains a single, but
improtant bugfix: https://github.com/MindFlavor/prometheus_wireguard_exporter/releases/tag/3.1.0

(cherry picked from commit 99b12cfc08)
2019-09-25 22:09:22 +02:00
Thomas Tuegel
4b46ba152c libsrtp: Use multiple outputs to reduce closure size 2019-09-25 14:20:32 -05:00
Thomas Tuegel
2aaf890280 SDL: Do not propagate -dev outputs at runtime 2019-09-25 14:20:32 -05:00
Thomas Tuegel
1cac77cfd8 spandsp: Use multiple outputs to reduce closure size 2019-09-25 14:20:32 -05:00
Thomas Tuegel
f041a041d6 hdf5: Use multiple outputs to reduce closure size 2019-09-25 14:20:32 -05:00
Thomas Tuegel
3212486ceb kate: No propagatedBuildInputs
kate does not have a `dev` output, so it should not have
`propagatedBuildInputs`, as this propagates other `dev` outputs into the user
environment.
2019-09-25 14:20:32 -05:00
Thomas Tuegel
a663d8fe49 ibus: Use multiple outputs to reduce closure size 2019-09-25 14:20:32 -05:00
Thomas Tuegel
3c26f2d065 tremor: Use multiple outputs to reduce closure size 2019-09-25 14:20:31 -05:00
Thomas Tuegel
1c240e40ec extra-cmake-modules: addEnvHooks: Use targetOffset 2019-09-25 14:20:31 -05:00
Thomas Tuegel
e3d85b640e extra-cmake-modules: Remove doc/ from xdgDataSubdirs 2019-09-25 14:20:31 -05:00
Thomas Tuegel
8005bf88a9 konsole: Remove spurious wrapper 2019-09-25 14:20:28 -05:00
Max Wittig
f4ee84dfeb gitlab-runner: 12.2.0 -> 12.3.0
(cherry picked from commit 92d5acb41a)
2019-09-25 18:48:08 +02:00
Robin Gloster
d8c1b4e8f2 linuxPackages.r8168: 8.046.00 -> 8.047.00
(cherry picked from commit d4212d66a8)
2019-09-25 17:10:30 +02:00
Robin Gloster
3c1a25f1c7 linuxPackages.jool: 4.0.0 -> 4.0.5
(cherry picked from commit 0fe41d4a87)
2019-09-25 16:59:15 +02:00
Kierán Meinhardt
8d3c8b9aef idrisPackages.heyting-algebra: remove
(cherry picked from commit 8eb0413c05)
2019-09-25 12:43:39 +02:00
Kierán Meinhardt
bb46e0f2c6 idrisPackages.heyting-algebra: mark as broken
The functionality provided by this package has been added to the Idris contrib library (module `Interfaces.Verified`).
Therefore identifiers cannot be disambiguated anymore.

(cherry picked from commit 7df8575a72)
2019-09-25 12:43:38 +02:00
Kierán Meinhardt
3c3a377e7f tamarin-prover: mark as broken because upstream is broken
(cherry picked from commit 815d940e52)
2019-09-25 12:40:13 +02:00
Ivan Kozik
e4f6f5039b kernel/common-config: enable SCHED_DEBUG
(cherry picked from commit 97cc421cdd)
2019-09-25 12:34:09 +02:00
Robin Gloster
64c6551271 pythonPackages.weasyprint: disable test
Needs an extra font for that test

(cherry picked from commit 6d71209af3)
2019-09-25 12:24:51 +02:00
Daniel Schaefer
9d1d9016b6 pythonPackages.weasyprint: 47 -> 50
(cherry picked from commit cedb0ecf4d)
2019-09-25 12:24:51 +02:00
Daniel Schaefer
7c267b5c7b pythonPackages.qiskit: Mark as broken
(cherry picked from commit 5c65c2e329)
2019-09-25 12:24:51 +02:00
Daniel Schaefer
12c51ea2a4 xml2rfc: Use pythonPackages.xml2rfc
(cherry picked from commit 8fd8f3a44a)
2019-09-25 12:24:51 +02:00
Daniel Schaefer
1851ab8c44 pythonPackages.xml2rfc: 2.18.0 -> 2.27.1
(cherry picked from commit bf050e9456)
2019-09-25 12:24:50 +02:00
Daniel Schaefer
c10e6c8f66 pythonPackages.dict2xml: init at 1.6.1
(cherry picked from commit d769048286)
2019-09-25 12:24:50 +02:00
Daniel Schaefer
c5d408bb85 pythonPackages.cairosvg: 2.3.0 -> 2.4.2
(cherry picked from commit a73937384e)
2019-09-25 12:24:50 +02:00
Daniel Schaefer
46cbfeaaa7 pythonPackages.pycountry: 19.7.15 -> 19.8.18
(cherry picked from commit f2b28387d0)
2019-09-25 12:24:49 +02:00
Robin Gloster
f3739e6103 paulstretch: fix build
(cherry picked from commit fb6595eafd)
2019-09-25 11:27:02 +02:00
László Vaskó
b133bff35e IPMIView: create desktop file
(cherry picked from commit 3848206bd2)
2019-09-25 09:57:19 +01:00
László Vaskó
9a94674fd2 IPMIView: fix iKVM console
This commit fixes #26650

The main problem was that the iKVM related libraries are always loaded
from the current working directory. The bundled wrapper script makes
sure to CD to the package root folder. This is a no-go in nix as the
application writes its settings in the current working directory and the
store is read-only.

Workaround: create a directory in the users home, where the required
binaries are symlinked and is writable for the current user.

There was an additional issue that for some BMCs IPMIView relies on
the bundled `stunnel` binary to wrap the iKVM traffic in a TLS tunnel.
Therefore it has to be patched to make it executable and the `killall`
command is needed on the PATH because it is used to terminate the
`stunnel` process upon exit.

(cherry picked from commit 15b8478211)
2019-09-25 09:57:15 +01:00
László Vaskó
784940ad43 IPMIView: 2.14.0 --> 2.16.0
Notes:
 * Previous URL is no longer accesible
 * build has to be adjusted for the updated JRE bundle
(cherry picked from commit 13cd9e1bf3)
2019-09-25 09:57:11 +01:00
László Vaskó
5205e5f1d2 IPMIView: fix indentation
(cherry picked from commit 96b2c4c395)
2019-09-25 09:57:07 +01:00
Ambroz Bizjak
5d92232ed6 virtualboxGuestAdditions: Fix clipboard integration.
VBoxClient needs a RUNPATH entry to dlopen libXfixes successfully.

Fixes https://github.com/NixOS/nixpkgs/issues/65542

(cherry picked from commit 7dcef37ef8)
2019-09-25 10:27:16 +02:00
Eelco Dolstra
d958752311 Merge pull request #69267 from edolstra/revert-interface-version-19.09
Revert systemd interface version to 2 [19.09 backport]
2019-09-25 10:08:58 +02:00
Peter Hoeg
e34ac949d1 Merge pull request #69383 from peterhoeg/f/dxx_stable
dxx-rebirth: build with gcc6 as gcc8 is not supported
2019-09-25 05:40:10 +08:00
Matthew Bauer
d79521cd3e androidndk: get correct libs for x86_64
(cherry picked from commit f089afe965)
2019-09-24 17:31:56 -04:00
Matthew Bauer
a5771ef41a gmp: don’t disable assembly on x86
this should always work, even on android / iOS toolchains

(cherry picked from commit 699fae259d)
2019-09-24 17:31:46 -04:00
Graham Christensen
9fe1782987 Merge pull request #69381 from grahamc/backport-netprom
Backport: perlPackages.NetPrometheus: init at 0.07 (and StructDumb at 0.09) #69379
2019-09-24 17:13:00 -04:00
Peter Hoeg
72833e97ec dxx-rebirth: build with gcc6 as gcc8 is not supported
(cherry picked from commit fe8b82f557)
2019-09-25 05:05:36 +08:00
Graham Christensen
2477127238 perlPackages.NetPrometheus: init at 0.07
(cherry picked from commit 9005bdd460)
2019-09-24 16:45:00 -04:00
Graham Christensen
e757e397b5 perlPackages.StructDumb: init at 0.09
(cherry picked from commit cd7ed820a0)
2019-09-24 16:44:53 -04:00
Jonathan Ringer
9c0c769bfa pythonPackage.pycurl2: fix build
(cherry picked from commit cc7c778bf1)
2019-09-24 16:49:34 +02:00
danme
d3feb15340 gnuk: 1.0.4 -> 1.2.14
(cherry picked from commit 5aa5fd4657)
2019-09-24 16:43:09 +02:00
Samuel Leathers
78a4175e0b linuxPackages.ply: add rsync to native build inputs
(cherry picked from commit 48c0062fe9)
2019-09-24 16:35:18 +02:00
Daniel Schaefer
1a9eec8a07 pythonPackages.astropy: Disable tests
A ton of tests fail and it's not obvious to me how to fix them.
Adding bleach to checkInputs fixes a tiny number of them, though.

(cherry picked from commit 4c714c1f58)
2019-09-24 16:25:36 +02:00
Jörg Thalheim
ec57b2c853 Merge pull request #69355 from mweinelt/pr/piper/gobjectintrospection
piper: temporarily propagate gobject-introspection [19.09 backport]
2019-09-24 15:10:47 +01:00
Robin Gloster
dce457f7bc xtreemfs: mark as broken
does not support openssl 1.1

(cherry picked from commit daa724ae5a)
2019-09-24 16:00:44 +02:00
Robin Gloster
cb802929a6 vtk: build with system libtiff
fixes vtktiff, therefore at least gdcm

(cherry picked from commit 2d6fbcd94e)
2019-09-24 16:00:44 +02:00
Nathan van Doorn
2ac5c9e7bb manticore: 2018.09.29 -> 2019.09.20
(cherry picked from commit 400431a0de)
2019-09-24 13:33:16 +00:00
Martin Weinelt
5ada0bf95b piper: temporarily propagate gobject-introspection
On startup piper would be unable to find Pango:
> ImportError: Typelib file for namespace 'Pango', version '1.0' not found

Workaround for #56943

(cherry picked from commit fb9b7446ee)
2019-09-24 14:58:20 +02:00
Pierre Bourdon
2cf6ae8e01 home-assistant: remove outdated pyyaml_3 pinning
The recent bump to 0.96.2 now requires pyyaml 5.1.1. The PRs upgrading
home-assistant to a newer version and the one pinning to an old PyYAML
version raced each other and we ended up with both submitted.

Fixes home-assistant build.

(cherry picked from commit 04c1fcd09c)
2019-09-24 14:56:04 +02:00
Dima
1d37ea57b5 python37Packages.scikitlearn: patching build
For numpy>=1.17 a test-case broke that required adjustments to
a threshold.

See https://github.com/NixOS/nixpkgs/issues/68494

(cherry picked from commit 82d7833b9b)
2019-09-24 14:56:03 +02:00
Jonathan Ringer
c23263abb0 pythonPackages.cheroot: fix tests
(cherry picked from commit 9a88d2c827)
2019-09-24 14:54:38 +02:00
Fabian Möller
f19b3ec555 cheroot: fix darwin sandbox build
(cherry picked from commit 5347a8038a)
2019-09-24 14:54:01 +02:00
Mario Rodas
e9f97cf82c vault: use buildGoPackage
(cherry picked from commit 9db2a8154c)
2019-09-24 14:48:36 +02:00
Arian van Putten
c1e6017cb8 vault: 1.2.2 -> 1.2.3
Fixes the build because https://git.apache.org has been taken offline
and now has been replaced with another mirror

(cherry picked from commit 35e9b2915a)
2019-09-24 14:48:32 +02:00
Roman Volosatovs
f96eabaa03 nixos/network: replace deprecated DHCP=both by DHCP=yes
(cherry picked from commit a0a3675bdf)
2019-09-24 14:14:56 +02:00
Tristan Helmich (omniIT)
ec6c4a83be graylog-plugin-auth-sso: 3.0.0 -> 3.1.0
(cherry picked from commit 3649ee5491)
2019-09-24 12:50:27 +01:00
Tristan Helmich (omniIT)
1be0dd0e50 graylog: 3.1.0 -> 3.1.2
(cherry picked from commit e702263b4a)
2019-09-24 12:50:23 +01:00
William Kral
805dcabd26 virtualbox: Temporary fix for kernel >= 5.3
(cherry picked from commit 2f2da824ed)
2019-09-24 13:36:48 +02:00
Vladimír Čunát
315aa052f8 knot-dns: 2.8.3 -> 2.8.4
https://gitlab.labs.nic.cz/knot/knot-dns/raw/v2.8.4/NEWS
(cherry picked from commit 1b0771ac42)
It should be fairly safe maintenance update.
2019-09-24 13:13:30 +02:00
talyz
74869e2897 nixos/gitlab: Document the restriction introduced on statePath
The state path now, since the transition from initialization in
preStart to using systemd-tmpfiles, has the following restriction: no
parent directory can be owned by any other user than root or the user
specified in services.gitlab.user. This is a potentially breaking
change and the cause of the error isn't immediately obvious, so
document it both in the release notes and statePath description.

(cherry picked from commit dfc43f7d0a)
2019-09-24 13:01:13 +02:00
talyz
fbc7e7e94c nixos/gitlab: Mention secret option transition in release notes
Document the breaking secret option transition from literal secrets to
file-based ones.

(cherry picked from commit 7e325c2251)
2019-09-24 13:01:12 +02:00
Jan Malakhovski
404d1cd097 firefoxPackages.tor-browser: 8.5.4 -> 8.5.6
(cherry picked from commit 54c8da0787)
2019-09-24 08:16:22 +02:00
Colin L Rice
daf223549d linux_rpi: copy dtb so raspberry pi 3a+ boots
(cherry picked from commit 56d198b775)
2019-09-24 04:23:52 +01:00
volth
e055c5a669 nixos/matomo: fix escape
(cherry picked from commit 48086fbd70)
2019-09-24 04:20:35 +01:00
volth
92f8173f84 nixos/tt-rss: fix string escape
(cherry picked from commit 432a2d73be)
2019-09-24 04:20:31 +01:00
volth
a50fbe3086 nixos/restya-board: fix string escape
(cherry picked from commit 4641b683f6)
2019-09-24 04:20:22 +01:00
volth
1d794ca494 nixos/matomo: fix string escape
(cherry picked from commit 08195254aa)
2019-09-24 04:20:17 +01:00
volth
0d94bf8d38 nixos/prosody: fix escape
(cherry picked from commit b384420f2c)
2019-09-24 04:20:12 +01:00
volth
b315611e93 nixos/graphite: fix escape
(cherry picked from commit fbd2b55715)
2019-09-24 04:20:07 +01:00
volth
48d07aab3a nixos/less: fix escape
(cherry picked from commit 1aadcee68a)
2019-09-24 04:19:59 +01:00
volth
40608754f7 nixos/rspamd: fix fancy unicode quote
(cherry picked from commit 602a39c318)
2019-09-24 04:19:53 +01:00
volth
0b1e1241a4 treewide: fix string escapes
(cherry picked from commit 8276314608)
2019-09-24 04:19:47 +01:00
Pascal Wittmann
e102f874d1 brave: 0.68.131 -> 0.69.128
(cherry picked from commit 4235d8b07c)
2019-09-24 04:02:10 +01:00
makefu
630bffe451 linuxPackages.exfat-nofuse: 2018-04-16 -> 2019-09-06
Upstream repository is unmaintained since 2018, maintainership got taken
over by AdrianBan ( https://github.com/dorimanx/exfat-nofuse/issues/145#issuecomment-528632096 )

(cherry picked from commit 8a6e2f5d53)
2019-09-24 03:47:54 +01:00
Jonathan Ringer
6146674966 radeontool: 1.5 -> 1.6.3
(cherry picked from commit 11e62297da)
2019-09-24 03:40:57 +01:00
MetaDark
3900cdf95a protontricks: 1.2.4 -> 1.2.5
(cherry picked from commit c52f723d5e)
2019-09-24 03:27:54 +01:00
Mitsuhiro Nakamura
fe4cb7eaf7 r-randomForest: fix build on Darwin
(cherry picked from commit 8df7139996)
2019-09-24 03:24:59 +01:00
Mitsuhiro Nakamura
27f187b96a r-minqa: fix build on Darwin
(cherry picked from commit aefe6bc2e1)
2019-09-24 03:24:54 +01:00
Mitsuhiro Nakamura
6faeaac5e6 r-pan: fix build on Darwin
(cherry picked from commit 3001a1f3ff)
2019-09-24 03:24:50 +01:00
Kevin Rauscher
5220486f44 mopidy: add setuptools to propagatedBuildInputs
(cherry picked from commit 09dac43f32)
2019-09-23 21:39:58 +01:00
Kevin Rauscher
9cf3bcfdae mopidy-iris: 3.39.0 -> 3.40.0
(cherry picked from commit 49e52b7ba5)
2019-09-23 21:39:50 +01:00
Ben Gamari
6e5766e0c0 build-support: Add p11_kit to appimage dependency set
This was in the upstream list but missing from nixpkgs' list.

(cherry picked from commit d1139e340d)
2019-09-23 21:36:50 +01:00
Jörg Thalheim
0c07921c90 rtlwifi_new: 2018-02-17 -> 2019-08-21
(cherry picked from commit 434a69f5b5)
2019-09-23 20:41:33 +01:00
Dima
408b7e4dac pythonPackages.cairocffi: v1.0.2 -> v.1.1.0
The tests were failing due the switch to pytest5.
This issue has been addressed upstream in
a500f20866
which is included in v.1.1.0, so bumping the version and
updating the old patch.

Hydra log of the failure:
https://hydra.nixos.org/build/100785460/nixlog/6

(cherry picked from commit 7ff2638b7f)
2019-09-23 20:37:18 +01:00
Tom Hunger
07f018b337 dynd: fix build
(cherry picked from commit f9da799b87)
2019-09-23 20:20:01 +01:00
WilliButz
b0448a752c grafana: 6.3.5 -> 6.3.6
(cherry picked from commit c846b0a52f)
2019-09-23 21:07:24 +02:00
Niklas Hambüchen
34f71a778d libdrm: Add patch to fix musl build. Fixes #66441
(cherry picked from commit b577340eb5bc3b72549f0544b50e2e37df78bf12)

Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
(cherry picked from commit 23399ff012)
2019-09-23 13:56:59 -04:00
Matthew Bauer
6a5b4ad1e5 aws-sdk-cpp: fix libatomic detection
Needed for https://hydra.nixos.org/build/100470050

/cc @lopsided98

(cherry picked from commit 980c80c08d)
2019-09-23 13:56:30 -04:00
Matthew Bauer
6b7a7b3e7a dolphin: add baloo to propagatedUseEnvPkgs
This is needed for "Search for..." feature in dolphin.

Fixes #68174

(cherry picked from commit de15e981f6)
2019-09-23 13:56:22 -04:00
Matthew Bauer
dee217386e mariadb: add patch for missing libcrypt on darwin
Really fixes #69034

(cherry picked from commit 067b4dbb93)
2019-09-23 13:56:08 -04:00
Matthew Bauer
d0d296fb80 treewide: replace daemon with enableDaemon
broken with the introducation of "daemon" in

96ffba10f5
(cherry picked from commit ad22b9084d)
2019-09-23 13:54:18 -04:00
Robin Gloster
dc8111b85d Merge pull request #69249 from rnhmjoj/radeon-backport
radeon-profile: 20170714 -> 20190903 [19.09 backport]
2019-09-23 15:21:47 +02:00
Yorick
05f275f451 pythonPackages.license-expression: make patchShebangs more specific
(cherry picked from commit b640dbd008)
2019-09-23 13:22:51 +01:00
Yorick
82e1d6fc19 pythonPackages.license-expression: fix build
(cherry picked from commit c6e002c0fc)
2019-09-23 13:22:47 +01:00
Vladimír Čunát
1875b76087 Merge commit 'staging-19.09' into release-19.09
This is older version that has finished already:
https://hydra.nixos.org/eval/1543593
2019-09-23 13:22:59 +02:00
Jörg Thalheim
6c0d878d69 systemd: make sysinit.target depend on local-fs.target again [… (#69285)
systemd: make sysinit.target depend on local-fs.target again [backport]
2019-09-23 10:37:14 +01:00
Jörg Thalheim
cf97c54381 systemd: add myself as maintainer
(cherry picked from commit 1e8772375e)
2019-09-23 09:46:33 +01:00
Jörg Thalheim
9bc836c5a8 systemd: make sysinit.target depend on local-fs.target again
This change was re-introduced when updating to systemd 243.
Also see: https://github.com/NixOS/nixpkgs/pull/67858

(cherry picked from commit 53fb1c512a)
2019-09-23 09:46:26 +01:00
Eelco Dolstra
12cc54f6cd firefox: Use default icu
(cherry picked from commit 13beb8d753)
2019-09-23 09:56:40 +02:00
Сухарик
f649240940 kvirc: use qt5.mkDerivation
(cherry picked from commit fa435f2291)
2019-09-23 07:54:25 +01:00
Miguel Madrid Mencía
e9f7d9cad5 gigedit: 1.1.0 -> 1.1.1
(cherry picked from commit 3ffd7ba6d0)
Backport of #68934
2019-09-23 07:53:59 +02:00
Eelco Dolstra
579f204e3d Revert systemd interface version to 2
The new systemd in 19.09 gives an "Access Denied" error when doing
"systemctl daemon-reexec" on an 19.03 system. The fix is to use the
previous systemctl to signal the daemon to re-exec itself. This
ensures that users don't have to reboot when upgrading from NixOS
19.03 to 19.09.

(cherry picked from commit b20a0e49c8)
2019-09-23 07:18:29 +02:00
talyz
7a7a80bc46 nixos/gitlab: Add gnutar and gzip to gitlab-sidekiq's path
Tar and gzip are needed when importing GitLab project exports.

(cherry picked from commit aceac9d531)
2019-09-23 06:45:41 +02:00
Aaron Andersen
b20330b01c Merge pull request #69254 from mmilata/wordpress-19.09
wordpress: 5.2.2 -> 5.2.3
2019-09-22 17:50:16 -04:00
adisbladis
bf040d6240 Merge pull request #69205 from etu/fix-cask-19-09
[19.09] cask: Fix cask usage
2019-09-22 21:42:10 +01:00
Eelco Dolstra
03762d6bef nixFlakes: 2.4pre20190913_a25c022 -> 2.4pre20190922_382aa05
(cherry picked from commit 8109be4859)
2019-09-22 22:03:20 +02:00
Matthew Bauer
f6599e35ce nix: mark unix only
Nix is only known to work on unix like platforms.

https://hydra.nixos.org/job/nixpkgs/cross-trunk/crossMingw32.nix.x86_64-linux
(cherry picked from commit 2c32f91bfc)
2019-09-22 22:03:16 +02:00
Eelco Dolstra
b0993afcaa nixFlakes: 2.3pre20190830_04np4n6 -> 2.4pre20190913_a25c022
(cherry picked from commit b9e81b2138)
2019-09-22 22:03:12 +02:00
Sander van der Burg
b9c0859e67 daemon: init at 0.6.4
(cherry picked from commit 96ffba10f5)
2019-09-22 21:20:20 +02:00
Matthew Bauer
2289446c6e glibc: fix cross compilation with gcc8
(cherry picked from commit 3fcc4441d7)
2019-09-22 15:08:28 -04:00
Eelco Dolstra
6ebebe1e7d vista-fonts: Use new download location
(cherry picked from commit d8e35fdbf9)
2019-09-22 20:19:54 +02:00
Thomas Tuegel
e739c13463 Merge pull request #69223 from worldofpeace/wrap-qt-apps/fix-stable
[19.09] wrapQtAppsHook: correct skip directories heuristic
2019-09-22 12:56:01 -05:00
Martin Milata
d03904fd9f wordpress: 5.2.2 -> 5.2.3
https://wordpress.org/news/2019/09/wordpress-5-2-3-security-and-maintenance-release/
2019-09-22 17:54:36 +02:00
Florian Klink
88f32cca5a afew: propagate setuptools
(cherry picked from commit acd7c02ea9)
2019-09-22 15:43:38 +01:00
Jörg Thalheim
dbf071d5ed python.pkgs.flask_oauthlib: remove
deprecated by upstream & broken: https://github.com/lepture/flask-oauthlib

(cherry picked from commit fe5c9079fd)
2019-09-22 15:37:52 +01:00
rnhmjoj
21c6e12dc1 radeon-profile: 20170714 -> 20190903
(cherry picked from commit 608b6b5b5ca008168b8cb1961c014da44449577e)
2019-09-22 16:19:17 +02:00
rnhmjoj
fdffddd90b radeon-profile: use Qt mkDerivation
(cherry picked from commit f93006638109877f10003898baa0bb1d0abf97f5)

This solves the runtime error due to missing Qt libraries.
2019-09-22 16:18:23 +02:00
Peter Simons
df74899305 python-mailmanclient: this package builds only with Python 3.x 2019-09-22 14:09:50 +02:00
Peter Simons
2e4218645c haskell-postmaster: mark the build as broken 2019-09-22 14:05:37 +02:00
Frederik Rietdijk
2ae5f1f03b Merge release-19.09 into staging-19.09 2019-09-22 09:55:54 +02:00
Sebastian Jordan
b06275bedb python: Fix invalid pip call in setuptoolsShellHook
(cherry picked from commit 5505d2f036)
2019-09-22 09:55:45 +02:00
Elis Hirwing
18670dfbd2 Merge pull request #69227 from talyz/release-19.09
nomachine-client: 6.7.6 -> 6.8.1
2019-09-22 07:43:37 +02:00
Tim Steinbach
6f65c2ffd3 linux: 5.2.16 -> 5.2.17 2019-09-21 20:37:52 -04:00
Tim Steinbach
fa98733530 linux: 4.9.193 -> 4.9.194 2019-09-21 20:37:52 -04:00
Tim Steinbach
f866ff4a87 linux: 4.4.193 -> 4.4.194 2019-09-21 20:37:51 -04:00
Tim Steinbach
0e052adaed linux: 4.19.74 -> 4.19.75 2019-09-21 20:37:51 -04:00
Tim Steinbach
819d2cb32e linux: 4.14.145 -> 4.14.146 2019-09-21 20:37:51 -04:00
Matthew Bauer
7dab61dfbf mariadb: disable auth_pam plugin on darwin
Fixes #69034

This plugin doesn’t work right for us now, needs to be disabled. It
was added first in 10.3.18:

91fdb931fa (diff-7cea40646c6b8df9a67a3eac4eec9bc6)
(cherry picked from commit 7e43b4d0ae)
2019-09-21 16:33:24 -04:00
Matthew Bauer
b0b2dad9ec libproxy: only wrap when pxgsettings exists
https://hydra.nixos.org/build/100220165
(cherry picked from commit 60c62446e7)
2019-09-21 16:32:26 -04:00
talyz
26b1cfff1e nomachine-client: 6.7.6 -> 6.8.1
(cherry picked from commit 43dc5c0e8f)
2019-09-21 22:11:03 +02:00
worldofpeace
1f4cd317c0 wrapQtAppsHook: correct skip directories heuristic
(cherry picked from commit 15e99a06a8)
2019-09-21 14:33:39 -04:00
Pierre Bourdon
b66fb91f17 mcomix: add missing setuptools dependency
(cherry picked from commit eef06df7f5)
2019-09-21 13:19:42 -04:00
Nathan van Doorn
98d67eb2c1 kexi: patch error due to Qt 5.13
(cherry picked from commit 550d67cc0b)
2019-09-21 12:04:30 -04:00
Elis Hirwing
ee20bd109a Merge pull request #69200 from c0deaddict/release-19.09
nixos/gitea: fix dump
2019-09-21 12:08:45 +02:00
Elis Hirwing
90718478af cask: Fix cask usage
Without python as a dependency I only get the following error:
/usr/bin/env: ‘python’: No such file or directory

(cherry picked from commit 4f297c2b6f)
2019-09-21 11:45:54 +02:00
Jos van Bakel
0e351ae810 nixos/gitea: fix dump
(cherry picked from commit 86b83f37b8)
2019-09-21 11:24:11 +02:00
Maximilian Bosch
f7f4387a2c openjdk8: add setJavaClassPath-hook to jdk as well
This hook got removed from JDK[1], however without this hook,
the classpath in a Java-build isn't created anymore which caused
several[2][3] broken packages.

[1] https://github.com/NixOS/nixpkgs/pull/65247/files#r324459267
[2] https://hydra.nixos.org/build/100896633
[3] https://hydra.nixos.org/build/100895668

ZHF #68361

(cherry picked from commit 19f88062a6)
2019-09-21 09:38:20 +01:00
Serhii Khoma
564a4c6512 dropbox: 73.4.118 -> 81.4.195
(cherry picked from commit 36c772b5f3)
2019-09-21 09:33:21 +01:00
Vladimír Čunát
2b72c139f5 treewide: mark packages as buildable on darwin (PR #45364)
vcunat amended the commit a bit; see the PR for details/discussion.

(cherry picked from commit 991c0e1618)
2019-09-21 09:40:28 +02:00
Matthew Bauer
62bdec69d3 gcc: fix mising avr limits.h
Fixes #69172

(cherry picked from commit 7b58739e2c)
2019-09-21 08:36:01 +01:00
taku0
1bf3db545c firefox: 69.0 -> 69.0.1
(cherry picked from commit a4edff0fec)
2019-09-21 08:29:53 +01:00
taku0
61201f89da firefox-bin: 69.0 -> 69.0.1
(cherry picked from commit ae20db1f21)
2019-09-21 08:29:48 +01:00
Ruud van Asseldonk
6687613f55 python37Packages.sentry-sdk: use checkInputs
Instead of buildInputs, as there dependencies are only used in tests.

(cherry picked from commit 8a9ebc0b4b)
2019-09-21 08:21:13 +01:00
Ruud van Asseldonk
1abe6495ab python37Packages.sentry-sdk: Fix tests
The tests depend on many third-party libraries, presumably because
Sentry offers integration for each of them. I added these as build
inputs but not propagated build inputs, because they are only needed for
the tests.

(cherry picked from commit ce6145dedc)
2019-09-21 08:21:08 +01:00
Symphorien Gibol
2306020821 python3Packages.python-language-server: add setuptools as a dependency
(cherry picked from commit 727aaae1bb)
2019-09-21 07:48:15 +01:00
worldofpeace
47d65314df Merge pull request #69109 from worldofpeace/backport-xfce
[19.09] Touchups for nixos/xfce4-14
2019-09-20 23:27:40 -04:00
Matthew Bauer
73f612b969 release.nix: remove firefox-unwrapped from darwin-tested
Unfortunately it is broken and I won’t have time to fix right now.
Most likely we will have to wait until the macOS 10.12 update to get
this one working again.

(cherry picked from commit 70f1335f8d)
2019-09-20 23:10:59 -04:00
Matthew Bauer
89a6723d00 Merge pull request #69029 from matthewbauer/remove-iself-iselfdyn-19-09
Revert "setup.sh introduce isELFExec, isELFDyn"
2019-09-20 23:04:15 -04:00
Maximilian Bosch
49f57e66fe mautrix-telegram: 0.6.0 -> 0.6.1
https://github.com/tulir/mautrix-telegram/releases/tag/v0.6.1
(cherry picked from commit ae293ad45e)
2019-09-20 23:38:05 +02:00
hyperfekt
10903f55a8 minecraft: 2015-07-24 -> 2.1.5965
switched to the new official launcher, renamed to minecraft-launcher,
and added an update script

(cherry picked from commit 3a635da857)
2019-09-20 21:55:34 +02:00
Jonathan Ringer
6825f045df python3Packages.python-engineio: 3.4.3 -> 3.9.3
(cherry picked from commit 2d8a5baa9c)
2019-09-20 16:34:01 +01:00
Jonathan Ringer
91abf952f2 python3Packages.uvicorn: 0.8.4 -> 0.9.0
(cherry picked from commit 80d1a3b37c)
2019-09-20 16:33:57 +01:00
Jonathan Ringer
d3f56ac32a python3Packages.websockets: 7.0 -> 8.0.2
(cherry picked from commit 9b092e228b)
2019-09-20 16:33:52 +01:00
Bjørn Forsman
14fa24f87a kicad: fix build
Fix configure time error:
  ...
  ImportError: No module named wx
  CMake Error at CMakeModules/FindwxPython.cmake:52 (message):
    wxPython/Phoenix does not appear to be installed on the system

Only build tested.

Fixes: f7e28bf5d8 ("Split buildPythonPackage into setup hooks")
(cherry picked from commit 5af0d0b5da)
2019-09-20 16:40:38 +02:00
Pierre Bourdon
ea623c7ef8 mono-zeroconf: remove broken package
No dependencies within nixpkgs, and the package has not built
successfully since 2018-04-29 according to Hydra[1].

[1] https://hydra.nixos.org/build/100604053

(cherry picked from commit 21c92c4a1d)
2019-09-20 08:33:45 -04:00
Fabian Möller
21be1354d2 csvs-to-sqlite: 0.9 -> 1.0
(cherry picked from commit 527fc00325)
2019-09-20 10:33:38 +02:00
Maximilian Bosch
6868fcd911 httpie: use python3 by default
This package is intended to be used as application and supports
python3[1] (and is about to deprecated python2.7 support[2]),
so there's no reason to not use it in 2019.

[1] https://github.com/jakubroztocil/httpie/tree/1.0.3#python-version
[2] b3d2c1876e

(cherry picked from commit a7f002ac41)
2019-09-20 10:08:29 +02:00
Georges Dubus
e81404fded httpie: add missing 'setuptools' to propagatedBuildInputs
As a side-effect of f7e28bf, the build no longer propagated 'setuptools', which
is a run-time dependency. See #68314 for further details.

(cherry picked from commit 55bf3b482c)
2019-09-20 08:32:21 +02:00
aszlig
3f2ffe1aa5 ip2unix: 2.1.0 -> 2.1.1
This is just a small bugfix release (essentially adds two lines of code)
which fixes a segfault if using with a program that doesn't pass a
sockaddr buffer to accept() or accept4().

Signed-off-by: aszlig <aszlig@nix.build>
(cherry picked from commit d69bc56e69)
2019-09-20 07:54:44 +02:00
Graham Christensen
499d72936b Merge pull request #69123 from ivan/chromium-77-font-fix-19.09
[19.09] chromium: add patch to fix performance regression with fonts
2019-09-19 19:07:27 -04:00
Graham Christensen
394258da48 Merge pull request #69122 from ivan/77.0.3865.90-for-19.09
[19.09] chromium: 77.0.3865.75 -> 77.0.3865.90
2019-09-19 19:01:22 -04:00
Ivan Kozik
f10c3dea7a chromium: add patch to fix performance regression with fonts
This reverts a commit to fix a serious performance regression
introduced in Chromium 77:

https://bugs.chromium.org/p/chromium/issues/detail?id=1003997

(cherry picked from commit 19d730df85)
2019-09-19 22:27:06 +00:00
Ivan Kozik
275b4eedce chromiumDev: fix widevine support
Upstream moved libwidevinecdm.so from
./opt/google/chrome-unstable/libwidevinecdm.so
to
./opt/google/chrome-unstable/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so

(cherry picked from commit 5456def6b3)
2019-09-19 22:05:14 +00:00
Ivan Kozik
f53ecba979 chromiumDev: fix build by disabling jumbo
This fixes:

FAILED: obj/chrome/browser/ui/ui/ui_jumbo_3.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/browser/ui/ui/ui_jumbo_3.o.d -DUSE_DBUS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"371202-8455294f-1\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=361348 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DUSE_CUPS -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DENABLE_IPC_FUZZER -DTOOLKIT_VIEWS=1 -DVK_NO_PROTOTYPES -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DSYNC_PASSWORD_REUSE_DETECTION_ENABLED -DON_FOCUS_PING_ENABLED -DEXPAT_RELATIVE_PATH -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DNO_MAIN_THREAD_WRAPPING -DV8_USE_EXTERNAL_STARTUP_DATA -DSK_GL -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_HAS_JPEG_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -DV8_DEPRECATION_WARNINGS -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-aggregate-address/\" -DPERFETTO_IMPLEMENTATION -I. -I../.. -Igen -Igen/shim_headers/snappy_shim -I../../third_party/libyuv/include -Igen/shim_headers/libpng_shim -Igen/shim_headers/libwebp_shim -I../../third_party/khronos -I../../gpu -I../../third_party/vulkan/include -Igen/shim_headers/opus_shim -Igen/third_party/dawn -I../../third_party/dawn/src/include -Igen/shim_headers/flac_shim -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -Igen/third_party/metrics_proto -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/webrtc_overrides -I../../third_party/webrtc -Igen/third_party/webrtc -I../../third_party/abseil-cpp -I../../third_party/skia -I../../third_party/vulkan/include -I../../third_party/skia/third_party/vulkanmemoryallocator -I../../third_party/vulkan/include -I../../third_party/libwebm/source -I../../v8/include -Igen/v8/include -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -Igen/third_party/perfetto -I../../third_party/re2/src -I../../third_party/mesa_headers -Igen -Igen -Igen -Igen -I../../third_party/libaddressinput/src/cpp/include -Igen/components/sync/protocol -I../../third_party/flatbuffers/src/include -I../../third_party/perfetto -I../../third_party/perfetto/include -Igen/third_party/perfetto/build_config -I../../third_party/brotli/include -I../../third_party/zlib -I../../third_party/fontconfig/src -Igen -Igen -Igen -Igen -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -fcomplete-member-pointers -m64 -march=x86-64 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -no-canonical-prefixes -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-xor-used-as-pow -Wno-c99-designator -Wno-reorder-init-list -Wno-final-dtor-non-final-class -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -I/nix/store/fn0ag3ahbrjjjbsqb2846x321zj4jika-glib-2.60.7-dev/include -I/nix/store/fn0ag3ahbrjjjbsqb2846x321zj4jika-glib-2.60.7-dev/include/glib-2.0 -I/nix/store/ilk1606qj4pqzsplnnzycsxpzl6pjss8-glib-2.60.7/lib/glib-2.0/include -Wno-shorten-64-to-32 -Wno-header-guard -I/nix/store/c3i4il1c0n9mjhzm1dsvcw8h8d973s0b-nspr-4.21-dev/include -I/nix/store/qk3racv0a2967wsk0g9ps9wlbfn17faj-nss-3.46-dev/include/nss -I/nix/store/v85mz845m1hv2xlhp0zvxv36pmsfbc3q-dbus-1.12.16-dev/include/dbus-1.0 -I/nix/store/j3sv2g9s6dnlh672rwx0mmlkcm37v1k8-dbus-1.12.16-lib/lib/dbus-1.0/include -std=c++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c gen/chrome/browser/ui/ui_jumbo_3.cc -o obj/chrome/browser/ui/ui/ui_jumbo_3.o
warning: unknown warning option '-Wno-implicit-int-float-conversion'; did you mean '-Wno-implicit-float-conversion'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-xor-used-as-pow'; did you mean '-Wno-unused-macros'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-c99-designator'; did you mean '-Wno-gnu-designator'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-reorder-init-list'; did you mean '-Wno-empty-init-stmt'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-final-dtor-non-final-class'; did you mean '-Wno-abstract-final-class'? [-Wunknown-warning-option]
In file included from gen/chrome/browser/ui/ui_jumbo_3.cc:24:
./../../chrome/browser/ui/views/profiles/profile_menu_view.cc:68:25: error: redefinition of 'GetProfileAttributesEntry'
ProfileAttributesEntry* GetProfileAttributesEntry(Profile* profile) {
                        ^
./../../chrome/browser/ui/views/profiles/avatar_toolbar_button.cc:49:25: note: previous definition is here
ProfileAttributesEntry* GetProfileAttributesEntry(Profile* profile) {
                        ^
5 warnings and 1 error generated.

(cherry picked from commit 44957a9f30)
2019-09-19 22:05:14 +00:00
Ivan Kozik
dcc6d8c4ae chromium: 77.0.3865.75 -> 77.0.3865.90
CVE-2019-13685 CVE-2019-13688 CVE-2019-13687 CVE-2019-13686

(cherry picked from commit 2e2a9ae22a)
2019-09-19 22:05:14 +00:00
worldofpeace
22f4e6e765 fixup! nixos/xfce4-14: cleanup defaults slightly
(cherry picked from commit 0b73294d60)
2019-09-19 13:26:27 -04:00
worldofpeace
ac71ccf8d6 nixos/xfce4-14: cleanup defaults slightly
We added
- parole
- pavucontrol
- xfce4-taskmanager
- xfwm4-themes

to the default packages.

(cherry picked from commit f6398d8ba2)
2019-09-19 13:26:24 -04:00
worldofpeace
066760240e nixos/xfce4-14: add gnome-themes-extra
(cherry picked from commit f85e126f8c)
2019-09-19 13:26:22 -04:00
worldofpeace
57d5f08181 nixos/xfce4-14: remove gtk-xfce-engine
Xfce 4.14 deprecated this.
It had many gtk2 themes that don't work that confused users #68977.

(cherry picked from commit 5bcec7642f)
2019-09-19 13:26:18 -04:00
worldofpeace
2e8d26341e xfceUnstable: make an alias
To be removed with xfce4-12.

(cherry picked from commit a8167d10f6)
2019-09-19 13:25:50 -04:00
Tim Steinbach
4fd551ee2f linux: 5.2.15 -> 5.2.16 2019-09-19 10:09:34 -04:00
Tim Steinbach
c536f0e168 linux: 4.19.73 -> 4.19.74 2019-09-19 10:09:34 -04:00
Tim Steinbach
ba6769a045 linux: 4.14.144 -> 4.14.145 2019-09-19 10:09:34 -04:00
Claudio Bley
d0c0f0d737 ntopng: Add patch needed to build with newer libpcap
Fixes build errors for the third-party mongoose module:
```
In file included from
/nix/store/r5s3w32ahjzdlzsfrhybc3l2qcpi6yb2-libpcap-1.9.0/include/pcap.h:43,
                 from /build/ntopng-2.0/include/ntop_includes.h:93,
                                  from src/HTTPserver.cpp:22:
/nix/store/r5s3w32ahjzdlzsfrhybc3l2qcpi6yb2-libpcap-1.9.0/include/pcap/pcap.h:958: note: this is the location of the previous definition
   #define INVALID_SOCKET -1

src/../third-party/mongoose/mongoose.c:270:13: error: multiple types in one declaration
 typedef int SOCKET;
             ^~~~~~
```
2019-09-19 22:34:41 +09:00
Peter Hoeg
1831478b18 Merge pull request #69069 from peterhoeg/u/stable_mosquitto_166
mosquitto: 1.6.4 -> 1.6.6
2019-09-19 14:40:48 +08:00
Peter Hoeg
bd890d87de libwebsockets: re-init 3.1
(cherry picked from commit b02b889255)
2019-09-19 10:28:36 +08:00
Peter Hoeg
0c2615a3c2 mosquitto: 1.6.5 -> 1.6.6
(cherry picked from commit 6605fffa17)
2019-09-19 10:26:15 +08:00
Peter Hoeg
c756b06570 mosquitto: 1.6.4 -> 1.6.5
(cherry picked from commit 05ee2af77d)
2019-09-19 10:26:05 +08:00
Jan Tojnar
f2b96c7bde Merge branch 'release-19.09' into staging-19.09 2019-09-18 23:20:21 +02:00
Graham Christensen
2121897d12 Merge pull request #69043 from jtojnar/no-wrap-doc-19.09
[19.09] doc: Disable wrapping source
2019-09-18 17:19:09 -04:00
Jan Tojnar
7aa93673a1 doc: re-format 2019-09-18 22:27:27 +02:00
Jan Tojnar
37f6004e8f nixos/doc: re-format 2019-09-18 22:26:40 +02:00
Jan Tojnar
7909a8fd21 doc: Disable wrapping source
Even a simple typo fix can result in a reflow of a whole paragraph, leading to illegible diffs. The majority of text editors supports wrapping the source code to a comfortable width so it makes sense to me to sacrifice the few that do not rather than the unfortunately line-oriented diff tools.

(cherry picked from commit 641f6356d3)
2019-09-18 22:26:10 +02:00
Maximilian Bosch
9c19a2e51a nixos/sway: install swaybg by default
(cherry picked from commit 713fda2eb5)
2019-09-18 21:52:05 +02:00
Bjørn Forsman
4d3136c3a5 mdadm: fix path to sendmail
Without this, mdadm won't be able to send email notifications:

  $ sudo mdadm --monitor --scan --test
  sh: /nix/store/2v8jn0lxza72grcm6hciak9fpgm7xb3a-system-sendmail-1.0: Is a directory

Fixes: b074a40f74 ("mdadm: use shared system-sendmail")
(cherry picked from commit 6b3832a519)
2019-09-18 20:57:51 +02:00
Averell Dalton
e73366b9e0 pythonPackages.iso-639: add setuptools dependency
(cherry picked from commit e853270354)
2019-09-18 14:45:08 -04:00
Matthew Bauer
da138686f6 Revert "setup.sh introduce isELFExec, isELFDyn"
This is broken in PIE (#68513). Best to not keep it in otherwise something
else will start using it.

This reverts commit e1b80a5a99.
2019-09-18 11:33:40 -04:00
Joachim Fasting
2031771388 tests/hardened: fix build
Bug introduced by 4ead3d2ec3

For ZHF https://github.com/NixOS/nixpkgs/issues/68361

(cherry picked from commit eb59755f70)
2019-09-18 15:40:03 +02:00
Thomas Tuegel
9d98bb75c4 Merge pull request #69015 from petabyteboy/feature/qt-patches-staging-19.09
qt5.12: Add patches for QTBUG-73459 and QTBUG-69077 (19.09)
2019-09-18 05:45:41 -05:00
Milan Pässler
e33ca60155 qt5.12: Add patches for QTBUG-73459 and QTBUG-69077
QT 5.12 introduced a regression, where a QT program wouldn't show its
tray icon, if there was no tray bar during program startup. (QTBUG-73459)

QT 5.12 introduced a regression, where qtwebengine applications would
freeze in some wayland compositors if a surface from the instance was not
visible (for example having a qutebrowser window on another workspace in
sway would freeze all qutebrowser windows).

Both got fixed already in Qt 5.12.4, but according to #57042 and its
sibling issues/PRs it doesn't seem to get fixed in near future for
nixpkgs.
2019-09-18 11:23:16 +02:00
Vladimír Čunát
604acd44f7 expat: patch CVE-2019-15903 (from Debian, issue #68818)
I hope this URL will last for a few months, feel free to find better.

(cherry picked from commit 531fe80e12)
2019-09-18 09:32:14 +02:00
worldofpeace
c8c01e2a95 doc/stdenv: document meson variables
(cherry picked from commit cd518845e2)
2019-09-17 21:33:57 -04:00
Enno Lohmeier
44808beb7d xmind: fix shell escape
(cherry picked from commit 11435e0616)
2019-09-18 02:45:55 +02:00
Symphorien Gibol
8ebd14f1f4 paperwork: include setuptools to fix startup
(cherry picked from commit 944aa2bb0d)
2019-09-17 20:31:18 -04:00
Martin Weinelt
0195953af1 pythonPackages.markdown: add missing setuptools to propagatedBuildInput
Fixes the following ImportError on application startup:

/nix/store/qh7ndfsar3icmwqbiwcla7pc8x1133vg-python2.7-Markdown-3.1.1/bin/markdown_py README.md > README.html.new
Traceback (most recent call last):
  File "/nix/store/qh7ndfsar3icmwqbiwcla7pc8x1133vg-python2.7-Markdown-3.1.1/bin/.markdown_py-wrapped", line 7, in <module>
    from markdown.__main__ import run
  File "/nix/store/qh7ndfsar3icmwqbiwcla7pc8x1133vg-python2.7-Markdown-3.1.1/lib/python2.7/site-packages/markdown/__init__.py", line 25, in <module>
    from .core import Markdown, markdown, markdownFromFile
  File "/nix/store/qh7ndfsar3icmwqbiwcla7pc8x1133vg-python2.7-Markdown-3.1.1/lib/python2.7/site-packages/markdown/core.py", line 29, in <module>
    import pkg_resources
ImportError: No module named pkg_resources
make: *** [Makefile:53: README.html] Error 1

(cherry picked from commit 2b239b5b30)
2019-09-17 20:23:15 -04:00
Alyssa Ross
6bf88448d0 tarsnap: fix license to mark as unfree
tarsnap has always been unfree, but this wasn't expressed properly, so
it wouldn't be caught by allowUnfree = false.

(cherry picked from commit 39b5f5956e)
2019-09-18 02:17:18 +02:00
Eelco Dolstra
b8907a3dcb Typo
(cherry picked from commit b9ed9c7fed)
2019-09-18 02:16:53 +02:00
Will Dietz
0698072a4e wireguard: 0.0.20190702 -> 0.0.20190913
(cherry picked from commit c6af7bf1ac)
2019-09-18 02:16:52 +02:00
Will Dietz
2abfe481b1 linuxPackages*.intel-speed-select (5.3+)
(cherry picked from commit 08466b3467)
2019-09-18 02:16:51 +02:00
Franz Pletz
1ab7e90e53 firmwareLinuxNonfree: 2019-07-17 -> 2019-08-15
(cherry picked from commit 6bbf9dc419)
2019-09-18 02:16:50 +02:00
Tim Steinbach
e79e95047c linux: Add 5.3, linux-libre: 16791 -> 16794
Update linuxPackages_latest to 5.3

(cherry picked from commit 921071da08)

Rationale for backport: Stable kernels (currently 5.2) will not be
maintained shortly after the next mainline release, which is currently
5.3.
2019-09-18 02:16:49 +02:00
Franz Pletz
89b0b1f655 linux_testing: mark as broken
This commit marks the rc linux kernel as broken just on the release
branch. Since testing kernels are neither regularly updated nor
backported by us to stable we shouldn't encourage using them.
2019-09-18 02:16:48 +02:00
Tim Steinbach
ffe0c68001 linux: 5.2-rc7 -> 5.3-rc5
(cherry picked from commit 6d6c3f66b0)
2019-09-18 02:16:43 +02:00
Robin Gloster
97b530a198 hardware.brightnessctl: add brightnessctl to env
(cherry picked from commit 9566ec034b)
2019-09-18 00:09:19 +02:00
worldofpeace
76672adfd2 nixos/release: add gnome3 closure
(cherry picked from commit fb45993a62)
2019-09-17 17:54:07 -04:00
Jonathan Ringer
e228f3fa65 python3Packages.boltztrap2: fix build
(cherry picked from commit afc1e5f1a7)
2019-09-17 21:37:31 +02:00
WilliButz
5066fad592 prometheus-blackbox-exporter: 0.15.0 -> 0.15.1
(cherry picked from commit ec885ad2a8)
2019-09-17 21:34:32 +02:00
Aaron Andersen
5d06c83ba2 valum: 0.3.15 -> 0.3.16
(cherry picked from commit 41f25ab575)
2019-09-17 13:45:01 -04:00
worldofpeace
a18d12aeab scribusUnstable: drop harfbuzz
(cherry picked from commit 446dd2543d)
2019-09-17 13:44:33 -04:00
Will Dietz
1e724d939a openconnect: 8.04 -> 8.05 (security!)
https://www.infradead.org/openconnect/changelog.html

( CVE-2019-16239 )

(cherry picked from commit 7d2ec5eeb8)
2019-09-17 13:07:28 -04:00
Maximilian Bosch
3109b42c7e evcxr: 0.4.4 -> 0.4.5
New release: https://github.com/google/evcxr/blob/v0.4.5/RELEASE_NOTES.md#version-045

Also added myself as maintainer and removed `zeromq` from the build
inputs as it's now vendored by upstream.

(cherry picked from commit af564fbd8a)
2019-09-17 12:59:23 -04:00
José Romildo Malaquias
c2ea3b1926 mate.atril: 1.22.1 -> 1.22.2
(cherry picked from commit 36daaa7c67)
2019-09-17 12:49:51 -04:00
Daniel Fullmer
c9453e32b0 k2pdfopt: Fix build and clean up
(cherry picked from commit 740d4c22ec)
2019-09-17 15:16:08 +02:00
Dima
28e5cee047 setools: 4.2.0 -> 4.2.2 and fixing build
The build was broken because meanwhile setools requires cython
and no bison, swig and flex anymore.

Also, bumping version to newest release, which is not directly related
to the build breakage.

(cherry picked from commit afc4110dac)
2019-09-17 07:44:56 -04:00
Dima
3a16352368 networkx: fixing undeclared dependency
the current version of networkx implicitly depends on
pkg_resources from setuptools to check the version of
pydot (https://github.com/networkx/networkx/issues/3173).

(cherry picked from commit 5b3fb23360)
2019-09-17 07:37:17 -04:00
Francesco Gazzetta
e83682c0d8 sfxr-qt: fix build by adding setuptools native dep
(cherry picked from commit 65bda96630)
2019-09-17 07:33:43 -04:00
marius851000
4ff0d77746 protonvpn-cli: fix missing runtime dependancies
(cherry picked from commit f924dc9f99)
2019-09-17 07:23:12 -04:00
Elis Hirwing
7326cf9239 Merge pull request #68955 from aanderse/moodle
nixos/moodle: add extraConfig option
2019-09-17 12:53:13 +02:00
Aaron Andersen
196a0d795f nixos/moodle: add extraConfig option
(cherry picked from commit 7491f85e4f)
2019-09-17 06:23:18 -04:00
Graham Christensen
97b15a4b4a alacritty: fix path to xdg-open
(cherry picked from commit 21dd0207b2)
2019-09-17 10:39:06 +02:00
Craige McWhirter
ea765f50b3 zcash: Add libsnark to stop build failures
Wanted for #68361

zcash build fails due to missing `profiling.hpp` which is provided by
`libsnark`.

(cherry picked from commit 2c9bab7ec2)
2019-09-16 18:39:54 -04:00
Maximilian Bosch
00eb854993 todoist: fix gomod hash
(cherry picked from commit 3161b0319b)
2019-09-16 23:17:14 +02:00
Ricardo M. Correia
6201f65df8 todoist: 0.13.1 -> 0.14.0
(cherry picked from commit fadebf39ed)
2019-09-16 23:17:11 +02:00
Jonathan Ringer
cb2bda9b3c pythonPackage.celery: fix tests
(cherry picked from commit 47a3a1127f)
2019-09-16 22:04:48 +02:00
Tim Steinbach
e4d1964ede linux: 5.2.14 -> 5.2.15
(cherry picked from commit ef13578aac)
2019-09-16 14:06:11 -04:00
Tim Steinbach
3c82789129 linux: 5.2.13 -> 5.2.14
(cherry picked from commit 9145123508)
2019-09-16 14:06:11 -04:00
Tim Steinbach
28bf760b2e linux: 4.9.192 -> 4.9.193
(cherry picked from commit 9ea89fd6c7)
2019-09-16 14:06:10 -04:00
Tim Steinbach
d42669ca41 linux: 4.9.191 -> 4.9.192
(cherry picked from commit 9c148f8c11)
2019-09-16 14:06:10 -04:00
Tim Steinbach
8c08d64846 linux: 4.4.192 -> 4.4.193
(cherry picked from commit f282e78e4b)
2019-09-16 14:06:10 -04:00
Tim Steinbach
3d8760f440 linux: 4.4.191 -> 4.4.192
(cherry picked from commit 3e828aa8c4)
2019-09-16 14:06:10 -04:00
Tim Steinbach
fe3530badb linux: 4.19.72 -> 4.19.73
(cherry picked from commit 572785b869)
2019-09-16 14:06:09 -04:00
Tim Steinbach
407a7c5a9e linux: 4.19.71 -> 4.19.72
(cherry picked from commit feb7dc93b9)
2019-09-16 14:06:09 -04:00
Tim Steinbach
b864a8d67b linux: 4.14.143 -> 4.14.144
(cherry picked from commit 57a9aa53f9)
2019-09-16 14:06:09 -04:00
Tim Steinbach
fc206f4960 linux: 4.14.142 -> 4.14.143
(cherry picked from commit 64bd7a34f9)
2019-09-16 14:06:09 -04:00
Vladimír Čunát
b4e6d2bebd Re-revert "pythonPackages.flaky: 3.5.3 -> 3.6.1 (#68411)"
This reverts commit 047e326191.
i.e. the change is moved from the release-19.09 branch to staging-19.09.
2019-09-16 20:00:58 +02:00
Vladimír Čunát
20e6e12856 Merge branch 'release-19.09' into staging-19.09 2019-09-16 20:00:38 +02:00
Vladimír Čunát
047e326191 Revert "pythonPackages.flaky: 3.5.3 -> 3.6.1 (#68411)"
This reverts commit 755c9f3ba2.
I'm moving this to the staging-19.09 branch, similarly to a95a53aa.
It's a huge rebuild (on the order of 20k jobs), and it seems like that
was not noticed, and I can't see sufficient motivation to skip ahead of
other changes in staging-19.09.  Here my motivation is mainly to reduce
the total amount of work necessary for Hydra.
2019-09-16 19:29:20 +02:00
Aaron Andersen
f06863eaba Merge pull request #68923 from mmahut/68892-19.09
zabbix: 4.2.5 -> 4.2.6, 4.0.11 -> 4.0.12
2019-09-16 11:55:38 -04:00
Aaron Andersen
c031e561f7 zabbix: 4.2.5 -> 4.2.6, 4.0.11 -> 4.0.12
(cherry picked from commit 908a842c89)
2019-09-16 17:35:26 +02:00
Will Dietz
281e574983 bison: 3.4.1 -> 3.4.2, bugfix release (#68734)
(cherry picked from commit b86f9d6d46)
2019-09-16 10:59:03 -04:00
Sebastian Ullrich
4976c82fb0 ccacheWrapper: make usable with clang
Override original `wrapCCWith` call to preserve essential arguments

(cherry picked from commit 046ea6d08f)
2019-09-16 15:16:51 +02:00
Andreas Rammhold
08ef9a84fd Merge remote-tracking branch 'origin/release-19.09' into staging-19.09 2019-09-16 08:54:11 +02:00
Pavol Rusnak
755c9f3ba2 pythonPackages.flaky: 3.5.3 -> 3.6.1 (#68411)
(cherry picked from commit b44fca1702)
2019-09-16 00:29:28 -04:00
Sascha Grunert
2f35266255 cri-o: 1.15.1 -> 1.15.2 (#68490)
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
(cherry picked from commit 29819009ec)
2019-09-16 00:16:22 -04:00
Yurii Izorkin
ca0e768e28 mariadb: 10.3.17 -> 10.3.18 (#68541)
* mariadb: fix library locate

* mariadb: 10.3.17 -> 10.3.18

(cherry picked from commit 6c97b0486c)
2019-09-15 23:49:46 -04:00
Will Dietz
f21863ddcc modemmanager: 1.10.0 -> 1.10.4
Update dbus-sys-dir to not use deprecated directory.

https://gitlab.freedesktop.org/mobile-broadband/ModemManager/blob/1.10.4/NEWS
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/blob/1.10.2/NEWS

Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
(cherry picked from commit 2182157f31)
2019-09-15 21:34:01 -04:00
Edmund Wu
e6b068cd95 vscodium: 1.38.0 -> 1.38.1
(cherry picked from commit 703471064b)
2019-09-15 21:18:07 -04:00
Edmund Wu
ef045ed26d vscode: 1.38.0 -> 1.38.1
(cherry picked from commit e4d2f259db)
2019-09-15 21:18:01 -04:00
worldofpeace
d1d4055f0d qt5.qtwebengine: reduce log output
Identical fix as 6f1ad0676f.

(cherry picked from commit f21f980ab8)
ZHF: #68361
2019-09-15 21:09:53 -04:00
worldofpeace
735afd9a82 gnome3.mutter328: fix graphical glitches in gala
See https://github.com/elementary/gala/issues/605 and patch

(cherry picked from commit 139806d89d)
2019-09-15 20:32:06 -04:00
Maximilian Bosch
f57ef9c830 python2Packages.pytest_5: disable build
`pytest_5` only supports python3[1], however the python2 build was enabled by
separating pytest_4 and pytest_5 into two different attributes.

ZHF #68361

[1] https://docs.pytest.org/en/latest/py27-py34-deprecation.html

(cherry picked from commit 5f1c02a1c9)
2019-09-16 01:38:16 +02:00
José Romildo Malaquias
f7e407e0ca deepin.deepin-wm: use vala-0.42 to avoid compilation errors
(cherry picked from commit 11ac4397a5)
2019-09-15 18:24:23 -04:00
Daniel Schaefer
520ab844ac chipsec: 1.4.0 -> 1.4.1
(cherry picked from commit f25e86411c)
2019-09-15 23:42:22 +02:00
Daniel Schaefer
13d11d87ad chipsec: 1.3.7 -> 1.4.0
(cherry picked from commit 908ecd5cb7)
2019-09-15 23:42:22 +02:00
Dima
539626acd3 linux-libre: fixing build / deblobbing (#68844)
Build was failing because we were depending on tagged versions of
the deblobbing scripts. The tags are not updated and thus newer
changes required won't be reflected unless the tag is re-created, which
might not be reliably the case.

So bumping revision and switching to use the branches to access the
deblob scripts.

For context, in our case the missing change is:

--- /nix/store/sfc0rrhj5l44zpqgpsymq5750k5wzg8p-tags-r16790/4.19-gnu/deblob-4.19	1970-01-01 01:00:01.000000000 +0100
+++ ../deblob-4.19	2019-09-14 14:53:44.637404289 +0200
@@ -1879,7 +1879,11 @@

 announce BRCMFMAC - "Broadcom IEEE802.11n embedded FullMAC WLAN driver"
 reject_firmware drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
-reject_firmware drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+if grep -q firmware_request_nowarn drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c; then
+  reject_firmware_nowarn drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+else
+  reject_firmware drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+fi
 clean_blob drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
 clean_blob drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.h

(cherry picked from commit 2a8f7d71ce)
2019-09-15 20:00:13 +00:00
Silvan Mosberger
6fb5a76570 nixos/redshift: Add rename for provider option
This was an oversight in https://github.com/NixOS/nixpkgs/pull/64309
resulting it backwards incompatibilities

(cherry picked from commit e686b39288)
2019-09-15 21:46:35 +02:00
Silvan Mosberger
f571f10ddb nixos/redshift: Move option renames to the module
(cherry picked from commit ecf5f85a81)
2019-09-15 21:46:28 +02:00
Jonathan Ringer
414c356441 pythonPackages.azure-common: fix namespace lookup
(cherry picked from commit 4a17217696)
2019-09-15 20:09:12 +02:00
Jonathan Ringer
f5c93cf178 pythonPackages.azure-mgmt-common: fix namespace issue
(cherry picked from commit fdd6245e53)
2019-09-15 20:09:12 +02:00
Jonathan Ringer
7be24ac2fb nixops_1_6_1: pin azure-storage
(cherry picked from commit a0440ad8b5)
2019-09-15 20:09:12 +02:00
Fabian Möller
425c2df37c mitmproxy: add pytest5 compatability
(cherry picked from commit 5d0c384fc1)
2019-09-15 19:26:16 +02:00
Mario Rodas
1b6105e2d1 diff-pdf: 2017-12-30 -> 0.3
(cherry picked from commit 1743fc5e4d)
2019-09-15 19:03:32 +02:00
Maximilian Bosch
277d648ffc nix-du: update version to show actual rev's date rather than git-master
(cherry picked from commit 050646af12)
2019-09-15 18:51:48 +02:00
danme
a982d99b28 nix-du: 0.3.0 -> master
recent master fixes the build problem.

(cherry picked from commit 586946829c)
2019-09-15 18:51:48 +02:00
Will Dietz
6ac09f48c7 dhcpcd: 8.0.3 -> 8.0.6
https://roy.marples.name/blog/dhcpcd-8-0-6-released
(cherry picked from commit 0d287a2786)
2019-09-15 17:12:17 +02:00
Bjørn Forsman
5d651b3a17 pythonPackages.demjson: disable on python 3
It doesn't seem to support _any_ python 3 versions.

(cherry picked from commit 6ba044c166)
2019-09-15 16:37:28 +02:00
Aaron Andersen
9c936bd8fd cataract: fix broken build
(cherry picked from commit 806dfb3f6a)
2019-09-15 15:52:10 +02:00
Averell Dalton
0d38802d66 nextcloud: fix deprecation warning
(cherry picked from commit 56e5dddf7c)
2019-09-15 15:41:17 +02:00
Aaron Andersen
e290cd1001 Merge pull request #68640 from peterhoeg/f/zm
zoneminder: fix the build
2019-09-15 09:38:15 -04:00
Silvan Mosberger
30eb7ba00b radicale: Fix runtime
Needed pkg_resources module, which apparently comes from setuptools
according to https://stackoverflow.com/a/10538412/6605742

(cherry picked from commit b7f54d4ffa)
2019-09-15 15:09:27 +02:00
Aaron Andersen
64e38f246a tome4: fix broken build
(cherry picked from commit 792f80d918)
2019-09-14 15:22:05 -04:00
Peter Simons
4b342f658b Merge pull request #68500 from peti/t/mailman
[release-19.09] port new Mailman & Postorius & Hyperkitty NixOS module from master
2019-09-14 20:54:38 +02:00
Vladimír Čunát
cedc990e3f ffmpeg_4, ffmpeg_full: 4.2 -> 4.2.1
Fixes #68561 CVE-2019-15942.

(cherry picked from commit 260761649b)
2019-09-14 20:15:55 +02:00
Pierre Bourdon
135093700b home-assistant: add missing setuptools dependency
Fixes currently broken nixos hass test: https://hydra.nixos.org/build/100923199

(cherry picked from commit 6a0c11b931)
2019-09-14 17:14:13 +02:00
Vladimír Čunát
7d2085c100 Merge #68776: thunderbird*: 68.0 -> 68.1.0 (security)
(cherry picked from commit 152f1e6577)
Re-tested for a while.
2019-09-14 16:27:01 +02:00
Maximilian Bosch
032187ae20 paperless: fix cors header
`django-cors-headers` 3.x (which is used in nixpkgs) requires a scheme
for allowed hosts. Upstream uses 2.4, however we create the python env
with Nix, so the source needs to be patched accordingly.

(cherry picked from commit 0d5806fefd)
2019-09-14 15:20:23 +02:00
Daniel Schaefer
d8986ddc6d paperless: Use pytest_4 in django-crispy-forms
Doesn't build with pytest_5

(cherry picked from commit cbab4663f3)
2019-09-14 15:20:23 +02:00
Daniel Schaefer
4dee67cb9b pytest: Add pytest_4 as its own attribute
Many packages aren't yet updated to handle the incompatible changes of
pytest5 so we still need v4.

(cherry picked from commit 34b58364e4)
2019-09-14 15:20:23 +02:00
Vladimír Čunát
5685f3bf61 Merge #68753: firefox-60-esr: 60.8.0esr -> 60.9.0esr
(cherry picked from commit 92604b88b3)
Re-tested on this branch for a while.
2019-09-14 15:14:08 +02:00
Daniel Schaefer
d0d0a15175 bareos: Mark as broken
Doesn't have a maintainer.
Doesn't work with our new glusterfs version.
bareos18 has changed from autotools to cmake so the derivation has to be
completely rewritten.

(cherry picked from commit e416a39464)
2019-09-14 15:08:27 +02:00
Doron Behar
321d7a25e2 sccache: 0.2.10 -> 0.2.11
(cherry picked from commit 4a99b423fe)
2019-09-14 15:00:09 +02:00
Maximilian Bosch
57955dfc6a documize-community: 3.2.0 -> 3.3.0
https://github.com/documize/community/releases/tag/v3.3.0
(cherry picked from commit c6f257265d)
2019-09-14 14:54:55 +02:00
Maximilian Bosch
5e1b7b60f0 python3Packages.face_recognition_models: fix startup
(cherry picked from commit e176117a81)
2019-09-14 14:48:20 +02:00
Maximilian Bosch
c1f47a59dc python3Packages.dlib: fix build
The CMake configuring is done in the `setup.py` and doesn't need to be
done by the setup hook. This broke the build as the setup-hook switches
into `source/build` which doesn't have a `setup.py`.

Relying on the setup script from upstream fixes the issue.

ZHF #68361

(cherry picked from commit 72ec538d2c)
2019-09-14 14:48:20 +02:00
Daniel Schaefer
0ae0e890fb ape: 6.7-131003 -> 2019-08-10
(cherry picked from commit ea3ea651f9)
2019-09-14 14:43:26 +02:00
Herwig Hochleitner
d1cd6f8db3 Merge pull request #60833 from jflanglois/chromium-widevine
chromium: fix widevine
(cherry picked from commit dd57bf928b)
2019-09-14 14:39:32 +02:00
Ivan Kozik
4546877d23 chromium: 76.0.3809.132 -> 77.0.3865.75
CVE-2019-5870 CVE-2019-5871 CVE-2019-5872 CVE-2019-5873
CVE-2019-5874 CVE-2019-5875 CVE-2019-5876 CVE-2019-5877
CVE-2019-5878 CVE-2019-5879 CVE-2019-5880 CVE-2019-5881
CVE-2019-13659 CVE-2019-13660 CVE-2019-13661 CVE-2019-13662
CVE-2019-13663 CVE-2019-13664 CVE-2019-13665 CVE-2019-13666
CVE-2019-13667 CVE-2019-13668 CVE-2019-13669 CVE-2019-13670
CVE-2019-13671 CVE-2019-13673 CVE-2019-13674 CVE-2019-13675
CVE-2019-13676 CVE-2019-13677 CVE-2019-13678 CVE-2019-13679
CVE-2019-13680 CVE-2019-13681 CVE-2019-13682 CVE-2019-13683

(cherry picked from commit d66430be79)
2019-09-14 14:37:50 +02:00
Daniel Schaefer
4909a5e764 twister: 0.9.34 -> 2019-08-19
(cherry picked from commit 42243e46b1)
2019-09-14 14:25:27 +02:00
Will Dietz
5c0ad0e3b2 networkmanager,modemmanager: fix service symlinks for systemd v243
Fixes problems such as:

systemd[1]: Failed to put bus name to hashmap: File exists
systemd[1]: dbus-org.freedesktop.nm-dispatcher.service: Two services allocated for the same bus name org.freedesktop.nm_dispatcher, refusing operation.

Problem is that systemd treats symlinks to files outside the service
path differently, causing our old workaround to look like two separate services.

These symlinks are intended to be a means for manually emulating
the behavior of the `Alias=` directive in these services.
Unfortunately even making these symlinks relative isn't enough,
since they don't make it to where it matters--
that only makes the links in /etc/static/systemd/system/*
relative, with systemd still being shown non-relative links
in /etc/systemd/system/*.

To fix this, drop all of this at the package level
and instead simply specify the aliases in the NixOS modules.

Also handle the same for modemmanager,
since the networkmanager NixOS module also handles that.

(cherry picked from commit 447d625edc)
2019-09-14 08:07:29 -04:00
Robin Gloster
539f1d177a xen_4_10: 4.10.0 -> 4.10.4
glusterfs compatibility fix, also added Wno-error flags for gcc8
compatibility

(cherry picked from commit dcdf68ee01)
2019-09-14 14:06:44 +02:00
Maximilian Bosch
cb48999619 nixos/hydra: incorporate upstream changes and update test
During the last update, `hydra-notify` was rewritten as a daemon which
listens to postgresql notifications for each build[1]. The module
uses the `hydra-notify.service` unit from upstream's Hydra module and
the VM test ensures that email notifications are sent properly.

Also updated `hydra-init.service` to install `pg_trgm` on a local
database if needed[2].

[1] c7861b85c4
[2] 8a0a5ec3a3

(cherry picked from commit ce37a040c2)
2019-09-14 13:38:39 +02:00
Maximilian Bosch
4ab56cbc95 nixos/hydra: fix test
We ship `https://cache.nixos.org` as binary cache by default which
automatically substitutes the test derivation used inside the Hydra
test. However it needs to be built locally to confirm that
`hydra-queue-runner` works properly.

Also inherited the platform name for the test derivation from `system`
to ensure that the build can be tested on each supported platform.

ZHF #68361

(cherry picked from commit 7f136b5a56)
2019-09-14 13:38:39 +02:00
Maximilian Bosch
d16b279990 hydra: 2019-05-06 -> 2019-08-30
(cherry picked from commit b898c262c1)
2019-09-14 13:38:37 +02:00
obadz
aac9559099 citrix-receiver: decomission in favor of citrix-workspace.
Already documented in #64645

(cherry picked from commit e5e6b514f5)
2019-09-14 13:24:32 +02:00
WilliButz
b19cce9050 httplz: 1.5.2 -> 1.6.0, add openssl to PATH
(cherry picked from commit 91bb6cf407)
2019-09-14 12:49:12 +02:00
Daniel Schaefer
286008d9cc httplz: Fix build with openssl_1_0_2
The rust crate dependency that wraps OpenSSL doesn't support the Openssl
1.1.

(cherry picked from commit acf571eec4)
2019-09-14 12:49:10 +02:00
Jonathan Ringer
b6d35154ef pythonPackages.azure-servicebus: 0.50.0 -> 0.50.1
(cherry picked from commit e5aba9c007)
2019-09-14 12:40:51 +02:00
Jonathan Ringer
4ade034371 pythonPackages.uamq: 1.1.0 -> 1.2.2
(cherry picked from commit 27c8e8ec5c)
2019-09-14 12:40:37 +02:00
Samuel Leathers
b501e0ed14 pythonPackages.twisted: add setuptools dependency
* required for buildbot test to pass

(cherry picked from commit 3491d523b3)
2019-09-14 12:35:38 +02:00
Will Dietz
086a44d53d samba: 4.10.6 -> 4.10.8 (security!)
https://www.samba.org/samba/history/samba-4.10.8.html
https://www.samba.org/samba/history/samba-4.10.7.html
(cherry picked from commit b5b92e015c)
2019-09-14 12:25:05 +02:00
Robin Gloster
7a5e4632dd spidermonkey_1_8_5: fix build with gcc8
closes #68765
closes #68763

(cherry picked from commit a345623f2b)
2019-09-14 12:19:59 +02:00
Aaron Andersen
4e2f3e0c94 nut: fix broken build
(cherry picked from commit 4e6b7a51a0)
2019-09-14 11:03:43 +02:00
Marek Mahut
936a53ee69 getdns: 1.5.1 -> 1.5.2 (#68567)
(cherry picked from commit a91fe3d575)
2019-09-14 00:37:45 -04:00
Will Dietz
54ad3625cf lollypop: 1.1.4.14 -> 1.1.4.16
https://gitlab.gnome.org/World/lollypop/-/tags/1.1.4.16
(cherry picked from commit 3b9995ca8e)
2019-09-13 23:50:11 -04:00
Jonathan Ringer
3920ccc2a1 pythonPackages.pyarrow: fix build
(cherry picked from commit 5e67b340e8)
2019-09-14 00:03:02 +02:00
danme
cbee07adc0 csvkit: fix failing test
downgrading dependency agate-sql

(cherry picked from commit 535117b136)
2019-09-13 23:53:40 +02:00
worldofpeace
85f8c3634c scribusUnstable: fix build
We use harfbuzzFull because that includes the icu build which
this depends on.

Fixes #68548

(cherry picked from commit 02cab2d031)
2019-09-13 17:51:47 -04:00
Fabian Möller
d44eb7871d manuskript: fix build and use wrapQtApp
(cherry picked from commit cd67dd52d2)
2019-09-13 23:32:25 +02:00
Daniel Schaefer
4372c17b54 xen: Ignore GCC8 errors
(cherry picked from commit dc0e697038)
2019-09-13 23:28:18 +02:00
Christian Kögler
cca77788c4 virtualboxGuestAdditions: fix compilation with kernel 5.2
(cherry picked from commit 2756c3054c)
2019-09-13 23:26:33 +02:00
Jonathan Ringer
da1d5f11b8 pythonPackages.zeep: fix pytest5 tests
(cherry picked from commit 30f3e4a3a6)
2019-09-13 23:25:29 +02:00
Jonathan Ringer
89a75070b7 python3Package.hug: 2.4.8 -> 2.6.0
(cherry picked from commit 8e06d7ee3b)
2019-09-13 23:20:53 +02:00
WilliButz
50f2d4dee6 samba4Full: fix build
The pkgconfig requirements for glusterfs-api were not satisfied without
uuid, resulting in Waf not setting the correct API version for glusterfs
during the build and consequently incompatible function calls in samba.

Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
(cherry picked from commit 9378ff1cb5)
2019-09-13 21:48:07 +02:00
Bjørn Forsman
29cb637ee0 wrapQtAppsHook: skip directories
Prevents messages like this in the build log:

  grep: <PATH>/bin: Is a directory

(cherry picked from commit d6e65ec4a0)
2019-09-13 21:29:16 +02:00
Bjørn Forsman
f62222edf8 wrapQtAppsHook: use patchelf --print-interpreter instead of isELFExec
Some executables are built as PIEs (e.g. keepassxc) and are technically
isELFDyn, not isELFExec. Without this change those executables will not
be wrapped.

(cherry picked from commit c6d516dfc4)
2019-09-13 21:29:16 +02:00
Tim Steinbach
2442103bb7 xmonad: Fix test 2019-09-13 15:17:57 -04:00
Linus Heckemann
b4298cff52 netatalk: use system netatalk
(cherry picked from commit 19ca6c62b0)
2019-09-13 20:47:56 +02:00
Aaron Andersen
b00a9bfeb5 ike: fix broken build
Co-Authored-By: worldofpeace <worldofpeace@protonmail.ch>
(cherry picked from commit beeaf5a5b1)
2019-09-13 14:41:42 -04:00
worldofpeace
245c45f369 Merge pull request #68637 from peterhoeg/f/icr
icr: compile against openssl 1.0.2
2019-09-13 14:40:51 -04:00
Robin Gloster
d27fdf8887 python.pkgs.cryptography: fix/ignore broken tests
Broken tests by openssl 1.1.1d, added patch and skipped one test

Issue for skipped test: https://github.com/pyca/cryptography/issues/4998
2019-09-13 20:12:19 +02:00
Maximilian Bosch
a396197871 nixos-option: don't break if builtins.trace is used in <nixos-config>
By default everything from `stderr` will be recorded in case of errors,
however this shouldn't break `nixos-option` if a simple trace call is
used that breaks the Nix expression evaluated by `nixos-option`.

Fixes #67659

(cherry picked from commit 588aefc53d)
closes #68121
2019-09-13 19:41:57 +02:00
Daniel Schaefer
7376e5d58f whitebox: 0.9.0 -> 0.16.0 (#68682)
(cherry picked from commit a5b2e090ec)
2019-09-13 17:40:49 +00:00
Alyssa Ross
309cdb8b44 appleseed: fix build
(cherry picked from commit 5617881a42)
2019-09-13 18:45:55 +02:00
Daniel Schaefer
3dc028716a xfstests: 2018-04-11 -> 2019-09-08
(cherry picked from commit 08dab35cd4)
2019-09-13 18:12:54 +02:00
danme
5db2b9b6f2 giv: removed
Because of a build error dropped for 19.09 (#68361).

(cherry picked from commit 55a636055c)
2019-09-13 17:05:28 +01:00
WilliButz
0f25cf4996 sambaMaster: remove outdated package
(cherry picked from commit cec8524112)
2019-09-13 16:57:33 +01:00
Jörg Thalheim
579b884e81 python.pkgs.pylint_1_9: fix incorrect checksum
was not updated in 08d556c0e8

(cherry picked from commit b31931adf5)
2019-09-13 16:33:02 +01:00
WilliButz
566cf38945 nixos/tests/mumble: update test to use systemd-journal
(cherry picked from commit ef394409b2)
2019-09-13 17:21:19 +02:00
Ben Wolsieffer
35751608ba openjdk8: use lndir instead of single symlink to JRE
Directly symlinking from the JDK to the JRE confused Gradle and made it try to
find JDK files inside the JRE.

(cherry picked from commit 1621cbe270)
2019-09-13 17:14:43 +02:00
Fabian Möller
09e958675c h11: add pytest5 compatability
(cherry picked from commit 3bf75ee4cc)
2019-09-13 15:53:40 +01:00
Daniel Schaefer
7174551223 xflux-gui: 1.1.10 -> 1.2.0
Didn't build with the old version because they dropped Python2 and
changed some dependencies.

(cherry picked from commit eb5497c419)
2019-09-13 16:46:03 +02:00
Michael Fellinger
9927fbb651 gem-config: fix zookeeper for gcc-8 (#68642)
(cherry picked from commit 13866ed4cf)
2019-09-13 14:02:15 +00:00
Linus Heckemann
3fd37b5b98 ants: use itk 4.x
(cherry picked from commit f6182da2c6)
2019-09-13 15:09:22 +02:00
Linus Heckemann
cfb651c22f itk4: init at 4.13.1
This is exactly the same as we had prior to
e7b0c389c2, which broke some dependents,
just under a new attribute name.

(cherry picked from commit afceaee163)
2019-09-13 15:09:20 +02:00
Jörg Thalheim
ef7af23127 python.pkgs.pylint_1_9: 1.9.4 -> 1.9.5
Also fix build by skipping a test that requires setuptools to be present.
(Also just adding setuptools does not fix the issue either?)

(cherry picked from commit 08d556c0e8)
2019-09-13 13:54:19 +01:00
WilliButz
63e72f522b rspamd: disable LuaJIT support on aarch64
When compiled with LuaJIT support, rspamd segfaults on aarch64.
Without LuaJIT, rspamd falls back to plain Lua and torch support needs to
be disabled.

(cherry picked from commit 7350dd9d94)
2019-09-13 14:48:15 +02:00
Aaron Andersen
7d8224bc92 tvheadend: fix broken build
(cherry picked from commit 823c05e0e8)
2019-09-13 14:30:52 +02:00
zimbatm
1b132a979a bundlerApp: avoid unecessary rebuilds when gemdir changes
Because the gemdir was referenced on the derivation, it would cause the
whole gemdir to get added to the store, which would in turn force the
derivation to be rebuilt whenever unrelated folder files would change.

(cherry picked from commit cef857e8b7)
2019-09-13 12:00:00 +00:00
talyz
89dee42dad nixos/gitlab: Fix swap of secrets
Fix accidental swap of the otp and db secrets in the secrets.yml
file. Fixes #68613.

(cherry picked from commit 4b6ba5b27c)
2019-09-13 13:35:55 +02:00
Robin Gloster
9116f7532d Merge remote-tracking branch 'upstream/staging-19.09' into release-19.09 2019-09-13 13:12:52 +02:00
Daniel Schaefer
4d378c2588 microsoft_gsl: Fix gcc8 build
(cherry picked from commit 5548ff632e)
2019-09-13 10:55:53 +01:00
Peter Hoeg
dae37ece4e zoneminder: fix the build
(cherry picked from commit 280e73c7eb)
2019-09-13 17:48:17 +08:00
Peter Hoeg
a35b9453d9 icr: compile against openssl 1.0.2
(cherry picked from commit c7b50f715d)
2019-09-13 17:39:10 +08:00
Andreas Rammhold
3000869605 Merge branch release-19.09 into staging-19.09 2019-09-13 09:58:15 +02:00
Jörg Thalheim
b2e824c843 dino: 2019-03-07 -> 2019-09-12
(cherry picked from commit e849aadd62)
2019-09-12 22:38:54 +01:00
zimbatm
8d1e7693f0 cide: remove (#68505)
(cherry picked from commit ab0308604b)
2019-09-12 22:03:31 +02:00
Aaron Andersen
c471931a4a Merge pull request #68466 from aanderse/moodle
moodle: 3.7.1 -> 3.7.2 [19.09 backport]
2019-09-12 16:02:59 -04:00
Matthew Harm Bekkema
c6437d7e97 kernel: Enable X86_AMD_PLATFORM_DEVICE
This is needed to get the toupad working on my Acer Nitro laptop.

(cherry picked from commit 2e94b9853c)
2019-09-12 14:15:15 -04:00
Ivan Kozik
48910f06ca anki: fix startup
Related: #68314

This fixes startup of anki, which currently shows this in a dialog:

Error during startup:
Traceback (most recent call last):
  File "/nix/store/0h395dwc6b80n5xg93p86ywaz6kpz6ck-anki-2.1.15/lib/python3.7/site-packages/aqt/main.py", line 46, in __init__
    self.setupAddons()
  File "/nix/store/0h395dwc6b80n5xg93p86ywaz6kpz6ck-anki-2.1.15/lib/python3.7/site-packages/aqt/main.py", line 657, in setupAddons
    import aqt.addons
  File "/nix/store/0h395dwc6b80n5xg93p86ywaz6kpz6ck-anki-2.1.15/lib/python3.7/site-packages/aqt/addons.py", line 9, in <module>
    import markdown
  File "/nix/store/knq8798kl0xzzr7ii4bchskg1c8mq6pj-python3.7-Markdown-3.1.1/lib/python3.7/site-packages/markdown/__init__.py", line 25, in <module>
    from .core import Markdown, markdown, markdownFromFile
  File "/nix/store/knq8798kl0xzzr7ii4bchskg1c8mq6pj-python3.7-Markdown-3.1.1/lib/python3.7/site-packages/markdown/core.py", line 29, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

(cherry picked from commit 2769d610ac)
2019-09-12 13:30:39 -04:00
Daniel Fullmer
093bde56b0 rtl8812au: 5.2.20.2_28373.20180619 -> 5.2.20.2_28373.20190903
(cherry picked from commit f12dcceb47)
2019-09-12 13:10:04 -04:00
Matthew Harm Bekkema
b0bd0ee67b lyx: use qt5's mkDerivation
Fixes the error:

    qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

See #65399

(cherry picked from commit b918bb9e5d)
2019-09-12 13:08:01 -04:00
Henrik Jonsson
9797f394f4 tor-browser-bundle-bin: 8.5.4 -> 8.5.5
(cherry picked from commit ac975ddd8f)
2019-09-12 18:54:58 +02:00
Dima
d611aa8b1c zeroc-ice-36: fix build for gcc8
The build was broken failing on unneccessary memsets.
This issue was fixed upstream in 3.7 and discussed in
https://github.com/zeroc-ice/ice/issues/82

The patch pertaining to the error causing the actual failure still
applies nicely onto the 3.6 version.

Hydra logs of breakage: https://hydra.nixos.org/build/100440955/nixlog/1

(cherry picked from commit cb966b6f7b)
2019-09-12 12:51:05 -04:00
Peter Hoeg
4d9d683f04 kdepim-addons: add missing dependency
(cherry picked from commit 428a58ad7f)
2019-09-12 12:49:12 -04:00
Aaron Andersen
8cef4f386b prayer: fix broken build
(cherry picked from commit 1fca7a8961)
2019-09-12 12:18:28 -04:00
WilliButz
e0b7f1e074 v8: fix build on aarch64
(cherry picked from commit 0e879bfe8d)
2019-09-12 12:11:07 -04:00
Aaron Andersen
48df6c91ce viking: fix broken build
(cherry picked from commit f6517742df)
2019-09-12 12:06:39 -04:00
Marek Mahut
bcc9f756e9 Merge pull request #68554 from mmahut/68365-19.09
nixos/zabbixWeb: fix a string reference as well as the phpfpm socket …
2019-09-12 15:48:42 +02:00
Aaron Andersen
bef6d65c76 nixos/zabbixWeb: fix a string reference as well as the phpfpm socket path
(cherry picked from commit a0edbc5b4d)
2019-09-12 15:41:44 +02:00
Maximilian Bosch
7fe98b5d05 mautrix-telegram: fix startup
`setuptools` isn't propagated automatically anymore, see also #68314.

(cherry picked from commit 54752cd3c4)
2019-09-12 13:32:22 +02:00
SRGOM
134da5b641 nixos.manual.installation.installing: nixos-hw
Fixed repo name gh:nixos/nixos-hardware

(cherry picked from commit c17e66afe4)
2019-09-12 12:18:29 +02:00
WilliButz
98dba44b07 wt4: 4.1.0 -> 4.1.1
(cherry picked from commit 823e8accb9)
2019-09-12 11:20:02 +02:00
WilliButz
a85cedd3ce wt3: 3.4.0 -> 3.4.1, include harfbuzz
(cherry picked from commit 5c5fc13602)
2019-09-12 11:19:55 +02:00
Nikolay Korotkiy
f13471dedd xchm: 1.23 -> 1.30
(cherry picked from commit d526e331f8)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-09-12 09:44:58 +02:00
Nick Spinale
60c1f80420 plyplus: enable for python3
(cherry picked from commit 982b85b578)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-09-12 09:22:53 +02:00
Jason Carr
dee9e16f7f lesspass: fix src
(cherry picked from commit 7644e88334)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-09-12 09:16:36 +02:00
taku0
e948252eef flashplayer: add maintainer
(cherry picked from commit c8802e1aed)
2019-09-11 17:17:37 -04:00
taku0
85e0a2ea2d flashplayer: 32.0.0.238 -> 32.0.0.255
(cherry picked from commit dac340737a)
2019-09-11 17:17:01 -04:00
Averell Dalton
c3f8f7965e youtube-dl: 2019.09.12 -> 2019.09.12.1
(cherry picked from commit 99ec6416c5)
2019-09-11 16:44:49 -04:00
rnhmjoj
75ba6bb7e4 warzone: 3.3.0_beta1 -> 3.3.0
(cherry picked from commit 3516b1ddc5)
2019-09-11 21:28:34 +01:00
rnhmjoj
76ef329590 warzone: 3.2.3 -> 3.3.0_beta1
(cherry picked from commit bdda1e5b66)
2019-09-11 21:28:30 +01:00
Roosembert Palacios
5630f0e4a5 youtube-dl: 2019.09.01 -> 2019.09.12
Signed-off-by: Roosembert Palacios <roosembert.palacios@epfl.ch>
(cherry picked from commit 264369254c)
2019-09-11 15:55:45 -04:00
Alyssa Ross
db5d82257d nixos/mailman: types.string -> types.str
(cherry picked from commit 27b459ce1e)
2019-09-11 19:58:48 +02:00
Marek Mahut
231544ccb2 Merge pull request #68439 from mmahut/morph-19.09
morph: 1.3.0 -> 1.3.1
2019-09-11 19:18:32 +02:00
WilliButz
25690ef7e2 nixos/tests: add prometheus-rspamd-exporter test
(cherry picked from commit ccf00bce12)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-09-11 18:04:41 +02:00
WilliButz
b41f60f47f nixos/prometheus-exporters: add rspamd-exporter
This adds a module that configures the json exporter,
which then acts as an exporter for rspamd.

(cherry picked from commit bcce960d7d)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-09-11 18:04:41 +02:00
WilliButz
2d528f19e7 prometheus-blackbox-exporter: 0.14.0 -> 0.15.0
(cherry picked from commit 9fd90aa825)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-09-11 18:02:25 +02:00
adisbladis
56f0bd9d2d Merge pull request #68504 from adisbladis/drop-go-1_11-1909
Drop unsupported go version 1.11 (19.09 backport)
2019-09-11 15:43:17 +01:00
adisbladis
c6dff650c2 go_1_11: Drop package
It's unsupported by upstream.

(cherry picked from commit 3e501fe168)
2019-09-11 15:09:34 +01:00
adisbladis
76a23ee869 mongodb-tools: 3.7.2 -> 4.2.0
Fix build with latest Go

(cherry picked from commit a26a274a68)
2019-09-11 15:09:28 +01:00
adisbladis
95d7c8df45 mirrorbits: Fix build with go 1.12
(cherry picked from commit b0326145da)
2019-09-11 15:09:21 +01:00
zimbatm
4f33008ec0 terraform: default to version 0.12 (#68497)
(cherry picked from commit f42258c54d)
2019-09-11 15:51:24 +02:00
Peter Simons
d29476ffff nixos/mailman: properly wrap the mailman-web script
(cherry picked from commit d0dba96e1d)
2019-09-11 15:39:58 +02:00
Peter Simons
7493c36bc1 nixos/mailman: create "mailman" executable as a proper wrapper script
(cherry picked from commit a7941fe210)
2019-09-11 15:39:58 +02:00
Peter Simons
37034c8045 nixos/mailman: clean up our variable names
(cherry picked from commit 1cb5cff611)
2019-09-11 15:39:58 +02:00
Peter Simons
4d7224d3d7 nixos/mailman: httpd.services requires mailman-web in the systemd sense
When mailman-web restarts, it removes the generated "static" directory. This
breaks a currently running httpd process, which needs a re-start, too, to
obtain a new handle for the newly generated path.

(cherry picked from commit 0cc37b3cfa)
2019-09-11 15:39:58 +02:00
Peter Simons
ff141ec6ef python-mailman-web: turn these Djando configuration files into a make-shift Python library
Suggested in https://github.com/NixOS/nixpkgs/pull/67951#issuecomment-530309702.

(cherry picked from commit 86f8895abb)
2019-09-11 15:39:57 +02:00
Peter Simons
420efa475f nixos/mailman: add support for the Mailman Web UI (Postorius & Hyperkitty)
(cherry picked from commit 72c7ba5aba)
2019-09-11 15:39:57 +02:00
Nathan van Doorn
b4a66c44ef qt59.qtscript: fix error due to gcc8.3
(cherry picked from commit 4535178a37)
2019-09-11 08:43:50 -04:00
Nathan van Doorn
9b0a4afadd qt511.qtscript: fix error due to gcc8.3
(cherry picked from commit a4ace375d2)
2019-09-11 08:43:43 -04:00
Andreas Rammhold
9ec45cc56e openssl_1_0_2: fixup sha256 2019-09-11 13:51:55 +02:00
Peter Simons
1bffbf1bda python-alembic: add missing 'setuptools' to propagatedBuildInputs
As a side-effect of f7e28bf5d8, the build
no longer propagated 'setuptools', which is a run-time dependency. See
https://github.com/NixOS/nixpkgs/pull/68314 for further details.

(cherry picked from commit 14854f20bb)
2019-09-11 12:18:50 +02:00
Aaron Andersen
69a371b9ac love_0_8: fix broken build
(cherry picked from commit ef114315ca)
2019-09-11 06:00:28 -04:00
Peter Simons
267c642687 python-django-haystack: add missing 'setuptools' to propagatedBuildInputs
As a side-effect of f7e28bf5d8, the build
no longer propagated 'setuptools', which is a run-time dependency. See
https://github.com/NixOS/nixpkgs/pull/68314 for further details.

Fixes https://github.com/NixOS/nixpkgs/issues/68479.

(cherry picked from commit b57f25ac80)
2019-09-11 11:58:15 +02:00
Andreas Rammhold
acc69d8aa8 Merge branch release-19.09 into staging-19.09 2019-09-11 11:42:48 +02:00
Andreas Rammhold
508be45202 Merge pull request #68450 from andir/19.09/openssl
[19.09] openssl: 1.1.1c -> 1.1.1d, openssl_1_0_2: 1.0.2s -> 1.0.2t (low severity security)
2019-09-11 11:39:26 +02:00
Pierre Bourdon
6f8818e5c3 deluge: add missing setuptools dependency
Latest staging merge broke nixos/tests/deluge.nix showing an ImportError
for "pkg_resources": https://nix-cache.s3.amazonaws.com/log/h8qzkcjldal5j1925g0r04ncl5afjjnp-vm-test-run-deluge.drv

(cherry picked from commit 50956385ff)
2019-09-11 05:32:52 -04:00
Tadeo Kondrak
5c89877e2e qutebrowser: add setuptools as a dependency
(cherry picked from commit 863589ad4d)
2019-09-11 05:28:56 -04:00
Fabian Möller
713aca09a5 django: don't wrap binary files twice 2019-09-11 09:30:50 +01:00
Ivan Kozik
a3d8dea4a1 fctix-engines.mozc: fix build
This fixes:

FAILED: obj/engine/engine.engine.o
clang++ -MMD -MF obj/engine/engine.engine.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV -DENABLE_GTK_RENDERER -DNDEBUG -DQT_NO_DEBUG -DNO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/build/source/src -Igen -Igen/proto_out -Wall -Wno-char-subscripts -Wno-sign-compare -Wno-deprecated-declarations -Wwrite-strings -fPIC -fno-exceptions -fmessage-length=0 -fno-strict-aliasing -funsigned-char -include base/namespace.h -pipe -pthread -fno-omit-frame-pointer -fstack-protector --param=ssp-buffer-size=4 -Wtype-limits -O2 -Wno-deprecated -Wno-covered-switch-default -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=gnu++0x -std=gnu++0x  -c ../../engine/engine.cc -o obj/engine/engine.engine.o
In file included from ../../engine/engine.cc:30:
In file included from /build/source/src/engine/engine.h:33:
In file included from /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/memory:62:
In file included from /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algobase.h:66:
/nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_iterator_base_funcs.h:183:2: error: cannot decrement value of type 'mozc::ZeroQueryDict::iterator'
        --__i;
        ^ ~~~
/nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_iterator_base_funcs.h:206:12: note: in instantiation of function template specialization 'std::__advance<mozc::ZeroQueryDict::iterator, long>' requested here
      std::__advance(__i, __d, std::__iterator_category(__i));
           ^
/nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algo.h:2137:9: note: in instantiation of function template specialization 'std::advance<mozc::ZeroQueryDict::iterator, long>' requested here
          std::advance(__middle, __half);
               ^
/nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algo.h:2190:19: note: in instantiation of function template specialization 'std::__equal_range<mozc::ZeroQueryDict::iterator, unsigned long, __gnu_cxx::__ops::_Iter_less_val, __gnu_cxx::__ops::_Val_less_iter>' requested here
      return std::__equal_range(__first, __last, __val,
                  ^
/build/source/src/prediction/zero_query_dict.h:213:17: note: in instantiation of function template specialization 'std::equal_range<mozc::ZeroQueryDict::iterator, unsigned long>' requested here
    return std::equal_range(begin(), end(), iter.index());
                ^
1 error generated.

(cherry picked from commit fdccd9cd9b)
2019-09-11 10:08:52 +02:00
Ivan Kozik
45226bf44c fcitx-engines.mozc: use newer protobuf
ibus-engines.mozc builds fine with the newer protobuf, this should as well.

(cherry picked from commit 03c01e418f)
2019-09-11 10:08:52 +02:00
arcnmx
64c35f9dbe pythonPackages.brotli: fix build
Recent changes to buildPythonPackage seem to have enabled a configure
script that doesn't work, so disable it.

(cherry picked from commit 91b7dd6c91)
ZHF: #68361
2019-09-11 02:57:31 -04:00
worldofpeace
c6332a7fbf nixosTests.xfce4-14: bump memorySize
(cherry picked from commit 20f8c3b984)
2019-09-11 02:44:55 -04:00
worldofpeace
5d0f6a557b nixosTests.xfce: bump memorySize
(cherry picked from commit baf36d9afa)
2019-09-11 02:44:55 -04:00
worldofpeace
9bd2f438e1 nixosTests.plasma5: fix test by enabling sound
Same issue as f59b4cb8d5

(cherry picked from commit bbcc947c46)
2019-09-11 02:44:55 -04:00
worldofpeace
11b01d9634 nixosTests.xfce: fix test by enabling sound
Same issue as f59b4cb8d5

(cherry picked from commit 0eb814ea88)
2019-09-11 02:44:55 -04:00
worldofpeace
4bacee3cb2 nixosTests.xfce4-14: fix test by enabling sound
Same issue as f59b4cb8d5

(cherry picked from commit 17877eaa68)
2019-09-11 02:44:55 -04:00
worldofpeace
b0e36731a8 Merge pull request #68473 from ivan/snscrape-fix-backport
[19.09] snscrape: fix startup
2019-09-11 02:40:46 -04:00
Ivan Kozik
669517342e snscrape: fix startup
This fixes:

Traceback (most recent call last):
  File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/bin/.snscrape-wrapped", line 11, in <module>
    sys.exit(main())
  File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 218, in main
    args = parse_args()
  File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/cli.py", line 154, in parse_args
    import snscrape.version
  File "/nix/store/607z14x0spsz1lsh0fg9cbyc9lr038mi-python3.7-snscrape-0.3.0/lib/python3.7/site-packages/snscrape/version.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Related: https://github.com/NixOS/nixpkgs/pull/68314
(cherry picked from commit 7e7c98a199)
2019-09-11 04:57:00 +00:00
Aaron Andersen
eb0123490e moodle: 3.7.1 -> 3.7.2
(cherry picked from commit cb7deb3deb)
2019-09-10 20:23:45 -04:00
worldofpeace
24842ace4c Merge pull request #68445 from ivan/mozc-gcc8-fix-backport
[19.09] ibus-engines.mozc: fix build
2019-09-10 18:44:32 -04:00
Dima
f7e746a062 qtwebkit: fixing build / reducing build log size
GCC 8 introduced a new type of warning `-Wclass-memaccess` which
is included in `-Wall`. This warnings spits out *a million* of warnings
like the following:

```
[...]
/build/source/Source/WTF/wtf/Vector.h:128:15: warning: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'class WTF::RefPtr<WebCore::TransformOperation>' with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
         memcpy(dst, src, reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
[...]
``

Logs demonstrating the issue:
https://hydra.nixos.org/build/100205478/nixlog/1

While I don't think disabling warnings is the best way to deal with this,
there is alrady precedent for this package and I don't feel confident enough
to either patch or bump this package.

Please view this as a low-friction sub-optimal suggestion in case nobody else
has a better fix.

(cherry picked from commit 6f1ad0676f)
2019-09-10 18:19:34 -04:00
Ivan Kozik
4a7cf941bb qolibri: use qt5's mkDerivation
(cherry picked from commit 939960b0fa)
2019-09-10 17:53:55 -04:00
Ivan Kozik
7916216c1e qolibri: 2018-11-14 -> 2019-07-22
(cherry picked from commit 153127f507)
2019-09-10 17:53:52 -04:00
Frederik Rietdijk
de71ea2b31 python.pkgs.wheelUnpackHook: propagate wheel
This was accidentally removed when buildPython* was rewritten as hooks.

(cherry picked from commit c99529a4b6)
2019-09-10 22:26:44 +02:00
Andrei Lapshin
1b967b38b3 ktorrent: 5.1.0 -> 5.1.2
Update ktorrent from 5.1.0 to 5.1.2 and libktorrent from 2.1 to 2.1.1,
remove already included patches

(cherry picked from commit 3f0f7d5054)
2019-09-10 22:18:28 +02:00
Frederik Rietdijk
41d2500647 python.pkgs.django_extensions: 2.1.4 -> 2.1.9
(cherry picked from commit aa6c38d9c1)
2019-09-10 22:08:34 +02:00
Frederik Rietdijk
0e21a2a0ca python.pkgs.blessed: disable failing test
(cherry picked from commit 4dd38c4289)
2019-09-10 22:08:31 +02:00
Andreas Rammhold
76d54c72ac openssl: 1.1.1c -> 1.1.1d 2019-09-10 21:22:11 +02:00
Andreas Rammhold
aa6327c29c openssl_1_0_2: 1.0.2s -> 1.0.2t 2019-09-10 21:22:11 +02:00
Ivan Kozik
e48a396b94 ibus-engines.mozc: fix build
This fixes:

FAILED: obj/engine/engine.engine.o
clang++ -MMD -MF obj/engine/engine.engine.o.d -DOS_LINUX -DMOZC_BUILD -DCHANNEL_DEV -DENABLE_GTK_RENDERER -DNDEBUG -DQT_NO_DEBUG -DNO_LOGGING -DIGNORE_HELP_FLAG -DIGNORE_INVALID_FLAG -I/build/source/src -Igen -Igen/proto_out -Wall -Wno-char-subscripts -Wno-sign-compare -Wno-deprecated-declarations -Wwrite-strings -Wno-unknown-warning-option -Wno-inconsistent-missing-override -fPIC -fno-exceptions -fmessage-length=0 -fno-strict-aliasing -funsigned-char -pipe -pthread -fno-omit-frame-pointer -fstack-protector --param=ssp-buffer-size=4 -Wtype-limits -O2 -Wno-deprecated -Wno-covered-switch-default -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=gnu++0x -std=gnu++0x  -c ../../engine/engine.cc -o obj/engine/engine.engine.o
In file included from ../../engine/engine.cc:30:
In file included from /build/source/src/engine/engine.h:33:
In file included from /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/memory:62:
In file included from /nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algobase.h:66:
/nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_iterator_base_funcs.h:183:2: error: cannot decrement value of type 'mozc::ZeroQueryDict::iterator'
        --__i;
        ^ ~~~
/nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_iterator_base_funcs.h:206:12: note: in instantiation of function template specialization 'std::__advance<mozc::ZeroQueryDict::iterator, long>' requested here
      std::__advance(__i, __d, std::__iterator_category(__i));
           ^
/nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algo.h:2137:9: note: in instantiation of function template specialization 'std::advance<mozc::ZeroQueryDict::iterator, long>' requested here
          std::advance(__middle, __half);
               ^
/nix/store/pcs8pq4a5rkym1hzibqz7da45fxkmig7-gcc-8.3.0/include/c++/8.3.0/bits/stl_algo.h:2190:19: note: in instantiation of function template specialization 'std::__equal_range<mozc::ZeroQueryDict::iterator, unsigned long, __gnu_cxx::__ops::_Iter_less_val, __gnu_cxx::__ops::_Val_less_iter>' requested here
      return std::__equal_range(__first, __last, __val,
                  ^
/build/source/src/prediction/zero_query_dict.h:213:17: note: in instantiation of function template specialization 'std::equal_range<mozc::ZeroQueryDict::iterator, unsigned long>' requested here
    return std::equal_range(begin(), end(), iter.index());
                ^
1 error generated.

(cherry picked from commit b4b332bcad)
2019-09-10 19:14:12 +00:00
Johan Thomsen
2e13a50938 morph: 1.3.0 -> 1.3.1 2019-09-10 20:27:52 +02:00
Michael Fellinger
1fed83d3df sup: remove
(cherry picked from commit da7886c940)
2019-09-10 19:44:32 +02:00
Gabriel Ebner
31c575190c pythonPackages.pivy: fix build
(cherry picked from commit 91fc12514f)
2019-09-10 18:40:17 +02:00
Maximilian Bosch
8050566cea matrix-synapse: fix startup
Currently, `setuptools` isn't propagated automatically to python
packages[1] which causes the following error when starting
`matrix-synapse`:

```
Traceback (most recent call last):
   File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/bin/.homeserver-wrapped", line 39, in <module>
     import synapse.config.logger
   File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/config/logger.py", line 27, in <module>
     from synapse.app import _base as appbase
   File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/app/__init__.py", line 18, in <module>
 E402
   File "/nix/store/xxkds7821mrahfx75az0sq3ryf69m612-matrix-synapse-1.3.1/lib/python3.7/site-packages/synapse/python_dependencies.py", line 19, in <module>
     from pkg_resources import (
 No module named 'pkg_resources'
```

[1] https://github.com/NixOS/nixpkgs/pull/68314

(cherry picked from commit 58dc1e2a6f)
2019-09-10 11:31:42 -04:00
Michael Fellinger
dcdc95ce4d gem-config: fix gpgme
(cherry picked from commit 35f849ab44)
2019-09-10 16:57:42 +02:00
worldofpeace
14faa8e494 nixos/gnome3: add gnome-shell xdg portal
(cherry picked from commit bfb2389a84)
2019-09-10 10:56:59 -04:00
Antoine Eiche
fcd7d6ad41 skydive: remove it from nixpkgs
The current Skydive version can not be build with a recent Go version
and the maintainer (lewo) is no longer interested in maintaining it.

(cherry picked from commit 636e15507b)
2019-09-10 09:10:22 -04:00
Eamonn Coughlan
ada07de5d0 rstudio: fix build with new hunspell-dicts
(cherry picked from commit cd9aec6114)
2019-09-10 14:05:03 +02:00
Andreas Rammhold
f03a88e184 Merge pull request #68410 from andir/nixos-19.09/build-rust-crate-renames
[19.09] buildRustCrate: add support for renaming crates
2019-09-10 11:58:10 +02:00
Daniël de Kok
573f244e51 buildRustCrate: add support for renaming crates
Before this change, buildRustCrate always called rustc with

--extern libName=[...]libName[...]

However, Cargo permits using a different name under which a dependency
is known to a crate. For example, rand 0.7.0 uses:

[dependencies]
getrandom_package = { version = "0.1.1", package = "getrandom", optional = true }

Which introduces the getrandom dependency such that it is known as
getrandom_package to the rand crate. In this case, the correct extern
flag is of the form

--extern getrandom_package=[...]getrandom[...]

which is currently not supported. In order to support such cases, this
change introduces a crateRenames argument to buildRustCrate. This
argument is an attribute set of dependencies that should be renamed. In
this case, crateRenames would be:

{
  "getrandom" = "getrandom_package";
}

The extern options are then built such that if the libName occurs as
an attribute in this set, it value will be used as the local
name. Otherwise libName will be used as before.

(cherry picked from commit 85c6d72011)
2019-09-10 11:05:06 +02:00
Aaron Andersen
d57d9ba288 dolphinEmu: fix broken build
(cherry picked from commit 4ece8498dc)
2019-09-09 23:24:13 -04:00
worldofpeace
b0b3b29e20 kexectools: fix build on i686
https://hydra.nixos.org/build/99957229
See: cb1e5463b5
(cherry picked from commit dc051dfdef)
2019-09-09 22:32:40 -04:00
worldofpeace
775b1f6daa iasl: drop uneeded patch
(cherry picked from commit c29b2cbb24)
2019-09-09 22:01:47 -04:00
worldofpeace
9d8e16173d doc/gnome: explain glib passthru functions
Examples are updated to commits that use them as well.

(cherry picked from commit 463377597b)
2019-09-10 02:31:06 +02:00
worldofpeace
0ee1b6af7e doc/gnome: explain double wrapped binaries
(cherry picked from commit 69e0d95462)
2019-09-10 02:31:03 +02:00
Jan Tojnar
1ee54cd3e9 doc: add GNOME
Closes: #16285
(cherry picked from commit 075b528a6d)
2019-09-10 02:30:57 +02:00
Franz Pletz
8b287f28a3 linux: build rtw88 module
Adds support for Realtek wireless/bluetooth cards found in some Lenovo
laptops. The old `r8822be` module was removed in favour of this one.

(cherry picked from commit 471ba8e2e6)
2019-09-10 02:01:10 +02:00
Sander van der Burg
565fc43440 nixos/dysnomia: enable InfluxDB support
(cherry picked from commit e987e3fef9)
2019-09-09 23:29:54 +02:00
Sander van der Burg
0603b7987f DisnixWebService: 0.8 -> 0.9
(cherry picked from commit e0af0be6e6)
2019-09-09 23:29:44 +02:00
Sander van der Burg
7f2d76342c disnixos: 0.7.1 -> 0.8
(cherry picked from commit 67879a7f0d)
2019-09-09 23:29:32 +02:00
Sander van der Burg
8cec4eaade disnix: 0.8 -> 0.9
(cherry picked from commit 46f190b40d)
2019-09-09 23:29:22 +02:00
Sander van der Burg
e6e9d2a073 dysnomia: 0.8 -> 0.9
(cherry picked from commit 95464bab66)
2019-09-09 23:29:13 +02:00
worldofpeace
530d185e9e gnome3.epiphany: fix build
Looks like something used to propagate nettle but doesn't anymore.
Adding it properly, as it does depend on it, fixes the issue.

(cherry picked from commit 00d419c362)
Fix gnome3 tests.

ZHF: #68361
2019-09-09 16:33:35 -04:00
worldofpeace
36f1c4a650 fwupd: add setuptools for python
It's no longer propagated so we need to add it.

Was failing like:
FAILED: libfwupd/fwupd.map
/build/fwupd-1.2.10/libfwupd/generate-version-script.py LIBFWUPD libfwupd/Fwupd-2.0.gir libfwupd/fwupd.map
Traceback (most recent call last):
File "/build/fwupd-1.2.10/libfwupd/generate-version-script.py", line 11, in <module>
    from pkg_resources import parse_version
ModuleNotFoundError: No module named 'pkg_resources'

(cherry picked from commit a9e0f1dee1)
This fixes the gnome3 tests so the channel can advance.
2019-09-09 16:10:14 -04:00
Léo Gaspard
aecb0df5b8 rss2email: 3.9 -> 3.10
(cherry picked from commit a80eef922d)
2019-09-09 19:24:39 +02:00
Gabriel Ebner
fa28fec2d6 vdirsyncer: fix build
(cherry picked from commit e5bbe65516)
2019-09-09 18:24:12 +02:00
Matthew Bauer
50101eaef5 Merge pull request #67791 from matthewbauer/set-ld-library-path
nixos/opengl: set LD_LIBRARY_PATH everywhere
2019-09-09 12:23:50 -04:00
Eelco Dolstra
08e05a0ffe Revert "pkgs/top-level: check types of nixpkgs.config"
This reverts commit 4a647dd225. Making
Nixpkgs use the module system is a major change that really should be
done via an RFC.
2019-09-09 17:46:19 +02:00
worldofpeace
736019f325 Merge pull request #68359 from ivan/fix-python-lmdb-backport
[19.09] pythonPackages.lmdb: fix build
2019-09-09 11:23:21 -04:00
Ivan Kozik
fe40168bc0 pythonPackages.lmdb: fix build
This fixes:

pythonCatchConflictsPhase
Found duplicated packages in closure for dependency 'lmdb':
  lmdb 0.97 (/build/lmdb-0.97)
  lmdb 0.97 (/nix/store/js0iimri6y9yqgfc111jzp3mrv5ic9cj-python3.7-lmdb-0.97/lib/python3.7/site-packages)

Package duplicates found in closure, see above. Usually this happens if two packages depend on different version of the same dependency.
builder for '/nix/store/9bcn2m3r5v8slmpj31hxw05j906qgl5l-python3.7-lmdb-0.97.drv' failed with exit code 1

This was probably broken by f7e28bf5d8

(cherry picked from commit 39d0c9693e)
2019-09-09 15:22:04 +00:00
Samuel Leathers
10e61bf5be 19.09 beta release 2019-09-09 10:47:14 -04:00
Matthew Bauer
6934870810 nixos/opengl: set LD_LIBRARY_PATH everywhere
Unfortunately there are still a few programs that need this. To avoid
breaking too many things for the 19.09 release, I recommend making
this true. We can disable it again once we feel confident most of
these cases are handled. Relevant issues:

- #67790
- #66544
- https://discourse.nixos.org/t/getting-an-error-has-anything-regarding-opengl-in-nixpkgs/3641

/cc @ambrop72 @disassembler @lheckemann
2019-08-30 16:22:01 -04:00
66289 changed files with 1614644 additions and 6047789 deletions

View File

@@ -1,34 +0,0 @@
{
"name": "nixpkgs",
"image": "mcr.microsoft.com/devcontainers/universal:5-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",
"useAttributePath": true,
"extraNixConfig": "experimental-features = nix-command flakes,sandbox = true"
}
},
// Fixup permissions inside container.
// https://github.com/NixOS/nix/issues/6680#issuecomment-1230902525
"postCreateCommand": "sudo apt-get install -y acl",
"postStartCommand": "sudo setfacl -k /tmp; if [ -e /dev/kvm ]; then sudo chgrp $(id -g) /dev/kvm; fi",
"customizations": {
"vscode": {
"extensions": [
"jnoortheen.nix-ide"
],
"settings": {
"[nix]": {
"editor.formatOnSave": true
},
"nix.enableLanguageServer": true,
"nix.serverPath": "nixd"
}
}
},
"remoteEnv": {
"NIXPKGS": "/workspaces/nixpkgs"
}
}

View File

@@ -1,5 +1,5 @@
# EditorConfig configuration for nixpkgs
# https://EditorConfig.org
# http://EditorConfig.org
# Top-most EditorConfig file
root = true
@@ -11,94 +11,18 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
# Ignore diffs/patches
[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
# We want readFile .version to return the version without a newline.
[.version]
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 nix/ruby/docbook files, set indent to spaces with width of two
[*.{nix,rb,xml}]
indent_style = space
# Match docbook files, set indent width of one
[*.xml]
indent_size = 1
# Match json/lockfiles/markdown/nix/ruby files, set indent width of two
[*.{js,json,lock,md,nix,rb}]
indent_size = 2
# Match all the Bash code in Nix files, set indent width of two
[*.{bash,sh}]
indent_size = 2
# Match Perl and Python scripts, set indent width of four
[*.{pl,pm,py}]
# Match shell/python/perl scripts, set indent to spaces with width of four
[*.{sh,py,pl}]
indent_style = space
indent_size = 4
# Match gemfiles, set indent to spaces with width of two
[Gemfile]
indent_size = 2
indent_style = space
# Match package.json and package-lock.json, which are generally pulled from upstream and accept them as they are
[package{,-lock}.json]
indent_style = unset
insert_final_newline = unset
# Disable file types or individual files
# some of these files may be auto-generated and/or require significant changes
[*.{c,h}]
insert_final_newline = unset
trim_trailing_whitespace = unset
[*.{asc,key,ovpn}]
insert_final_newline = unset
end_of_line = unset
trim_trailing_whitespace = unset
[*.json]
insert_final_newline = unset
[*.lock]
indent_size = unset
# Although Markdown/CommonMark allows using two trailing spaces to denote
# a hard line break, we do not use that feature in nixpkgs since
# it forces the surrounding paragraph to become a <literallayout> which
# does not wrap reasonably.
# Instead of a hard line break, start a new paragraph by inserting a blank line.
[*.md]
trim_trailing_whitespace = true
# binaries
[*.nib]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
[eggs.nix]
trim_trailing_whitespace = unset
[registry.dat]
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.
# Match diffs, avoid to trim trailing whitespace
[*.{diff,patch}]
trim_trailing_whitespace = false

View File

@@ -1,315 +0,0 @@
# This file contains a list of commits that are not likely what you
# are looking for in a blame, such as mass reformatting or renaming.
#
# If a commit's line ends with `# !autorebase <command>`,
# where <command> is an idempotent bash command that reapplies the changes from the commit,
# the `maintainers/scripts/auto-rebase/run.sh` script can be used to rebase
# across that commit while automatically resolving merge conflicts caused by the commit.
#
# You can set this file as a default ignore file for blame by running
# the following command.
#
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# To temporarily not use this file add
# --ignore-revs-file=""
# to your blame command.
#
# The ignoreRevsFile can't be set globally due to blame failing if the file isn't present.
# To not have to set the option in every repository it is needed in,
# save the following script in your path with the name "git-bblame"
# now you can run
# $ git bblame $FILE
# to use the .git-blame-ignore-revs file if it is present.
#
# #!/usr/bin/env bash
# repo_root=$(git rev-parse --show-toplevel)
# if [[ -e $repo_root/.git-blame-ignore-revs ]]; then
# git blame --ignore-revs-file="$repo_root/.git-blame-ignore-revs" $@
# else
# git blame $@
# fi
# nixos/modules/rename: Sort alphabetically
1f71224fe86605ef4cd23ed327b3da7882dad382
# manual: fix typos
feddd5e7f8c6f8167b48a077fa2a5394dc008999
# nixos: fix module paths in rename.nix
d08ede042b74b8199dc748323768227b88efcf7c
# fix indentation in mk-python-derivation.nix
d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3
# fix indentation in meteor default.nix
a37a6de881ec4c6708e6b88fd16256bbc7f26bbd
# pkgs/stdenv/make-derivation: Reindent
b4cc2a2479a7ab0f6440b2e1319221920ef72699
# treewide: automatically md-convert option descriptions
2e751c0772b9d48ff6923569adfa661b030ab6a2
# nixos/*: automatically convert option docs
087472b1e5230ffc8ba642b1e4f9218adf4634a2
# nixos/*: automatically convert option descriptions
ef176dcf7e76c3639571d7c6051246c8fbadf12a
# nixos/*: automatically convert option docs to MD
61e93df1891972bae3e0c97a477bd44e8a477aa0
# nixos/*: convert options with admonitions to MD
722b99bc0eb57711c0498a86a3f55e6c69cdb05f
# nixos/*: automatically convert option docs
6039648c50c7c0858b5e506c6298773a98e0f066
# nixos/*: md-convert options with unordered lists
c915b915b5e466a0b0b2af2906cd4d2380b8a1de
# nixos/*: convert options with listings
f2ea09ecbe1fa1da32eaa6e036d64ac324a2986f
# nixos/*: convert straggler options to MD
1d41cff3dc4c8f37bb5841f51fcbff705e169178
# nixos/*: normalize manpage references to single-line form
423545fe4865d126e86721ba30da116e29c65004
# nixos/documentation: split options doc build
fc614c37c653637e5475a0b0a987489b4d1f351d
# nixos/*: convert options with admonitions to MD
722b99bc0eb57711c0498a86a3f55e6c69cdb05f
# nixos/*: convert internal option descriptions to MD
9547123258f69efd92b54763051d6dc7f3bfcaca
# nixos/*: replace </para><para> with double linebreaks
694d5b19d30bf66687b42fb77f43ea7cd1002a62
# treewide: add defaultText for options with simple interpolation defaults
fb0e5be84331188a69b3edd31679ca6576edb75a
# nixos/*: mark pre-existing markdown descriptions as mdDoc
7e7d68a250f75678451cd44f8c3d585bf750461e
# nixos/*: normalize link format
3aebb4a2be8821a6d8a695f0908d8567dc00de31
# nixos/*: replace <code> in option docs with <literal>
16102dce2fbad670bd47dd75c860a8daa5fe47ad
# nixos/*: add trivial defaultText for options with simple defaults
25124556397ba17bfd70297000270de1e6523b0a
# systemd: rewrite comments
92dfeb7b3dab820ae307c56c216d175c69ee93cd
# systemd: break too long lines of Nix code
67643f8ec84bef1482204709073e417c9f07eb87
# {pkgs/development/cuda-modules,pkgs/test/cuda,pkgs/top-level/cuda-packages.nix}: reformat all CUDA files with nixfmt-rfc-style 2023-03-01
802a1b4d3338f24cbc4efd704616654456d75a94
# postgresql: move packages.nix to ext/default.nix
719034f6f6749d624faa28dff259309fc0e3e730
# php ecosystem: reformat with nixfmt-rfc-style
75ae7621330ff8db944ce4dff4374e182d5d151f
c759efa5e7f825913f9a69ef20f025f50f56dc4d
# pkgs/os-specific/bsd: Reformat with nixfmt-rfc-style 2024-03-01
3fe3b055adfc020e6a923c466b6bcd978a13069a
# k3s: format with nixfmt-rfc-style
6cfcd3c75428ede517bc6b15a353d704837a2830
# python3Packages: format with nixfmt
59b1aef59071cae6e87859dc65de973d2cc595c0
# treewide description changes (#317959)
bf995e3641950f4183c1dd9010349263dfa0123b
755b915a158c9d588f08e9b08da9f7f3422070cc
f8c4a98e8e138e21353a2c33b90db3359f539b37
# vscode-extensions.*: format with nixfmt (RFC 166)
7bf9febfa6271012b1ef86647a3a06f06875fdcf
# remove uses of mdDoc (#303841)
1a24330f792c8625746d07d842290e6fd95ae6f9
acd0e3898feb321cb9a71a0fd376f1157d0f4553
1b28414d2886c57343864326dbb745a634d3e37d
6afb255d976f85f3359e4929abd6f5149c323a02
# azure-cli: move to by-name, nixfmt #325950
96cd538b68bd1d0a0a37979356d669abbba32ebc
# poptracker: format with nixfmt-rfc-style (#326697)
ff5c8f6cc3d1f2e017e86d50965c14b71f00567b
# mangal: format with nixfmt-rfc-style #328284
3bb5e993cac3a6e1c3056d2bc9bf43eb2c7a5951
# pico-sdk: switch to finalAttrs (#329438)
8946018b0391ae594d167f1e58497b18de068968
# ollama: format with nixfmt-rfc-style (#329353)
bdfde18037f8d9f9b641a4016c8ada4dc4cbf856
# nixos/ollama: format with nixfmt-rfc-style (#329561)
246d1ee533810ac1946d863bbd9de9b525818d56
# steam: cleanup (#216972)
ad815aebfbfe1415ff6436521d545029c803c3fb
# nixos/nvidia: apply nixfmt-rfc-style (#313440)
fbdcdde04a7caa007e825a8b822c75fab9adb2d6
# treewide: reformat files which need reformatting after (#341407)
e0464e47880a69896f0fb1810f00e0de469f770a
# step-cli: format package.nix with nixfmt (#331629)
fc7a83f8b62e90de5679e993d4d49ca014ea013d
# ndn-cxx: format with nixfmt-rfc-style
160b2b769c3b8a6d1ae9947afa77520fa2887db7
# ndn-tools: format with nixfmt-rfc-style
4882ef721ce3d7bb3b5e48ff80125255db515013
# nfd: format with nixfmt-rfc-style
548c2377fa81e2abfc192fbf4f521e601251c468
# darwin.stdenv: format with nixfmt-rfc-style (#333962)
93c10ac9e561c6594d3baaeaff2341907390d9b8
# nrr: format with nixfmt-rfc-style (#334578)
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
# percona: apply nixfmt
8d14fa2886fec877690c6d28cfcdba4503dbbcea
# nixos/virtualisation: format image-related files
# Original formatting commit that was reverted
04fadac429ca7d6b92025188652376c230205730
# Revert commit
4cec81a9959ce612b653860dcca53101a36f328a
# Final commit that does the formatting
88b285c01d84de82c0b2b052fd28eaf6709c2d26
# sqlc: format with nixfmt
2bdec131b2bb2c8563f4556d741d34ccb77409e2
# ant: format with nixfmt-rfc-style
2538d58436b8d0b56d29780aeebf4bf720ddb9ea
# treewide: migrate packages to pkgs/by-name, take 1
571c71e6f73af34a229414f51585738894211408
# format files with nixfmt (#347275)
adb9714bd909df283c66bbd641bd631ff50a4260
# treewide: incus packages
9ab59bb5fb943ad6740f64f5a79eae9642fb8211
# treewide nixfmt reformat pass 1, master, staging and staging-next
4f0dadbf38ee4cf4cc38cbc232b7708fddf965bc
667d42c00d566e091e6b9a19b365099315d0e611
84d4f874c2bac9f3118cb6907d7113b3318dcb5e
# tmuxPlugins sha-to-sri.py script
516b1e74c358a9c4b06e5591f8c1a2897aad0c33
# treewide: migrate comments in lib to rfc145 style
ef85e0daa092c9eae0d32c7ce16b889728a5fbc0
d89ad6c70e0e89aaae75e9f886878ea4e103965a
e0fe216f4912dd88a021d12a44155fd2cfeb31c8
80d5b411f6397d5c3e755a0635d95742f76f3c75
# nixos/movim: format with nixfmt-rfc-style
43c1654cae47cbf987cb63758c06245fa95c1e3b
# nixos/iso-image.nix: nixfmt
da9a092c34cef6947d7aee2b134f61df45171631
# python-packages: format with nixfmt-rfc-style
5f6f5e13ae0b6960cbf1be8aeb3d0048285a08d1
# python-packages: sort with keep-sorted
fd14c067813572afc03ddbf7cdedc3eab5a59954
783add849cbca228a36ffdf407e5d380dc2fe6c4
# treewide format of all Nix files
374e6bcc403e02a35e07b650463c01a52b13a7c8 # !autorebase nix-shell --run treefmt
# nix: nixfmt-rfc-style
a4f7e161b380b35b2f7bc432659a95fd71254ad8
0812c9a321003c924868051d2b2e1934e8880f3f
34f269c14ac18d89ddee9a8f54b1ca92a85bbcc6
062c34cdace499aa44f0fa6ca6f2ca71769f6c43
# 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

50
.gitattributes vendored
View File

@@ -1,26 +1,5 @@
# 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.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
@@ -35,30 +14,3 @@ nixos/doc/default.nix linguist-documentation=false
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

152
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,152 @@
# CODEOWNERS file
#
# This file is used to describe who owns what in this repository. This file does not
# replace `meta.maintainers` but is instead used for other things than derivations
# and modules, like documentation, package sets, and other assets.
#
# For documentation on this file, see https://help.github.com/articles/about-codeowners/
# Mentioned users will get code review requests.
# This file
/.github/CODEOWNERS @edolstra
# Libraries
/lib @edolstra @nbp
/lib/systems @nbp @ericson2314 @matthewbauer
/lib/generators.nix @edolstra @nbp @Profpatsch
/lib/debug.nix @edolstra @nbp @Profpatsch
# Nixpkgs Internals
/default.nix @nbp
/pkgs/top-level/default.nix @nbp @Ericson2314
/pkgs/top-level/impure.nix @nbp @Ericson2314
/pkgs/top-level/stage.nix @nbp @Ericson2314 @matthewbauer
/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
/pkgs/stdenv/generic @Ericson2314 @matthewbauer
/pkgs/stdenv/cross @Ericson2314 @matthewbauer
/pkgs/build-support/cc-wrapper @Ericson2314 @orivej
/pkgs/build-support/bintools-wrapper @Ericson2314 @orivej
/pkgs/build-support/setup-hooks @Ericson2314
# NixOS Internals
/nixos/default.nix @nbp
/nixos/lib/from-env.nix @nbp
/nixos/lib/eval-config.nix @nbp
/nixos/doc/manual/configuration/abstractions.xml @nbp
/nixos/doc/manual/configuration/config-file.xml @nbp
/nixos/doc/manual/configuration/config-syntax.xml @nbp
/nixos/doc/manual/configuration/modularity.xml @nbp
/nixos/doc/manual/development/assertions.xml @nbp
/nixos/doc/manual/development/meta-attributes.xml @nbp
/nixos/doc/manual/development/option-declarations.xml @nbp
/nixos/doc/manual/development/option-def.xml @nbp
/nixos/doc/manual/development/option-types.xml @nbp
/nixos/doc/manual/development/replace-modules.xml @nbp
/nixos/doc/manual/development/writing-modules.xml @nbp
/nixos/doc/manual/man-nixos-option.xml @nbp
/nixos/modules/installer/tools/nixos-option.sh @nbp
# New NixOS modules
/nixos/modules/module-list.nix @Infinisil
# Python-related code and docs
/maintainers/scripts/update-python-libraries @FRidh
/pkgs/top-level/python-packages.nix @FRidh
/pkgs/development/interpreters/python @FRidh
/pkgs/development/python-modules @FRidh
/doc/languages-frameworks/python.section.md @FRidh
# Haskell
/pkgs/development/compilers/ghc @basvandijk
/pkgs/development/haskell-modules @basvandijk
/pkgs/development/haskell-modules/default.nix @basvandijk
/pkgs/development/haskell-modules/generic-builder.nix @basvandijk
/pkgs/development/haskell-modules/hoogle.nix @basvandijk
# Perl
/pkgs/development/interpreters/perl @volth
/pkgs/top-level/perl-packages.nix @volth
/pkgs/development/perl-modules @volth
# R
/pkgs/applications/science/math/R @peti
/pkgs/development/r-modules @peti
# Ruby
/pkgs/development/interpreters/ruby @alyssais @zimbatm
/pkgs/development/ruby-modules @alyssais @zimbatm
# Rust
/pkgs/development/compilers/rust @Mic92 @LnL7
# Darwin-related
/pkgs/stdenv/darwin @NixOS/darwin-maintainers
/pkgs/os-specific/darwin @NixOS/darwin-maintainers
# C compilers
/pkgs/development/compilers/gcc @matthewbauer
/pkgs/development/compilers/llvm @matthewbauer
# Compatibility stuff
/pkgs/top-level/unix-tools.nix @matthewbauer
/pkgs/development/tools/xcbuild @matthewbauer
# Beam-related (Erlang, Elixir, LFE, etc)
/pkgs/development/beam-modules @gleber
/pkgs/development/interpreters/erlang @gleber
/pkgs/development/interpreters/lfe @gleber
/pkgs/development/interpreters/elixir @gleber
/pkgs/development/tools/build-managers/rebar @gleber
/pkgs/development/tools/build-managers/rebar3 @gleber
/pkgs/development/tools/erlang @gleber
# Jetbrains
/pkgs/applications/editors/jetbrains @edwtjo
# Eclipse
/pkgs/applications/editors/eclipse @rycee
# Licenses
/lib/licenses.nix @alyssais
# Qt / KDE
/pkgs/applications/kde @ttuegel
/pkgs/desktops/plasma-5 @ttuegel
/pkgs/development/libraries/kde-frameworks @ttuegel
/pkgs/development/libraries/qt-5 @ttuegel
# PostgreSQL and related stuff
/pkgs/servers/sql/postgresql @thoughtpolice
/nixos/modules/services/databases/postgresql.xml @thoughtpolice
/nixos/modules/services/databases/postgresql.nix @thoughtpolice
/nixos/tests/postgresql.nix @thoughtpolice
# Hardened profile & related modules
/nixos/modules/profiles/hardened.nix @joachifm
/nixos/modules/security/hidepid.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-config.nix @joachifm
# Dhall
/pkgs/development/dhall-modules @Gabriel439 @Profpatsch
/pkgs/development/interpreters/dhall @Gabriel439 @Profpatsch
# Idris
/pkgs/development/idris-modules @Infinisil
# Bazel
/pkgs/development/tools/build-managers/bazel @mboes @Profpatsch
# NixOS modules for e-mail and dns services
/nixos/modules/services/mail/mailman.nix @peti
/nixos/modules/services/mail/postfix.nix @peti
/nixos/modules/services/networking/bind.nix @peti
/nixos/modules/services/mail/rspamd.nix @peti
# Emacs
/pkgs/applications/editors/emacs-modes @adisbladis
/pkgs/applications/editors/emacs @adisbladis
/pkgs/top-level/emacs-packages.nix @adisbladis

54
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,54 @@
# How to contribute
Note: contributing implies licensing those contributions
under the terms of [COPYING](../COPYING), which is an MIT-like license.
## Opening issues
* Make sure you have a [GitHub account](https://github.com/signup/free)
* [Submit an issue](https://github.com/NixOS/nixpkgs/issues) - assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Include information what version of nixpkgs and Nix are you using (nixos-version or git revision).
## Submitting changes
* Format the commit messages in the following way:
```
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
(Motivation for change. Additional information.)
```
For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
Examples:
* nginx: init at 2.0.1
* firefox: 54.0.1 -> 55.0
* nixos/hydra: add bazBaz option
Dual baz behavior is needed to do foo.
* nixos/nginx: refactor config generation
The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
* `meta.description` should:
* Be capitalized.
* Not start with the package name.
* Not have a period at the end.
* `meta.license` must be set and fit the upstream license.
* If there is no upstream license, `meta.license` should default to `stdenv.lib.licenses.unfree`.
* `meta.maintainers` must be set.
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes) and on how to [submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).
## Writing good commit messages
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.
For package version upgrades and such a one-line commit message is usually sufficient.
## Reviewing contributions
See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#sec-reviewing-contributions).

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

@@ -0,0 +1,11 @@
## Issue description
### Steps to reproduce
## Technical details
Please run `nix run nixpkgs.nix-info -c nix-info -m` and paste the result.

View File

@@ -1,145 +0,0 @@
name: "Bug report (package)"
description: "Create a generic bug report against a package."
title: "PACKAGENAME: BUG TITLE"
labels: ["0.kind: bug"]
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>
Welcome to Nixpkgs. Please replace the **`PACKAGENAME: BUG TITLE`** template above with the correct package name (As seen in the [NixOS Package Search](https://search.nixos.org/packages)) and a short title summarising what the bug entails.
> [!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
> ```
---
- type: "dropdown"
id: "version"
attributes:
label: "Nixpkgs version"
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.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
default: 0
validations:
required: true
- type: "textarea"
id: "description"
attributes:
label: "Describe the bug"
description: "Please include a clear and concise description of what the issue is."
validations:
required: true
- type: "textarea"
id: "how-to-reproduce"
attributes:
label: "Steps to reproduce"
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"
id: "expected-behaviour"
attributes:
label: "Expected behaviour"
description: "Please write a concise description of what was supposed to happen."
validations:
required: true
- type: "textarea"
id: "screenshots"
attributes:
label: "Screenshots"
description: |
If applicable, add screenshots to help explain your problem.
If you need help uploading images to GitHub, please review the [relevant documentation](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#uploading-assets).
validations:
required: false
- type: "textarea"
id: "logs"
attributes:
label: "Relevant log output"
description: |
If applicable, copy and paste any relevant log output.
This will be automatically formatted into code, so no need for backticks.
render: "console"
validations:
required: false
- type: "textarea"
id: "additional-context"
attributes:
label: "Additional context"
description: "Add any other context about the problem here."
validations:
required: false
- type: "textarea"
id: "metadata"
attributes:
label: "System metadata"
description: "Please run `nix-shell -p nix-info --run \"nix-info -m\"` on a terminal and paste the output of that command here."
validations:
required: true
- type: "textarea"
id: "maintainers"
attributes:
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
description: |
This bug tracker is for actionable issues that are not the result of user error. If you need help using your system and are unsure if this is a bug with Nixpkgs, please consider asking for help on the [NixOS Discourse](https://discourse.nixos.org/) or the [NixOS Matrix Space](https://matrix.to/#/#community:nixos.org) before opening an issue.
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). "
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: |
# Thank you for helping improve Nixpkgs!
---
- type: "textarea"
id: "prioritisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,159 +0,0 @@
name: "Bug report (macOS)"
description: "Create a bug report against a package where the issue only occurs on macOS."
title: "PACKAGENAME: BUG TITLE"
labels: ["0.kind: bug", "6.topic: darwin"]
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>
Welcome to Nixpkgs. Please replace the **`PACKAGENAME: BUG TITLE`** template above with the correct package name (As seen in the [NixOS Package Search](https://search.nixos.org/packages)) and a short title summarising what the bug entails.
> [!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
> ```
---
- type: "dropdown"
id: "version"
attributes:
label: "Nixpkgs version"
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.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
default: 0
validations:
required: true
- type: "textarea"
id: "description"
attributes:
label: "Describe the bug"
description: "Please include a clear and concise description of what the issue is."
validations:
required: true
- type: "textarea"
id: "how-to-reproduce"
attributes:
label: "Steps to reproduce"
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"
id: "expected-behaviour"
attributes:
label: "Expected behaviour"
description: "Please write a concise description of what was supposed to happen."
validations:
required: true
- type: "textarea"
id: "screenshots"
attributes:
label: "Screenshots"
description: |
If applicable, add screenshots to help explain your problem.
If you need help uploading images to GitHub, please review the [relevant documentation](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#uploading-assets).
validations:
required: false
- type: "textarea"
id: "logs"
attributes:
label: "Relevant log output"
description: |
If applicable, copy and paste any relevant log output.
This will be automatically formatted into code, so no need for backticks.
render: "console"
validations:
required: false
- type: "textarea"
id: "additional-context"
attributes:
label: "Additional context"
description: "Add any other context about the problem here."
validations:
required: false
- type: "textarea"
id: "metadata"
attributes:
label: "System metadata"
description: "Please run `nix-shell -p nix-info --run \"nix-info -m\"` on a terminal and paste the output of that command here."
validations:
required: true
- type: "dropdown"
id: "nix-darwin"
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.
options:
- "Yes, I am using nix-darwin."
- "No, I am not using nix-darwin."
default: 1
validations:
required: true
- type: "textarea"
id: "maintainers"
attributes:
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.
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
description: |
This bug tracker is for actionable issues that are not the result of user error. If you need help using your system and are unsure if this is a bug with Nixpkgs/NixOS, please consider asking for help on the [NixOS Discourse](https://discourse.nixos.org/) or the [NixOS Matrix Space](https://matrix.to/#/#community:nixos.org) before opening an issue.
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). "
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: |
# Thank you for helping improve Nixpkgs!
---
- type: "textarea"
id: "prioritisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,149 +0,0 @@
name: "Bug report (NixOS module)"
description: "Create a bug report against a NixOS Module."
title: "nixos/MODULENAME: BUG TITLE"
labels: ["0.kind: bug", "6.topic: nixos"]
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>
Welcome to Nixpkgs. Please replace the **`nixos/MODULENAME: BUG TITLE`** template above with the correct module name (As seen in the [NixOS Option Search](https://search.nixos.org/options)) and a short title summarising what the bug entails.
> [!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
> ```
---
- type: "dropdown"
id: "version"
attributes:
label: "Nixpkgs version"
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.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
default: 0
validations:
required: true
- type: "textarea"
id: "description"
attributes:
label: "Describe the bug"
description: "Please include a clear and concise description of what the issue is."
validations:
required: true
- type: "textarea"
id: "how-to-reproduce"
attributes:
label: "Steps to reproduce"
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"
id: "expected-behaviour"
attributes:
label: "Expected behaviour"
description: "Please write a concise description of what was supposed to happen."
validations:
required: true
- type: "textarea"
id: "screenshots"
attributes:
label: "Screenshots"
description: |
If applicable, add screenshots to help explain your problem.
If you need help uploading images to GitHub, please review the [relevant documentation](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#uploading-assets).
validations:
required: false
- type: "textarea"
id: "logs"
attributes:
label: "Relevant log output"
description: |
If applicable, copy and paste any relevant log output.
This will be automatically formatted into code, so no need for backticks.
render: "console"
validations:
required: false
- type: "textarea"
id: "additional-context"
attributes:
label: "Additional context"
description: "Add any other context about the problem here."
validations:
required: false
- type: "textarea"
id: "metadata"
attributes:
label: "System metadata"
description: "Please run `nix-shell -p nix-info --run \"nix-info -m\"` on a terminal and paste the output of that command here."
validations:
required: true
- type: "textarea"
id: "maintainers"
attributes:
label: "Notify maintainers"
description: |
Please mention the people who are in the `meta.maintainers` list of the offending module. This is done by prefixing the person's username with an '@' character. You can quickly go to the source code of a module by searching for it on the [NixOS Option Search](https://search.nixos.org/options) and clicking the "Declared in..." button.
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
description: |
This bug tracker is for actionable issues that are not the result of user error. If you need help using your system and are unsure if this is a bug with Nixpkgs, please consider asking for help on the [NixOS Discourse](https://discourse.nixos.org/) or the [NixOS Matrix Space](https://matrix.to/#/#community:nixos.org) before opening an issue.
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). "
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: |
# Thank you for helping improve Nixpkgs!
---
- type: "textarea"
id: "prioritisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,155 +0,0 @@
name: "Build failure"
description: "Report a package that is failing to build."
title: "Build failure: PACKAGENAME"
labels: ["0.kind: build failure"]
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>
Welcome to Nixpkgs. Please replace the **`Build failure: PACKAGENAME`** template above with the correct package name (As seen in the [NixOS Package Search](https://search.nixos.org/packages)).
> [!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
> ```
---
- type: "dropdown"
id: "version"
attributes:
label: "Nixpkgs version"
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).
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
default: 0
validations:
required: true
- type: "textarea"
id: "how-to-reproduce"
attributes:
label: "Steps to reproduce"
description: "Please include a step-by-step guide for reproducing this build failure. Consider writing in concise, numbered bullet points to ensure that Nixpkgs developers can retrace your steps."
validations:
required: true
- type: "dropdown"
id: "hydra"
attributes:
label: "Can Hydra reproduce this build failure?"
description: |
Can [Hydra](https://hydra.nixos.org), Nixpkgs' Continuous Integration system, reproduce this build failure?
Please use the search function in the header bar to locate the last build job for the package in question.
- If there's a <img src="https://raw.githubusercontent.com/NixOS/hydra/refs/heads/master/src/root/static/images/emojione-red-x-274c.svg" width="20px" align="top" alt="Red X"> icon near the package entry, say '**Yes, Hydra can reproduce this build failure.**'
- If there's a <img src="https://raw.githubusercontent.com/NixOS/hydra/refs/heads/master/src/root/static/images/emojione-gray-x-2716.svg" width="20px" align="top" alt="Dark Gray X"> icon near the package entry, then the build failure occurs with another package, and you need to track the original failing package by going down the chain of 'Cached failures' until you reach the final package in the failing dependency chain. Once you locate the failing package, re-write this report against that package and say '**Yes, Hydra can reproduce this build failure.**'
- If there's a <img src="https://raw.githubusercontent.com/NixOS/hydra/refs/heads/master/src/root/static/images/emojione-check-2714.svg" width="20px" align="top" alt="Green Check Mark"> icon near the package entry, then it most likely means it's a local issue with your system. (Maybe you ran out of space?)
You can still open a build failure report, but please say '**No, Hydra cannot reproduce this build failure.**' below.
- If there's a <img src="https://raw.githubusercontent.com/NixOS/hydra/refs/heads/master/src/root/static/images/emojione-question-2754.svg" width="20px" align="top" alt="Gray Question Mark"> icon near the package entry, say '**Hydra is currently rebuilding this package.**'
- If there's a <img src="https://raw.githubusercontent.com/NixOS/hydra/refs/heads/master/src/root/static/images/emojione-stopsign-1f6d1.svg" width="20px" align="top" alt="Red Stop Sign"> icon near the package entry, then the build job was stopped manually. If this occurs, please coordinate with the [Infrastructure Team](https://matrix.to/#/#infra:nixos.org), and say '**The last build job was manually cancelled.**'
- If Hydra isn't supposed to build the package at all, say '**Hydra doesnt try to build the package.**'
options:
- "Please select the Hydra Status."
- "Yes, Hydra can reproduce this build failure."
- "No, Hydra cannot reproduce this build failure."
- "Hydra is currently rebuilding this package."
- "The last build job was manually cancelled."
- "Hydra doesnt try to build the package."
default: 0
validations:
required: true
- type: "input"
id: "hydra-logs"
attributes:
label: "Link to Hydra build job"
description: "If you answered 'yes' in the question above, please copy-and-paste the link to the failing Hydra job here."
validations:
required: false
- type: "textarea"
id: "logs"
attributes:
label: "Relevant log output"
description: |
Please copy and paste the logs from the failed build.
This will be automatically formatted into code, so no need for backticks.
render: "console"
validations:
required: true
- type: "textarea"
id: "additional-context"
attributes:
label: "Additional context"
description: "Add any other context about the problem here."
validations:
required: false
- type: "textarea"
id: "metadata"
attributes:
label: "System metadata"
description: "Please run `nix-shell -p nix-info --run \"nix-info -m\"` on a terminal and paste the output of that command here."
validations:
required: true
- type: "textarea"
id: "maintainers"
attributes:
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
description: |
This bug tracker is for actionable issues that are not the result of user error. If you need help using your system and are unsure if this is a bug with Nixpkgs, please consider asking for help on the [NixOS Discourse](https://discourse.nixos.org/) or the [NixOS Matrix Space](https://matrix.to/#/#community:nixos.org) before opening an issue.
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)."
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: |
# Thank you for helping improve Nixpkgs!
---
- type: "textarea"
id: "prioritisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,128 +0,0 @@
name: "Request: package update"
description: "Create an update request for an existing, but outdated package."
title: "Update Request: PACKAGENAME OLDVERSION → NEWVERSION"
labels: ["0.kind: enhancement", "9.needs: package (update)"]
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>
Welcome to Nixpkgs. Please replace the **`Update Request: 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, and the latest version of the package.
> [!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
> ```
---
- type: "dropdown"
id: "version"
attributes:
label: "Nixpkgs version"
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.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
default: 0
validations:
required: true
- type: "input"
id: "name"
attributes:
label: "Package name"
description: "Please indicate the name of the package."
validations:
required: true
- type: "input"
id: "upstream-version"
attributes:
label: "Upstream version"
description: "Please indicate the latest version of the package."
validations:
required: true
- type: "input"
id: "nixpkgs-version"
attributes:
label: "Nixpkgs version"
description: |
Please indicate the current version number in Nixpkgs' **unstable** channel. You can check this by setting the [NixOS Package Search](https://search.nixos.org/packages?channel=unstable) channel to 'unstable' and searching for the package.
If you meant to request an upgrade in the stable channel, please file the '**Request: backport to stable**' form instead.
validations:
required: true
- type: "input"
id: "changelog"
attributes:
label: "Changelog"
description: "If applicable, please link the upstream changelog for the latest version."
validations:
required: false
- type: "textarea"
id: "additional-context"
attributes:
label: "Additional context"
description: "Add any other context about the update here."
validations:
required: false
- type: "textarea"
id: "maintainers"
attributes:
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
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)."
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: |
# Thank you for helping improve Nixpkgs!
---
- type: "textarea"
id: "prioritisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,103 +0,0 @@
name: "Request: NixOS module"
description: "Create a new NixOS Module request for an existing package."
title: "Module Request: nixos/MODULENAME"
labels: ["0.kind: enhancement", "6.topic: nixos", "9.needs: module (new)"]
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>
Welcome to Nixpkgs. Please replace the **`Module Request: nixos/MODULENAME`** template above with the correct module name (As seen in the [NixOS Option Search](https://search.nixos.org/options)).
> [!TIP]
> For instance, if you were filing a request against the missing `hello` module, your title would be as follows:
> ```
> Module Request: nixos/hello
> ```
---
- type: "dropdown"
id: "version"
attributes:
label: "Nixpkgs version"
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.
options:
- "Please select a version."
- "- Unstable (26.11)"
- "- Stable (26.05)"
default: 0
validations:
required: true
- type: "textarea"
id: "description"
attributes:
label: "Describe the proposed module"
description: "Please include a clear and concise description of what the module should accomplish."
validations:
required: true
- type: "textarea"
id: "additional-context"
attributes:
label: "Additional context"
description: "Add any other context about the proposed module here."
validations:
required: false
- type: "textarea"
id: "maintainers"
attributes:
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
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). "
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: |
# Thank you for helping improve NixOS!
---
- type: "textarea"
id: "prioritisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,109 +0,0 @@
name: "Request: backport to stable"
description: "Create a backport request for a package that is up-to-date in the unstable channel, but outdated in the stable channel."
title: "Backport to Stable: PACKAGENAME OLDVERSION → NEWVERSION"
labels: ["0.kind: enhancement", "9.needs: port to stable"]
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>
> [!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).
>
> 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
> ```
---
- type: "input"
id: "name"
attributes:
label: "Package name"
description: "Please indicate the name of the package."
validations:
required: true
- type: "input"
id: "unstable-version"
attributes:
label: "Version in unstable"
description: "Please indicate the current version of the package in the unstable channel."
validations:
required: true
- type: "input"
id: "stable-version"
attributes:
label: "Version in stable"
description: "Please indicate the current version of the package in the stable channel."
validations:
required: true
- type: "textarea"
id: "reasoning"
attributes:
label: "Reasoning for backport"
description: "Please briefly explain why this backport fits the [release suitability guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#changes-acceptable-for-releases) and why you think this update should be backported."
validations:
required: false
- type: "textarea"
id: "maintainers"
attributes:
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
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+)."
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: |
# Thank you for helping improve Nixpkgs!
---
- type: "textarea"
id: "prioritisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,91 +0,0 @@
name: "Request: documentation"
description: "Report missing or incorrect documentation in the NixOS or Nixpkgs manuals."
title: "Missing Documentation: PACKAGENAME"
labels: ["0.kind: enhancement", "9.needs: documentation"]
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>
Welcome to Nixpkgs. Please replace the **`Missing Documentation: PACKAGENAME`** template above with the correct package name (As seen in the [NixOS Package Search](https://search.nixos.org/packages)) or module name (As seen in the [NixOS Option Search](https://search.nixos.org/options)).
> [!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
> ```
---
- type: "textarea"
id: "description"
attributes:
label: "Describe the problem"
description: "Please include a clear and concise description of what the issue is."
validations:
required: true
- type: "textarea"
id: "proposal"
attributes:
label: "Proposed solution"
description: |
If possible, please draft a tentative documentation chapter to resolve this issue.
Your proposal should be written in CommonMark Markdown, optionally enhanced with [Nix-specific extensions](https://github.com/NixOS/nixpkgs/tree/master/doc#syntax).
render: "markdown"
validations:
required: false
- type: "textarea"
id: "maintainers"
attributes:
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
attributes:
label: "I assert that this issue is relevant for Nixpkgs"
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)."
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: |
# Thank you for helping improve Nixpkgs!
---
- type: "textarea"
id: "priorisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,161 +0,0 @@
name: "Unreproducible Package"
description: "Report a package that does not produce a bit-by-bit reproducible result each time it is built."
title: "Unreproducible Package: PACKAGENAME"
labels: ["0.kind: enhancement", "6.topic: reproducible builds"]
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>
Welcome to Nixpkgs. Please replace the **`Unreproducible Package: PACKAGENAME`** template above with the correct package name (As seen in the [NixOS Package Search](https://search.nixos.org/packages)).
> [!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.
---
- type: "input"
id: "version"
attributes:
label: "Nixpkgs Revision"
description: "In which commit of Nixpkgs is this package displaying unreproducibility?"
- type: "textarea"
id: "introduction"
attributes:
label: "Introduction"
description: |
This is a generic introduction to build reproducibility.
Please replace **PACKAGENAME** below with the canonical package name of the package, as you have done for the title above.
value: |
Building **PACKAGENAME** multiple times does not yield bit-by-bit identical
results, complicating the detection of Continuous Integration (CI) breaches. For
more information on this issue, visit [reproducible-builds.org](https://reproducible-builds.org/).
Fixing bit-by-bit reproducibility also has additional advantages, such as
avoiding hard-to-reproduce bugs, making content-addressed storage more effective
and reducing rebuilds in such systems.
validations:
required: true
- type: "textarea"
id: "how-to-reproduce"
attributes:
label: "Steps to reproduce"
description: |
This is a step-by-step instruction set meant for maintainers to debug the package that is failing to reproduce. You should also follow it to gather the `diffoscope` logs that will be needed below.
Please replace **PACKAGENAME** below with the canonical package name of the package, as you have done for the introduction and the title above.
value: |
### 1. Build the package
This step will build the package. Specific arguments are passed to the command
to keep the build artifacts so we can compare them in case of differences.
Execute the following command:
```
nix-build '<nixpkgs>' -A PACKAGENAME && nix-build '<nixpkgs>' -A PACKAGENAME --check --keep-failed
```
Or using the new command line style:
```
nix build nixpkgs#PACKAGENAME && nix build nixpkgs#PACKAGENAME --rebuild --keep-failed
```
### 2. Compare the build artifacts
If the previous command completes successfully, no differences were found and
there's nothing to do, builds are reproducible.
If it terminates with the error message `error: derivation '<X>' may not be
deterministic: output '<Y>' differs from '<Z>'`, use `diffoscope` to investigate
the discrepancies between the two build outputs. You may need to add the
`--exclude-directory-metadata recursive` option to ignore files and directories
metadata (*e.g. timestamp*) differences.
```
nix run nixpkgs#diffoscopeMinimal -- --exclude-directory-metadata recursive <Y> <Z>
```
### 3. Examine the build log
To examine the build log, use:
```
nix-store --read-log $(nix-instantiate '<nixpkgs>' -A PACKAGENAME)
```
Or with the new command line style:
```
nix log $(nix path-info --derivation nixpkgs#PACKAGENAME)
```
validations:
required: true
- type: "textarea"
id: "logs"
attributes:
label: "Diffoscope log"
description: |
Please copy and paste the relevant `diffoscope` log output, gathered from the steps above.
This will be automatically formatted into a monospaced text block, so no need for backticks.
render: "console"
- type: "textarea"
id: "additional-context"
attributes:
label: "Additional context"
description: "Add any other context about the problem here."
validations:
required: false
id: "maintainers"
attributes:
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
---
**Note for maintainers:** Please tag this issue in your pull request description. (i.e. `Resolves #ISSUE`.)
validations:
required: false
- type: "checkboxes"
id: "sanity-check"
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)."
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: |
# Thank you for helping improve Nixpkgs!
---
- type: "textarea"
id: "prioritisation"
attributes:
label: "Is this issue important to you?"
description: |
**Please do not modify this text area!**
This template helps Nixpkgs developers know which issues should be prioritised by allowing users to vote with a :+1: reaction.
This is not a guarantee that highly-requested issues will be fixed first, but it helps us to figure out what's important to users. Please react on other users' issues if you find them important.
value: |
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

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."

37
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: '0.kind: bug'
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. ...
2. ...
3. ...
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
**Metadata**
Please run `nix run nixpkgs.nix-info -c nix-info -m` and paste the result.
Maintainer information:
```yaml
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
```

View File

@@ -0,0 +1,18 @@
---
name: Packaging requests
about: For packages that are missing
title: ''
labels: '0.kind: packaging request'
assignees: ''
---
**Project description**
_describe the project a little_
**Metadata**
* homepage URL:
* source URL:
* license: mit, bsd, gpl2+ , ...
* platforms: unix, linux, darwin, ...

View File

@@ -1,42 +1,23 @@
<!-- Nixpkgs has a lot of new incoming Pull Requests, but not enough people to review this constant stream. Even if you aren't a committer, we would appreciate reviews of other PRs, especially simple ones like package updates. Just testing the relevant package/service and leaving a comment saying what you tested, how you tested it and whether it worked would be great. List of open PRs: <https://github.com/NixOS/nixpkgs/pulls>, for more about reviewing contributions: <https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download/1/nixpkgs/manual.html#sec-reviewing-contributions>. Reviewing isn't mandatory, but it would help out a lot and reduce the average time-to-merge for all of us. Thanks a lot if you do! -->
###### Motivation for this change
<!--
^ Please summarise the changes you have done and explain why they are necessary here ^
For package updates please link to a changelog or describe changes, this helps your fellow maintainers discover breaking updates.
For new packages please briefly describe the package or provide a link to its homepage.
-->
## Things done
###### Things done
<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
- Built on platform:
- [ ] 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].
- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS)
- Built on platform(s)
- [ ] NixOS
- [ ] macOS
- [ ] other Linux distributions
- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nix-review --run "nix-review wip"`
- [ ] Tested execution of all binary files (usually in `./result/bin/`)
- [ ] Determined the impact on package closure size (by running `nix path-info -S` before and after)
- [ ] Ensured that relevant documentation is up to date
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/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
###### Notify maintainers
[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
cc @

36
.github/STALE-BOT.md vendored
View File

@@ -1,36 +0,0 @@
# Stale bot information
- Thanks for your contribution!
- Our stale bot will never close an issue or PR.
- To remove the stale label, just leave a new comment.
- _How to find the right people to ping?_ &rarr; [`git blame`](https://git-scm.com/docs/git-blame) to the rescue! (or GitHub's history and blame buttons.)
- You can always ask for help on [our Discourse Forum](https://discourse.nixos.org/), [our Matrix room](https://matrix.to/#/#nix:nixos.org), or on the [#nixos IRC channel](https://web.libera.chat/#nixos).
## Suggestions for PRs
1. GitHub sometimes doesn't notify people who commented / reviewed a PR previously, when you (force) push commits. If you have addressed the reviews you can [officially ask for a review](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from those who commented to you or anyone else.
2. If it is unfinished but you plan to finish it, please mark it as a draft.
3. If you don't expect to work on it any time soon, closing it with a short comment may encourage someone else to pick up your work.
4. To get things rolling again, rebase the PR against the target branch and address valid comments.
5. If you need a review to move forward, ask in [the Discourse thread for PRs that need help](https://discourse.nixos.org/t/prs-in-distress/3604).
6. If all you need is a merge, check the git history to find and [request reviews](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/requesting-a-pull-request-review) from people who usually merge related contributions.
## Suggestions for issues
1. If it is resolved (either for you personally, or in general), please consider closing it.
2. If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
3. If you still have interest in resolving it, try to ping somebody who you believe might have an interest in the topic. Consider discussing the problem in [our Discourse Forum](https://discourse.nixos.org/).
4. As with all open source projects, your best option is to submit a Pull Request that addresses this issue. We :heart: this attitude!
**Memorandum on closing issues**
Don't be afraid to close an issue that holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
## Useful GitHub search queries
- [Open PRs with any stale-bot interaction](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+)
- [Open PRs with any stale-bot interaction and `2.status: stale`](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+label%3A%222.status%3A+stale%22)
- [Open PRs with any stale-bot interaction and NOT `2.status: stale`](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+commenter%3Aapp%2Fstale+-label%3A%222.status%3A+stale%22+)
- [Open Issues with any stale-bot interaction](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+)
- [Open Issues with any stale-bot interaction and `2.status: stale`](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+label%3A%222.status%3A+stale%22+)
- [Open Issues with any stale-bot interaction and NOT `2.status: stale`](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+commenter%3Aapp%2Fstale+-label%3A%222.status%3A+stale%22+)

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

@@ -1,9 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels: []
commit-message:
prefix: ".github"

View File

@@ -1,23 +0,0 @@
# This file is used by .github/workflows/bot.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$'
"4.workflow: staging":
- any:
- head-branch:
- '^staging-next$'
- '^staging-next-'
"6.topic: haskell":
- any:
- head-branch:
- '^haskell-updates$'
"6.topic: python":
- any:
- head-branch:
- '^python-updates$'

View File

@@ -1,47 +0,0 @@
# This file is used by .github/workflows/bot.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
"8.has: documentation":
- any:
- 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']
# keep-sorted end

641
.github/labeler.yml vendored
View File

@@ -1,641 +0,0 @@
# This file is used by .github/workflows/bot.yml
# This version uses `sync-labels: true`, meaning that a non-match will remove the label
# keep-sorted start case=no numeric=yes newline_separated=yes skip_lines=1
"4.workflow: backport":
- any:
- base-branch:
- '^release-'
- '^staging-\d'
- '^staging-next-\d'
- '^staging-nixos-\d'
# NOTE: bsd, darwin and cross-compilation labels are handled by ofborg
"6.topic: agda":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/agda.section.md
- nixos/tests/agda.nix
- pkgs/build-support/agda/**/*
- pkgs/development/libraries/agda/**/*
- pkgs/top-level/agda-packages.nix
"6.topic: cinnamon":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/cinnamon.nix
- nixos/tests/cinnamon.nix
- nixos/tests/cinnamon-wayland.nix
- pkgs/by-name/ci/cinnamon/**/*
- pkgs/by-name/ci/cinnamon-*/**/*
- pkgs/by-name/cj/cjs/**/*
- pkgs/by-name/mu/muffin/**/*
- pkgs/by-name/ne/nemo/**/*
- pkgs/by-name/ne/nemo-*/**/*
"6.topic: continuous integration":
- any:
- changed-files:
- any-glob-to-any-file:
- .github/**/*
- ci/**/*.*
"6.topic: coq":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/applications/science/logic/coq/**/*
- pkgs/development/coq-modules/**/*
- pkgs/top-level/coq-packages.nix
"6.topic: COSMIC":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/desktop-managers/cosmic.nix
- nixos/modules/services/display-managers/cosmic-greeter.nix
- nixos/tests/cosmic.nix
- pkgs/by-name/co/cosmic-*/**/*
- pkgs/by-name/li/libcosmicAppHook/*
- pkgs/by-name/po/pop-launcher/*
- pkgs/by-name/xd/xdg-desktop-portal-cosmic/*
"6.topic: crystal":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/compilers/crystal/**/*
"6.topic: cuda":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/cuda-modules/**/*
- pkgs/top-level/cuda-packages.nix
"6.topic: deepin":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/desktops/deepin/**/*
- pkgs/desktops/deepin/**/*
"6.topic: docker tools":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/applications/virtualization/docker/**/*
"6.topic: dotnet":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/dotnet.section.md
- maintainers/scripts/update-dotnet-lockfiles.nix
- pkgs/build-support/dotnet/**/*
- pkgs/development/compilers/dotnet/**/*
- pkgs/test/dotnet/**/*
- pkgs/top-level/dotnet-packages.nix
"6.topic: emacs":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/editors/emacs.nix
- nixos/modules/services/editors/emacs.xml
- nixos/tests/emacs-daemon.nix
- pkgs/applications/editors/emacs/build-support/**/*
- pkgs/applications/editors/emacs/elisp-packages/**/*
- pkgs/applications/editors/emacs/**/*
- pkgs/top-level/emacs-packages.nix
"6.topic: Enlightenment DE":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/enlightenment.nix
- pkgs/desktops/enlightenment/**/*
- pkgs/development/python-modules/python-efl/*
"6.topic: erlang":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/beam.section.md
- pkgs/development/beam-modules/**/*
- pkgs/development/interpreters/elixir/**/*
- pkgs/development/interpreters/erlang/**/*
- pkgs/development/tools/build-managers/rebar/**/*
- pkgs/development/tools/build-managers/rebar3/**/*
- pkgs/development/tools/erlang/**/*
- pkgs/top-level/beam-packages.nix
"6.topic: fetch":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/build-support/fetch*/**/*
"6.topic: flakes":
- any:
- changed-files:
- any-glob-to-any-file:
- '**/flake.nix'
- lib/systems/flake-systems.nix
- nixos/modules/config/nix-flakes.nix
"6.topic: flutter":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/build-support/flutter/*.nix
- pkgs/development/compilers/flutter/**/*.nix
"6.topic: games":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/games/**/*
"6.topic: GNOME":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/gnome.section.md
- nixos/modules/services/desktops/gnome/**/*
- nixos/modules/services/desktop-managers/gnome.nix
- nixos/tests/gnome-xorg.nix
- nixos/tests/gnome.nix
- pkgs/desktops/gnome/**/*
"6.topic: golang":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/go.section.md
- pkgs/build-support/go/**/*
- pkgs/development/compilers/go/**/*
"6.topic: hardware":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/hardware/**/*
"6.topic: haskell":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/haskell.section.md
- maintainers/scripts/haskell/**/*
- pkgs/development/compilers/ghc/**/*
- pkgs/development/haskell-modules/**/*
- pkgs/development/tools/haskell/**/*
- pkgs/test/haskell/**/*
- pkgs/top-level/haskell-packages.nix
- pkgs/top-level/release-haskell.nix
"6.topic: java":
- any:
- changed-files:
- any-glob-to-any-file:
# Distributions
- pkgs/development/compilers/adoptopenjdk-icedtea-web/**/*
- pkgs/development/compilers/corretto/**/*
- pkgs/development/compilers/graalvm/**/*
- pkgs/development/compilers/openjdk/**/*
- pkgs/by-name/op/openjfx/**/*
- pkgs/development/compilers/semeru-bin/**/*
- pkgs/development/compilers/temurin-bin/**/*
- pkgs/development/compilers/zulu/**/*
# Documentation
- doc/languages-frameworks/java.section.md
# Gradle
- doc/languages-frameworks/gradle.section.md
- pkgs/development/tools/build-managers/gradle/**/*
- pkgs/by-name/gr/gradle-completion/**/*
# Maven
- pkgs/by-name/ma/maven/**/*
- doc/languages-frameworks/maven.section.md
# Ant
- pkgs/by-name/an/ant/**/*
# javaPackages attrset
- pkgs/development/java-modules/**/*
- pkgs/top-level/java-packages.nix
# Maintainer tooling
- pkgs/by-name/ni/nixpkgs-openjdk-updater/**/*
# Misc
- nixos/modules/programs/java.nix
"6.topic: jitsi":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/networking/jitsi-videobridge.nix
- nixos/modules/services/web-apps/jitsi-meet.nix
- pkgs/servers/web-apps/jitsi-meet/**/*
- pkgs/servers/jitsi-videobridge/**/*
- pkgs/applications/networking/instant-messengers/jitsi/**/*
"6.topic: julia":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/julia.section.md
- pkgs/development/compilers/julia/**/*
- pkgs/development/julia-modules/**/*
"6.topic: jupyter":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/python-modules/jupyter*/**/*
- pkgs/development/python-modules/mkdocs-jupyter/*
- nixos/modules/services/development/jupyter/**/*
- pkgs/applications/editors/jupyter-kernels/**/*
- pkgs/applications/editors/jupyter/**/*
"6.topic: k3s":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/cluster/rancher/default.nix
- nixos/modules/services/cluster/rancher/k3s.nix
- nixos/tests/rancher/**/*
- pkgs/applications/networking/cluster/k3s/**/*
"6.topic: kernel":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/packages/linux.section.md
- lib/kernel.nix
- nixos/doc/manual/configuration/linux-kernel.chapter.md
- nixos/modules/system/boot/kernel.nix
- nixos/tests/kernel-generic/**/*
- pkgs/build-support/kernel/**/*
- pkgs/os-specific/linux/kernel/**/*
- pkgs/top-level/linux-kernels.nix
"6.topic: lib":
- any:
- changed-files:
- any-glob-to-any-file:
- lib/**
"6.topic: llvm/clang":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/compilers/llvm/**/*
"6.topic: lua":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/tools/misc/luarocks/*
- pkgs/development/interpreters/lua-5/**/*
- pkgs/development/interpreters/luajit/**/*
- pkgs/development/lua-modules/**/*
- pkgs/top-level/lua-packages.nix
"6.topic: Lumina DE":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/lumina.nix
- pkgs/desktops/lumina/**/*
"6.topic: LXQt":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/lxqt.nix
- pkgs/desktops/lxqt/**/*
"6.topic: mate":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/mate.nix
- nixos/tests/mate.nix
- pkgs/desktops/mate/**/*
- pkgs/by-name/ca/caja/**/*
- pkgs/by-name/ca/caja-*/**/*
- pkgs/by-name/li/libmatekbd/**/*
- pkgs/by-name/li/libmatemixer/**/*
- pkgs/by-name/li/libmateweather/**/*
- pkgs/by-name/ma/marco/**/*
- pkgs/by-name/ma/mate-*/**/*
"6.topic: module system":
- any:
- changed-files:
- any-glob-to-any-file:
- lib/modules.nix
- lib/types.nix
- lib/options.nix
- lib/tests/modules.sh
- lib/tests/modules/**
"6.topic: musl":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/os-specific/linux/musl/**/*
- pkgs/by-name/mu/musl/**/*
"6.topic: nim":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/nim.section.md
- pkgs/build-support/build-nim-package.nix
- pkgs/build-support/build-nim-sbom.nix
- pkgs/by-name/ni/nim*
- pkgs/top-level/nim-overrides.nix
"6.topic: nixos":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/**/*
- pkgs/by-name/sw/switch-to-configuration-ng/**/*
- pkgs/by-name/ni/nixos-rebuild-ng/**/*
- pkgs/os-specific/linux/nixos-rebuild/**/*
"6.topic: nixos-container":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/virtualisation/nixos-containers.nix
- pkgs/tools/virtualization/nixos-container/**/*
"6.topic: nodejs":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/javascript.section.md
- pkgs/build-support/node/**/*
- pkgs/development/node-packages/**/*
- pkgs/development/tools/yarn/*
- pkgs/development/tools/yarn2nix-moretea/**/*
- pkgs/development/tools/pnpm/**/*
- pkgs/development/web/nodejs/*
"6.topic: nvidia":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/hardware/video/nvidia.nix
- nixos/modules/services/hardware/nvidia-container-toolkit/**/*
- nixos/modules/services/hardware/nvidia-optimus.nix
- pkgs/os-specific/linux/nvidia-x11/**/*
"6.topic: ocaml":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/ocaml.section.md
- pkgs/development/compilers/ocaml/**/*
- pkgs/development/compilers/reason/**/*
- pkgs/development/ocaml-modules/**/*
- pkgs/development/tools/ocaml/**/*
- pkgs/top-level/ocaml-packages.nix
"6.topic: pantheon":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/desktops/pantheon/**/*
- nixos/modules/services/desktop-managers/pantheon.nix
- nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
- nixos/tests/pantheon.nix
- pkgs/desktops/pantheon/**/*
"6.topic: php":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/php.section.md
- nixos/tests/php/**/*
- pkgs/build-support/php/**/*
- pkgs/development/interpreters/php/**/*
- pkgs/development/php-packages/**/*
- pkgs/test/php/default.nix
- pkgs/top-level/php-packages.nix
"6.topic: printing":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/printing/cupsd.nix
- pkgs/misc/cups/**/*
"6.topic: python":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/python.section.md
- pkgs/development/interpreters/python/**/*
- pkgs/development/python-modules/**/*
- pkgs/top-level/python-packages.nix
"6.topic: qt/kde":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/qt.section.md
- nixos/modules/services/desktop-managers/plasma6.nix
- nixos/tests/plasma6.nix
- pkgs/kde/**/*
"6.topic: R":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/applications/science/math/R/**/*
- pkgs/development/r-modules/**/*
"6.topic: rocm":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/rocm-modules/**/*
"6.topic: ruby":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/ruby.section.md
- pkgs/development/interpreters/ruby/**/*
- pkgs/development/ruby-modules/**/*
- pkgs/top-level/ruby-packages.nix
"6.topic: rust":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/rust.section.md
- pkgs/build-support/rust/**/*
- pkgs/development/compilers/rust/**/*
"6.topic: stdenv":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/stdenv/**/*
"6.topic: steam":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/games/steam/**/*
"6.topic: systemd":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/os-specific/linux/systemd/**/*
- nixos/modules/system/boot/systemd*/**/*
"6.topic: tcl":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/tcl.section.md
- pkgs/development/interpreters/tcl/*
- pkgs/development/tcl-modules/**/*
- pkgs/top-level/tcl-packages.nix
"6.topic: teams":
- any:
- changed-files:
- any-glob-to-any-file:
- maintainers/team-list.nix
"6.topic: testing":
- any:
- changed-files:
- any-glob-to-any-file:
# NOTE: Let's keep the scope limited to test frameworks that are
# *developed in this repo*;
# - not individual tests
# - not packages for test frameworks
- pkgs/build-support/testers/**
- nixos/lib/testing/**
- nixos/lib/test-driver/**
- nixos/tests/nixos-test-driver/**
- nixos/lib/testing-python.nix # legacy
- nixos/tests/make-test-python.nix # legacy
# lib/debug.nix has a test framework (runTests) but it's not the main focus
"6.topic: TeX":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/texlive.section.md
- pkgs/test/texlive/**
- pkgs/tools/typesetting/tex/**/*
"6.topic: tree-sitter":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/packages/python-tree-sitter.section.md
- pkgs/applications/editors/emacs/elisp-packages/manual-packages/tree-sitter-langs/**/*
- pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/**/*
- pkgs/applications/editors/vim/plugins/nvim-treesitter/**/*
- pkgs/by-name/*/*tree-sitter*/**/*
- pkgs/by-name/ne/neovim-unwrapped/treesitter-parsers.nix
- pkgs/development/python-modules/*tree-sitter*/**/*
"6.topic: updaters":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/common-updater/**/*
"6.topic: vim":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/vim.section.md
- pkgs/applications/editors/vim/**/*
- pkgs/applications/editors/vim/plugins/**/*
- nixos/modules/programs/neovim.nix
- pkgs/applications/editors/neovim/**/*
"6.topic: vscode":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/applications/editors/vscode/**/*
"6.topic: windows":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/os-specific/windows/**/*
"6.topic: xen-project":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/virtualisation/xen*
- pkgs/by-name/xe/xen/*
- pkgs/by-name/qe/qemu_xen/*
- pkgs/by-name/xe/xen-guest-agent/*
- pkgs/by-name/xt/xtf/*
- pkgs/build-support/xen/*
- pkgs/development/ocaml-modules/xen*/*
- pkgs/development/ocaml-modules/vchan/*
"6.topic: xfce":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/doc/manual/configuration/xfce.xml
- nixos/modules/services/x11/desktop-managers/xfce.nix
- nixos/tests/xfce.nix
- pkgs/desktops/xfce/**/*
- pkgs/by-name/ga/garcon/**/*
- pkgs/by-name/li/libxfce4*/**/*
- pkgs/by-name/th/thunar/**/*
- pkgs/by-name/th/thunar-*/**/*
- pkgs/by-name/tu/tumbler/**/*
- pkgs/by-name/xf/xfce4-*/**/*
- pkgs/by-name/xf/xfconf/**/*
- pkgs/by-name/xf/xfdesktop/**/*
- pkgs/by-name/xf/xfwm4/**/*
"6.topic: zig":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/compilers/zig/**/*
- doc/hooks/zig.section.md
"8.has: changelog":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/release-notes/**/*
- nixos/doc/manual/release-notes/**/*
"8.has: maintainer-list (update)":
- any:
- changed-files:
- any-glob-to-any-file:
- maintainers/maintainer-list.nix
"8.has: module (update)":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/**/*
# keep-sorted end

View File

@@ -1,77 +0,0 @@
# GitHub Actions Workflows
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.
- 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**.
- 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.
- 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`.
- **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

@@ -1,97 +0,0 @@
# WARNING:
# When extending this action, be aware that $GITHUB_TOKEN allows write access to
# the GitHub repository. This means that it should not evaluate user input in a
# way that allows code injection.
name: Backport
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
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
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
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_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
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
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
- 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' ]
})

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

@@ -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

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

@@ -1,59 +0,0 @@
# Some workflows depend on the base branch of the PR, but changing the base branch is not included in the default trigger events, which would be `opened`, `synchronize` or `reopened`.
# Instead it causes an `edited` event.
# Since `edited` is also triggered when PR title/body is changed, we use this wrapper workflow, to run the other workflows conditionally only.
# There are already feature requests for adding a `base_changed` event:
# - https://github.com/orgs/community/discussions/35058
# - https://github.com/orgs/community/discussions/64119
#
# Instead of adding this to each workflow's pull_request_target event, we trigger this in a separate workflow.
# This has the advantage, that we can actually skip running those jobs for simple edits like changing the title or description.
# The actual trigger happens by closing and re-opening the pull request, which triggers the default pull_request_target events.
# This is much simpler and reliable than other approaches.
name: "Edited base branch"
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
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
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 }}
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')

View File

@@ -1,495 +0,0 @@
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
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
- 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:
runs-on: ubuntu-24.04-arm
needs: versions
if: ${{ !cancelled() && !failure() }}
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
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
sudo chmod 600 /swap
sudo mkswap /swap
sudo swapon /swap
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
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 }}
- name: Install Nix
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|-single-chunk)$'
- 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
env:
MATRIX_SYSTEM: ${{ matrix.system }}
run: |
TARGET_DRV=$(nix-instantiate nixpkgs/trusted/ci --arg nixpkgs ./nixpkgs/trusted-pinned -A eval.singleSystem \
--argstr evalSystem "$MATRIX_SYSTEM" \
--arg chunkSize 8000 \
--argstr nixPath "nixVersions.latest")
# 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
with:
name: ${{ inputs.artifact-prefix }}${{ matrix.version && format('{0}-', matrix.version) || '' }}diff-${{ matrix.system }}
path: diff/*
compare:
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
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
with:
pattern: ${{ inputs.artifact-prefix }}diff-*
path: diff
merge-multiple: true
- name: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- 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
- name: Upload the maintainer list
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ inputs.artifact-prefix }}maintainers
path: combined/maintainers.json
- name: Compare against the target branch
env:
TARGET_SHA: ${{ inputs.mergedSha }}
run: |
git -C nixpkgs/trusted diff --name-only "$TARGET_SHA" \
| 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 \
--arg touchedFilesJson ./touched-files.json \
--out-link comparison
cat comparison/step-summary.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload the comparison results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ inputs.artifact-prefix }}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
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
# 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
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: Install Nix
uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
- name: Ensure flake outputs on all systems still evaluate
run: nix flake check --all-systems --no-build './nixpkgs/untrusted?shallow=1'
- name: Query nixpkgs with aliases enabled to check for basic syntax errors
run: |
time nix-env -I ./nixpkgs/untrusted -f ./nixpkgs/untrusted -qa '*' --option restrict-eval true --option allow-import-from-derivation false >/dev/null
- name: Ensure NixOS modules meta is valid
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

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',
})

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,
})

View File

@@ -1,86 +0,0 @@
# This action periodically merges base branches into staging branches.
# This is done to
# * prevent conflicts or rather resolve them early
# * make all potential breakage happen on the staging branch
# * and make sure that all major rebuilds happen before the staging
# branch gets merged back into its base branch.
name: "Periodic Merges (24h)"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 24 hours
- cron: '0 0 * * *'
workflow_dispatch:
permissions: {}
defaults:
run:
shell: bash
jobs:
periodic-merge:
if: github.repository_owner == 'NixOS' || github.event_name == 'workflow_dispatch'
strategy:
# don't fail fast, so that all pairs are tried
fail-fast: false
# certain branches need to be merged in order, like master->staging-next->staging
# and disabling parallelism ensures the order of the pairs below.
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
- name: merge-base(master,staging) → haskell-updates
from: master staging
into: haskell-updates
uses: ./.github/workflows/periodic-merge.yml
with:
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,
}),
),
)

View File

@@ -1,46 +0,0 @@
# This action periodically merges base branches into staging branches.
# This is done to
# * prevent conflicts or rather resolve them early
# * make all potential breakage happen on the staging branch
# * and make sure that all major rebuilds happen before the staging
# branch gets merged back into its base branch.
name: "Periodic Merges (6h)"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 6 hours
- cron: '0 */6 * * *'
workflow_dispatch:
permissions: {}
defaults:
run:
shell: bash
jobs:
periodic-merge:
if: github.repository_owner == 'NixOS' || github.event_name == 'workflow_dispatch'
strategy:
# don't fail fast, so that all pairs are tried
fail-fast: false
# certain branches need to be merged in order, like master->staging-next->staging
# and disabling parallelism ensures the order of the pairs below.
max-parallel: 1
matrix:
pairs:
- from: master
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 }}

View File

@@ -1,69 +0,0 @@
name: "Merge"
on:
workflow_call:
inputs:
from:
description: Branch to merge into target branch. Can also be two branches separated by space to find the merge base between them.
required: true
type: string
into:
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
id: app-token
with:
client-id: ${{ vars.NIXPKGS_CI_CLIENT_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
- name: Find merge base between two branches
if: contains(inputs.from, ' ')
id: merge_base
env:
branches: ${{ inputs.from }}
run: |
# turn into bash array, split on space
read -ra branches <<< "$branches"
git fetch --shallow-since="1 month ago" origin "${branches[@]}"
merge_base="$(git merge-base "refs/remotes/origin/${branches[0]}" "refs/remotes/origin/${branches[1]}")"
echo "Found merge base: $merge_base" >&2
echo "merge_base=$merge_base" >> "$GITHUB_OUTPUT"
- name: ${{ inputs.from }} → ${{ inputs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
with:
type: now
from_branch: ${{ steps.merge_base.outputs.merge_base || inputs.from }}
target_branch: ${{ inputs.into }}
github_token: ${{ steps.app-token.outputs.token }}
- name: Comment on failure
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"

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

27
.gitignore vendored
View File

@@ -2,41 +2,16 @@
,*
.*.swp
.*.swo
.\#*
\#*\#
.idea/
.nixos-test-history
.vscode/
.helix/
outputs/
result-*
result
repl-result-*
tags
!pkgs/development/python-modules/result
result-*
/doc/NEWS.html
/doc/NEWS.txt
/doc/manual.html
/doc/manual.pdf
/source/
.version-suffix
.direnv
.envrc
.DS_Store
.mypy_cache
__pycache__
/pkgs/development/libraries/qt-5/*/tmp/
/pkgs/desktops/kde-5/*/tmp/
/pkgs/development/mobile/androidenv/xml/*
# generated by pkgs/common-updater/update-script.nix
update-git-commits.txt
/*.log
# JetBrains IDEA module declaration file
/nixpkgs.iml
# Usually used for manual backports
.worktree/

View File

@@ -1,45 +0,0 @@
ajs124 <git@ajs124.de> <ajs124@users.noreply.github.com>
Anderson Torres <torres.anderson.85@protonmail.com>
Atemu <git@atemu.net> <atemu.main@gmail.com>
Christina Sørensen <christina@cafkafk.com>
Christina Sørensen <christina@cafkafk.com> <christinaafk@gmail.com>
Christina Sørensen <christina@cafkafk.com> <89321978+cafkafk@users.noreply.github.com>
Daniel Løvbrøtte Olsen <me@dandellion.xyz> <daniel.olsen99@gmail.com>
Ethan Carter Edwards <ethan@ethancedwards.com> Ethan Edwards <ethancarteredwards@gmail.com>
Fabian Affolter <mail@fabian-affolter.ch> <fabian@affolter-engineering.ch>
Fiona Behrens <me@kloenk.dev>
Fiona Behrens <me@kloenk.dev> <me@kloenk.de>
goatastronaut0212 <goatastronaut0212@outlook.com> <goatastronaut0212@proton.me>
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>

View File

@@ -1 +0,0 @@
lib/.version

1
.version Normal file
View File

@@ -0,0 +1 @@
19.09

View File

@@ -1,965 +0,0 @@
# Contributing to Nixpkgs
This document is for people wanting to contribute to Nixpkgs.
This involves changes that are proposed using [GitHub](https://github.com) [pull requests](https://docs.github.com/pull-requests) to the [Nixpkgs repository](https://github.com/nixos/nixpkgs).
A GitHub account is recommended, which you can sign up for [here](https://github.com/signup).
See [here](https://discourse.nixos.org/t/about-the-patches-category/477) for how to contribute without a GitHub account.
This document assumes that you already know how to use GitHub and Git.
If that's not the case, we recommend learning about it [here](https://docs.github.com/en/get-started/quickstart/hello-world).
## Overview
[overview]: #overview
This file contains general contributing information.
More specific information about individual parts of Nixpkgs can be found here:
- [`doc`](./doc/README.md): Sources and infrastructure for the [Nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/)
- [`lib`](./lib/README.md): Sources and documentation of the [library functions](https://nixos.org/manual/nixpkgs/stable/#chap-functions)
- [`maintainers`](./maintainers/README.md): Nixpkgs maintainer and team listings, maintainer scripts
- [`nixos`](./nixos/README.md): Implementation of [NixOS](https://nixos.org/manual/nixos/stable/)
- [`pkgs`](./pkgs/README.md): Package and [builder](https://nixos.org/manual/nixpkgs/stable/#part-builders) definitions
# How to's
## How to create pull requests
[pr-create]: #how-to-create-pull-requests
This section describes how changes can be proposed with a pull request (PR).
> [!Note]
> Be aware that contributing implies licensing those contributions under the terms of [COPYING](./COPYING), an MIT-like license.
0. Set up a local version of Nixpkgs to work with:
1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) the [Nixpkgs repository](https://github.com/nixos/nixpkgs).
1. [Clone the forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) into a local `nixpkgs` directory.
1. [Configure the upstream Nixpkgs repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository).
1. Select the appropriate [base branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#working-with-branches) for the change, as [described here][branch].
If in doubt, use `master`.
This can be changed later by [rebasing][rebase].
2. Create a new Git branch, ideally such that:
- The name of the branch hints at your change, e.g. `update-hello`.
- The branch contains the most recent base branch.
We'll assume the base branch `master` here.
```bash
# Make sure you have the latest changes from upstream Nixpkgs
git fetch upstream
# Create and switch to a new branch, based on the base branch in Nixpkgs
git switch --create update-hello upstream/master
```
To avoid potentially having to download and build many derivations, you can base on a specific [Git commit](https://www.git-scm.com/docs/gitglossary#def_commit) instead:
- The commit of the latest `nixpkgs-unstable` channel, available [here](https://channels.nixos.org/nixpkgs-unstable/git-revision).
- The commit of a local Nixpkgs downloaded using [nix-channel](https://nixos.org/manual/nix/stable/command-ref/nix-channel), available using `nix-instantiate --eval --expr '(import <nixpkgs/lib>).trivial.revisionWithDefault null'`
- If you're using NixOS, the commit of your NixOS installation, available with `nixos-version --revision`.
You can use this commit instead of `upstream/master` in the above command:
```bash
# Here, b9c03fbb is an example commit from nixpkgs-unstable
git switch --create update-hello b9c03fbb
```
3. Make your changes in the local Nixpkgs repository and:
- Adhere to both the [general code conventions][code-conventions], and the relevant [specific code conventions][overview].
- Test the changes.
- If necessary, document the changes.
See the [overview section][overview] for more specific information.
4. Commit your changes using `git commit`.
Make sure to adhere to the [commit conventions](#commit-conventions).
Repeat the steps 3-4 as many times as necessary.
Advance to the next step once all the commits make sense together.
You can view your commits with `git log`.
5. Push your commits to your fork of Nixpkgs:
```
git push --set-upstream origin HEAD
```
The above command will output a link to directly do the next step:
```
remote: Create a pull request for 'update-hello' on GitHub by visiting:
remote: https://github.com/myUser/nixpkgs/pull/new/update-hello
```
6. [Create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request#creating-the-pull-request) from the new branch in your Nixpkgs fork to the upstream Nixpkgs repository.
Use the branch from step 1 as the PR's base branch.
Go through the [pull request template][pr-template].
7. Respond to review comments and potentially to CI failures and merge conflicts by updating the PR.
Always keep it in a mergeable state.
The non-technical side of this process is covered in [I opened a PR, how do I get it merged?](#i-opened-a-pr-how-do-i-get-it-merged).
The [ofborg](https://github.com/NixOS/ofborg) CI system will perform checks to ensure code quality.
You can see the results at the bottom of the PR.
See [the ofborg Readme](https://github.com/NixOS/ofborg#readme) for more details.
- To add new commits, repeat steps 3-4 and push the result:
```
git push
```
- To change existing commits, [rewrite the Git history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
Useful Git commands for this are `git commit --patch --amend` and `git rebase --interactive`.
With a rewritten history you need to force-push the commits:
```
git push --force-with-lease
```
- If there are merge conflicts, you will have to [rebase the branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) onto the current **base branch**.
Sometimes this can be done [on GitHub directly](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch#updating-your-pull-request-branch).
To rebase locally:
```
git fetch upstream
git rebase upstream/master
git push --force-with-lease
```
Use the base branch from step 1 instead of `upstream/master`.
- If you need to change the base branch, [rebase][rebase].
8. If your PR is merged and [acceptable for releases][release-acceptable], you may [backport][pr-backport] it.
### Pull request template
[pr-template]: #pull-request-template
The pull request template helps to determine which steps have been taken so far.
Details not covered by the title and links to existing related issues should go at the top.
When a PR is created, it will be pre-populated with some checkboxes.
#### Tested using sandboxing
When sandbox builds are enabled, Nix will set up an isolated environment for each build process.
It is used to remove further hidden dependencies set by the build environment, to improve reproducibility.
This includes access to the network during the build outside of `fetch*` functions and files outside the Nix store.
Depending on the operating system, access to other resources is blocked as well; see [sandbox](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-sandbox) in the Nix manual for details.
Please test builds with sandboxing enabled, because it is also used in [Hydra](https://nixos.org/hydra).
If you are on Linux, sandboxing is enabled by default.
On other platforms, sandboxing is disabled by default due to a small performance hit on each build.
Please enable sandboxing **before** building the package by adding the following to `/etc/nix/nix.conf`:
```ini
sandbox = true
```
#### Built on platform(s)
Many Nix packages are designed to run on multiple platforms.
As such, its important to let the maintainer know which platforms you have tested on.
Its not always practical to test all platforms, and its not required for a pull request to be merged.
Only check the platforms you tested the build on in this section.
#### Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
Packages with automated tests are likely merged quicker, because they dont require as much manual testing.
If there are existing tests for the package, they should be run.
NixOS tests can only be run on linux.
For more details on writing and running tests, see the [section in the NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests).
#### Tested compilation of all pkgs that depend on this change using `nixpkgs-review`
If you are modifying a package, you can use `nixpkgs-review` to make sure all packages that depend on the updated package still build.
It can work on uncommitted changes with the `wip` option or on a specific pull request.
Review changes from pull request number 12345:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review pr 12345"
```
Alternatively, with flakes (and analogously for the other commands below):
```ShellSession
nix run nixpkgs#nixpkgs-review -- pr 12345
```
Review uncommitted changes:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
```
Review changes from the last commit:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
```
#### Tested execution of all binary files (usually in `./result/bin/`)
It's important to test a modified package's executables.
Look into `./result/bin` and run all files in there, or at a minimum, the main executable.
For example, if you make a change to `texlive`, you probably would only check the binaries associated with the change you made, rather than testing all of them.
#### Meets Nixpkgs contribution standards
The last two checkboxes are about whether it fits the guidelines in this `CONTRIBUTING.md` file.
This document details our standards for commit messages, reviews, licensing of contributions, etc...
Everyone should read and understand these standards before submitting a pull request.
### Rebasing between branches (i.e. from `master` to `staging`)
[rebase]: #rebasing-between-branches-ie-from-master-to-staging
Sometimes, changes must be rebased between branches.
One example is, if the number of rebuilds caused is too large for the original target branch.
In the following example, the current `feature` branch is based on `master`, and we rebase it to have the PR target `staging`.
We rebase on the _merge base_ between `master` and `staging` to avoid too many local rebuilds.
```console
# Rebase your commits onto the common merge base
git rebase --onto upstream/staging... upstream/master
# Force push your changes
git push origin feature --force-with-lease
```
The syntax `upstream/staging...` is equivalent to `upstream/staging...HEAD` and stands for the merge base between `upstream/staging` and `HEAD` (hence between `upstream/staging` and `upstream/master`).
Then use the *Edit* button in the upper right corner of the GitHub PR, and switch the base branch from `master` to `staging`.
*After* the PR has been retargeted, a final rebase onto the target branch might be needed to resolve merge conflicts.
```console
# Rebase onto target branch
git rebase upstream/staging
# Review and fixup possible conflicts
git status
# Force push your changes
git push origin feature --force-with-lease
```
## How to backport pull requests
[pr-backport]: #how-to-backport-pull-requests
Once a PR has been merged, a backport to the corresponding `release-YY.MM` branch can be created.
### Automatically backporting changes
> [!Note]
> You have to be a [Nixpkgs maintainer](./maintainers) to automatically create a backport pull request.
Add the [`backport release-YY.MM` label](https://github.com/NixOS/nixpkgs/labels?q=backport) to the PR on the `master` branch.
This will cause [a GitHub Action](.github/workflows/backport.yml) to open a new PR to the `release-YY.MM` branch a few minutes later.
This can be done on both open or already merged pull requests.
### Manually backporting changes
To manually create a backport, follow [the standard pull request process][pr-create], but:
- Use `release-YY.MM` for the base branch, both for the local branch and the pull request.
> [!Warning]
> Do not use the `nixos-YY.MM` branch.
> It points to the latest _tested_ release channel commit.
- Instead of manually making and committing the changes, use [`git cherry-pick -x`](https://git-scm.com/docs/git-cherry-pick) for each commit.
Use `git cherry-pick -x <commit>` when the reason is obvious, for example for minor version bumps and fixes.
Otherwise, use `git cherry-pick -xe <commit>` to add a reason for the backport.
Here is [an example](https://github.com/nixos/nixpkgs/commit/5688c39af5a6c5f3d646343443683da880eaefb8).
> [!Warning]
> Ensure the commits exist on the `master` branch.
> In the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the `master` pull request.
- In the pull request description, link to the original pull request to `master`.
The pull request title should include `[YY.MM]` matching the release you're backporting to.
## How to review pull requests
[pr-review]: #how-to-review-pull-requests
The Nixpkgs project receives a high number of pull requests.
Anyone may review and approve PRs and it is an important contribution to the project.
The high change rate makes any PR that remains open for too long subject to merge conflicts.
To avoid extra work, reviewing PRs timely and being responsive is key.
GitHub provides sort filters to see the [most recently updated](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) pull requests.
We highly encourage looking at [this list of ready to merge, unreviewed pull requests](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+review%3Anone+status%3Asuccess+no%3Aproject+no%3Aassignee+no%3Amilestone).
Controversial changes can lead to controversial opinions, but it is important to respect every community member and their work.
Always be nice and polite.
GitHub provides reactions for quick feedback to pull requests or comments.
The thumb-down reaction should be used with care and, if possible, accompanied with explanation for the submitter to improve their contribution.
When doing a review:
- Aim to drive the proposal to a timely conclusion.
- Focus on the proposed changes and keep the scope narrow.
- Help the contributor prioritise their efforts towards getting their change merged.
If you find anything related that could be improved but is not immediately required for acceptance, consider:
- Implementing the changes yourself in a follow-up pull request,
- Tracking your idea in an issue,
- Offering to review a follow-up pull request,
- Making concrete [suggestions](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request) in the same pull request.
For example, follow-up changes could involve refactoring code in the affected files.
But please remember not to make such additional considerations a blocker, and communicate that to the contributor, for example by following the [conventional comments](https://conventionalcomments.org) pattern.
If the related change is essential for the contribution at hand, make clear why you think it is important to address that first.
Pull request reviews should include a list of what has been reviewed in a comment, so other reviewers and mergers can know the state of the review.
All the review templates provided are generic examples.
Their usage is optional and the reviewer is free to adapt them.
To get more information about how to review specific parts of Nixpkgs, refer to the documents linked to in the [overview section][overview].
If a pull request contains documentation changes that might require feedback from the documentation team, ping [@NixOS/documentation-team](https://github.com/orgs/nixos/teams/documentation-team) on the pull request.
If you have enough knowledge and experience in a topic and would like to be a long-term reviewer for related submissions, please contact the current reviewers for that topic.
The main reviewers for a topic can be hard to find as there is no list, but checking past pull requests or git-blaming the code can give some hints.
## How to merge pull requests yourself
[pr-merge]: #how-to-merge-pull-requests
You can invoke the nixpkgs-merge-bot by commenting `@NixOS/nixpkgs-merge-bot merge`.
The bot will verify the following conditions, refusing to merge otherwise:
- the PR author should be @r-ryantm or a Nixpkgs committer;
- the invoker should be among the package maintainers on the targeted branch;
- the package should reside in `pkgs/by-name`.
Required status checks prevent PRs that fail them ("PR / ..." jobs) from being merged. Ofborg is not required by the checks.
For other pull requests, please see [I opened a PR, how do I get it merged?](#i-opened-a-pr-how-do-i-get-it-merged).
In case the PR is stuck waiting for the author to apply a trivial change and the author allowed members to modify the PR, consider applying it yourself.
You should pay extra attention to make sure the addition doesn't go against the idea of the original PR and would not be opposed by the author.
Please see the [`nixpkgs-committers` repository](https://github.com/NixOS/nixpkgs-committers) for information on how to proceed to be granted this level of access.
As a maintainer, when you leave the Nix community, please create an issue or post on [Discourse](https://discourse.nixos.org) with references to the packages and modules you maintained, so they can be taken over by other contributors.
# Flow of merged pull requests
After a pull request is merged, it eventually makes it to [Hydra](https://hydra.nixos.org).
Hydra regularly evaluates and builds Nixpkgs, updating [the official channels](https://channels.nixos.org) when their jobs succeed.
See [Nix Channel Status](https://status.nixos.org) for the current channel states.
Our primary development branches and their related channels are:
- `master`: The main branch, used for the unstable channels `nixos-unstable`, `nixos-unstable-small` and `nixpkgs-unstable`.
- `release-YY.MM`: The release branches, used for the stable channels `nixos-YY.MM`, `nixos-YY.MM-small` and `nixpkgs-YY.MM-darwin`.
When a channel is updated, its corresponding branch is also updated to the same commit.
Example: The [`nixpkgs-unstable` branch](https://github.com/nixos/nixpkgs/tree/nixpkgs-unstable) corresponds to the commit from the [`nixpkgs-unstable` channel](https://channels.nixos.org/nixpkgs-unstable).
Nixpkgs is tied to the NixOS release process, which is documented in the [NixOS Release Wiki](https://nixos.github.io/release-wiki/).
See [this section][branch] to know when to use the release branches.
## Staging
[staging]: #staging
The staging workflow exists to batch Hydra builds of many packages together.
It is coordinated in the [Staging room](https://matrix.to/#/#staging:nixos.org) on Matrix.
It works by directing commits that cause [mass rebuilds][mass-rebuild] to a separate `staging` branch that isn't directly built by Hydra.
Regularly, the `staging` branch is _manually_ merged into a `staging-next` branch to be built by Hydra using the [`nixpkgs:staging-next` jobset](https://hydra.nixos.org/jobset/nixpkgs/staging-next).
The `staging-next` branch should then only receive changes that fix Hydra builds; **for anything else, ask the [Staging room](https://matrix.to/#/#staging:nixos.org) first**.
Once it is verified that there are no major regressions, `staging-next` is merged into `master` using [a pull request](https://github.com/NixOS/nixpkgs/issues?q=label%3A%224.workflow%3A+staging%22).
This is done manually to ensure it's a good use of Hydra's computing resources.
Since `staging-next` is separate from `staging`, you may merge changes into `staging` at any time.
In order for the `staging` and `staging-next` branches to be up-to-date with the latest commits on `master`, there are regular _automated_ merges from `master` into `staging-next`, and from `staging-next` into `staging`.
This is implemented using GitHub workflows [here](.github/workflows/periodic-merge-6h.yml) and [here](.github/workflows/periodic-merge-24h.yml).
> [!Note]
> Changes must be well tested before being merged into any branch.
> Hydra builds should not be used as a testing platform.
Here is a Git history diagram showing the flow of commits between the three branches:
```mermaid
%%{init: {
'theme': 'base',
'themeVariables': {
'gitInv0': '#ff0000',
'gitInv1': '#ff0000',
'git2': '#ff4444',
'commitLabelFontSize': '15px'
},
'gitGraph': {
'showCommitLabel':true,
'mainBranchName': 'master',
'rotateCommitLabel': true
}
} }%%
gitGraph
commit id:" "
branch staging
commit id:" "
branch staging-next
merge master id:"automatic"
checkout staging
merge staging-next id:"automatic "
checkout staging-next
merge staging type:HIGHLIGHT id:"manual"
commit id:"fixup"
checkout master
checkout staging
checkout master
commit id:" "
checkout staging-next
merge master id:"automatic "
checkout staging
merge staging-next id:"automatic "
checkout staging-next
commit id:"fixup "
checkout master
merge staging-next type:HIGHLIGHT id:"manual (PR)"
```
Here's an overview of the different branches:
| branch | `master` | `staging-next` | `staging` | [`staging-nixos`][test-driver-rebuild] |
| --- | --- | --- | --- | --- |
| Used for development | ✔️ | ❌ | ✔️ | ✔️ |
| Built by Hydra | ✔️ | ✔️ | ❌ | ❌ |
| [Mass rebuilds][mass-rebuild] | ❌ | ⚠️ Only to fix Hydra builds | ✔️ | ❌[^1] |
| Critical security fixes | ✔️ for non-mass-rebuilds | ✔️ for mass-rebuilds | ❌ | ✔️ |
| Automatically merged into | `staging-next` & `staging-nixos` | `staging` | - | - |
| Manually merged into | - | `master` | `staging-next` | `master` |
The staging workflow is used for all stable branches with corresponding names:
- `master`/`release-YY.MM`
- `staging`/`staging-YY.MM`
- `staging-next`/`staging-next-YY.MM`
- `staging-nixos`/`staging-nixos-YY.MM`
[^1]: Except changes that cause no more rebuilds than kernel updates
# Conventions
## Branch conventions
<!-- This section is relevant to both contributors and reviewers -->
[branch]: #branch-conventions
Most changes should go to `master`, but sometimes other branches should be used instead.
Use the following decision process to figure out the right branch:
Is the change [acceptable for releases][release-acceptable] and do you wish to have the change in the release?
- No: Use the `master` branch, do not backport the pull request.
- Yes: Can the change be implemented the same way on the `master` and release branches?
For example, a package's major version might differ between the `master` and release branches, such that separate security patches are required.
- Yes: Use the `master` branch and [backport the pull request](#how-to-backport-pull-requests).
- No: Create separate pull requests to the `master` and `release-YY.MM` branches.
If the change causes a [mass rebuild][mass-rebuild], use the `staging` branch instead:
- Mass rebuilds to `master` should go to `staging` instead.
- Mass rebuilds to `release-YY.MM` should go to `staging-YY.MM` instead.
See [this section][staging] for how such changes propagate between the branches.
### Changes acceptable for releases
[release-acceptable]: #changes-acceptable-for-releases
Only changes to _supported_ releases may be accepted.
The oldest supported release (`YYMM`) can be found using
```
nix-instantiate --eval -A lib.trivial.oldestSupportedRelease
```
The release branches should generally only receive backwards-compatible changes, both for the Nix expressions and derivations.
Here are some examples of changes that are okay to backport:
- ✔️ New packages, modules and functions
- ✔️ Security fixes
- ✔️ Package version updates
- ✔️ Patch versions with fixes
- ✔️ Minor versions with new functionality, but no breaking changes
In addition, major package version updates with breaking changes are also acceptable for:
- ✔️ Services that would fail without up-to-date client software, such as `spotify`, `steam`, and `discord`
- ✔️ Security critical applications, such as `firefox` and `chromium`
### Changes causing mass rebuilds
[mass-rebuild]: #changes-causing-mass-rebuilds
Which changes cause mass rebuilds is not formally defined.
In order to help the decision, CI automatically assigns [`rebuild` labels](https://github.com/NixOS/nixpkgs/labels?q=rebuild) to pull requests based on the number of packages they cause rebuilds for.
As a rule of thumb, if the number of rebuilds is **500 or more**, consider targeting the `staging` branch instead of `master`; if the number is **1000 or more**, the pull request causes a mass rebuild, and should target the `staging` branch.
See [previously merged pull requests to the staging branches](https://github.com/NixOS/nixpkgs/issues?q=base%3Astaging+-base%3Astaging-next+is%3Amerged) to get a sense for what changes are considered mass rebuilds.
Please note that changes to the Linux kernel are an exception to this rule.
These PRs go to `staging-nixos`, see [the next section for more context](#changes-rebuilding-all-tests).
### Changes rebuilding all NixOS tests
[test-driver-rebuild]: #changes-rebuilding-all-nixos-tests
Changes causing a rebuild of all NixOS tests get a special [`10.rebuild-nixos-tests`](https://github.com/NixOS/nixpkgs/issues?q=state%3Aopen%20label%3A10.rebuild-nixos-tests) label.
These changes pose a significant impact on the build infrastructure.
Hence, these PRs should either target a `staging`-branch or `staging-nixos`-branch, provided one of following conditions applies:
* The label `10.rebuild-nixos-tests` is set, or
* The PR is a change affecting the Linux kernel.
The branch gets merged whenever mainline kernel updates or critical security fixes land on the branch.
This usually happens on a weekly basis.
Backports are not handled by such a branch.
The relevant PRs from this branch must be backported manually.
## Commit conventions
[commit-conventions]: #commit-conventions
- Create one commit for each logical unit.
- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case.
Use `git rebase -i`.
See [Squashing Commits](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_squashing) for additional information.
- For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
- When adding yourself to `maintainer-list.nix`, make a separate commit with the message `maintainers: add <handle>`.
Add the commit before those making changes to the package or module.
See [Nixpkgs Maintainers](./maintainers/README.md) for details.
- Make sure you read about any commit conventions specific to the area you're touching.
See:
- [Commit conventions](./doc/README.md#commit-conventions) for changes to `doc`, the Nixpkgs manual.
- [Commit conventions](./lib/README.md#commit-conventions) for changes to `lib`.
- [Commit conventions](./nixos/README.md#commit-conventions) for changes to `nixos`.
- [Commit conventions](./pkgs/README.md#commit-conventions) for changes to `pkgs`.
### Writing good commit messages
[writing-good-commit-messages]: #writing-good-commit-messages
It's important to include relevant information in the *commit message*, so others can later understand *why* a change was made.
While this potentially can be understood by reading code, PR discussion or upstream changes, doing so often requires a lot of work.
Simple package version updates need to include the attribute name, old and new versions, as well as a reference to the release notes or changelog.
Package upgrades with more extensive changes require more verbose commit messages.
## Review and Merge conventions
Comments on Pull Requests are considered non-blocking by default.
Every blocking comment must be explicitly marked as such by using GitHub's "Request Changes" review type.
A reviewer who submits a blocking review should be available for discussion and re-review.
An abandoned review may be dismissed after reasonable time was given at the discretion of the merger.
All suggestions for change, blocking or not, should be acknowledged before merge.
This can happen implicitly by applying the suggestion, or explicitly by rejecting it.
To make changes on commit structure and commit messages or apply simple suggestions, committers are encouraged to [checkout the PR](https://cli.github.com/manual/gh_pr_checkout) and push directly to the contributor's branch before merging.
Committers will carefully weigh the cost of another review cycle against the feelings of the contributor when pushing to their branch.
They should also transparently communicate which changes they made.
If a contributor does not want committers to push to their branch, they must uncheck the "Allow edits and access to secrets by maintainers" box explicitly.
> [!WARNING]
> Committers: Branches created via `gh pr checkout` can't be pushed with `--force-with-lease`, so do a sanity check before pushing.
## Code conventions
[code-conventions]: #code-conventions
### Release notes
If you removed packages or made some major NixOS changes, write about it in the next release notes in [`nixos/doc/manual/release-notes`](./nixos/doc/manual/release-notes).
### File naming and organisation
Names of files and directories should be in lowercase, with dashes between words — kebab case, not camel case.
For instance, it should be `all-packages.nix`, not `allPackages.nix` or `AllPackages.nix`.
### Formatting
CI [enforces](./.github/workflows/lint.yml) all Nix files to be formatted using the [official Nix formatter](https://github.com/NixOS/nixfmt).
You can ensure this locally using either of these commands:
```
nix-shell --run treefmt
nix develop --command treefmt
nix fmt
```
If you're starting your editor in `nix-shell` or `nix develop`, you can also set it up to automatically run `treefmt` on save.
If you have any problems with formatting, please ping the [formatting team](https://nixos.org/community/teams/formatting/) via [@NixOS/nix-formatting](https://github.com/orgs/NixOS/teams/nix-formatting).
### Syntax
- Set up [editorconfig](https://editorconfig.org) for your editor, such that [the settings](./.editorconfig) are automatically applied.
- Use `lowerCamelCase` for variable names, not `UpperCamelCase`.
Note, this rule does not apply to package attribute names, which instead follow the rules in [package naming](./pkgs/README.md#package-naming).
- Functions should list their expected arguments as precisely as possible.
That is, write
```nix
{
stdenv,
fetchurl,
perl,
}:
<...>
```
instead of
```nix
args: with args; <...>
```
or
```nix
{
stdenv,
fetchurl,
perl,
...
}:
<...>
```
For functions that are truly generic in the number of arguments, but have some required arguments, you should write them using an `@`-pattern:
```nix
{
stdenv,
doCoverageAnalysis ? false,
...
}@args:
stdenv.mkDerivation (args // { foo = if doCoverageAnalysis then "bla" else ""; })
```
instead of
```nix
args:
args.stdenv.mkDerivation (
args
// {
foo = if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "";
}
)
```
- Unnecessary string conversions should be avoided.
Do
```nix
{ tag = version; }
```
instead of
```nix
{ tag = "${version}"; }
```
- Building lists conditionally _should_ be done with `lib.optional(s)` instead of using `if cond then [ ... ] else null` or `if cond then [ ... ] else [ ]`.
```nix
{ buildInputs = lib.optional stdenv.hostPlatform.isDarwin iconv; }
```
instead of
```nix
{ buildInputs = if stdenv.hostPlatform.isDarwin then [ iconv ] else null; }
```
As an exception, an explicit conditional expression with null can be used when fixing an important bug without triggering a mass rebuild.
If this is done a follow up pull request _should_ be created to change the code to `lib.optional(s)`.
- Any style choices not covered here but that can be expressed as general rules should be left at the discretion of the authors of changes and _not_ commented in reviews.
The purpose of this is:
- to avoid churn as contributors with different style preferences undo each other's changes,
- to ensure that style rules are written down and consistent (and can thus be followed when authoring changes, reducing review cycles),
- and to encourage reviews to focus on more impactful considerations.
# Practical contributing advice
To contribute effectively and efficiently, you need to be aware of how the process generally works.
This section aims to document the process as we live it in Nixpkgs to set the right expectations and give practical tips on how to work with it.
## I opened a PR, how do I get it merged?
[i-opened-a-pr-how-do-i-get-it-merged]:#i-opened-a-pr-how-do-i-get-it-merged
In order for your PR to be merged, a committer needs to review and merge it.
Because committers are mostly independent, unpaid volunteers, this can take time.
It is entirely normal for your PR to sit around without any feedback for days, weeks or sometimes even months.
We strive to avoid this, but the reality is that it happens frequently.
Even when you get feedback, follow-ups may take just as long.
Don't be intimidated and kindly ask for feedback again every so often.
If your change is good, it will eventually be merged.
You can often speed up the process by understanding the committer's perspective and preparing your PR with reviewing in mind.
### The committer's perspective
PRs have varying quality and even the best people make mistakes.
Committers need to assess whether a PR's changes are good or not.
To merge, at least one committer has to be confident about its quality.
Committers typically assess three aspects:
1. Whether the change's intention is necessary and desirable.
2. Whether the code quality of your changes is good.
3. Whether the produced artifacts are good.
To get your PR merged quickly and smoothly, you should help convince committers in these aspects.
### How to help committers assess your PR
It's best to explain *why* you've made your change, because guessing the intention is not always possible.
This does not apply to trivial changes like version updates, because the intention is obvious.
For more nuanced changes or even major version upgrades, it helps if you explain the background behind your change.
For example, if you're adding a package, explain what it is and why it should be in Nixpkgs.
This goes hand in hand with [Writing good commit messages](#writing-good-commit-messages).
To show the quality of your code, you should focus on making it *reviewable*.
First, take a look at your code changes yourself and try to put yourself into the shoes of someone who didn't just write that code.
Would you immediately know what the code does or why it is needed by glancing at it?
If not, reviewers will notice this and will ask you to clarify the code by refactoring it and/or adding code comments.
Doing this preemptively can save a lot of time.
Doing multiple unrelated changes in a single commit can become hard to review quickly.
Thus, consider multiple atomic commits to tell the story of your change.
There is a balance to strike however: over-fragmentation causes friction.
The artifacts are the hardest to assess because PRs touch all sorts of components: applications, libraries, NixOS modules, editor plugins and many other things.
Any individual committer can only really assess components that they themselves know how to use.
Yet, they must still be convinced somehow.
There isn't a good generic solution to this but there are some ways to ease it:
- Provide smoke tests that can be run without much research or setup.
Committers usually don't have the time or interest to learn how your component works and how they could test its functionality.
Try to provide a quick guide on how to use it in a meaningful way or a ready-made command that demonstrates that it works as expected.
The committer can use this to convince themselves that your change is good.
If it can be automated, you could even turn this into an automated NixOS test which reviewers could simply run.
- Invite other users of the component to try it out and report their findings.
Seeing other users testing the changes and having it work for them can convince committers, too.
- Describe what you have done to test your PR.
It also helps, if you can additionally show that you have done sufficient quality assurance on your changes.
- Become a maintainer of the component.
Listed maintainers generally receive more trust when it comes to changes to their maintained components.
Even if you adhere to all of these recommendations, it is still quite possible for your PR to be forgotten or abandoned by any given committer.
Please remain mindful of them doing this work on their own volition and unpaid in their free time and therefore [owing you nothing](https://mikemcquaid.com/open-source-maintainers-owe-you-nothing/).
Causing a stink in such a situation is a surefire way to get any other potential committer to not want to look at your PR either.
Ask them nicely whether they still intend to review your PR and find yourself another committer to look at your PR if not.
### How can I get a committer to look at my PR?
- Improve skimmability: use a simple descriptive PR title outlining _what_ is done and _why_.
Details go in commit messages.
- Improve discoverability: apply all relevant labels, tick all relevant PR body checkboxes.
- Wait.
Reviewers frequently browse open PRs and may happen to run across yours and take a look.
- Get non-committers to review/approve.
Many committers filter open PRs for low-hanging fruit that have already been reviewed.
- [@-mention](https://github.blog/news-insights/mention-somebody-they-re-notified/) someone and ask them nicely.
- Post in one of the channels made for this purpose if there has been no activity for at least one week:
- The current "PRs ready for review" or "PRs already reviewed" threads in the [NixOS Discourse](https://discourse.nixos.org/c/dev/14).
- The [Nixpkgs Review Requests Matrix room](https://matrix.to/#/#review-requests:nixos.org).
- Similar threads/rooms in unofficial NixOS spaces, such as Discord.
### CI failed or got stuck on my PR, what do I do?
First, ensure that the failure is actually related to your change.
Sometimes, the CI system simply has a hiccup or the check was broken by someone else before.
Read through the error message; it's usually quite easy to tell whether it is caused by changes to the component you touched.
If it is indeed caused by your change, try to fix it.
Don't be afraid of asking for advice if you're uncertain how to do that, others might have fixed such issues already and can help you out.
Your PR will not be merged while CI is still failing.
ofborg builds can often get stuck, particularly in PRs targeting `staging` and in builders for the Darwin platform.
Reviewers will know how to handle them or when to ignore them.
Don't worry about it.
However, if there is a build failure and it was caused by your change, you need to investigate it.
If ofborg reveals the build to be broken on a platform that you don't have access to, consider setting your package's `meta.broken`, `meta.badPlatforms` or `meta.platforms` accordingly.
When in any doubt, please ask via comments or through one of the help channels.
## I received a review, how do I get it over the finish line?
Most likely, a reviewer wants you to change a few things or requires further input.
A reviewer may have taken a look at the code and it looked good to them ("Diff LGTM"), but they still need to be convinced of the artifact's quality.
They might also be waiting on input from other users or maintainers on whether the intention and direction of your PR makes sense.
If you know of people who could help clarify any of this, please bring the PR to their attention.
The current state of the PR is frequently not clearly communicated, so please don't hesitate to ask about it if it's unclear to you.
It's also possible for the reviewer to not be convinced that your PR is necessary or that the method you've chosen is the right one.
Please explain your intentions and reasoning to the committer in such a case.
There may be constraints you had to work with which they're not aware of or qualities of your approach that they didn't immediately notice.
If these weren't clear to the reviewer, that's a good sign you should explain them in your commit message or code comments!
There are some further pitfalls and realities to be aware of:
### Aim to reduce cycles
Be prepared for it to take a while for the reviewer to get back to you after you respond.
This is simply the reality of projects at the scale of Nixpkgs.
As such, make sure to respond to _all_ feedback at once.
It wastes everyone's time to wait for a couple of days just to have the reviewer need to remind you to address something they asked for.
### A reviewer requested a bunch of insubstantial changes
The people involved in Nixpkgs care about code quality.
Once in Nixpkgs, the code needs to be maintained for many years to come.
Therefore, you will likely be asked to do something different or adhere to a standard.
Sometimes however, they also care a bit too much and may ask you to adhere to a personal preference of theirs.
It's not always easy to tell whether or not the requested changes must be addressed.
Sometimes, another reviewer may even have a _conflicting_ opinion on some points.
It is convention to mark review comments that are not required to merge as nitpicks, but this is not always followed.
As the author, you should still take a look at these, as they will often reveal best practices and unwritten rules.
Those usually have good reasons behind them and you may want to pick them up as well.
Please keep in mind that reviewers always mean well.
Their intent is not to denounce your code, they want your code to be as good as it can be.
Through their experience, they may also take notice of a seemingly insignificant issue that has caused problems before.
Sometimes however, they can also get a bit carried away and become too perfectionistic.
If you feel some of the requests are unreasonable, out of scope, or merely a matter of personal preference, try to nicely ask the reviewers whether these requests are *critical* to the PR's success.
While we do have a set of [official standards for the Nix community](https://github.com/NixOS/rfcs), we don't have standards for everything and there are often multiple valid ways to achieve the same goal.
Unless there are standards forbidding the patterns used in your code or there are serious technical, maintainability or readability issues with your code, you can disregard these requests.
Please communicate this clearly though; a simple "I prefer it this way and see no major issue maintaining it" can save a lot of arguing.
If you are unsure about some change requests, please ask reviewers *why* they requested them.
This will usually reveal how important they deem it to be and will help educate you about standards, best practices, unwritten rules as well as preferences people have and why.
Some committers have stronger opinions on some things and may not want to merge your PR if you don't follow their requests.
It is totally fine to get yourself a second or third opinion in such a case.
### Committers work on a push-basis
It's possible for you to get a review but nothing happens afterwards, even if you respond to review comments.
A committer not following up on your PR does not necessarily mean they're disinterested, they may have simply had other circumstances preventing them from doing so.
Committers typically handle many PRs at the same time and it is not realistic for them to keep up with all of them immediately.
If someone approved and didn't merge a few days later, they most likely just forgot.
Please see it as your responsibility to actively remind reviewers of your open PRs.
The easiest way to do so is to notify them via GitHub.
GitHub notifies people involved, whenever you add a comment or push to your PR or re-request their review.
Doing any of that will get their attention again.
Everyone deserves proper attention, and yes, that includes you!
However, please be mindful that committers can sadly not always give everyone the attention they deserve.
It may very well be the case that you have to do this every time you need the committer to follow up upon your PR.
Again, this is a community project so please be mindful of people's circumstances here; be nice when requesting reviews again.
It may also be the case that the committer has lost interest or isn't familiar enough with the component you're touching to be comfortable to merge.
They will likely not immediately state that fact, so please ask for clarification and don't hesitate to find yourself another committer to take a look.
### Nothing helped
If you followed these guidelines but still got no results or if you feel that you have been wronged, please explicitly reach out to the greater community.
The [NixOS Discourse](https://discourse.nixos.org) is a great place to do this, as it has historically been the asynchronous medium with the greatest concentration of committers and other people who are involved in Nixpkgs.
There is a dedicated discourse thread [PRs in distress](https://discourse.nixos.org/t/prs-in-distress/3604) where you can link your PR, if everything else fails.
The [Nixpkgs / NixOS contributions Matrix channel](https://matrix.to/#/#dev:nixos.org) is the best synchronous channel with the same qualities.
Please reserve these for cases where you've made a serious effort in trying to get the attention of multiple active committers and provided realistic means for them to assess your PR's quality.
As mentioned previously, it is unfortunately perfectly normal for a PR to sit around for weeks.
Please don't blow up situations where progress is happening but is merely not going fast enough for your tastes.
Honking in a traffic jam will not make you go any faster.
# Automation/AI policy
Every contribution to Nixpkgs and related development venues, including code, documentation, and communication on GitHub and Matrix, must have a **responsible person in the loop** who is accountable for that contribution and reviews it before submission, and must **transparently disclose** any nontrivial use of automation to produce it, including but not limited to LLMbased AI tools.
The following sections give more detail.
## Scope
Any use of automated tools to generate nontrivial amounts of output as part of a contribution, in whole or in part, verbatim or edited, is covered by this policy, except as listed in the Exemptions section.
Both LLMbased AI tools and handwritten automation are covered.
Contributions include code and documentation in commits, commit messages, pull request summaries and reviews, issue and vulnerability reports, GitHub comments, Matrix messages, and Discourse posts.
The covered venues are the GitHub repositories for Nixpkgs and [related projects](https://github.com/orgs/NixOS/teams/nixpkgs-core/repositories) under the jurisdiction of the Nixpkgs core team, Matrix rooms that are focused on development of those projects, and Discourse topics about Nixpkgs development.
## Accountability
Everyone who submits a contribution to Nixpkgs is responsible for it, regardless of the use of automated tooling.
Before submission, they must establish a reasonable level of understanding of the contribution and expectation of its correctness.
A contributor submitting a contribution intended for inclusion in Nixpkgs is also responsible for ensuring that it is [appropriately licensed](https://github.com/NixOS/nixpkgs/blob/master/COPYING) and credited, and not encumbered by any incompatible copyright.
When output from automated tooling is used in contributions, a contributor must establish confidence in that output.
This can be achieved by establishing confidence in the correctness of the toolings logic, manual review of the included output, or using further automation to verify the output (e.g. programmatically checking whether a refactor avoids causing rebuilds).
As the inner workings of LLMbased AI tools cannot be sufficiently understood at present, only the latter two options are available when those are used; vibe coding without review is not permitted.
When automation is used to verify output, the verification tooling itself must be disclosed and reviewed in line with this policy.
This policy applies equally to any further discussion of a contribution.
Comments and reviews must separately satisfy the same requirements of understanding, review, and disclosure.
Contributors are expected to be able to answer questions about their contribution and respond to feedback appropriately, without simply forwarding messages back and forth to automated tools.
It is not permitted to submit automated contributions without any manual review or intervention, outside of standard community automation.
Automation without any manual review must not be used as the sole arbiter of whether to merge a change.
## Transparency
All covered use of automated tooling for a contribution must be disclosed as part of that contribution.
In the case of LLMbased AI tooling used for commits, this **must** be in the form of an `Assisted-by:` Git commit trailer, including at least the tool name and the primary model name and version used for the contribution.
A `Co-authored-by:` trailer does not satisfy this policy.
Any adequate form of disclosure is permitted for other kinds of tooling and contribution.
Pull request summaries and review comments must be disclosed separately to commits.
## Exemptions
The following situations are fully or partially exempt:
* Use of standard deterministic editor/IDE/formatter/text transformation tooling to produce changes that the author manually reviews and understands is exempt, including inline “autocompletion” (even if LLMbased) of short, rote snippets of text that do not contribute anything beyond boilerplate the author would have written anyway.
* Use of standard community automation is exempt, such as `nix-update`, the official Nixpkgs CI bots, the @r-ryantm update bot, other maintainerapproved bots that run update scripts, and the Nixpkgs security tracker bot.
* Use of AI tools for research, testing, debugging, or private review is out of scope, if no substantial amount of their output is included in the resulting contribution.
However, if these tools had a significant technical influence on your contribution, you are still responsible for it per the Accountability section, and are expected to disclose this where relevant.
* Use of machine translation is exempt from the requirement to understand the translated output.
However, the requirements of appropriate confidence in the original text, responsibility, and disclosure still apply, and you are encouraged to additionally include the original untranslated contribution.
* Use of automation in a contribution clearly marked as not being ready for merge (e.g. a draft pull request) is exempt from the requirement for full selfreview, as long as some amount of review has been done and it is expected that the requirements will be met by the time it is marked as ready.
This does not waive any other requirement.
* Use of automated tools to develop upstream software packaged inside Nixpkgs is not in scope.
## Enforcement
If you believe that someone is using automation without appropriate disclosure and review, you can politely ask them if thats the case and point them to this policy as appropriate.
Please assume good faith and remain civil; its not always possible to determine, and it is more likely that someone overlooked this policy than deliberately violated it.
If you think someone is continuing to break the policy after this, please escalate to the [Nixpkgs core team](https://nixos.org/community/teams/nixpkgs-core/) rather than fighting over it.
If a contribution is clearly in violation of the policy (e.g. the contributor admits it was not followed, or there are AI tool attributions that do not meet our required format), it can be closed or hidden, preferably after informing the contributor of the policy and giving them a chance to address the violations.
Deliberate violations of this policy are considered to break the [Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) clause against “Wasting other peoples time with low quality contributions, including but not limited to LLM and bot spam”.
Repeated violations are grounds for further moderation action.
## Credits
This policy takes inspiration from similar policies in [LLVM](https://llvm.org/docs/AIToolPolicy.html), [Mesa](https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-26.1.0-rc1/docs/submittingpatches.rst?ref_type=tags), [Fedora](https://docs.fedoraproject.org/en-US/council/policy/ai-contribution-policy/), and the [Linux kernel](https://docs.kernel.org/7.0/process/coding-assistants.html), along with [a proposal by the author of Anubis](https://xeiaso.net/notes/2025/assisted-by-footer/).

View File

@@ -1,4 +1,4 @@
Copyright (c) 2003-2026 Eelco Dolstra and the Nixpkgs/NixOS contributors
Copyright (c) 2003-2019 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

103
README.md
View File

@@ -1,76 +1,103 @@
<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">
</picture>
</a>
<a href="https://nixos.org/nixos"><img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="NixOS logo" /></a>
</p>
<p align="center">
<a href="CONTRIBUTING.md"><img src="https://img.shields.io/github/contributors-anon/NixOS/nixpkgs" alt="Contributors badge" /></a>
<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>
<a href="https://www.codetriage.com/nixos/nixpkgs"><img src="https://www.codetriage.com/nixos/nixpkgs/badges/users.svg" alt="Code Triagers badge" /></a>
<a href="https://opencollective.com/nixos"><img src="https://opencollective.com/nixos/tiers/supporter/badge.svg?label=Supporter&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
40,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
* [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution
* [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions
* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expressions (programs), and how to use Nix command line tools
* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expresssions (programs), and how to use Nix command line tools
# Community
* [Discourse Forum](https://discourse.nixos.org/)
* [Matrix Chat](https://matrix.to/#/#space: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.)
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)
* [NixOS Weekly](https://weekly.nixos.org/)
* [Community-maintained wiki](https://nixos.wiki/)
# 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 offical 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
* [nixos-hardware](https://github.com/NixOS/nixos-hardware) - NixOS profiles to optimize settings for different hardware
* [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 19.09 release](https://hydra.nixos.org/jobset/nixos/release-19.09)
* [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 19.09 release](https://hydra.nixos.org/job/nixos/release-19.09/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://nixos.org/nix/manual/#sec-channels). The channels
are provided via a read-only mirror of the Nixpkgs repository called
[nixpkgs-channels](https://github.com/NixOS/nixpkgs-channels).
# 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 over 40,000 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. When pull requests are made, our tooling automation bot,
[OfBorg](https://github.com/NixOS/ofborg) will perform various checks
to help ensure expression quality.
For more information about contributing to the project, please visit the [contributing page](CONTRIBUTING.md).
The *Nixpkgs maintainers* are people who have assigned themselves to
maintain specific individual packages. We encourage people who care
about a package to assign themselves as a maintainer. When a pull
request is made against a package, OfBorg will notify the appropriate
maintainer(s). The *Nixpkgs committers* are people who have been given
permission to merge.
Most contributions are based on and merged into these branches:
* `master` is the main branch where all small contributions go
* `staging` is branched from master, changes that have a big impact on
Hydra builds go to this branch
* `staging-next` is branched from staging and only fixes to stabilize
and security fixes with a big impact on Hydra builds should be
contributed to this branch. This branch is merged into master when
deemed of sufficiently high quality
For more information about contributing to the project, please visit
the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/.github/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 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 +105,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.

538
ci/OWNERS
View File

@@ -1,538 +0,0 @@
# This file is used to describe who owns what in this repository.
# Users/teams will get review requests for PRs that change their files.
#
# This file does not replace `meta.maintainers`
# but is instead used for other things than derivations and modules,
# like documentation, package sets, and other assets.
#
# This file uses the same syntax as the natively supported CODEOWNERS file,
# see https://help.github.com/articles/about-codeowners/ for documentation.
# However it comes with some notable differences:
# - There is no need for user/team listed here to have write access.
# - No reviews will be requested for PRs that target the wrong base branch.
#
# Processing of this file is implemented in workflows/codeowners-v2.yml
# CI
/.github/*_TEMPLATE* @SigmaSquadron
/.github/actions @NixOS/nixpkgs-ci
/.github/workflows @NixOS/nixpkgs-ci
/ci @NixOS/nixpkgs-ci
/ci/OWNERS @infinisil @philiptaron
# Development support
/.editorconfig @Mic92
/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/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
/lib/options.nix @infinisil @roberth @hsjobeki
/lib/tests/modules.sh @infinisil @roberth @hsjobeki
/lib/tests/modules @infinisil @roberth @hsjobeki
# Nixpkgs Internals
/default.nix @Ericson2314
/pkgs/top-level/default.nix @Ericson2314
/pkgs/top-level/impure.nix @Ericson2314
/pkgs/top-level/stage.nix @Ericson2314
/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/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
# Nixpkgs make-disk-image
/doc/build-helpers/images/makediskimage.section.md @raitobezarius
/nixos/lib/make-disk-image.nix @raitobezarius
# Nix, the package manager
# @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
# Nixpkgs documentation
/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
/maintainers/scripts/doc @jtojnar @ryantm
# Contributor documentation
/CONTRIBUTING.md @infinisil
/.github/PULL_REQUEST_TEMPLATE.md @infinisil
/doc/contributing/ @infinisil
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @infinisil
/lib/README.md @infinisil
/doc/README.md @infinisil
/nixos/README.md @infinisil
/pkgs/README.md @infinisil
/pkgs/by-name/README.md @infinisil
/maintainers/README.md @infinisil
# User-facing development documentation
/doc/development.md @infinisil
/doc/development @infinisil
# NixOS Internals
/nixos/default.nix @infinisil
/nixos/lib/from-env.nix @infinisil
/nixos/lib/eval-config.nix @infinisil
/nixos/modules/misc/ids.nix @R-VdP
/nixos/modules/system/activation/bootspec.nix @grahamc @cole-h @raitobezarius
/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
# 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
# ACME
/nixos/modules/security/acme @NixOS/acme
# Systemd
/nixos/modules/system/boot/systemd.nix @NixOS/systemd
/nixos/modules/system/boot/systemd @NixOS/systemd
/nixos/lib/systemd-*.nix @NixOS/systemd
/pkgs/os-specific/linux/systemd @NixOS/systemd
# Systemd-boot
/nixos/modules/system/boot/loader/systemd-boot @JulienMalka
# Limine
/nixos/modules/system/boot/loader/limine @lzcunt @programmerlexi @johnrtitor
/nixos/tests/limine @johnrtitor
# Images and installer media
/nixos/modules/profiles/installation-device.nix @ElvishJerricco
/nixos/modules/installer/cd-dvd/ @ElvishJerricco
/nixos/modules/installer/sd-card/
# Amazon
/nixos/modules/virtualisation/amazon-init.nix @arianvp
/nixos/modules/virtualisation/ec2-data.nix @arianvp
/nixos/modules/virtualisation/amazon-options.nix @arianvp
/nixos/modules/virtualisation/amazon-image.nix @arianvp
/nixos/maintainers/scripts/ec2/ @arianvp
/nixos/modules/services/misc/amazon-ssm-agent.nix @arianvp
/nixos/tests/amazon-ssm-agent.nix @arianvp
/nixos/modules/system/boot/grow-partition.nix @arianvp
/nixos/modules/services/monitoring/amazon-cloudwatch-agent.nix @philipmw
/nixos/tests/amazon-cloudwatch-agent.nix @philipmw
# Monitoring
/nixos/modules/services/monitoring/fluent-bit.nix @arianvp
/nixos/tests/fluent-bit.nix @arianvp
# nixos-rebuild-ng
/pkgs/by-name/ni/nixos-rebuild-ng @thiagokokada
# Updaters
## update.nix
/maintainers/scripts/update.nix @jtojnar
/maintainers/scripts/update.py @jtojnar
## 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
# 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
# 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/build-support/rust/fetch-cargo-vendor* @TomaSajt
/doc/languages-frameworks/rust.section.md @winterqt
# Tcl
/pkgs/development/interpreters/tcl @fgaz
/pkgs/development/libraries/tk @fgaz
/pkgs/top-level/tcl-packages.nix @fgaz
/pkgs/development/tcl-modules @fgaz
/doc/languages-frameworks/tcl.section.md @fgaz
# C compilers
/pkgs/development/compilers/gcc
/pkgs/development/compilers/llvm @NixOS/llvm
/pkgs/development/compilers/emscripten @raitobezarius
/doc/toolchains/llvm.chapter.md @NixOS/llvm
/doc/languages-frameworks/emscripten.section.md @raitobezarius
# Audio
/nixos/modules/services/audio/botamusique.nix @mweinelt
/nixos/modules/services/audio/snapserver.nix @mweinelt
/nixos/tests/botamusique.nix @mweinelt
/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/chromium @emilylange @networkException
/nixos/tests/chromium.nix @emilylange @networkException
# Certificate Authorities
pkgs/by-name/ca/cacert @ajs124 @lukegb @mweinelt
pkgs/development/libraries/nss/ @ajs124 @lukegb @mweinelt
pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
# Java
/doc/languages-frameworks/java.section.md @NixOS/java
/doc/languages-frameworks/gradle.section.md @NixOS/java
/doc/languages-frameworks/maven.section.md @NixOS/java
/nixos/modules/programs/java.nix @NixOS/java
/pkgs/top-level/java-packages.nix @NixOS/java
# Jetbrains
/pkgs/applications/editors/jetbrains @leona-ya @theCapypara
# Licenses
/lib/licenses @alyssais @emilazy @jopejoe1
# Qt
/pkgs/development/libraries/qt-5 @K900 @NickCao @SuperSandro2000
/pkgs/development/libraries/qt-6 @K900 @NickCao @SuperSandro2000
# KDE Frameworks 5
/pkgs/development/libraries/kde-frameworks @K900 @NickCao @SuperSandro2000
# KDE / Plasma 6
/pkgs/kde @K900 @NickCao @SuperSandro2000
/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000
# PostgreSQL and related stuff
/pkgs/by-name/po/postgresqlTestHook @NixOS/postgres
/pkgs/by-name/ps/psqlodbc @NixOS/postgres
/pkgs/servers/sql/postgresql @NixOS/postgres
/pkgs/development/tools/rust/cargo-pgrx @NixOS/postgres
/nixos/modules/services/databases/postgresql.md @NixOS/postgres
/nixos/modules/services/databases/postgresql.nix @NixOS/postgres
/nixos/tests/postgresql @NixOS/postgres
# MySQL/MariaDB and related stuff
/nixos/modules/services/databases/mysql.nix @6543
/nixos/modules/services/backup/mysql-backup.nix @6543
# Home Automation
/nixos/modules/services/home-automation/home-assistant.nix @mweinelt
/nixos/modules/services/home-automation/zigbee2mqtt.nix @mweinelt
/nixos/tests/home-assistant.nix @mweinelt
/nixos/tests/zigbee2mqtt.nix @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
/pkgs/by-name/op/openntpd @thoughtpolice
/nixos/modules/services/networking/ntp @thoughtpolice
# Network
/pkgs/by-name/ke/kea @mweinelt
/pkgs/by-name/ba/babeld @mweinelt
/nixos/modules/services/networking/babeld.nix @mweinelt
/nixos/modules/services/networking/kea.nix @mweinelt
/nixos/modules/services/networking/knot.nix @mweinelt
/nixos/modules/services/monitoring/prometheus/exporters/kea.nix @mweinelt
/nixos/tests/babeld.nix @mweinelt
/nixos/tests/kea.nix @mweinelt
/nixos/tests/knot.nix @mweinelt
# Web servers
/doc/packages/nginx.section.md @raitobezarius
/pkgs/servers/http/nginx/ @raitobezarius
/nixos/modules/services/web-servers/nginx/ @raitobezarius
# D
/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
# Idris
/pkgs/development/idris-modules @Infinisil
/pkgs/development/compilers/idris2 @mattpolzin
# NixOS modules for e-mail and dns services
/nixos/modules/services/mail/mailman.nix @peti
/nixos/modules/services/mail/postfix.nix @peti
/nixos/modules/services/networking/bind.nix @peti
/nixos/modules/services/mail/rspamd.nix @peti
# Emacs
/pkgs/applications/editors/emacs/elisp-packages @NixOS/emacs
/pkgs/applications/editors/emacs @NixOS/emacs
/pkgs/top-level/emacs-packages.nix @NixOS/emacs
/doc/packages/emacs.section.md @NixOS/emacs
/nixos/modules/services/editors/emacs.md @NixOS/emacs
# Kakoune
/pkgs/applications/editors/kakoune @philiptaron
# LuaPackages
/pkgs/development/lua-modules @NixOS/lua
# Neovim
/pkgs/applications/editors/neovim @NixOS/neovim
# 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
# Docker tools
/pkgs/build-support/docker @roberth @jhol
/nixos/tests/docker-tools* @roberth @jhol
/doc/build-helpers/images/dockertools.section.md @roberth @jhol
# 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
# GNOME
/pkgs/desktops/gnome @jtojnar
/pkgs/desktops/gnome/extensions @jtojnar
/pkgs/build-support/make-hardcode-gsettings-patch @jtojnar
# Cinnamon
/pkgs/by-name/ci/cinnamon-* @mkg20001
/pkgs/by-name/cj/cjs @mkg20001
/pkgs/by-name/mu/muffin @mkg20001
/pkgs/by-name/ne/nemo @mkg20001
/pkgs/by-name/ne/nemo-* @mkg20001
# Xfce
/doc/hooks/xfce4-dev-tools.section.md @NixOS/xfce
# terraform providers
/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
# Dotnet
/pkgs/build-support/dotnet @corngood
/pkgs/development/compilers/dotnet @corngood
/pkgs/test/dotnet @corngood
/doc/languages-frameworks/dotnet.section.md @corngood
# Node.js
/pkgs/build-support/node/build-npm-package @winterqt
/pkgs/build-support/node/prefetch-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
/pkgs/development/compilers/ocaml @ulrikstrid
/pkgs/development/ocaml-modules @ulrikstrid
# ZFS
/nixos/modules/tasks/filesystems/zfs.nix @adamcstephens @amarshall
/nixos/tests/zfs.nix @adamcstephens @amarshall
/pkgs/os-specific/linux/zfs @adamcstephens @amarshall
# Zig
/pkgs/development/compilers/zig @RossComputerGuy
/doc/hooks/zig.section.md @RossComputerGuy
# Buildbot
nixos/modules/services/continuous-integration/buildbot @Mic92 @zowoq
nixos/tests/buildbot.nix @Mic92 @zowoq
pkgs/development/tools/continuous-integration/buildbot @Mic92 @zowoq
# Pretix
pkgs/by-name/pr/pretix/ @mweinelt
pkgs/by-name/pr/pretalx/ @mweinelt
nixos/modules/services/web-apps/pretix.nix @mweinelt
nixos/modules/services/web-apps/pretalx.nix @mweinelt
nixos/tests/web-apps/pretix.nix @mweinelt
nixos/tests/web-apps/pretalx.nix @mweinelt
# incus/lxc
nixos/maintainers/scripts/incus/ @adamcstephens
nixos/modules/virtualisation/incus.nix @adamcstephens
nixos/modules/virtualisation/lxc* @adamcstephens
nixos/tests/incus/ @adamcstephens
pkgs/by-name/in/incus/ @adamcstephens
pkgs/by-name/lx/lxc* @adamcstephens
# ExpidusOS, Flutter
/pkgs/development/compilers/flutter @RossComputerGuy
/pkgs/desktops/expidus @RossComputerGuy
# GNU Tar & Zip
/pkgs/by-name/gn/gnutar @RossComputerGuy
/pkgs/by-name/zi/zip @RossComputerGuy
# SELinux
/pkgs/by-name/ch/checkpolicy @RossComputerGuy
/pkgs/by-name/li/libselinux @RossComputerGuy
/pkgs/by-name/li/libsepol @RossComputerGuy
# installShellFiles
/pkgs/by-name/in/installShellFiles/* @Ericson2314
/pkgs/test/install-shell-files/* @Ericson2314
/doc/hooks/installShellFiles.section.md @Ericson2314
# Darwin
/pkgs/by-name/ap/apple-sdk @NixOS/darwin-core
/pkgs/os-specific/darwin @NixOS/darwin-core
/pkgs/stdenv/darwin @NixOS/darwin-core
# BEAM
pkgs/development/beam-modules/ @NixOS/beam
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
# 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

View File

@@ -1,106 +0,0 @@
# CI support files
This directory contains files to support CI, such as [GitHub Actions](https://github.com/NixOS/nixpkgs/tree/master/.github/workflows) and [Ofborg](https://github.com/nixos/ofborg).
This is in contrast with [`maintainers/scripts`](../maintainers/scripts) which is for human use instead.
## 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.
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.
## `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.
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>.
# Branch classification
For the purposes of CI, branches in the NixOS/nixpkgs repository are classified as follows:
- **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.
Some branches also have a version component, which is either `unstable` or `YY.MM`.
`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.
[@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

View File

@@ -1,31 +0,0 @@
{
buildGoModule,
fetchFromGitHub,
fetchpatch,
}:
buildGoModule {
name = "codeowners-validator";
src = fetchFromGitHub {
owner = "mszostok";
repo = "codeowners-validator";
rev = "f3651e3810802a37bd965e6a9a7210728179d076";
hash = "sha256-5aSmmRTsOuPcVLWfDF6EBz+6+/Qpbj66udAmi1CLmWQ=";
};
patches = [
# https://github.com/mszostok/codeowners-validator/pull/222
(fetchpatch {
name = "user-write-access-check";
url = "https://github.com/mszostok/codeowners-validator/compare/f3651e3810802a37bd965e6a9a7210728179d076...840eeb88b4da92bda3e13c838f67f6540b9e8529.patch";
hash = "sha256-t3Dtt8SP9nbO3gBrM0nRE7+G6N/ZIaczDyVHYAG/6mU=";
})
# 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
# that breaks tokens generated for GitHub Apps.
./permissions.patch
# Allows setting a custom CODEOWNERS path using the OWNERS_FILE env var
./owners-file-name.patch
];
postPatch = "rm -r docs/investigation";
vendorHash = "sha256-R+pW3xcfpkTRqfS2ETVOwG8PZr0iH5ewroiF7u8hcYI=";
}

View File

@@ -1,15 +0,0 @@
diff --git a/pkg/codeowners/owners.go b/pkg/codeowners/owners.go
index 6910bd2..e0c95e9 100644
--- a/pkg/codeowners/owners.go
+++ b/pkg/codeowners/owners.go
@@ -39,6 +39,10 @@ func NewFromPath(repoPath string) ([]Entry, error) {
// openCodeownersFile finds a CODEOWNERS file and returns content.
// see: https://help.github.com/articles/about-code-owners/#codeowners-file-location
func openCodeownersFile(dir string) (io.Reader, error) {
+ if file, ok := os.LookupEnv("OWNERS_FILE"); ok {
+ return fs.Open(file)
+ }
+
var detectedFiles []string
for _, p := range []string{".", "docs", ".github"} {
pth := path.Join(dir, p)

View File

@@ -1,36 +0,0 @@
diff --git a/internal/check/valid_owner.go b/internal/check/valid_owner.go
index a264bcc..610eda8 100644
--- a/internal/check/valid_owner.go
+++ b/internal/check/valid_owner.go
@@ -16,7 +16,6 @@ import (
const scopeHeader = "X-OAuth-Scopes"
var reqScopes = map[github.Scope]struct{}{
- github.ScopeReadOrg: {},
}
type ValidOwnerConfig struct {
@@ -223,10 +222,7 @@ func (v *ValidOwner) validateTeam(ctx context.Context, name string) *validateErr
for _, t := range v.repoTeams {
// GitHub normalizes name before comparison
if strings.EqualFold(t.GetSlug(), team) {
- if t.Permissions["push"] {
- return nil
- }
- return newValidateError("Team %q cannot review PRs on %q as neither it nor any parent team has write permissions.", team, v.orgRepoName)
+ return nil
}
}
@@ -245,10 +241,7 @@ func (v *ValidOwner) validateGitHubUser(ctx context.Context, name string) *valid
for _, u := range v.repoUsers {
// GitHub normalizes name before comparison
if strings.EqualFold(u.GetLogin(), userName) {
- if u.Permissions["push"] {
- return nil
- }
- return newValidateError("User %q cannot review PRs on %q as they don't have write permissions.", userName, v.orgRepoName)
+ return nil
}
}

View File

@@ -1,205 +0,0 @@
let
pinned = (builtins.fromJSON (builtins.readFile ./pinned.json)).pins;
in
{
system ? builtins.currentSystem,
nixpkgs ? null,
nixPath ? "nixVersions.latest",
}:
let
nixpkgs' =
if nixpkgs == null then
fetchTarball {
inherit (pinned.nixpkgs) url;
sha256 = pinned.nixpkgs.hash;
}
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;
};
fmt =
let
treefmtNixSrc = fetchTarball {
inherit (pinned.treefmt-nix) url;
sha256 = pinned.treefmt-nix.hash;
};
treefmtEval = (import treefmtNixSrc).evalModule pkgs {
# Important: The auto-rebase script uses `git filter-branch --tree-filter`,
# which creates trees within the Git repository under `.git-rewrite/t`,
# notably without having a `.git` themselves.
# So if this projectRootFile were the default `.git/config`,
# having the auto-rebase script use treefmt on such a tree would make it
# format all files in the _parent_ Git tree as well.
projectRootFile = ".git-blame-ignore-revs";
# Be a bit more verbose by default, so we can see progress happening
settings.verbose = 1;
# By default it's info, which is too noisy since we have many unmatched files
settings.on-unmatched = "debug";
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.
# 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"
];
};
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"
];
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 {
root = ../.;
fileset = fs.difference ../. (fs.maybeMissing ../.git);
};
in
{
shell = treefmtEval.config.build.devShell;
pkg = treefmtEval.config.build.wrapper;
check = treefmtEval.config.build.check nixFilesSrc;
};
in
rec {
inherit pkgs fmt;
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;
};
# 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;
};
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; };
lix = pkgs.callPackage ./parse.nix { nix = pkgs.lix; };
lix_latest = pkgs.callPackage ./parse.nix { nix = pkgs.lixPackageSets.latest.lix; };
};
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

@@ -1,48 +0,0 @@
# Nixpkgs CI evaluation
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:
```
nix-build ci -A eval.baseline
```
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`
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`
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,317 +0,0 @@
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
def flatten_data(json_data: dict) -> dict:
"""
Extracts and flattens metrics from JSON data.
This is needed because the JSON data can be nested.
For example, the JSON data entry might look like this:
"gc":{"cycles":13,"heapSize":5404549120,"totalBytes":9545876464}
Flattened:
"gc.cycles": 13
"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"
)
return flat_metrics
def load_all_metrics(path: 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.
Args:
path (Path): Directory containing JSON files or a stats JSON file.
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 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 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
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:
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,
)
updated = []
equivalent = []
for key in all_keys:
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
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:
pct_change = 100 * diff / 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),
)
# 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)
if __name__ == "__main__":
main()

View File

@@ -1,309 +0,0 @@
{
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,
touchedFilesJson,
ownersFile ? ../../OWNERS,
}:
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.
They can be obtained by running `nix-build -A ci.eval.full` on both revisions.
---
Outputs:
- changed-paths.json: Various information about the changes:
{
attrdiff: {
added: ["package1"],
changed: ["package2", "package3", "package4"],
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
},
rebuildsByKernel: {
darwin: ["package1", "package2"],
linux: ["package1", "package2", "package3"]
},
rebuildCountByKernel: {
darwin: 2,
linux: 3,
},
rebuildsByPlatform: {
aarch64-darwin: ["package1", "package2"],
aarch64-linux: ["package1", "package2"],
x86_64-linux: ["package1", "package2", "package3"],
x86_64-darwin: ["package1"],
},
}
- step-summary.md: A markdown render of the changes
---
Implementation details:
Helper functions can be found in ./utils.nix.
Two main "types" are important:
- `packagePlatformPath`: A string of the form "<PACKAGE_PATH>.<PLATFORM>"
Example: "python312Packages.numpy.x86_64-linux"
- `packagePlatformAttr`: An attrs representation of a packagePlatformPath:
Example: { name = "python312Packages.numpy"; platform = "x86_64-linux"; }
*/
inherit (import ./utils.nix { inherit lib; })
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");
rebuildsPackagePlatformAttrs = convertToPackagePlatformAttrs diffAttrs.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;
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;
};
}
);
getMaintainers = callPackage ./maintainers.nix { };
inherit
(getMaintainers {
affectedAttrPaths = map (a: a.packagePath) (
convertToPackagePlatformAttrs (diffAttrs.changed ++ diffAttrs.removed)
);
changedFiles = lib.importJSON touchedFilesJson;
})
users
teams
packages
;
in
runCommand "compare"
{
# Don't depend on -dev outputs to reduce closure size for CI.
nativeBuildInputs = map lib.getBin [
jq
cmp-stats
codeowners
];
users = builtins.toJSON users;
teams = builtins.toJSON teams;
packages = builtins.toJSON (lib.map (lib.concatStringsSep ".") packages);
passAsFile = [
"users"
"teams"
"packages"
];
}
''
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
# We cannot generate a performance comparison
{
echo
echo "# Performance comparison"
echo
echo "This compares the performance of this branch against its pull request base branch (e.g., 'master')"
echo
echo "For further help please refer to: [ci/README.md](https://github.com/NixOS/nixpkgs/blob/master/ci/README.md)"
echo
} >> $out/step-summary.md
cmp-stats --explain ${combined}/before/stats ${combined}/after/stats >> $out/step-summary.md
else
# Package chunks are the same in both revisions
# We can use the to generate a performance comparison
{
echo
echo "# Performance Comparison"
echo
echo "Performance stats were skipped because the package sets differ between the two revisions."
echo
echo "For further help please refer to: [ci/README.md](https://github.com/NixOS/nixpkgs/blob/master/ci/README.md)"
} >> $out/step-summary.md
fi
jq -r '.[]' "${touchedFilesJson}" > ./touched-files
readarray -t touchedFiles < ./touched-files
echo "This PR touches ''${#touchedFiles[@]} files"
# 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"
''

View File

@@ -1,30 +0,0 @@
def truncate(xs; n):
if xs | length > n then xs[:n] + ["..."]
else xs
end;
def itemize_packages(xs):
truncate(xs; 2000) |
map("- [\(.)](https://search.nixos.org/packages?channel=unstable&show=\(.)&from=0&size=50&sort=relevance&type=packages&query=\(.))") |
join("\n");
def get_title(s; xs):
s + " (" + (xs | length | tostring) + ")";
def section(title; xs):
"<details> <summary>" + get_title(title; xs) + "</summary>\n\n" + itemize_packages(xs) + "</details>";
def fallback_document(content; n):
if content | utf8bytelength > n then
get_title("Added packages"; .attrdiff.added) + "\n\n" +
get_title("Removed packages"; .attrdiff.removed) + "\n\n" +
get_title("Changed packages"; .attrdiff.changed)
else content
end;
# we truncate the list to stay below the GitHub limit of 1MB per step summary.
fallback_document(
section("Added packages"; .attrdiff.added) + "\n\n" +
section("Removed packages"; .attrdiff.removed) + "\n\n" +
section("Changed packages"; .attrdiff.changed); 1000 * 1000
)

View File

@@ -1,159 +0,0 @@
# 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
{
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 = [ ];
},
}:
let
nixpkgsRoot = toString ../../.. + "/";
stripNixpkgsRootFromKeys = lib.mapAttrs' (
file: value: lib.nameValuePair (lib.removePrefix nixpkgsRoot file) value
);
moduleMeta = (pkgs.nixos { }).config.meta;
# 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: lib.any (lib.hasPrefix filename) changedFiles;
anyMatchingFiles = files: lib.any anyMatchingFile files;
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) [
# 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"
# attribute.
#
# ".meta.position" has the following form:
# "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); }
]
)
));
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;
# 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))
];
# An attribute can appear in affected *and* touched
attrPathsToGetMaintainersFor = lib.unique (relevantAffectedAttrPaths ++ changedByNameAttrPaths);
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;
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)))
];
in
{
users = byUser;
teams = byTeam;
packages = attrPathsToGetMaintainersFor;
}

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

@@ -1,239 +0,0 @@
{ lib, ... }:
rec {
# Borrowed from https://github.com/NixOS/nixpkgs/pull/355616
uniqueStrings = list: builtins.attrNames (builtins.groupBy lib.id list);
/*
Converts a `packagePlatformPath` into a `packagePlatformAttr`
Turns
"hello.aarch64-linux"
into
{
name = "hello";
packagePath = [ "hello" ];
platform = "aarch64-linux";
}
*/
convertToPackagePlatformAttr =
packagePlatformPath:
let
# python312Packages.numpy.aarch64-linux -> ["python312Packages" "numpy" "aarch64-linux"]
splittedPath = lib.splitString "." packagePlatformPath;
# ["python312Packages" "numpy" "aarch64-linux"] -> ["python312Packages" "numpy"]
packagePath = lib.init splittedPath;
# "python312Packages.numpy"
name = lib.concatStringsSep "." packagePath;
in
if name == "" then
null
else
{
# [ "python312Packages" "numpy" ]
inherit packagePath;
# python312Packages.numpy
inherit name;
# "aarch64-linux"
platform = lib.last splittedPath;
};
/*
Converts a list of `packagePlatformPath`s into a list of `packagePlatformAttr`s
Turns
[
"hello.aarch64-linux"
"hello.x86_64-linux"
"hello.aarch64-darwin"
"hello.x86_64-darwin"
"bye.x86_64-darwin"
"bye.aarch64-darwin"
"release-checks" <- Will be dropped
]
into
[
{ name = "hello"; platform = "aarch64-linux"; packagePath = [ "hello" ]; }
{ name = "hello"; platform = "x86_64-linux"; packagePath = [ "hello" ]; }
{ name = "hello"; platform = "aarch64-darwin"; packagePath = [ "hello" ]; }
{ name = "hello"; platform = "x86_64-darwin"; packagePath = [ "hello" ]; }
{ name = "bye"; platform = "aarch64-darwin"; packagePath = [ "hello" ]; }
{ name = "bye"; platform = "x86_64-darwin"; packagePath = [ "hello" ]; }
]
*/
convertToPackagePlatformAttrs =
packagePlatformPaths:
builtins.filter (x: x != null) (map convertToPackagePlatformAttr packagePlatformPaths);
/*
Converts a list of `packagePlatformPath`s directly to a list of (unique) package names
Turns
[
"hello.aarch64-linux"
"hello.x86_64-linux"
"hello.aarch64-darwin"
"hello.x86_64-darwin"
"bye.x86_64-darwin"
"bye.aarch64-darwin"
]
into
[
"hello"
"bye"
]
*/
extractPackageNames =
packagePlatformPaths:
let
packagePlatformAttrs = convertToPackagePlatformAttrs (uniqueStrings packagePlatformPaths);
in
uniqueStrings (map (p: p.name) packagePlatformAttrs);
/*
Group a list of `packagePlatformAttr`s by platforms
Turns
[
{ name = "hello"; platform = "aarch64-linux"; ... }
{ name = "hello"; platform = "x86_64-linux"; ... }
{ name = "hello"; platform = "aarch64-darwin"; ... }
{ name = "hello"; platform = "x86_64-darwin"; ... }
{ name = "bye"; platform = "aarch64-darwin"; ... }
{ name = "bye"; platform = "x86_64-darwin"; ... }
]
into
{
aarch64-linux = [ "hello" ];
x86_64-linux = [ "hello" ];
aarch64-darwin = [ "hello" "bye" ];
x86_64-darwin = [ "hello" "bye" ];
}
*/
groupByPlatform =
packagePlatformAttrs:
let
packagePlatformAttrsByPlatform = builtins.groupBy (p: p.platform) packagePlatformAttrs;
extractPackageNames = map (p: p.name);
in
lib.mapAttrs (_: extractPackageNames) packagePlatformAttrsByPlatform;
# Turns
# [
# { name = "hello"; platform = "aarch64-linux"; ... }
# { name = "hello"; platform = "x86_64-linux"; ... }
# { name = "hello"; platform = "aarch64-darwin"; ... }
# { name = "hello"; platform = "x86_64-darwin"; ... }
# { name = "bye"; platform = "aarch64-darwin"; ... }
# { name = "bye"; platform = "x86_64-darwin"; ... }
# ]
#
# into
#
# {
# linux = [ "hello" ];
# darwin = [ "hello" "bye" ];
# }
groupByKernel =
packagePlatformAttrs:
let
filterKernel =
kernel:
builtins.attrNames (
builtins.groupBy (p: p.name) (
builtins.filter (p: lib.hasSuffix kernel p.platform) packagePlatformAttrs
)
);
in
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
Turns
{
linux = 56;
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;
# [...]
}
*/
getLabels =
rebuildCountByKernel:
lib.mergeAttrsList (
lib.mapAttrsToList (
kernel: rebuildCount:
let
range = from: to: from <= rebuildCount && (to == null || rebuildCount <= to);
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;
}
) rebuildCountByKernel
);
}

View File

@@ -1,326 +0,0 @@
# 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,
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 ? { },
}:
let
nixpkgs =
with lib.fileset;
toSource {
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"
]
);
};
supportedSystems = builtins.fromJSON (
builtins.readFile ../../pkgs/top-level/release-supported-systems.json
);
attrpathsSuperset =
{
evalSystem,
}:
runCommand "attrpaths-superset.json"
{
src = nixpkgs;
# Don't depend on -dev outputs to reduce closure size for CI.
nativeBuildInputs = map lib.getBin [
busybox
nix
];
}
''
export NIX_STATE_DIR=$(mktemp -d)
mkdir $out
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" \
-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
'';
singleSystem =
{
# 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,
# The path to the `paths.json` file from `attrpathsSuperset`
attrpathFile ? "${attrpathsSuperset { inherit evalSystem; }}/paths.json",
}:
let
singleChunk = writeShellScript "single-chunk" ''
set -euo pipefail
chunkSize=$1
myChunk=$2
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" \
--eval-system "$system" \
--option restrict-eval true \
--option allow-import-from-derivation false \
--query --available \
--out-path --json \
--meta \
--show-trace \
--arg chunkSize "$chunkSize" \
--arg myChunk "$myChunk" \
--arg attrpathFile "${attrpathFile}" \
--arg systems "[ \"$system\" ]" \
--arg includeBroken ${lib.boolToString includeBroken} \
--argstr extraNixpkgsConfigJson ${lib.escapeShellArg (builtins.toJSON extraNixpkgsConfig)} \
-I ${nixpkgs} \
-I ${attrpathFile} \
> "$outputDir/result/$myChunk" \
2> "$outputDir/stderr/$myChunk"
exitCode=$?
set -e
cat "$outputDir/stderr/$myChunk"
cat "$outputDir/timestats/$myChunk"
if (( exitCode != 0 )); then
echo "Evaluation failed with exit code $exitCode"
# This immediately halts all xargs processes
kill $PPID
elif [[ -s "$outputDir/stderr/$myChunk" ]]; then
echo "Nixpkgs on $system evaluated with warnings, aborting"
kill $PPID
fi
'';
in
runCommand "nixpkgs-eval-${evalSystem}"
{
# Don't depend on -dev outputs to reduce closure size for CI.
nativeBuildInputs = map lib.getBin [
busybox
jq
nix
];
env = {
inherit evalSystem chunkSize;
};
__structuredAttrs = true;
unsafeDiscardReferences.out = true;
}
''
export NIX_STATE_DIR=$(mktemp -d)
nix-store --init
echo "System: $evalSystem"
cores=$NIX_BUILD_CORES
echo "Cores: $cores"
attrCount=$(jq length "${attrpathFile}")
echo "Attribute count: $attrCount"
echo "Chunk size: $chunkSize"
# Same as `attrCount / chunkSize` but rounded up
chunkCount=$(( (attrCount - 1) / chunkSize + 1 ))
echo "Chunk count: $chunkCount"
mkdir -p $out/${evalSystem}
# 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"
if [[ ! -f "$out/${evalSystem}/min-avail-memory" ]] || (( availMemory < $(<$out/${evalSystem}/min-avail-memory) )); then
echo "$availMemory" > $out/${evalSystem}/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
fi
sleep 4
done
) &
seq_end=$(( chunkCount - 1 ))
${lib.optionalString quickTest ''
seq_end=0
''}
chunkOutputDir=$(mktemp -d)
mkdir "$chunkOutputDir"/{result,stats,timestats,stderr}
seq -w 0 "$seq_end" |
command time -f "%e" -o "$out/${evalSystem}/total-time" \
xargs -I{} -P"$cores" \
${singleChunk} "$chunkSize" {} "$evalSystem" "$chunkOutputDir"
cp -r "$chunkOutputDir"/stats $out/${evalSystem}/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
'';
diff = callPackage ./diff.nix { };
combine =
{
diffDir,
}:
runCommand "combined-eval"
{
# Don't depend on -dev outputs to reduce closure size for CI.
nativeBuildInputs = map lib.getBin [
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
# 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/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")
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;
};
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" "[ ]",
}:
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;
};
in
comparisonReport;
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
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;
}
)

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

@@ -1,66 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq
set -o pipefail -o errexit -o nounset
trace() { echo >&2 "$@"; }
tmp=$(mktemp -d)
cleanup() {
# Don't exit early if anything fails to cleanup
set +o errexit
trace -n "Cleaning up.. "
[[ -e "$tmp/base" ]] && git worktree remove --force "$tmp/base"
[[ -e "$tmp/merged" ]] && git worktree remove --force "$tmp/merged"
rm -rf "$tmp"
trace "Done"
}
trap cleanup exit
repo=https://github.com/NixOS/nixpkgs.git
if (( $# != 0 )); then
baseBranch=$1
shift
else
trace "Usage: $0 BASE_BRANCH [REPOSITORY]"
trace "BASE_BRANCH: The base branch to use, e.g. master or release-23.11"
trace "REPOSITORY: The repository to fetch the base branch from, defaults to $repo"
exit 1
fi
if (( $# != 0 )); then
repo=$1
shift
fi
if [[ -n "$(git status --porcelain)" ]]; then
trace -e "\e[33mWarning: Dirty tree, uncommitted changes won't be taken into account\e[0m"
fi
headSha=$(git rev-parse HEAD)
trace -e "Using HEAD commit \e[34m$headSha\e[0m"
trace -n "Creating Git worktree for the HEAD commit in $tmp/merged.. "
git worktree add --detach -q "$tmp/merged" HEAD
trace "Done"
trace -n "Fetching base branch $baseBranch to compare against.. "
git fetch -q "$repo" refs/heads/"$baseBranch"
baseSha=$(git rev-parse FETCH_HEAD)
trace -e "\e[34m$baseSha\e[0m"
trace -n "Creating Git worktree for the base branch in $tmp/base.. "
git worktree add -q "$tmp/base" "$baseSha"
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 "Running nixpkgs-vet.."
nix-build ci -A nixpkgs-vet --arg base "$tmp/base" --arg head "$tmp/merged"

View File

@@ -1,41 +0,0 @@
{
lib,
nix,
runCommand,
}:
let
nixpkgs =
with lib.fileset;
toSource {
root = ../.;
fileset = (fileFilter (file: file.hasExt "nix") ../.);
};
in
runCommand "nix-parse-${nix.name}"
{
nativeBuildInputs = [
nix
];
}
''
export NIX_STORE_DIR=$TMPDIR/store
export NIX_STATE_DIR=$TMPDIR/state
nix-store --init
cd "${nixpkgs}"
# This will only show the first parse error, not all of them. That's fine, because
# the other CI jobs will report in more detail. This job is about checking parsing
# across different implementations / versions, not about providing the best DX.
# Returning all parse errors requires significantly more resources.
find . -type f -iname '*.nix' | xargs -P $(nproc) nix-instantiate --parse 2>&1 >/dev/null | {
# Also fail on (deprecation) warnings printed to stderr.
if grep "warning"; then
echo "Failing due to warnings in stderr" >&2
exit 1
fi
}
touch $out
''

View File

@@ -1,31 +0,0 @@
{
"pins": {
"nixpkgs": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "NixOS",
"repo": "nixpkgs"
},
"branch": "nixpkgs-unstable",
"submodules": false,
"revision": "02f3fa0374fa13707d42d55d58ecc76b091f223c",
"url": "https://github.com/NixOS/nixpkgs/archive/02f3fa0374fa13707d42d55d58ecc76b091f223c.tar.gz",
"hash": "0z8d33c5g0gk9a74ppqq77npisf9xx9c8ai9isxa2hyjx4lv1pki"
},
"treefmt-nix": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "numtide",
"repo": "treefmt-nix"
},
"branch": "main",
"submodules": false,
"revision": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
"url": "https://github.com/numtide/treefmt-nix/archive/790751ff7fd3801feeaf96d7dc416a8d581265ba.tar.gz",
"hash": "1zah3dmbpn3ap5acg22kq1j19dg32gj73l43yamjcxhc38sv9kd5"
}
},
"version": 5
}

View File

@@ -1,82 +0,0 @@
#!/usr/bin/env nix-shell
/*
#!nix-shell -i node -p nodejs
*/
const typeConfig = {
master: ['development', 'primary'],
release: ['development', 'primary'],
staging: ['development', 'secondary'],
'staging-next': ['development', 'secondary'],
'staging-nixos': ['development', 'secondary'],
'haskell-updates': ['development', 'secondary'],
nixos: ['channel'],
nixpkgs: ['channel'],
}
// "order" ranks the development branches by how likely they are the intended base branch
// when they are an otherwise equally good fit according to ci/github-script/prepare.js.
const orderConfig = {
master: 0,
release: 1,
staging: 2,
'staging-nixos': 2,
'haskell-updates': 3,
'staging-next': 4,
}
function split(branch) {
return {
...branch.match(
/(?<prefix>.+?)(-(?<version>\d{2}\.\d{2}|unstable)(?:-(?<suffix>.*))?)?$/,
).groups,
}
}
function classify(branch) {
const { prefix, version } = split(branch)
return {
branch,
order: orderConfig[prefix] ?? Infinity,
stable: (version ?? 'unstable') !== 'unstable',
type: typeConfig[prefix] ?? ['wip'],
version: version ?? 'unstable',
}
}
module.exports = { classify, split }
// If called directly via CLI, runs the following tests:
if (!module.parent) {
console.log('split(branch)')
function testSplit(branch) {
console.log(branch, split(branch))
}
testSplit('master')
testSplit('release-25.05')
testSplit('staging')
testSplit('staging-next')
testSplit('staging-25.05')
testSplit('staging-next-25.05')
testSplit('nixpkgs-25.05-darwin')
testSplit('nixpkgs-unstable')
testSplit('haskell-updates')
testSplit('backport-123-to-release-25.05')
console.log('')
console.log('classify(branch)')
function testClassify(branch) {
console.log(branch, classify(branch))
}
testClassify('master')
testClassify('release-25.05')
testClassify('staging')
testClassify('staging-next')
testClassify('staging-25.05')
testClassify('staging-next-25.05')
testClassify('nixpkgs-25.05-darwin')
testClassify('nixpkgs-unstable')
testClassify('haskell-updates')
testClassify('backport-123-to-release-25.05')
}

View File

@@ -1,32 +0,0 @@
#!/usr/bin/env -S nix-instantiate --eval --strict --json --arg unused true
# Unused argument to trigger nix-instantiate calling this function with the default arguments.
{
pinnedJson ? ./pinned.json,
}:
let
pinned = (builtins.fromJSON (builtins.readFile pinnedJson)).pins;
nixpkgs = fetchTarball {
inherit (pinned.nixpkgs) url;
sha256 = pinned.nixpkgs.hash;
};
pkgs = import nixpkgs {
config.allowAliases = false;
};
inherit (pkgs) lib;
lix = lib.pipe pkgs.lixPackageSets [
(lib.filterAttrs (_: set: lib.isDerivation set.lix or null && set.lix.meta.available))
lib.attrNames
(lib.filter (name: lib.match "lix_[0-9_]+|git" name != null))
(map (name: "lixPackageSets.${name}.lix"))
];
nix = lib.pipe pkgs.nixVersions [
(lib.filterAttrs (_: drv: lib.isDerivation drv && drv.meta.available))
lib.attrNames
(lib.filter (name: lib.match "nix_[0-9_]+|git" name != null))
(map (name: "nixVersions.${name}"))
];
in
lix ++ nix

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p npins
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
npins --lock-file pinned.json update

View File

@@ -1,15 +1,10 @@
let
missingFeatures = map ({ description, ... }: description) (import ./lib/minfeatures.nix).missing;
in
let requiredVersion = import ./lib/minver.nix; in
if missingFeatures != [ ] then
if ! builtins ? nixVersion || builtins.compareVersions requiredVersion builtins.nixVersion == 1 then
abort ''
This version of Nixpkgs requires an implementation of Nix with the following features:
- ${builtins.concatStringsSep "\n- " missingFeatures}
You are evaluating with Nix ${builtins.nixVersion or "(too old to know)"}, please upgrade:
This version of Nixpkgs requires Nix >= ${requiredVersion}, please upgrade:
- If you are running NixOS, `nixos-rebuild' can be used to upgrade your system.
@@ -19,7 +14,7 @@ if missingFeatures != [ ] then
- If you installed Nix using the install script (https://nixos.org/nix/install),
it is safe to upgrade by running it again:
curl -L https://nixos.org/nix/install | sh
curl https://nixos.org/nix/install | sh
For more information, please see the NixOS release notes at
https://nixos.org/nixos/manual or locally at

8
doc/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
*.chapter.xml
*.section.xml
.version
functions/library/generated
functions/library/locations.xml
highlightjs
manual-full.xml
out

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