Compare commits

..

656 Commits

Author SHA1 Message Date
figsoda
057f9aecfb Release NixOS 23.11
(cherry picked from commit 04220ed676)
2023-11-29 18:25:34 +00:00
Silvan Mosberger
f790fda359 Backport and converge release notes editorial updates (#270990)
Co-Authored-By: Alejandro Sánchez Medina <alejandrosanchzmedina@gmail.com>
2023-11-29 13:22:58 -05:00
figsoda
8ffd80a37b Merge pull request #270175 from ShamrockLee/backport-23.11-apptainer-localstatedir
[Backport 23.11] apptainer, singularity: use self-contained LOCALSTATEDIR by default
2023-11-29 13:08:06 -05:00
figsoda
f6a1b39da6 Merge pull request #270448 from NixOS/backport-268746-to-release-23.11
[Backport release-23.11] python311Packages.torch: choose magma at the expression level
2023-11-29 13:05:13 -05:00
Robert Schütz
d3aefc17da Merge pull request #270840 from NixOS/backport-269799-to-release-23.11
[Backport release-23.11] poetry: 1.7.0 -> 1.7.1
2023-11-29 09:21:32 -08:00
Julien Malka
c4d1a77d17 Merge pull request #270511 from NixOS/backport-270042-to-release-23.11
[Backport release-23.11] python311Packages.pyregion: 2.1.1 -> 2.2.0; fix darwin build
2023-11-29 17:53:54 +01:00
Julien Malka
f8f87feb4a Merge pull request #270883 from NixOS/backport-270027-to-release-23.11
[Backport release-23.11] python311Packages.astropy-healpix: upstream patch to fix darwin build
2023-11-29 17:52:59 +01:00
Emily Trau
de0ad77082 Merge pull request #270951 from NixOS/backport-270823-to-release-23.11
[Backport release-23.11] tuba: fix clang build
2023-11-30 01:30:08 +11:00
Nick Cao
0828adcdd1 Merge pull request #270835 from NixOS/backport-270479-to-release-23.11
[Backport release-23.11] microsoft-edge: 119.0.2151.44 -> 119.0.2151.72
2023-11-29 09:29:27 -05:00
Emily Trau
126cac648a tuba: fix clang build
(cherry picked from commit 1c6cc8ed6e)
2023-11-29 14:29:25 +00:00
Nick Cao
13e2aebd05 Merge pull request #270817 from NixOS/backport-270672-to-release-23.11
[Backport release-23.11] cargo-tarpaulin: 0.27.1 -> 0.27.2
2023-11-29 09:28:19 -05:00
Peder Bergebakken Sundt
52185213f6 Merge pull request #270895 from NixOS/backport-270506-to-release-23.11
[Backport release-23.11] python311Packages.hdbscan: fix build
2023-11-29 15:10:45 +01:00
Ilan Joselevich
a10facb775 Merge pull request #270937 from NixOS/backport-270485-to-release-23.11
[Backport release-23.11] biome: 1.3.3 -> 1.4.0
2023-11-29 15:57:21 +02:00
nikstur
b5433ba9bb Merge pull request #270599 from blitz/fractal-5-backport
[23.11] fractal: 4.4.2 -> 5
2023-11-29 14:46:45 +01:00
figsoda
07878cc056 biome: 1.3.3 -> 1.4.0
Diff: https://github.com/biomejs/biome/compare/cli/v1.3.3...cli/v1.4.0

Changelog: https://github.com/biomejs/biome/blob/cli/v1.4.0/CHANGELOG.md
(cherry picked from commit 2be9727421)
2023-11-29 13:32:28 +00:00
Emily Trau
50aa30a13c Merge pull request #270930 from NixOS/backport-270851-to-release-23.11
[Backport release-23.11] python311Packages.pot: pypi missing files, switch to github; fixbuild
2023-11-30 00:11:05 +11:00
annalee
3b03a8d304 python311Packages.pot: pypi missing files, switch to github; fixbuild
pypi source is missing tests/conftest.py which is causing the tests to
with missing attribute errors

(cherry picked from commit 7d835a1dc5)
2023-11-29 12:58:28 +00:00
Emily Trau
48579be8c7 Merge pull request #270845 from NixOS/backport-270753-to-release-23.11
[Backport release-23.11] python310Packages.oelint-parser: 2.11.4 -> 2.11.6, oelint-adv: 3.26.2 -> 3.26.4
2023-11-29 23:57:04 +11:00
Emily Trau
040fba80e1 Merge pull request #270844 from NixOS/backport-270777-to-release-23.11
[Backport release-23.11] cargo-show-asm: 0.2.22 -> 0.2.23
2023-11-29 23:56:37 +11:00
Vladimír Čunát
9c24b00b63 Merge #270925: libreoffice: skip tests for now
...into release-23.11
2023-11-29 13:46:03 +01:00
Vladimír Čunát
5f4ce4b64d libreoffice: skip tests for now
They expired in some way recently.
2023-11-29 12:57:57 +01:00
Martin Weinelt
9ee72f9096 Merge pull request #270902 from NixOS/backport-270856-to-release-23.11
[Backport release-23.11] kea: 2.4.0 -> 2.4.1
2023-11-29 12:20:12 +01:00
K900
506b69f59f Merge pull request #270914 from NixOS/backport-270904-to-release-23.11
[Backport release-23.11] Linux kernels 2023-11-29
2023-11-29 14:09:13 +03:00
Alyssa Ross
da4b8f6cc5 linux-rt_5_10: 5.10.199-rt97 -> 5.10.201-rt98
(cherry picked from commit 565eb9a83a)
2023-11-29 11:08:53 +00:00
Alyssa Ross
ef68702000 linux_4_14: 4.14.330 -> 4.14.331
(cherry picked from commit c84f34c3c0)
2023-11-29 11:08:53 +00:00
Alyssa Ross
8334746e47 linux_4_19: 4.19.299 -> 4.19.300
(cherry picked from commit 3172e8e1fc)
2023-11-29 11:08:53 +00:00
Alyssa Ross
3a303c748c linux_5_4: 5.4.261 -> 5.4.262
(cherry picked from commit f954c6ac38)
2023-11-29 11:08:53 +00:00
Alyssa Ross
0df28b904e linux_5_10: 5.10.201 -> 5.10.202
(cherry picked from commit f3f7cca7e5)
2023-11-29 11:08:53 +00:00
Alyssa Ross
d39a89dad1 linux_5_15: 5.15.139 -> 5.15.140
(cherry picked from commit c2a8b5f8d2)
2023-11-29 11:08:53 +00:00
Alyssa Ross
a48b7c26a0 linux_6_1: 6.1.63 -> 6.1.64
(cherry picked from commit 2f492ad3cf)
2023-11-29 11:08:53 +00:00
Alyssa Ross
6906b1cfac linux_6_5: 6.5.12 -> 6.5.13
(cherry picked from commit 5214ba12f3)
2023-11-29 11:08:53 +00:00
Alyssa Ross
130c863235 linux_6_6: 6.6.2 -> 6.6.3
(cherry picked from commit dd27218c71)
2023-11-29 11:08:53 +00:00
Alyssa Ross
e2d63175d0 linux_testing: 6.7-rc2 -> 6.7-rc3
(cherry picked from commit 4f711c3ba6)
2023-11-29 11:08:53 +00:00
Mario Rodas
915154c352 Merge pull request #270855 from NixOS/backport-270819-to-release-23.11
[Backport release-23.11] gifski: fix version
2023-11-29 06:02:30 -05:00
Sergei Trofimovich
e249e03d91 kea: 2.4.0 -> 2.4.1
Changes: https://downloads.isc.org/isc/kea/2.4.1/Kea-2.4.1-ReleaseNotes.txt
(cherry picked from commit c687a1297f)
2023-11-29 10:33:32 +00:00
Vincent Laporte
4cb57ac11f coqPackages.mathcomp-word: 2.1 → {2.2, 3.0}
(cherry picked from commit c647161636)
2023-11-29 11:08:47 +01:00
tu-maurice
0f45ffcaff python311Packages.hdbscan: fix build
Patch is already upstream in the current packaged version.

(cherry picked from commit 776fcd1504)
2023-11-29 10:08:04 +00:00
Vincent Laporte
2ad9b5d4f6 coqPackages.VST: 2.12 → 2.13
coqPackages.compcert: 3.13 → 3.13.1

(cherry picked from commit 208fecaf03)
2023-11-29 11:07:05 +01:00
annalee
6dca38404f python311Packages.astropy-healpix: upstream patch to fix darwin build
upstream patch adds const to arguments so the function definition
matches the function pointer prototype.

remove patch on next version update

(cherry picked from commit 7246ec5b0d)
2023-11-29 09:53:49 +00:00
Martin Weinelt
b4e2399458 Merge pull request #270758 from NixOS/backport-270745-to-release-23.11
[Backport release-23.11] firefox-{beta,devedition}-unwrapped: 121.0b3 -> 121.0b4
2023-11-29 10:31:24 +01:00
Otavio Salvador
1f58335672 uuu: fix updateScript to pass specific version-regexp
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
(cherry picked from commit 6923231af9)
2023-11-29 10:18:40 +01:00
figsoda
a53d55a1ed cargo-modules: 0.11.0 -> 0.11.2
Diff: https://github.com/regexident/cargo-modules/compare/0.11.0...0.11.2

Changelog: https://github.com/regexident/cargo-modules/blob/0.11.2/CHANGELOG.md
(cherry picked from commit 65a8ceb0a9)
2023-11-29 10:18:08 +01:00
hexclover
c4b3e88a35 nixos/mininet: wrap with mininet in PYTHONPATH and ifconfig in PATH
(cherry picked from commit 4e6fc83b98)
2023-11-29 10:16:52 +01:00
hexclover
bb6b6a806b mininet: 2.3.0 -> 2.3.1b4
Switched to Python 3.

(cherry picked from commit 496705197e)
2023-11-29 10:16:52 +01:00
Vladimír Čunát
4cc4c0455a Merge #269828: staging-next-23.11 iteration 1
...into release-23.11
2023-11-29 10:03:16 +01:00
figsoda
664a52500b gifski: fix version
(cherry picked from commit 419a57cc60)
2023-11-29 08:17:24 +00:00
Mario Rodas
d194651754 Merge pull request #270816 from NixOS/backport-270780-to-release-23.11
[Backport release-23.11] gifski: 1.13.0 -> 1.31.1
2023-11-29 03:16:12 -05:00
Emily Trau
a5aea79fbf Merge pull request #270852 from NixOS/backport-269642-to-release-23.11
[Backport release-23.11] remnote: 1.12.64 -> 1.13.0
2023-11-29 18:46:20 +11:00
John Garcia
4e00e07e63 remnote: 1.12.64 -> 1.13.0
(cherry picked from commit 1debdc9730)
2023-11-29 07:45:28 +00:00
John Garcia
0f65dc22c1 maintainers: rename jgarcia to chewblacka
(cherry picked from commit d91e9ecd5b)
2023-11-29 07:45:28 +00:00
Otavio Salvador
58f6208710 python310Packages.oelint-parser: 2.11.4 -> 2.11.6
(cherry picked from commit 09e9a8afab)
2023-11-29 07:28:29 +00:00
Otavio Salvador
be45d3ba65 oelint-adv: 3.26.2 -> 3.26.4
(cherry picked from commit 684c68ead6)
2023-11-29 07:28:29 +00:00
figsoda
7644957184 cargo-show-asm: 0.2.22 -> 0.2.23
Diff: https://diff.rs/cargo-show-asm/0.2.22/0.2.23

Changelog: https://github.com/pacak/cargo-show-asm/blob/0.2.23/Changelog.md
(cherry picked from commit c2abe3fd80)
2023-11-29 07:26:27 +00:00
Robert Schütz
70b0be5563 poetryPlugins.poetry-plugin-up: 0.7.0 -> 0.7.1
Diff: https://github.com/MousaZeidBaker/poetry-plugin-up/compare/refs/tags/0.7.0...0.7.1

Changelog: https://github.com/MousaZeidBaker/poetry-plugin-up/releases/tag/0.7.1
(cherry picked from commit 5427e0b5b3)
2023-11-29 06:49:05 +00:00
Robert Schütz
ffb88b6d60 poetry: 1.7.0 -> 1.7.1
Diff: https://github.com/python-poetry/poetry/compare/refs/tags/1.7.0...1.7.1

Changelog: https://github.com/python-poetry/poetry/blob/refs/tags/1.7.1/CHANGELOG.md
(cherry picked from commit 334cf93916)
2023-11-29 06:49:05 +00:00
Rhys Davies
b96877958c microsoft-edge: 119.0.2151.44 -> 119.0.2151.72
(cherry picked from commit 353ec7d154)
2023-11-29 06:21:39 +00:00
Emily Trau
c2fc886d84 Merge pull request #270833 from NixOS/backport-269607-to-release-23.11
[Backport release-23.11] khal: no longer broken on Darwin
2023-11-29 17:15:24 +11:00
Jonathan Wilkins
405e6ae2cb khal: no longer broken on Darwin
This builds for me on aarch64 Darwin, unsure about x86_64.

(cherry picked from commit 6224235f2b)
2023-11-29 06:14:19 +00:00
Emily Trau
f7171e3e31 Merge pull request #270829 from NixOS/backport-269502-to-release-23.11
[Backport release-23.11] fsautocomplete: sdk_6_0 -> sdk_7_0
2023-11-29 17:11:14 +11:00
Kirill Radzikhovskyy
0e9c413b2b fsautocomplete: sdk_6_0 -> sdk_7_0
(cherry picked from commit 69d4f03872)
2023-11-29 06:09:26 +00:00
Emily Trau
9e557c3138 Merge pull request #270825 from NixOS/backport-270781-to-release-23.11
[Backport release-23.11] poco: fix static build
2023-11-29 16:49:36 +11:00
Emily Trau
de108b11bb poco: fix static build
(cherry picked from commit 369650ef38)
2023-11-29 05:49:01 +00:00
Vincent Laporte
f086297307 ocamlPackages.bap: use LLVM 14
This fixes build after https://github.com/NixOS/nixpkgs/pull/241692

(cherry picked from commit 2a39e05773)
2023-11-29 06:44:59 +01:00
Emily Trau
33e56b2512 Merge pull request #270824 from NixOS/backport-269725-to-release-23.11
[Backport release-23.11] tuba: 0.4.1 -> 0.5.0
2023-11-29 16:42:55 +11:00
Colin
ad106ad88d tuba: 0.4.1 -> 0.5.0
release notes: <https://github.com/GeopJr/Tuba/releases/tag/v0.5.0>

(cherry picked from commit 0847a05a3f)
2023-11-29 05:42:11 +00:00
Emily Trau
ff22c38240 Merge pull request #270822 from NixOS/backport-270483-to-release-23.11
[Backport release-23.11] runelite: fix desktop entry
2023-11-29 16:34:45 +11:00
Alex Martens
d8fa45fe7f runelite: fix desktop entry
(cherry picked from commit 8cf9ec9b02)
2023-11-29 05:34:07 +00:00
figsoda
37f88eec0b cargo-tarpaulin: 0.27.1 -> 0.27.2
Diff: https://github.com/xd009642/tarpaulin/compare/0.27.1...0.27.2

Changelog: https://github.com/xd009642/tarpaulin/blob/0.27.2/CHANGELOG.md
(cherry picked from commit 29175e613e)
2023-11-29 05:07:10 +00:00
figsoda
fdba78afe6 gifski: 1.13.0 -> 1.31.1
Diff: https://github.com/ImageOptim/gifski/compare/1.13.0...1.31.1

Changelog: https://github.com/ImageOptim/gifski/releases/tag/1.31.1
(cherry picked from commit d341b7d95c)
2023-11-29 05:06:39 +00:00
Emily Trau
ab2ab0eff7 Merge pull request #270813 from NixOS/backport-270625-to-release-23.11
[Backport release-23.11] httptunnel: update to latest rev; fix darwin
2023-11-29 15:33:50 +11:00
annalee
14b51e6bd7 httptunnel: update to latest rev; fix darwin
version in nixpkgs is at least older than 2012
3b2a6f15b2...d8f91af976

(cherry picked from commit 1b87c9dcd6)
2023-11-29 04:33:12 +00:00
Emily Trau
69d668c4a6 Merge pull request #270812 from NixOS/backport-270137-to-release-23.11
[Backport release-23.11] liberasurecode: ignore strict prototypes on clang; fix darwin
2023-11-29 15:31:12 +11:00
annalee
015010b708 liberasurecode: ignore strict prototypes on clang; fix darwin
(cherry picked from commit 0d220827ac)
2023-11-29 04:27:28 +00:00
Fabián Heredia Montiel
36e04f1e2f Merge pull request #270801 from NixOS/backport-270388-to-release-23.11
[Backport release-23.11] redis-plus-plus: 1.3.7 -> 1.3.10
2023-11-29 04:22:35 +00:00
Nicolas Benes
f6ab8ce7d3 redis-plus-plus: 1.3.7 -> 1.3.10
https://github.com/sewenew/redis-plus-plus/releases/tag/1.3.8
https://github.com/sewenew/redis-plus-plus/releases/tag/1.3.9
https://github.com/sewenew/redis-plus-plus/releases/tag/1.3.10
(cherry picked from commit a4ce630f3e)
2023-11-29 03:44:07 +00:00
Silvan Mosberger
1ba9379d20 Merge pull request #270700 from NixOS/backport-269962-to-release-23.11
[Backport release-23.11] homepage-dashboard: 0.7.4 -> 0.8.2
2023-11-29 03:36:02 +01:00
Silvan Mosberger
90fd8ab887 Merge pull request #270702 from NixOS/backport-267538-to-release-23.11
[Backport release-23.11] sourcehut.pastesrht: add missing backend component
2023-11-29 03:34:43 +01:00
figsoda
03d20903ac Merge pull request #270724 from NixOS/backport-268766-to-release-23.11
[Backport release-23.11] sccache: 0.7.2 -> 0.7.4
2023-11-28 20:46:12 -05:00
figsoda
fbbe108832 Merge pull request #270661 from NixOS/backport-270500-to-release-23.11
[Backport release-23.11] felix-fm: 2.10.1 -> 2.10.2
2023-11-28 20:45:40 -05:00
Fabián Heredia Montiel
b7b373d930 Merge pull request #270740 from azahi/moonlander-as-broken
moonlander: mark as broken
2023-11-29 01:35:34 +00:00
Fabián Heredia Montiel
fd2cb323a5 Merge pull request #270739 from NixOS/backport-270594-to-release-23.11
[Backport release-23.11] kotlin-native: update darwin hashes; fix build
2023-11-29 01:35:10 +00:00
github-actions[bot]
037a1dd5d1 Merge release-23.11 into staging-next-23.11 2023-11-29 00:14:22 +00:00
Martin Weinelt
9203c0f664 firefox-devedition-unwrapped: 121.0b3 -> 121.0b4
(cherry picked from commit 21672ccd69)
2023-11-28 23:57:29 +00:00
Martin Weinelt
986b3deb00 firefox-beta-unwrapped: 121.0b3 -> 121.0b4
(cherry picked from commit 2438f55f09)
2023-11-28 23:57:29 +00:00
Nick Cao
06b8a5a030 Merge pull request #270734 from katexochen/dn5/backport-5-1-8
[Backport release-23.11] dnf5: 5.1.7 -> 5.1.8, re-enable tests, add man pages, fix hash
2023-11-28 17:19:06 -05:00
annalee
159aa18167 kotlin-native: update darwin hashes; fix build
last version update https://github.com/NixOS/nixpkgs/pull/264833
only updated the linux x64 hash and neglected the 2 macos ones.

this updates the other two hashes using the published sha256 digests
https://github.com/JetBrains/kotlin/releases/tag/v1.9.20
and converts them to an sri.

testing: build passed on x64 darwin
(cherry picked from commit eb198e32f0)
2023-11-28 22:09:06 +00:00
Azat Bahawi
e7f2d627ba moonlander: mark as broken
Also removed azahi from maintainers.
2023-11-29 01:08:33 +03:00
Paul Meyer
09b7b34c2f dnf5: tag was moved, fix hash
(cherry picked from commit f9abf15185)
2023-11-28 22:22:29 +01:00
Nick Cao
9afc2703f6 Merge pull request #270653 from NixOS/backport-270597-to-release-23.11
[Backport release-23.11] soft-serve: 0.7.2 -> 0.7.3
2023-11-28 16:14:51 -05:00
Nick Cao
cacc794846 Merge pull request #270656 from NixOS/backport-270491-to-release-23.11
[Backport release-23.11] fw: 2.18.0 -> 2.19.0
2023-11-28 16:14:37 -05:00
Nick Cao
49142e0821 Merge pull request #270655 from NixOS/backport-270492-to-release-23.11
[Backport release-23.11] cargo-mutants: 23.11.1 -> 23.11.2
2023-11-28 16:14:25 -05:00
Nick Cao
3b1ff53fce Merge pull request #270658 from NixOS/backport-270482-to-release-23.11
[Backport release-23.11] symbolicator: 23.11.0 -> 23.11.2
2023-11-28 16:14:15 -05:00
Nick Cao
b49f088abd Merge pull request #270659 from NixOS/backport-270501-to-release-23.11
[Backport release-23.11] gql: 0.8.0 -> 0.9.0
2023-11-28 16:14:00 -05:00
Nick Cao
66a6941664 Merge pull request #270660 from NixOS/backport-270502-to-release-23.11
[Backport release-23.11] jql: 7.0.6 -> 7.0.7
2023-11-28 16:13:50 -05:00
figsoda
34a0638f92 sccache: 0.7.2 -> 0.7.4
Diff: https://github.com/mozilla/sccache/compare/v0.7.2...v0.7.4

Changelog: https://github.com/mozilla/sccache/releases/tag/v0.7.4
(cherry picked from commit 10e0ccbfa5)
2023-11-28 19:50:52 +00:00
Martin Weinelt
5705f147a5 Merge pull request #270697 from emilylange/release-23.11-forgejo
[release-23.11] forgejo: 1.20.5-1 -> 1.20.6-0
2023-11-28 19:23:43 +01:00
Tomas Antonio Lopez
c520c31a04 sourcehut.pastesrht: 0.15.1 -> 0.15.2
(cherry picked from commit d84b211fea)
2023-11-28 17:40:39 +00:00
Tomas Antonio Lopez
38ba8684ff nixos/sourcehut: compile and integrate paste.sr.ht API component
(cherry picked from commit 5476b490d4)
2023-11-28 17:40:39 +00:00
Tomas Antonio Lopez
a732a46482 sourcehut.pastesrht: add myself as maintainer
(cherry picked from commit 3881f6f864)
2023-11-28 17:40:39 +00:00
Nick Cao
c021f2903d Merge pull request #270636 from NixOS/backport-270439-to-release-23.11
[Backport release-23.11] qt6: 6.6.0 -> 6.6.1
2023-11-28 12:26:10 -05:00
Jon Seager
64229c7ec3 homepage-dashboard: 0.7.4 -> 0.8.2
(cherry picked from commit ef47a483c2)
2023-11-28 17:16:21 +00:00
emilylange
82ec744fb7 forgejo: 1.20.5-1 -> 1.20.6-0
https://codeberg.org/forgejo/forgejo/releases/tag/v1.20.6-0

4160dcdaaf/RELEASE-NOTES.md (1-20-6-0)
2023-11-28 18:06:44 +01:00
Lily Foster
55d6d8ee14 Merge pull request #270630 from NixOS/backport-269099-to-release-23.11
[Backport release-23.11] geph: add cacert to provide certificates during fetches
2023-11-28 11:24:14 -05:00
Nick Cao
036c04ca50 Merge pull request #269768 from NixOS/backport-267030-to-release-23.11
[Backport release-23.11] python311Packages.pymc: 5.9.1 -> 5.9.2, python311Packages.pytensor: 2.17.3 -> 2.18.1
2023-11-28 11:09:52 -05:00
Silvan Mosberger
1442a502b6 Merge pull request #270676 from NixOS/backport-270628-to-release-23.11 2023-11-28 16:55:25 +01:00
Silvan Mosberger
356f49951e rl-2311: Link to blog post on the file set library
(cherry picked from commit ec54fee3b5)
2023-11-28 15:52:24 +00:00
h7x4
41213c07bb treewide: add mainProgram
(cherry picked from commit 41974d5ed9)
2023-11-28 16:49:41 +01:00
Nick Cao
c9407db9a7 Merge pull request #269605 from NixOS/backport-266496-to-release-23.11
[Backport release-23.11] nextcloud-notify_push: 0.6.3 -> 0.6.5
2023-11-28 10:07:10 -05:00
Nick Cao
abcbadddd5 Merge pull request #269234 from NixOS/backport-269160-to-release-23.11
[Backport release-23.11] AdaCore 24 updates
2023-11-28 10:06:52 -05:00
Nick Cao
f7ff0bd2d8 Merge pull request #270080 from NixOS/backport-269948-to-release-23.11
[Backport release-23.11] python3Packages.wasmer-compiler-llvm: fix build failure
2023-11-28 10:06:28 -05:00
Nick Cao
659a03ab79 Merge pull request #270030 from NixOS/backport-269899-to-release-23.11
[Backport release-23.11] pythonPackages.pyheck: fix build on darwin
2023-11-28 10:05:40 -05:00
Nick Cao
391840a1f2 Merge pull request #270144 from NixOS/backport-268342-to-release-23.11
[Backport release-23.11] datadog-agent: fix metric submission
2023-11-28 10:04:40 -05:00
Nick Cao
f0323031a3 Merge pull request #269454 from NixOS/backport-269381-to-release-23.11
[Backport release-23.11] bcachefs: fix lib.kernel.option miss use.
2023-11-28 10:03:59 -05:00
Nick Cao
fb7180a2eb Merge pull request #270635 from NixOS/backport-270430-to-release-23.11
[Backport release-23.11] ktfmt,tuxmut: fix meta.license (apsl20 -> asl20)
2023-11-28 10:00:52 -05:00
figsoda
64e56bb47b felix-fm: 2.10.1 -> 2.10.2
Diff: https://github.com/kyoheiu/felix/compare/v2.10.1...v2.10.2

Changelog: https://github.com/kyoheiu/felix/blob/v2.10.2/CHANGELOG.md
(cherry picked from commit 01238b5407)
2023-11-28 14:50:24 +00:00
figsoda
86db36437b jql: 7.0.6 -> 7.0.7
Diff: https://github.com/yamafaktory/jql/compare/jql-v7.0.6...jql-v7.0.7

Changelog: https://github.com/yamafaktory/jql/releases/tag/jql-v7.0.7
(cherry picked from commit 81b063bee8)
2023-11-28 14:49:05 +00:00
figsoda
063a02c705 gql: 0.8.0 -> 0.9.0
Diff: https://github.com/AmrDeveloper/GQL/compare/0.8.0...0.9.0

Changelog: https://github.com/AmrDeveloper/GQL/releases/tag/0.9.0
(cherry picked from commit f84656d425)
2023-11-28 14:48:47 +00:00
figsoda
e0788c9d9a symbolicator: 23.11.0 -> 23.11.2
Diff: https://github.com/getsentry/symbolicator/compare/23.11.0...23.11.2

Changelog: https://github.com/getsentry/symbolicator/blob/23.11.2/CHANGELOG.md
(cherry picked from commit 0eeabb2d28)
2023-11-28 14:48:14 +00:00
figsoda
8fd810c110 cargo-mutants: 23.11.1 -> 23.11.2
Diff: https://github.com/sourcefrog/cargo-mutants/compare/v23.11.1...v23.11.2

Changelog: https://github.com/sourcefrog/cargo-mutants/releases/tag/v23.11.2
(cherry picked from commit 20c316dd23)
2023-11-28 14:41:55 +00:00
figsoda
b155f583e4 fw: 2.18.0 -> 2.19.0
Diff: https://github.com/brocode/fw/compare/v2.18.0...v2.19.0
(cherry picked from commit a7f14dd928)
2023-11-28 14:41:46 +00:00
figsoda
ca0cbf6f94 Merge pull request #270508 from NixOS/backport-268414-to-release-23.11
[Backport release-23.11] fh: 0.1.7 -> 0.1.8
2023-11-28 09:34:37 -05:00
Someone Serge
12a1aaa6e6 nixos/clamav: ensure freshclam starts before clamav (if enabled)
(cherry picked from commit 1ee22608c6)
2023-11-28 14:32:45 +00:00
Ashish SHUKLA
c6f5d645ae soft-serve: 0.7.2 -> 0.7.3
(cherry picked from commit 3a3cd40181)
2023-11-28 14:31:38 +00:00
Nick Cao
c130043cf7 Merge pull request #270441 from NixOS/backport-270259-to-release-23.11
[Backport release-23.11] osu-lazer-bin: remove version from name
2023-11-28 09:20:20 -05:00
Nick Cao
f05eb35cd5 qt6.qtbase: fix build on older macOS
(cherry picked from commit 64c132c427)
2023-11-28 13:26:32 +00:00
Nick Cao
19eeddba0b qt6.qtwayland: drop outdated patches
(cherry picked from commit b30aa72d57)
2023-11-28 13:26:32 +00:00
Nick Cao
221e0e7ef2 qt6.qtsvg: drop outdated patches
(cherry picked from commit 4b8fb7d6da)
2023-11-28 13:26:32 +00:00
Nick Cao
04eaa9179b qt6.qtbase: derive plugin load path from PATH
(cherry picked from commit da08600073)
2023-11-28 13:26:31 +00:00
Nick Cao
17ce419a51 qt6.qtbase: refresh patches
(cherry picked from commit 53ad6fd1b4)
2023-11-28 13:26:31 +00:00
Nick Cao
b22de6f140 qt6: 6.6.0 -> 6.6.1
(cherry picked from commit 3e46f20afe)
2023-11-28 13:26:31 +00:00
Anthony Roussel
256f0803c6 tuxmux: fix meta.license
(cherry picked from commit 301cb47e71)
2023-11-28 13:01:20 +00:00
Anthony Roussel
c7df2a63dc ktfmt: fix meta.license
(cherry picked from commit 0a957d97cc)
2023-11-28 13:01:20 +00:00
penalty1083
d09245f1b9 geph: add cacert to provide certificates during fetches
(cherry picked from commit 950887fc2a)
2023-11-28 12:35:30 +00:00
Bobby Rong
411915218e Merge pull request #270629 from NixOS/backport-270438-to-release-23.11
[Backport release-23.11] xfce.xfce4-whiskermenu-plugin: 2.8.1 -> 2.8.2
2023-11-28 20:35:24 +08:00
Bobby Rong
a7e3ecfe9d xfce.xfce4-whiskermenu-plugin: 2.8.1 -> 2.8.2
https://gitlab.xfce.org/panel-plugins/xfce4-whiskermenu-plugin/-/compare/v2.8.1...v2.8.2
(cherry picked from commit b29fef3331)
2023-11-28 12:24:41 +00:00
Martin Weinelt
4b7192cbd3 Merge pull request #270614 from NixOS/backport-270547-to-release-23.11
[Backport release-23.11] buildMozillaMach: prune patches
2023-11-28 12:15:22 +01:00
Martin Weinelt
81df7d0a4c buildMozillaMach: prune patches
The oldest version we support is at 115 right now, so we can drop
everything older than that.

(cherry picked from commit 3303ff548b)
2023-11-28 11:10:44 +00:00
github-actions[bot]
febae9547a hashcat: fix darwin build (#270213)
use libc++ libc++abi, not libstdc++, when stdenv.cc.libcxx is non null

MACOSX_DEPLOYMENT_TARGET is defined by the environment, comment out the
definition in the Makefile as it breaks the c++ build.

(cherry picked from commit 27e9083e87)

Co-authored-by: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
2023-11-28 12:07:31 +01:00
Mario Rodas
31022727ed Merge pull request #270532 from NixOS/backport-270147-to-release-23.11
[Backport release-23.11] sonic-server: fix build with clang 16
2023-11-28 05:39:51 -05:00
Colin
200c0e5e4b fractal: enable gstreamer-good support
gstreamer-good was in the old `fractal` 4.x package, seems to have been
overlooked in the upgrade to fractal 5. providing this enables fractal to
play inline video -- else the following output is observed for messages
containing video:

```
ERROR fractal::components::video_player:👿 Error playing video: Error from element /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.
Your GStreamer installation is missing a plug-in.
../gst/playback/gsturidecodebin.c(1049): no_more_pads_full (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
../gst/playback/gstdecodebin2.c(4704): gst_decode_bin_expose (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: Quicktime (video/quicktime, variant=(string)iso)
```

(cherry picked from commit aeb5204b5c)
2023-11-28 11:07:05 +01:00
linsui
a549a407cd fractal: 4.4.2 -> 5
(cherry picked from commit aa9baf4206)
2023-11-28 11:06:49 +01:00
Azat Bahawi
7c4c20509c Merge pull request #270574 from NixOS/backport-270130-to-release-23.11
[Backport release-23.11] vesktop: add desktop item categories
2023-11-28 10:35:37 +03:00
Azat Bahawi
075a6deb70 vesktop: add desktop item categories
(cherry picked from commit f7d2a5b123)
2023-11-28 07:34:26 +00:00
Martin Weinelt
3fb4ba1c4f Merge pull request #270544 from NixOS/backport-270536-to-release-23.11
[Backport release-23.11] buildMozillaMach: replace dbus workaround with upstream patch
2023-11-28 04:00:10 +01:00
Martin Weinelt
a21a935ef1 buildMozillaMach: replace dbus workaround with upstream patch
https://bugzilla.mozilla.org/show_bug.cgi?id=1864083

The fix was targeted for Firefox 122.

(cherry picked from commit a72f24ef3b)
2023-11-28 02:50:50 +00:00
Martin Weinelt
7dd40eb4b4 Merge remote-tracking branch 'origin/release-23.11' into staging-next-23.11
Use the hash for nss_latest already on staging-next-23.11, since the
source has been migrated to git there.
2023-11-28 02:44:55 +01:00
Martin Weinelt
5fdb1f2fc9 Merge pull request #270531 from NixOS/backport-269244-to-release-23.11
[Backport release-23.11] firefox-{beta,devedition}-unwrapped: 120.0b9 -> 121.0b3
2023-11-28 02:41:43 +01:00
Anthony Roussel
01b8eed311 sonic-server: fix build with clang 16
https://github.com/valeriansaliou/sonic/pull/316
(cherry picked from commit 98245cb2f1)
2023-11-28 01:02:33 +00:00
Martin Weinelt
7b916854d2 buildMozillaMach: update no-buildconfig patch for 121+
(cherry picked from commit a2502f79d1)
2023-11-28 00:59:21 +00:00
Martin Weinelt
949dde3d30 firefox-devedition-unwrapped: 120.0b9 -> 121.0b3
https://www.mozilla.org/en-US/firefox/121.0beta/releasenotes/
(cherry picked from commit 876ab4292f)
2023-11-28 00:59:21 +00:00
Martin Weinelt
860a31339e firefox-beta-unwrapped: 120.0b9 -> 121.0b3
https://www.mozilla.org/en-US/firefox/121.0beta/releasenotes/
(cherry picked from commit d66796d44e)
2023-11-28 00:59:21 +00:00
Martin Weinelt
dff573c194 nss_latest: 3.94 -> 3.95
https://github.com/nss-dev/nss/blob/NSS_3_95_RTM/doc/rst/releases/nss_3_95.rst
(cherry picked from commit 827579aa46)
2023-11-28 00:59:21 +00:00
Maciej Krüger
31b865a5a3 Merge pull request #270528 from NixOS/backport-265730-to-release-23.11
[Backport release-23.11] nixos/x2goserver: Support sudo-rs
2023-11-28 01:38:06 +01:00
nicoo
43a1599d0e nixos/x2goserver: Work with both Miller's sudo and sudo-rs
(cherry picked from commit 6f28ce9856)
2023-11-28 00:37:32 +00:00
Martin Weinelt
4dbd9bb774 Merge pull request #270516 from NixOS/backport-269922-to-release-23.11
[Backport release-23.11] Update moto and dependency py-partiql-parser to latest versions
2023-11-28 01:28:33 +01:00
github-actions[bot]
73e1729111 Merge release-23.11 into staging-next-23.11 2023-11-28 00:14:17 +00:00
Scott Dier
4c4f07332e python311Packages.moto: 4.2.6 -> 4.2.10
Add AWS environment variables required for some tests to pass.

(cherry picked from commit 348fb6cba5)
2023-11-27 23:28:05 +00:00
Scott Dier
5e868434a8 python311Packages.py-partialql-parser: 0.4.0 -> 0.4.2
(cherry picked from commit ae18f5de96)
2023-11-27 23:28:05 +00:00
Adam C. Stephens
ee7dc395e4 Merge pull request #270445 from adamcstephens/backport-270275-to-release-23.11
[Backport release-23.11] zfs: default disable zfs_dmu_offset_next_sync to avoid data corruption
2023-11-27 18:09:34 -05:00
annalee
5a616273c0 python311Packages.pyregion: 2.1.1 -> 2.2.0; fix darwin build
https://github.com/astropy/pyregion/blob/2.2.0/CHANGES.rst

add -Wno-error=int-conversion for clang to not error out on generated
code. (code returns NULL rather than 0). gcc warns but does not error.

(cherry picked from commit 83263612a9)
2023-11-27 23:06:33 +00:00
Silvan Mosberger
d21337e1bb Merge pull request #270471 from NixOS/backport-269919-to-release-23.11
[Backport release-23.11] nix-ld: mark as broken on 32 bit targets
2023-11-28 00:04:01 +01:00
figsoda
b0314782b3 fh: 0.1.7 -> 0.1.8
Diff: https://github.com/DeterminateSystems/fh/compare/v0.1.7...v0.1.8

Changelog: https://github.com/DeterminateSystems/fh/releases/tag/v0.1.8
(cherry picked from commit 693025dbcf)
2023-11-27 22:39:03 +00:00
Silvan Mosberger
56798d79d9 Merge pull request #270413 from NixOS/backport-270233-to-release-23.11
[Backport release-23.11] kapacitor: fix build of embedded `libflux` dependency with current rust
2023-11-27 23:33:40 +01:00
Nick Cao
ce32ce87e5 Merge pull request #270428 from NixOS/backport-270300-to-release-23.11
[Backport release-23.11] pgrok: 1.4.0 -> 1.4.1
2023-11-27 14:39:02 -05:00
Manuel Frischknecht
a8e3d0d041 Mark nix-ld as broken on 32 bit targets
See https://github.com/Mic92/nix-ld/issues/64

(cherry picked from commit 52a2546118)
2023-11-27 19:29:10 +00:00
Robert Schütz
42e452b739 Merge pull request #270361 from NixOS/backport-270243-to-release-23.11
[Backport release-23.11] python311Packages.img2pdf: 0.5.0 -> 0.5.1
2023-11-27 11:07:53 -08:00
Robert Schütz
2831b241c0 Merge pull request #270310 from NixOS/backport-269801-to-release-23.11
[Backport release-23.11] deltachat-desktop: 1.41.4 -> 1.42.1
2023-11-27 11:03:14 -08:00
Robert Schütz
a38527223b Merge pull request #270360 from NixOS/backport-270248-to-release-23.11
[Backport release-23.11] diebahn: 1.5.0 -> 2.1.0
2023-11-27 11:02:51 -08:00
Robert Schütz
0cc822db2f Merge pull request #270359 from NixOS/backport-269437-to-release-23.11
[Backport release-23.11] setzer: 61 -> 62
2023-11-27 11:01:43 -08:00
Nikolay Korotkiy
f39aee099b Merge pull request #270037 from NixOS/backport-269600-to-release-23.11
[Backport release-23.11] {mcrypt,libmcrypt}: fix build on darwin
2023-11-27 22:43:12 +04:00
Bjørn Forsman
3c62ff4c90 t1utils: improve meta.license
Replace stringy license with attrset.

Ref https://github.com/NixOS/nixpkgs/issues/269788

(cherry picked from commit 3f4ce2b393)
2023-11-27 19:00:55 +01:00
Bjørn Forsman
eba92fadf0 ngrep: improve meta.license
Replace stringy license with attrset. Also update the comments, as
upstream now document the license in README.md and LICENSE.

Ref https://github.com/NixOS/nixpkgs/issues/269788

(cherry picked from commit eb602b02de)
2023-11-27 19:00:43 +01:00
MarcFontaine
dca5cd94d9 xearth: improve meta.license
(cherry picked from commit 428dc289da)
2023-11-27 19:00:27 +01:00
Andrew Marshall
9f2dc974c2 zfs: default disable zfs_dmu_offset_next_sync to avoid data corruption
This helps mitigate a data corruption bug. This was previously defaulted
to zero prior to upstream commit
05b3eb6d232009db247882a39d518e7282630753, and it is already a tunable,
so doing this seems safe. Initially data corruption was thought to be
introduced with v2.2, but further upstream investigation currently
believes that changes in v2.2 only exacerbated the issue that already
existed.

A longer-term fix is likely to be
https://github.com/openzfs/zfs/pull/15571, though that is not yet
merged. The zfs_2_1 package has already backported that, so do not apply
the tunable default change there.

Positioning of `extraPatches` is to avoid merge conflicts with
https://github.com/NixOS/nixpkgs/pull/269097.

Patch is nearly identical to the [Gentoo][1] patch, but better patch
formatting.

See https://github.com/openzfs/zfs/issues/11900
See https://github.com/openzfs/zfs/issues/15526

[1]: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/zfs-kmod/files/zfs-kmod-2.2.1-Disable-zfs_dmu_offset_next_sync-tunable-by-default.patch

(cherry picked from commit 9670ddc543)
2023-11-27 12:55:02 -05:00
Trolli Schmittlauch
9afe0db829 nixos/forgejo docs: correct phrasing
(cherry picked from commit 0e893a9f22)
2023-11-27 18:48:08 +01:00
Silvan Mosberger
d9bc7aeba7 Merge pull request #270451 from NixOS/backport-270440-to-release-23.11
[Backport release-23.11] slack: 4.34.121 -> 4.35.126
2023-11-27 18:33:38 +01:00
Silvan Mosberger
75b18b94ed slack: 4.34.121 -> 4.35.126
(cherry picked from commit 5075c3f6ec)
2023-11-27 17:14:20 +00:00
Someone Serge
cb1d60fa89 magma: respect the global isStatic
(cherry picked from commit 1e33c8819f)
2023-11-27 17:02:33 +00:00
Someone Serge
5f43325925 python311Packages.torch: fix typo in the cuda&&rocm error message
(cherry picked from commit 643464269f)
2023-11-27 17:02:33 +00:00
Someone Serge
face7e61a5 python311Packages.torch: choose magma at the expression level
...instead of at the callPackage site.
Addresses https://github.com/NixOS/nixpkgs/issues/268736

(cherry picked from commit 395b7cc35b)
2023-11-27 17:02:33 +00:00
Adam C. Stephens
76c42dcda8 Merge pull request #270295 from amarshall/backport-269097-to-release-23.11
[Backport release-23.11] zfs: 2.2.0 -> 2.2.1
2023-11-27 11:43:44 -05:00
Yifei Sun
e34b37843c osu-lazer-bin: remove version from name
Reported-by: Lord-Valen <lord_valen@protonmail.com>
(cherry picked from commit aecd00daa6)
2023-11-27 16:05:34 +00:00
Peder Bergebakken Sundt
5c9af7ee8b Merge pull request #270436 from NixOS/backport-270235-to-release-23.11
[Backport release-23.11] jo: add meta.mainProgram
2023-11-27 16:44:45 +01:00
Benoit de Chezelles
ec3fdf04ea jo: add meta.mainProgram
(cherry picked from commit eb6d53c504)
2023-11-27 15:43:37 +00:00
Nick Cao
271c95cf53 Merge pull request #270258 from NixOS/backport-270106-to-release-23.11
[Backport release-23.11] qgis: 3.34.0 -> 3.34.1
2023-11-27 10:28:32 -05:00
Nick Cao
eb95691d23 Merge pull request #270289 from NixOS/backport-270109-to-release-23.11
[Backport release-23.11] qgis-ltr: 3.28.12 -> 3.28.13
2023-11-27 10:28:12 -05:00
Nick Cao
b076935a86 Merge pull request #269909 from adamcstephens/backport-269883-to-release-23.11
[Backport release-23.11]  river: 0.2.4 -> 0.2.6, rivercarro: 0.1.4 -> 0.3.0
2023-11-27 09:56:16 -05:00
Nick Cao
a2173423c9 Merge pull request #270386 from NixOS/backport-270352-to-release-23.11
[Backport release-23.11] ocamlPackages.caqti*: improve meta.license
2023-11-27 09:53:07 -05:00
R. Ryantm
9c9a2be295 pgrok: 1.4.0 -> 1.4.1
(cherry picked from commit dbeda3f17f)
2023-11-27 14:41:28 +00:00
Nick Cao
b0494e609d Merge pull request #270317 from NixOS/backport-270059-to-release-23.11
[Backport release-23.11] python311Packages.clarifai: 9.7.1 -> 9.10.4; python311Packages.clarifai-grpc: 9.10.0 -> 9.10.5
2023-11-27 09:41:27 -05:00
Nick Cao
0e6503a05b Merge pull request #270274 from NixOS/backport-269536-to-release-23.11
[Backport release-23.11] mmlgui: unstable-2023-09-20 -> unstable-2023-11-16
2023-11-27 09:35:41 -05:00
K900
52af1de776 Merge pull request #270421 from NixOS/backport-265987-to-release-23.11
[Backport release-23.11] python3Packages.{shiboken6,pyside6}: 6.5.2 -> 6.6.0
2023-11-27 17:01:55 +03:00
Lily Foster
e72cda9f7a python3Packages.{shiboken6,pyside6}: 6.5.2 -> 6.6.0
(cherry picked from commit f272f575ab)
2023-11-27 14:01:18 +00:00
Lily Foster
f9e1604165 Merge pull request #270276 from NixOS/backport-257337-to-release-23.11
[Backport release-23.11] prefetch-yarn-deps: Fix handling of scoped packages
2023-11-27 08:33:02 -05:00
Silvan Mosberger
9838f429be kapacitor: fix aarch64-darwin build
(cherry picked from commit 63b5de1e53)
2023-11-27 13:15:44 +00:00
Manuel Frischknecht
7f706a07d2 kapacitor: fix build of embedded libflux dependency with current rust
The embedded `libflux` dependency of `kapacitor` fails to build with
more current rust tooling due to an unneeded `.clone()` call that
is promoted into an error message by a strict linting build config.

This introduces a patch that removes the offending method call.
The issue is already resolved upstream, but even the current `kapacitor`
version still depends on this specific version of `libflux` [1], and the
respective git commit contains a lot of other (automated) changes [2],
so cherry-picking the patch via a GitHub URL seems even more brittle.

[1]: https://github.com/influxdata/kapacitor/blob/v1.7.1/go.mod#L26
[2]: e7f7023848 (diff-96572e971d9e19b54290a434debbf7db054b21c9ce19035159542756ffb8ab87)

(cherry picked from commit 8e6e709ca1)
2023-11-27 13:15:44 +00:00
maralorn
fa1c8834c9 Merge pull request #270408 from NixOS/backport-270161-to-release-23.11
[Backport release-23.11] nix-output-monitor: 2.0.0.7 -> 2.1.1
2023-11-27 13:42:02 +01:00
maralorn
f0741aa779 nix-output-monitor: 2.0.0.7 -> 2.1.1
(cherry picked from commit 98a0153ced)
2023-11-27 12:39:53 +00:00
Peder Bergebakken Sundt
aa769cc97f Merge pull request #270390 from NixOS/backport-269643-to-release-23.11
[Backport release-23.11] samba: fix samba-tool
2023-11-27 12:58:03 +01:00
Mats
c0c4501dab samba: fix samba-tool
This commit addresses the following issues:
- samba-tool requiring python built with libxcrypt-legacy
- adding the missing markdown python package
- fixing the shebang patching so disallowedReferences passes

(cherry picked from commit 9b5cfd41d8)
2023-11-27 09:52:57 +00:00
Aaron L. Zeng
8d2a71ab47 ocamlPackages.caqti*: improve meta.license
See #269788.

(cherry picked from commit d28237a2cc)
2023-11-27 09:45:35 +00:00
adisbladis
260cc44547 Merge pull request #270285 from NixOS/backport-269637-to-release-23.11
[Backport release-23.11] lib.meta: Avoid attrset allocation in platformMatch
2023-11-27 22:00:14 +13:00
markuskowa
45be9e40f5 Merge pull request #270278 from NixOS/backport-269455-to-release-23.11
[Backport release-23.11] kamailio: 5.7.2 -> 5.7.3, refactor expression
2023-11-27 08:14:28 +01:00
Robert Schütz
8a13231bfb python311Packages.img2pdf: 0.5.0 -> 0.5.1
Changelog: https://gitlab.mister-muffin.de/josch/img2pdf/src/tag/0.5.1/CHANGES.rst
(cherry picked from commit 3d2902dd2e)
2023-11-27 06:59:01 +00:00
Robert Schütz
e88b7ebc5e diebahn: 1.5.0 -> 2.1.0
Diff: https://gitlab.com/schmiddi-on-mobile/diebahn/-/compare/1.5.0...2.1.0

Changelog: https://gitlab.com/schmiddi-on-mobile/railway/-/blob/2.1.0/CHANGELOG.md
(cherry picked from commit f31fc1b4a5)
2023-11-27 06:55:38 +00:00
Robert Schütz
0f684b2ee8 setzer: 61 -> 62
Diff: https://github.com/cvfosammmm/Setzer/compare/v61...v62
(cherry picked from commit 770c9bb52e)
2023-11-27 06:54:17 +00:00
Lin Jian
070b5cf9f7 Merge pull request #270342 from NixOS/backport-260902-to-release-23.11
[Backport release-23.11] preload: init at 0.6.4
2023-11-26 22:15:57 -06:00
Lin Jian
75549da375 Merge pull request #270341 from NixOS/backport-264661-to-release-23.11
[Backport release-23.11] nixos/dolibarr: add package option
2023-11-26 22:15:23 -06:00
LDprg
2c453c2c75 nixos/preload: init
(cherry picked from commit a0f5d5e500)
2023-11-27 04:14:51 +00:00
LDprg
77edc9d8bf preload: init at 0.6.4
(cherry picked from commit a08e49d5d2)
2023-11-27 04:14:51 +00:00
LDprg
af110be8d1 maintainers: add ldprg
(cherry picked from commit 2c820c1893)
2023-11-27 04:14:51 +00:00
Jakob Schöttl
238aed0b2b nixos/dolibarr: add package option
Allow users to easily use a different dolibarr version, e.g. version 18
(currently in unstable) instead of 16.

(cherry picked from commit 7a363cef5f)
2023-11-27 04:11:23 +00:00
Peder Bergebakken Sundt
d4e995928f Merge pull request #270326 from NixOS/backport-269786-to-release-23.11
[Backport release-23.11] tectonic: fixes #269167: tectonic build failure
2023-11-27 04:31:11 +01:00
Peder Bergebakken Sundt
1c1985b942 Merge pull request #270333 from NixOS/backport-269296-to-release-23.11
[Backport release-23.11] amdgpu_top: 0.1.11 -> 0.3.1
2023-11-27 04:17:00 +01:00
Peder Bergebakken Sundt
04901b89cc Merge pull request #270015 from NixOS/backport-269433-to-release-23.11
[Backport release-23.11] photofield: 0.11.0 -> 0.13.0
2023-11-27 04:07:22 +01:00
RadovanSk
224154ec44 amdgpu_top: 0.1.11 -> 0.3.1
(cherry picked from commit 99fdbbf06d)
2023-11-27 03:01:51 +00:00
Peter A.
1263998322 tectonic: fixed compilation issue
implements workaround for: https://github.com/NixOS/nixpkgs/issues/166205

inspired by similar fix: b6d4be13d0

(cherry picked from commit 2049b08b3b)
2023-11-27 02:26:27 +00:00
Peder Bergebakken Sundt
8bb8ec3bc1 Merge pull request #270302 from NixOS/backport-268670-to-release-23.11
[Backport release-23.11] osl: fix build, 1.12.13.0 -> 1.12.14.0
2023-11-27 03:12:55 +01:00
github-actions[bot]
d218f5e6e3 python311Packages.pyvoro: mark as broken and unmaintained, preparing for removal (#270041)
(cherry picked from commit 7aa812b06d)

Co-authored-by: Antoine Pietri <antoine.pietri1@gmail.com>
2023-11-27 10:25:58 +09:00
natsukium
e873281367 python311Packages.clarifai-grpc: 9.10.0 -> 9.10.5
Diff: https://github.com/Clarifai/clarifai-python-grpc/compare/9.10.0...9.10.5

Changelog: https://github.com/Clarifai/clarifai-python-grpc/releases/tag/9.10.5
(cherry picked from commit 219f5595b9)
2023-11-27 01:25:20 +00:00
natsukium
983dd833fd python311Packages.clarifai: 9.7.1 -> 9.10.4
Diff: https://github.com/Clarifai/clarifai-python/compare/9.7.3...9.10.4

Changelog: https://github.com/Clarifai/clarifai-python/releases/tag/9.10.4
(cherry picked from commit 1b8ad25047)
2023-11-27 01:25:20 +00:00
OTABI Tomoya
c6cccd0ac8 Merge pull request #270029 from NixOS/backport-266178-to-release-23.11
[Backport release-23.11] python3Packages.pykdl: fix build with Python 3.11
2023-11-27 10:08:16 +09:00
Peder Bergebakken Sundt
b037a29763 Merge pull request #270303 from NixOS/backport-263675-to-release-23.11
[Backport release-23.11] armagetronad: 0.2.9.1.0 -> 0.2.9.1.1 + refactor
2023-11-27 01:53:18 +01:00
Robert Schütz
6197fbf7ec libdeltachat: add deltachat-desktop to passthru.tests
(cherry picked from commit d07bce0acb)
2023-11-27 00:36:24 +00:00
Robert Schütz
c2905e5362 deltachat-desktop: ensure libdeltachat version matches jsonrpc-client
(cherry picked from commit 80888d4fd8)
2023-11-27 00:36:23 +00:00
Robert Schütz
943347cbbd deltachat-desktop: 1.41.4 -> 1.42.1
Diff: https://github.com/deltachat/deltachat-desktop/compare/v1.41.4...v1.42.1

Changelog: https://github.com/deltachat/deltachat-desktop/blob/v1.42.1/CHANGELOG.md
(cherry picked from commit 3d8eb1b5f7)
2023-11-27 00:36:23 +00:00
Robert Schütz
0d8a197b3e libdeltachat: 1.131.6 -> 1.131.7
Diff: https://github.com/deltachat/deltachat-core-rust/compare/v1.131.6...v1.131.7

Changelog: https://github.com/deltachat/deltachat-core-rust/blob/v1.131.7/CHANGELOG.md
(cherry picked from commit 8395af32dc)
2023-11-27 00:36:23 +00:00
github-actions[bot]
d5e34f5e8d Merge release-23.11 into staging-next-23.11 2023-11-27 00:14:36 +00:00
Morgan Jones
d383e4489d armagetronad: reproducible build by setting version
(cherry picked from commit 6f41e0b9af)
2023-11-27 00:03:57 +00:00
Morgan Jones
5326135a50 armagetronad: 0.2.9.1.0 -> 0.2.9.1.1 + passthrus for other versions
Support the following passthrus for more obscure game server setups:

- `armagetronad."0.2.9-sty+ct+ap"[.dedicated]`
- `armagetronad."0.4"[.dedicated]`

(cherry picked from commit f5803331cf)
2023-11-27 00:03:57 +00:00
Weijia Wang
3fae5832ad osl: fix build on darwin
(cherry picked from commit 12b56aea48)
2023-11-27 00:03:41 +00:00
ShaddyDC
e93a828d4c osl: fix build, 1.12.13.0 -> 1.12.14.0
(cherry picked from commit 96e3dd4aa1)
2023-11-27 00:03:41 +00:00
Jan Tojnar
20fd38001f inkscape: 1.3 → 1.3.1
https://inkscape.org/news/2023/11/18/big-small-release-inkscape-131-is-out/
https://media.inkscape.org/media/doc/release_notes/1.3.1/Inkscape_1.3.1.html
https://gitlab.com/inkscape/inkscape/-/compare/INKSCAPE_1_3...INKSCAPE_1_3_1
b4b9cbbb9f...e014a9958a
18fc32f997...cf523857e4

No build changes; lib2geom submodule, picking the patches in parent commit.

(cherry picked from commit 1975237b43)
2023-11-27 00:28:46 +01:00
Jan Tojnar
ed8a0d56c8 lib2geom: pick patch from Inkscape 1.3.1
Inkscape 1.3.1 updates the lib2geom submodule as follows:
18fc32f997...cf523857e4

We already have the clang patch and do not care about mingw,
let’s backport the ellipsis patch since it affects rendering:

https://gitlab.com/inkscape/inkscape/-/issues/4445
(cherry picked from commit 97a7458055)
2023-11-27 00:28:46 +01:00
Jörg Thalheim
e0350ce899 zfsUnstable: 2.2.1-unstable-2023-10-21 -> 2.2.1
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
(cherry picked from commit 55b737831b)
2023-11-26 18:21:54 -05:00
Andrew Marshall
3283cdc931 zfs: 2.2.0 -> 2.2.1
Now supports Kernel 6.6.

(cherry picked from commit 365cc96597)
2023-11-26 18:21:54 -05:00
Nick Cao
3020da0a4f Merge pull request #270171 from NixOS/backport-270094-to-release-23.11
[Backport release-23.11] centrifugo: 5.1.1 -> 5.1.2
2023-11-26 18:07:19 -05:00
Ivan Mincik
389b5e2d46 qgis-ltr: 3.28.12 -> 3.28.13
(cherry picked from commit 7a834eeb82)
2023-11-26 22:45:48 +00:00
Robert Schütz
2ed6b43a46 Merge pull request #269245 from NixOS/backport-268951-to-release-23.11
[Backport release-23.11] deltachat-desktop: 1.41.1 -> 1.41.4
2023-11-26 14:43:33 -08:00
adisbladis
6c7adabe4b lib.meta: Avoid attrset allocation in platformMatch
Benchmarks (`nix-instantiate ./. -A python3`)

- Before
``` json
{
  "cpuTime": 0.30625399947166443,
  "envs": {
    "bytes": 4484216,
    "elements": 221443,
    "number": 169542
  },
  "gc": {
    "heapSize": 402915328,
    "totalBytes": 53091024
  },
  "list": {
    "bytes": 749424,
    "concats": 4242,
    "elements": 93678
  },
  "nrAvoided": 253991,
  "nrFunctionCalls": 149848,
  "nrLookups": 49614,
  "nrOpUpdateValuesCopied": 1588326,
  "nrOpUpdates": 10106,
  "nrPrimOpCalls": 130356,
  "nrThunks": 359013,
  "sets": {
    "bytes": 30432320,
    "elements": 1860540,
    "number": 41480
  },
  "sizes": {
    "Attr": 16,
    "Bindings": 16,
    "Env": 16,
    "Value": 24
  },
  "symbols": {
    "bytes": 236218,
    "number": 24459
  },
  "values": {
    "bytes": 10504632,
    "number": 437693
  }
}
```

- After
```
{
  "cpuTime": 0.29695799946784973,
  "envs": {
    "bytes": 3296712,
    "elements": 169055,
    "number": 121517
  },
  "gc": {
    "heapSize": 402915328,
    "totalBytes": 49044992
  },
  "list": {
    "bytes": 504928,
    "concats": 4242,
    "elements": 63116
  },
  "nrAvoided": 175403,
  "nrFunctionCalls": 110554,
  "nrLookups": 44907,
  "nrOpUpdateValuesCopied": 1588326,
  "nrOpUpdates": 10106,
  "nrPrimOpCalls": 82330,
  "nrThunks": 306625,
  "sets": {
    "bytes": 29943328,
    "elements": 1843076,
    "number": 28382
  },
  "sizes": {
    "Attr": 16,
    "Bindings": 16,
    "Env": 16,
    "Value": 24
  },
  "symbols": {
    "bytes": 236218,
    "number": 24459
  },
  "values": {
    "bytes": 9037752,
    "number": 376573
  }
}
```

(cherry picked from commit 4b4d413817)
2023-11-26 22:29:10 +00:00
Markus Kowalewski
a8f126d72d kamailio: add TLS support
(cherry picked from commit 3b8d3c6c61)
2023-11-26 21:50:51 +00:00
Markus Kowalewski
9d1ddd9068 kamailio: make "modules" customiziable by overrideAttrs
(cherry picked from commit 231b889d79)
2023-11-26 21:50:51 +00:00
Markus Kowalewski
4af6579fe5 kamailio: make "modules" customiziable by overrideAttrs
(cherry picked from commit 9f3a21f0e9)
2023-11-26 21:50:51 +00:00
Markus Kowalewski
ab29cdf197 kamailio: 5.7.2 -> 5.7.3
(cherry picked from commit c59b67fde0)
2023-11-26 21:50:50 +00:00
Markus Kowalewski
40e63e422c kamailio: refactor expression
* remove pkgs from input
* do not override build and install phase (not needed)
* fix src ULR for autoupdates
* enable parallel builds
* move some packages to nativeBuildInputs

(cherry picked from commit c1bf4079c0)
2023-11-26 21:50:50 +00:00
Lorenz Leutgeb
49c1e1e6ed prefetch-yarn-deps: Fix access to .resolved
... and simplify `prefetchYarnDeps`

(cherry picked from commit 29cf6a0422)
2023-11-26 21:50:00 +00:00
Lorenz Leutgeb
40e76214fe prefetch-yarn-deps: Fix parsing of scoped packages
(cherry picked from commit 3843224a55)
2023-11-26 21:50:00 +00:00
R. Ryantm
df8ab56be1 mmlgui: unstable-2023-09-20 -> unstable-2023-11-16
(cherry picked from commit 09dbc6d462)
2023-11-26 21:45:56 +00:00
Pierre Bourdon
0cdc719613 Merge pull request #270267 from NixOS/backport-270193-to-release-23.11
[Backport release-23.11] python3Packages.yamlpath: mark as broken
2023-11-26 22:32:36 +01:00
mfrischknecht
b6b9d25e18 python3Packages.yamlpath: explain why the package is broken
Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
(cherry picked from commit 02e9c1685d)
2023-11-26 21:32:13 +00:00
Manuel Frischknecht
8bcbfc02e3 python3Packages.yamlpath: mark as broken
`yamlpath` depends on `ruamel.yaml` <= 0.17.21 [1], but the packaged
version in Nixpkgs is on version 0.17.32 by now. This breaks a lot
of the libraries own unit tests.

As I don't see anything in Nixpkgs depending on `yamlpath`, this simply
marks the package as broken.

[1]: 9bbddea520/setup.py (L48)

(cherry picked from commit 53b47693e1)
2023-11-26 21:32:13 +00:00
Mario Rodas
19eb8a60fa Merge pull request #270044 from NixOS/backport-269810-to-release-23.11
[Backport release-23.11] python311Packages.uri-template: 1.2.0 -> 1.3.0
2023-11-26 16:24:48 -05:00
Ivan Mincik
854055c459 qgis: 3.34.0 -> 3.34.1
(cherry picked from commit a16cdc2e39)
2023-11-26 20:59:11 +00:00
Maciej Krüger
52ebd31853 Merge pull request #270255 from NixOS/backport-265728-to-release-23.11 2023-11-26 21:38:24 +01:00
Maciej Krüger
6a6d814ea7 Merge pull request #270253 from NixOS/backport-265722-to-release-23.11 2023-11-26 21:38:10 +01:00
nicoo
f0dd0185a4 nixos/ssm-agent: Handle sudo-rs too
(cherry picked from commit 690f027251)
2023-11-26 20:37:43 +00:00
nicoo
0307447859 nixos/btrbk: Support both Miller's sudo and sudo-rs
(cherry picked from commit 19af28537b)
2023-11-26 20:36:46 +00:00
Robert Hensing
1f33d80492 Merge pull request #270220 from NixOS/backport-269970-to-release-23.11
[Backport release-23.11] nixos/containers: warn if containers are used but disabled
2023-11-26 20:38:01 +01:00
Nick Cao
ed60d66d1b Merge pull request #270170 from NixOS/backport-270091-to-release-23.11
[Backport release-23.11] netbird-ui: fix broken systray icon path (resolves build failure)
2023-11-26 14:37:18 -05:00
Robert Hensing
5c3e31b7d2 Merge pull request #270217 from NixOS/backport-248554-to-release-23.11
[Backport release-23.11] darwin.linuxBuilder: Fix working directory in documentation
2023-11-26 20:26:41 +01:00
pennae
b94fd173e3 Merge pull request #270219 from NixOS/backport-269942-to-release-23.11
[Backport release-23.11] nixos-render-docs: take header and footer on CLI
2023-11-26 20:25:19 +01:00
Maciej Krüger
757b704ca5 Merge pull request #270228 from NixOS/backport-263471-to-release-23.11 2023-11-26 20:19:29 +01:00
pennae
788526caaf Merge pull request #270231 from NixOS/backport-269918-to-release-23.11
[Backport release-23.11] nixos-render-docs: fix mypy test
2023-11-26 20:16:59 +01:00
pennae
107a1feb36 nixos-render-docs: fix mypy test
markdown-it-py somewhat recently added more type annotations to their
code, obsoleting a few lint-ignores in nrd.

(cherry picked from commit 14d4491000)
2023-11-26 19:05:30 +00:00
nicoo
20d2649068 nixos/sudo-rs: Move support for pam_ssh_agent_auth(8) to PAM's NixOS module
Similar to delroth's suggestion in #262790.

(cherry picked from commit bcc2d1238a)
2023-11-26 18:58:01 +00:00
nicoo
9f4b1c3050 nixos/sudo-rs: Clarify security.sudo-rs.enable's description
(cherry picked from commit f5d059b1f5)
2023-11-26 18:58:01 +00:00
nicoo
729c89d242 nixos/sudo-rs: Refactor option definitions
(cherry picked from commit 46aaa5be70)
2023-11-26 18:58:01 +00:00
nicoo
a01493271f nixos/sudo-rs: refactor processing of cfg.extraRules
(cherry picked from commit 03db94319a)
2023-11-26 18:58:01 +00:00
nicoo
39608712fb nixos/tests/sudo-rs: cleanup
(cherry picked from commit 211c4b0545)
2023-11-26 18:58:01 +00:00
nicoo
229f862936 nixos/sudo-rs: Fix bug putting the wrong version of sudo in environment.systemPackages
(cherry picked from commit 9b0a63c2fe)
2023-11-26 18:58:00 +00:00
nicoo
6dd11c64ed nixos/sudo-rs: Drop checks for sudo implementation
(cherry picked from commit 165b600f01)
2023-11-26 18:58:00 +00:00
nicoo
6c19b06361 nixos/sudo-rs: uniformize ssh-agent auth behaviour with security.sudo
(cherry picked from commit cd42b18a2c)
2023-11-26 18:58:00 +00:00
nicoo
3f7b1a8758 nixos/release-notes: Document pitfall when switching to sudo-rs
(cherry picked from commit c1b5226cd4)
2023-11-26 18:58:00 +00:00
nicoo
1fb44a71bc nixos/sudo-rs: Simplify activation
(cherry picked from commit b05648b541)
2023-11-26 18:58:00 +00:00
nicoo
fac6fb2af2 nixos/release-notes: Tidy-up location of sudo-rs link definition
Presumably introduced when reverting #253876

(cherry picked from commit 572413151a)
2023-11-26 18:58:00 +00:00
Robert Schütz
24cf11a2a0 Merge pull request #269968 from NixOS/backport-268742-to-release-23.11
[Backport release-23.11] igraph: 0.10.7 -> 0.10.8
2023-11-26 10:56:55 -08:00
emilylange
d015a0fc7d nixos/containers: warn if containers are used but disabled
This is a follow-up to 8dfe8e447e.

(cherry picked from commit 1c404d2584)
2023-11-26 18:40:00 +00:00
Viktor Kronvall
56c455509a nixos-render-docs: header and footer as list[str]
(cherry picked from commit 98ba0aed73)
2023-11-26 18:35:55 +00:00
Viktor Kronvall
1accd93eca nixos-render-docs: take header and footer on CLI
This commit generalizes nixos-render-docs for manpage generation
to take the header preamble and footer postscript as file paths
as CLI flags --header and --footer.

(cherry picked from commit 9bfa2e36a2)
2023-11-26 18:35:55 +00:00
Gabriella Gonzalez
c8dec19ac0 darwin.linuxBuilder: Fix working directory in documentation
This fixes the working directory for the suggested flake, as originally
suggested by @MaxDaten in:

https://github.com/NixOS/nixpkgs/issues/229542#issuecomment-1674886874

… and then amended by @Enzime in:

https://github.com/NixOS/nixpkgs/pull/248554#issuecomment-1676825733
(cherry picked from commit 4cb41faba7)
2023-11-26 18:35:22 +00:00
Norbert Melzer
a47fdb7719 Merge pull request #270033 from NixOS/backport-269892-to-release-23.11
[Backport release-23.11] rustic-rs: fix build on darwin
2023-11-26 18:53:28 +01:00
R. Ryantm
2c9d9c8a75 jellyfin: 10.8.11 -> 10.8.12
(cherry picked from commit 46be2f5f7a)
2023-11-26 18:25:15 +01:00
R. Ryantm
d509d3db16 jellyfin-web: 10.8.11 -> 10.8.12
(cherry picked from commit 161368a1e4)
2023-11-26 18:25:03 +01:00
Fabian Affolter
983d982048 python311Packages.bitstring: 4.1.2 -> 4.1.3
Changelog: https://github.com/scott-griffiths/bitstring/releases/tag/bitstring-4.1.3
(cherry picked from commit b3f541eb26)
2023-11-26 18:20:05 +01:00
Robert Scott
0988231870 Merge pull request #270192 from NixOS/backport-269034-to-release-23.11
[Backport release-23.11] lp_solve: ignore implicit int warnings
2023-11-26 17:06:49 +00:00
Silvan Mosberger
9f939f035d Merge pull request #270191 from NixOS/backport-269854-to-release-23.11
[Backport release-23.11] qrscan: Pin libclang to version 15
2023-11-26 17:45:34 +01:00
annalee
c2a6e083b8 lp_solve: ignore implicit int warnings, add x64 darwin ldflags
the configuration code generates small c programs with a main function
sans return type specifer. this causes clang builds to fail. add
'-Wno-error=implicit-int' to fix the build.

add -headerpad_max_install_names to env.NIX_LDFLAGS for x64 darwin

(cherry picked from commit 540ea20215)
2023-11-26 16:42:14 +00:00
Andreas Zweili
1e3eafe41f qrscan: Pin libclang to version 15
(cherry picked from commit 18c3616b0e)
2023-11-26 16:40:19 +00:00
Pierre Bourdon
34ab6f6197 Merge pull request #270181 from NixOS/backport-270165-to-release-23.11
[Backport release-23.11] linuxPackages.systemtap: fix cross-build by depending on host Python
2023-11-26 17:30:12 +01:00
Robert Schütz
5ff37cd458 Merge pull request #270009 from NixOS/backport-269821-to-release-23.11
[Backport release-23.11] python311Packages.radios: 0.1.1 -> 0.3.0
2023-11-26 08:22:04 -08:00
Robert Schütz
5739ab8343 Merge pull request #269973 from NixOS/backport-265957-to-release-23.11
[Backport release-23.11] impression: 2.1 -> 3.0.1
2023-11-26 08:12:43 -08:00
Robert Schütz
80ee2474d5 Merge pull request #269972 from NixOS/backport-259822-to-release-23.11
[Backport release-23.11] warp: 0.5.4 -> 0.6.0
2023-11-26 08:12:01 -08:00
Pierre Bourdon
90ef1879fb linuxPackages.systemtap: fix cross-build by depending on host Python
(cherry picked from commit bc5c75e9ee)
2023-11-26 16:08:31 +00:00
Bobby Rong
0e33e7f8a4 Merge pull request #270180 from NixOS/backport-269573-to-release-23.11
[Backport release-23.11] xdg-desktop-portal: fix disabling Geo location
2023-11-27 00:03:47 +08:00
Patrick Steinhardt
78d87d6f47 xdg-desktop-portal: fix disabling Geo location
The "geoclue" Meson option is defined to have type "feature", which
means that the set of possible options is "enabled", "disabled" or
"auto". We pass "false" though when the user has disabled Geo location
support, which is wrong and causes the build to fail:

> meson.build:1:0: ERROR: Value "false" (of type "string") for combo option "Enable Geoclue support. Needed for location portal" is not one of the choices. Possible choices are (as string): "enabled", "disabled", "auto".

This broke in c585543ccd (xdg-desktop-portal: 1.16.0 → 1.17.0,
2023-08-08) where we started using the new Meson-based build system
instead of the autotools-based one. Fix it by using "disabled" instead.

(cherry picked from commit f8dd4b46cc)
2023-11-26 16:03:35 +00:00
Peder Bergebakken Sundt
757c42d77d Merge pull request #270054 from NixOS/backport-258205-to-release-23.11
[Backport release-23.11] kicad: 7.0.7 -> 7.0.9
2023-11-26 16:59:53 +01:00
Nick Cao
6b56623c93 Merge pull request #270063 from NixOS/backport-269893-to-release-23.11
[Backport release-23.11] gnomeExtensions.pop-shell: unstable-2023-04-27 -> unstable-2023-11-10
2023-11-26 10:51:14 -05:00
Nick Cao
376f565a15 Merge pull request #270138 from NixOS/backport-270101-to-release-23.11
[Backport release-23.11] osquery: Apply unreleased upstream patch to build using Clang 16
2023-11-26 10:49:10 -05:00
Ivan Trubach
bf44cc930e centrifugo: 5.1.1 -> 5.1.2
(cherry picked from commit 3eaa5ffac3)
2023-11-26 15:44:10 +00:00
the-furry-hubofeverything
9fc1b4b395 netbird-ui: fix broken systray icon path
Resolves build failure

(cherry picked from commit 19b442691f)
2023-11-26 15:42:53 +00:00
Yueh-Shun Li
1ff97cb952 apptainer, singularity: make LOCALSTATEDIR internal by default
Use "$out/var/lib" as LOCALSTATEDIR configuration value
by default intsead of "/var/lib"
as a way toward top-level-directory independent runtime.

Add input argument externalLocalStateDir to optionally specify the
path to external LOCALSTATEDIR if not null.

Add NixOS module option
programs.singularity.enableExternalLocalStateDir (default to true)
to use "/var/lib" as LOCALSTATEDIR.
2023-11-26 23:40:03 +08:00
Yueh-Shun Li
7e2453c351 apptainer, singularity: drop obsolete LOCALSTATEDIR dirs
Leave only the SESSIONDIR, which is "$LOCALSTATEDIR/$projectName/mnt/session"
2023-11-26 23:40:03 +08:00
Robert Scott
94351a10e4 Merge pull request #269990 from NixOS/backport-269839-to-release-23.11
[Backport release-23.11] augeas: 1.12.0 -> 1.14.1; fix darwin build
2023-11-26 15:34:03 +00:00
Robert Scott
ceaf74fb93 Merge pull request #270022 from NixOS/backport-268853-to-release-23.11
[Backport release-23.11] gvisor: 20221102.1 -> 20231113.0
2023-11-26 15:01:31 +00:00
Azat Bahawi
025beac954 Merge pull request #270151 from NixOS/backport-270125-to-release-23.11
[Backport release-23.11] iaito: fix desktop entry icon
2023-11-26 17:23:13 +03:00
Azat Bahawi
7bd31b0150 iaito: fix desktop entry icon
(cherry picked from commit fc388a6dfe)
2023-11-26 14:20:53 +00:00
Pierre Bourdon
6601717ea7 Merge pull request #269397 from NixOS/backport-268561-to-release-23.11
[Backport release-23.11] python3Packages.lpc-checksum: init at 3.0.0
2023-11-26 15:10:42 +01:00
Pierre Bourdon
11ce9e8401 Merge pull request #269525 from NixOS/backport-269191-to-release-23.11
[Backport release-23.11] protege-distribution: 5.5.0 -> 5.6.3
2023-11-26 15:09:12 +01:00
Paul Meyer
0a8c0d45f7 dnf5: add version test
(cherry picked from commit 6dc8cbd7a3)
2023-11-26 14:07:34 +00:00
Paul Meyer
a81c7b9796 dnf5: add man pages
(cherry picked from commit 8c803cf496)
2023-11-26 14:07:33 +00:00
Paul Meyer
7392c80d2c dnf5: re-enable tests
(cherry picked from commit 990e21fdaf)
2023-11-26 14:07:33 +00:00
Paul Meyer
8eac21272a dnf5: 5.1.7 -> 5.1.8
Adding `libyaml`, as the following output was observed:

dnf5> -- Checking for module 'modulemd-2.0>=2.11.2'
dnf5> --   Found modulemd-2.0, version 2.15.0
dnf5> Package yaml-0.1 was not found in the pkg-config search path.
dnf5> Perhaps you should add the directory containing `yaml-0.1.pc'
dnf5> to the PKG_CONFIG_PATH environment variable
dnf5> Package 'yaml-0.1', required by 'modulemd-2.0', not found

(cherry picked from commit 0890159e5c)
2023-11-26 14:07:33 +00:00
Pierre Bourdon
f8174fb2c8 Merge pull request #270140 from NixOS/backport-269889-to-release-23.11
[Backport release-23.11] {tor,mullvad}-browser: add missing libGL required for wayland
2023-11-26 15:07:25 +01:00
Adam C. Stephens
eacda838b1 Merge pull request #270026 from NixOS/backport-269877-to-release-23.11
[Backport release-23.11] edk2/OVMF: various fixes (cross), features (RISC-V), security updates (2023-11)
2023-11-26 09:06:21 -05:00
Xavier Vello
206767a484 datadog-agent: fix metric submission
(cherry picked from commit fa6d090ba3)
2023-11-26 13:56:53 +00:00
Pierre Bourdon
04a70ee4eb Merge pull request #269334 from NixOS/backport-268556-to-release-23.11
[Backport release-23.11] mcuboot-imgtool: fix pname
2023-11-26 14:55:00 +01:00
Felix Schröter
bf37122237 mullvad-browser: add missing libGL required for wayland
(cherry picked from commit d9b5076e33)
2023-11-26 13:36:43 +00:00
Felix Schröter
956e6538a3 tor-browser: add missing libGL required for wayland
(cherry picked from commit 2c477ed32d)
2023-11-26 13:36:43 +00:00
Pierre Bourdon
e95ee713be Merge pull request #269764 from NixOS/backport-269163-to-release-23.11
[Backport release-23.11] tor-browser: 13.0.1 -> 13.0.5, mullvad-browser: 13.0.1 -> 13.0.4
2023-11-26 14:35:49 +01:00
Manuel Frischknecht
594d177d66 osquery: also apply Use-locale.h-instead-of-removed-xlocale.h-header.patch on aarch64
The patch file fixes a build issue due to a missing `xlocale.h` header,
but *only* for x86. aarch64 actually has the same issue, so expanding
it hopefully also fixes that build, too.

(cherry picked from commit 8110ae5f41)
2023-11-26 13:27:00 +00:00
Manuel Frischknecht
e0f67235f2 osquery: add unreleased upstream patch for current Clang version
osquery uses vendored boost libraries that still rely on old
standard types like `std::unary_function` (deprecated since
C++11, removed in C++17) which breaks the build with Clang 16.

Upstream already contains a fix [1] that hasn't been released yet.

[1]: 222991a15b

(cherry picked from commit c9e65df9df)
2023-11-26 13:26:59 +00:00
Silvan Mosberger
8f8d3d79ba Merge pull request #269849 from NixOS/backport-250545-to-release-23.11
[Backport release-23.11] halide: 15.0.1 -> 16.0.0
2023-11-26 13:25:54 +01:00
Silvan Mosberger
b2f31e717e Merge pull request #269848 from NixOS/backport-269243-to-release-23.11
[Backport release-23.11] petsc: 3.19.2 -> 3.19.4, fix tests, add more options
2023-11-26 13:25:02 +01:00
Pierre Bourdon
e42a638bef Merge pull request #270116 from NixOS/backport-269954-to-release-23.11
[Backport release-23.11] nixos/tmate-ssh-server: fix tmate-client-config script
2023-11-26 12:47:31 +01:00
Ivan Mincik
ed624ca2d3 nixos/tmate-ssh-server: fix tmate-client-config script
(cherry picked from commit df254b2dd2)
2023-11-26 11:42:35 +00:00
Felix Bühler
2acca4b403 Merge pull request #270039 from NixOS/backport-258567-to-release-23.11
[Backport release-23.11] newsflash: 2.3.1 -> 3.0.2
2023-11-26 11:33:57 +01:00
Auguste Baum
2fec28b389 python3Packages.wasmer-compiler-llvm: fix build failure
(cherry picked from commit c4cd72586f)
2023-11-26 09:19:15 +00:00
Atemu
f616fe0bca Merge pull request #269986 from NixOS/backport-269416-to-release-23.11
[Backport release-23.11] linux_xanmod, linux_xanmod_latest: 2023-11-20
2023-11-26 10:05:13 +01:00
Dawid Dziurla
9956441a4e gnomeExtensions.pop-shell: unstable-2023-04-27 -> unstable-2023-11-10
(cherry picked from commit da87e679f5)
2023-11-26 08:43:37 +00:00
Evils
5cdbc647c8 kicad: 7.0.8 -> 7.0.9
(cherry picked from commit 3580ff791f)
2023-11-26 06:38:56 +00:00
Evils
c87942b203 kicad: 7.0.7 -> 7.0.8
(cherry picked from commit 6d6e7afdc8)
2023-11-26 06:38:56 +00:00
Vladimír Čunát
363facf450 Merge #270048: gst_all_1.*: 1.22.6 -> 1.22.7
...into staging-next-23.11
2023-11-26 06:25:51 +01:00
Vladimír Čunát
11d11d0e05 Merge branch 'release-23.11' into staging-next-23.11 2023-11-26 06:24:23 +01:00
Lily Foster
0c4903bc06 python311Packages.gst-python: 1.22.6 -> 1.22.7
(cherry picked from commit 0e55a04e65)
2023-11-26 05:20:38 +00:00
Lily Foster
73a64304f8 gst_all_1.gst-editing-services: 1.22.6 -> 1.22.7
(cherry picked from commit 94f7fa9544)
2023-11-26 05:20:38 +00:00
Lily Foster
7df66729af gst_all_1.gst-rtsp-server: 1.22.6 -> 1.22.7
(cherry picked from commit 6858aabf62)
2023-11-26 05:20:38 +00:00
Lily Foster
8c11abf96d gst_all_1.gst-devtools: 1.22.6 -> 1.22.7
(cherry picked from commit f8929124db)
2023-11-26 05:20:38 +00:00
Lily Foster
09c1a7a470 gst_all_1.gst-vaapi: 1.22.6 -> 1.22.7
(cherry picked from commit db986621b5)
2023-11-26 05:20:38 +00:00
Lily Foster
22657d43aa gst_all_1.gst-libav: 1.22.6 -> 1.22.7
(cherry picked from commit 2704423053)
2023-11-26 05:20:38 +00:00
Lily Foster
de44b58bb7 gst_all_1.gst-plugins-ugly: 1.22.6 -> 1.22.7
(cherry picked from commit 0628efe77e)
2023-11-26 05:20:38 +00:00
Lily Foster
d631290ff3 gst_all_1.gst-plugins-bad: 1.22.6 -> 1.22.7
(cherry picked from commit fbbd5fca7a)
2023-11-26 05:20:38 +00:00
Lily Foster
2c0fc80d0d gst_all_1.gst-plugins-good: 1.22.6 -> 1.22.7
(cherry picked from commit 4ae96968a2)
2023-11-26 05:20:37 +00:00
Lily Foster
8144ac38dc gst_all_1.gst-plugins-base: 1.22.6 -> 1.22.7
(cherry picked from commit 3b8197a2b7)
2023-11-26 05:20:37 +00:00
Lily Foster
6bf0a26fab gst_all_1.gstreamer: 1.22.6 -> 1.22.7
(cherry picked from commit b3d32f5302)
2023-11-26 05:20:37 +00:00
Fabian Affolter
937edb6590 python311Packages.phik: refactor, disable failing tests
(cherry picked from commit fc1c549b56)
2023-11-26 04:52:43 +00:00
Fabian Affolter
b44ebb5f50 python311Packages.uri-template: 1.2.0 -> 1.3.0
Diff: https://github.com/plinss/uri_template/compare/refs/tags/v1.2.0...v1.3.0
(cherry picked from commit 6011769ece)
2023-11-26 04:52:43 +00:00
Felix Buehler
57bda1edca newsflash: 2.3.1 -> 3.0.2
(cherry picked from commit c4f2f4530c)
2023-11-26 04:02:46 +00:00
Simon Žlender
23d67313d9 mcrypt: fix build on darwin
(cherry picked from commit 986d96a355)
2023-11-26 03:50:47 +00:00
Simon Žlender
a57dbc298c libmcrypt: fix build on darwin
(cherry picked from commit a9cb4dc2ef)
2023-11-26 03:50:46 +00:00
Mathis Antony
083441d1c3 rustic-rs: fix build on darwin
- Add `apple_sdk.SystemConfiguration` dependency

(cherry picked from commit f5b7885e0c)
2023-11-26 03:41:03 +00:00
Mathis Antony
86cf84458a pythonPackages.pyheck: fix build on darwin
- Add libiconv dependency

(cherry picked from commit 07390fcb4a)
2023-11-26 03:26:48 +00:00
Ben Wolsieffer
c1dede9842 python3Packages.pykdl: use system pybind11
pykdl 1.5.1 only supports using a vendored copy of pybind11, but this
version doesn't support Python 3.11. Therefore, backport an upstream
patch that allows using a system pybind11 installation.

(cherry picked from commit 20135addf0)
2023-11-26 03:21:26 +00:00
Mario Rodas
d572fb0545 Merge pull request #269974 from NixOS/backport-269292-to-release-23.11
[Backport release-23.11] libpostal: fix on darwin
2023-11-25 22:19:00 -05:00
Adam C. Stephens
4f067efb87 Merge pull request #269984 from NixOS/backport-269916-to-release-23.11
[Backport release-23.11] forgejo: 1.20.5-0 -> 1.20.5-1
2023-11-25 22:04:57 -05:00
OTABI Tomoya
dbe8f689f1 Merge pull request #269824 from NixOS/backport-269640-to-release-23.11
[Backport release-23.11] dssp: 4.4.4.1 -> 4.4.5
2023-11-26 11:26:22 +09:00
Robert Schütz
37e9abc3b3 Merge pull request #269967 from NixOS/backport-268745-to-release-23.11
[Backport release-23.11] python311Packages.rapidfuzz: 3.4.0 -> 3.5.2
2023-11-25 18:00:19 -08:00
Raito Bezarius
e9c0d46ea3 OVMF: mark broken on Darwin
https://hydra.nixos.org/build/241925714/nixlog/2
(cherry picked from commit b0eed3a0ac)
2023-11-26 01:32:32 +00:00
Raito Bezarius
d0687a732f OVMF: support RISC-V
Built according to https://github.com/tianocore/edk2/tree/master/OvmfPkg/RiscVVirt
and 884f2fa7ed.

(cherry picked from commit db9b8f36df)
2023-11-26 01:32:32 +00:00
Raito Bezarius
8a3dd90769 OVMF: disable sourceDebug by default
`sourceDebug` enables a source-level debugger agent inside the UEFI code
that can be leveraged via a certain bus (USB or serial for example) to debug the platform.

See: https://github.com/tianocore/tianocore.github.io/wiki/SourceLevelDebugPkg for more information.
`sourceDebug` is almost something you never want when you debug UEFI in a virtual machine.

Debugging with GDB can be achieved via: https://github.com/tianocore/tianocore.github.io/wiki/How-to-debug-OVMF-with-QEMU-using-GDB.

(cherry picked from commit 770194fac1)
2023-11-26 01:32:32 +00:00
Raito Bezarius
f1d97c980a edk2: support RISC-V
EDK2 has a good support of RISC-V nowadays.

(cherry picked from commit 6a2ed3adf2)
2023-11-26 01:32:32 +00:00
Raito Bezarius
99c106153c edk2: 202308 -> 202311
https://github.com/tianocore/edk2/releases/tag/edk2-stable202311
(cherry picked from commit e99c920fb1)
2023-11-26 01:32:32 +00:00
Raito Bezarius
44e8a77f4c edk2: fix cross compilation
`libuuid` is actually a dependency of the host platform and
should not be tucked in `depBuildBuild`.

Also, we don't need `buildPackages.util-linux` for the compilation.

(cherry picked from commit ff3adab370)
2023-11-26 01:32:32 +00:00
Yongun Seong
a39d0651b6 nixosTests.gvisor: remove flaky test
(cherry picked from commit ee59d35be8)
2023-11-26 00:44:08 +00:00
Yongun Seong
1087813842 gvisor: 20221102.1 -> 20231113.0
Also, unbreak on go >= 1.21

(cherry picked from commit d9b470bd0b)
2023-11-26 00:44:08 +00:00
Anthony Roussel
e3eecbdcf4 photofield: add meta.mainProgram
(cherry picked from commit 7e9c976322)
2023-11-26 00:05:13 +00:00
Anthony Roussel
b2a773d652 photofield: add passthru.tests.version
(cherry picked from commit 469d56aedd)
2023-11-26 00:05:13 +00:00
Anthony Roussel
54f3fadd88 photofield: 0.11.0 -> 0.13.0
https://github.com/SmilyOrg/photofield/compare/v0.11.0...v0.13.0
(cherry picked from commit f8adf710cb)
2023-11-26 00:05:13 +00:00
natsukium
a9d204e786 python311Packages.radios: fix darwin sandbox build
(cherry picked from commit 6b6e39e08d)
2023-11-25 23:33:35 +00:00
natsukium
eba65b9f3c python311Packages.radios: 0.1.1 -> 0.3.0
Diff: https://github.com/frenck/python-radios/compare/v0.1.1...v0.3.0
(cherry picked from commit 5b30a71a13)
2023-11-25 23:33:35 +00:00
Brian Leung
7720124fa2 llvm-mode: update src location
The directory structure of LLVM seems be handled differently in the
most recent checkout of nixpkgs.

(cherry picked from commit f4f2c01d4b)
2023-11-25 20:12:22 -03:00
Robert Schütz
60b54d3ce7 Merge pull request #269925 from NixOS/backport-268741-to-release-23.11
[Backport release-23.11] celeste: 0.8.0 -> 0.8.1
2023-11-25 13:53:18 -08:00
annalee
84436456bd python311Packages.augeas: 1.1.0 -> 1.2.0
https://github.com/hercules-team/python-augeas/releases/tag/v1.2.0
(cherry picked from commit 998308f5fd)
2023-11-25 21:26:01 +00:00
annalee
e92b09b8ac augeas: 1.12.0 -> 1.14.1; fix darwin build
use github source, enable tests, split output

(cherry picked from commit 4faea1c283)
2023-11-25 21:26:01 +00:00
Robert Schütz
40976290da udiskie: 2.5.0 -> 2.5.1
Diff: https://github.com/coldfix/udiskie/compare/v2.5.0...v2.5.1

Changelog: https://github.com/coldfix/udiskie/blob/v2.5.1/CHANGES.rst
(cherry picked from commit 6bec29d6d5)
2023-11-25 18:10:47 -03:00
zzzsyyy
2d5c0b67ce linux_xanmod_latest: 6.5.11 -> 6.5.12
(cherry picked from commit f9e8890509)
2023-11-25 20:52:34 +00:00
zzzsyyy
60e9849901 linux_xanmod: 6.1.62 -> 6.1.63
(cherry picked from commit 0a825f0bdf)
2023-11-25 20:52:33 +00:00
Adam Stephens
3e9801bc91 forgejo: 1.20.5-0 -> 1.20.5-1
Changelog: https://codeberg.org/forgejo/forgejo/releases/tag/v1.20.5-1
(cherry picked from commit c0bdb24caf)
2023-11-25 20:46:08 +00:00
Tom Hall
36115b74a6 libpostal: fix on darwin
Apparently, recent XCode versions are stricter
https://github.com/openvenues/libpostal/issues/511

Second patch has a second hunk which adds a blank line, so it doesn't
apply cleanly. To get around this, I've included an edited version of
the patch with only the hunk we need.

(cherry picked from commit 2a675bbf79)
2023-11-25 19:28:05 +00:00
Robert Schütz
37b2cb3ec0 impression: 2.1 -> 3.0.1
Diff: https://gitlab.com/adhami3310/Impression/-/compare/v2.1...v3.0.1
(cherry picked from commit ae329c80c0)
2023-11-25 19:26:24 +00:00
Robert Schütz
41ebb1d86b warp: 0.5.4 -> 0.6.1
Diff: https://gitlab.gnome.org/World/warp/-/compare/v0.5.4...v0.6.1
(cherry picked from commit b3ffb9c872)
2023-11-25 19:25:59 +00:00
Robert Schütz
8f1a9609db python311Packages.igraph: 0.11.2 -> 0.11.3
Diff: https://github.com/igraph/python-igraph/compare/refs/tags/0.11.2...0.11.3

Changelog: https://github.com/igraph/python-igraph/blob/refs/tags/0.11.3/CHANGELOG.md
(cherry picked from commit ab08d2f8d7)
2023-11-25 19:05:11 +00:00
Robert Schütz
5bc3ecf650 igraph: 0.10.7 -> 0.10.8
Diff: https://github.com/igraph/igraph/compare/0.10.7...0.10.8

Changelog: https://github.com/igraph/igraph/blob/0.10.8/CHANGELOG.md
(cherry picked from commit ab4c37fb7e)
2023-11-25 19:05:11 +00:00
Robert Schütz
2b3178dc62 python311Packages.rapidfuzz: 3.4.0 -> 3.5.2
Diff: https://github.com/maxbachmann/RapidFuzz/compare/refs/tags/v3.4.0...v3.5.2

Changelog: https://github.com/maxbachmann/RapidFuzz/blob/refs/tags/v3.5.2/CHANGELOG.rst
(cherry picked from commit e9861f19a7)
2023-11-25 19:04:32 +00:00
Robert Schütz
b0e5de9084 rapidfuzz-cpp: 2.1.1 -> 2.2.3
Diff: https://github.com/maxbachmann/rapidfuzz-cpp/compare/v2.1.1...v2.2.3

Changelog: https://github.com/maxbachmann/rapidfuzz-cpp/blob/v2.2.3/CHANGELOG.md
(cherry picked from commit a8f3862611)
2023-11-25 19:04:32 +00:00
K900
2564af380b Merge pull request #269958 from NixOS/backport-267862-to-staging-23.11
[Backport staging-23.11] pipewire: 0.3.84 -> 0.3.85
2023-11-25 21:34:34 +03:00
K900
76fe3aa88c pipewire: 0.3.84 -> 0.3.85
Diff: https://gitlab.freedesktop.org/pipewire/pipewire/-/compare/0.3.84...0.3.85

Changelog: https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/0.3.85
(cherry picked from commit 8652272012)
2023-11-25 18:34:05 +00:00
Felix Bühler
d3f66cb74b Merge pull request #269952 from NixOS/backport-267278-to-release-23.11
[Backport release-23.11] nixos/nextcloud: fix docu of packages
2023-11-25 18:50:02 +01:00
Felix Buehler
64e7a89ec4 nixos/nextcloud: fix docu of packages
(cherry picked from commit 7f9abdcfcb)
2023-11-25 17:48:55 +00:00
Silvan Mosberger
5a83b3cb4d Merge pull request #269950 from NixOS/backport-269897-to-release-23.11
[Backport release-23.11] Skip `sqlite3_bind_bug68849.phpt` php unit test on i686 linux
2023-11-25 18:42:59 +01:00
Silvan Mosberger
b703f18c13 Merge pull request #269924 from NixOS/backport-269894-to-release-23.11
[Backport release-23.11] pyqt6: fix build on darwin
2023-11-25 18:42:15 +01:00
Manuel Frischknecht
d534c4afca Skip sqlite3_bind_bug68849.phpt php unit test on i686 linux
PHP unit tests are broken with SQLite >= 3.43 [1].
If I understand the discussion in the SQLite forums [2]
on the issue correctly, the trigger for this should not
be a problem with SQLite itself but the test itself
(and thus using a current SQLite version shouldn't
generally be a problem for actual PHP code).

[1]: https://github.com/php/php-src/issues/12076
[2]: https://www.sqlite.org/forum/forumpost/abbb95376ec6cd5f

(cherry picked from commit fb1cc4af9c)
2023-11-25 17:41:45 +00:00
piegames
31c05c0648 Merge pull request #269871 from NixOS/backport-269668-to-release-23.11
[Backport release-23.11] gnomeExtensions.gsconnect: 55 -> 56
2023-11-25 18:27:47 +01:00
Martin Weinelt
ea5e04e6cb Merge pull request #269939 from NixOS/backport-269862-to-release-23.11
[Backport release-23.11] python/hooks: use python.pythonVersion in catchConflicts to support other Pythons
2023-11-25 17:50:48 +01:00
Alexandre Macabies
998b1e6c5d python/hooks: use python.pythonVersion to support PyPy
f292ef4 introduced a check for the Python version but uses `.version`,
which isn't friendly to other Pythons like PyPy which use versions
strings like 7.3, failing the >=3.10 check.

Using `.pythonVersion` fixes this check.

Co-authored-by: Pierre Bourdon <delroth@gmail.com>
(cherry picked from commit fc235bb0fc)
2023-11-25 16:38:08 +00:00
Robert Schütz
023eb12f18 celeste: 0.8.0 -> 0.8.1
Diff: https://github.com/hwittenborn/celeste/compare/v0.8.0...v0.8.1

Changelog: https://github.com/hwittenborn/celeste/blob/v0.8.1/CHANGELOG.md
(cherry picked from commit 8f36fa2c0f)
2023-11-25 16:01:42 +00:00
Thibault Gagnaux
c79ce4e103 pyqt6: fix build on darwin
Disable error on -address-of-temporary through linker flag.

(cherry picked from commit b7a8d59e3a)
2023-11-25 15:57:04 +00:00
Nick Cao
21af6ad539 Merge pull request #269778 from NixOS/backport-269290-to-release-23.11
[Backport release-23.11] usql: fix build with clang 12+
2023-11-25 10:04:42 -05:00
Gaetan Lepage
0f0b9e065b river: 0.2.5 -> 0.2.6
Diff: https://github.com/riverwm/river/compare/refs/tags/v0.2.5...v0.2.6

Changelog: https://github.com/ifreund/river/releases/tag/v0.2.6
(cherry picked from commit 3e96f75e85)
2023-11-25 09:45:52 -05:00
Gaetan Lepage
0b9a89d6e2 rivercarro: 0.1.4 -> 0.3.0
Changelog: https://git.sr.ht/~novakane/rivercarro/refs/v0.3.0
2023-11-25 09:45:40 -05:00
Gaetan Lepage
960a2a2aa0 river: 0.2.4 -> 0.2.5
Changelog: https://github.com/riverwm/river/releases/tag/v0.2.5
2023-11-25 09:45:31 -05:00
Nick Cao
64c7a58b81 Merge pull request #269825 from NixOS/backport-269700-to-release-23.11
[Backport release-23.11] root: fix excessive build log size
2023-11-25 09:42:03 -05:00
Nick Cao
a6f2bdff5b Merge pull request #269826 from NixOS/backport-269720-to-release-23.11
[Backport release-23.11] cargo-watch: fix build on darwin
2023-11-25 09:41:30 -05:00
Nick Cao
ddbbb20f46 Merge pull request #269901 from NixOS/backport-269868-to-release-23.11
[Backport release-23.11] bundix: fix meta attribute
2023-11-25 09:24:37 -05:00
Mario Rodas
0e276e262e bundix: update homepage
(cherry picked from commit 42c6b58de0)
2023-11-25 14:13:50 +00:00
Mario Rodas
c15c0ffb0c bundix: fix license attribute
(cherry picked from commit a86ecf3af8)
2023-11-25 14:13:49 +00:00
piegames
9c85e4f1e7 Merge pull request #269869 from NixOS/backport-269211-to-release-23.11
[Backport release-23.11] gnomeExtensions.ddterm: unbreak
2023-11-25 15:05:03 +01:00
piegames
a4487f1364 Merge pull request #269870 from NixOS/backport-269217-to-release-23.11
[Backport release-23.11] gnomeExtensions.freon: fix patch
2023-11-25 15:04:35 +01:00
Julien Malka
13c02890b2 Merge pull request #269838 from NixOS/backport-269715-to-release-23.11 2023-11-25 14:19:36 +01:00
Silvan Mosberger
4e82806eb9 Merge pull request #269878 from NixOS/backport-269328-to-release-23.11
[Backport release-23.11] DisnixWebService: fix build for Axis2 1.8.1
2023-11-25 13:44:17 +01:00
Silvan Mosberger
93895d3595 Merge pull request #269858 from NixOS/backport-269845-to-release-23.11
[Backport release-23.11] psutils: fix build on darwin by setting -std=c89
2023-11-25 13:41:58 +01:00
Anthony Roussel
ebec387be0 DisnixWebService: add meta.{changelog,homepage}
(cherry picked from commit 77586e5cf6)
2023-11-25 12:39:22 +00:00
Anthony Roussel
1c7412b7d0 DisnixWebService: fix build for Axis2 1.8.1
See upstream fix: https://github.com/svanderburg/DisnixWebService/pull/2

(cherry picked from commit 05d8b88821)
2023-11-25 12:39:21 +00:00
Stefan Kranich
81d7e98866 gnomeExtensions.gsconnect: 55 -> 56
(cherry picked from commit 889760fb2a)
2023-11-25 12:25:05 +00:00
Peder Bergebakken Sundt
c6bee01f8e gnomeExtensions.freon: fix patch
(cherry picked from commit 2ccae77687)
2023-11-25 12:22:28 +00:00
Peder Bergebakken Sundt
a14f2a4db0 gnomeExtensions.ddterm: unbreak
(cherry picked from commit 57fad0dbec)
2023-11-25 12:22:13 +00:00
piegames
befb8730e1 Merge pull request #269714 from NixOS/backport-269588-to-release-23.11
[Backport release-23.11] gnomeExtensions.pano: refresh patch
2023-11-25 13:21:11 +01:00
Pierre Bourdon
0d2a8fe1f2 Merge pull request #269860 from NixOS/backport-269853-to-release-23.11
[Backport release-23.11] qt6.qtwebengine: set correct platforms
2023-11-25 12:37:24 +01:00
Lorenz Brun
46a9c2373f qt6.qtwebengine: set correct platforms
Qt WebEngine is built on Chromium, which only supports a limited set
of platforms. Set these here to stop attempts at building for other
platforms.

(cherry picked from commit 0e4a87f4dd)
2023-11-25 11:37:03 +00:00
Antoine Pietri
4ea664cf2c psutils: fix build on darwin by setting -std=c89
And void main -> int main

(cherry picked from commit ff7534f13b)
2023-11-25 11:33:28 +00:00
Tom Westerhout
8b5e2f0033 halide: use preCheck instead of overwriting checkPhase
(cherry picked from commit da893e4d17)
2023-11-25 11:13:20 +00:00
Tom Westerhout
7c51b4a020 halide: disable fuzzing tests
(cherry picked from commit f6370efdfb)
2023-11-25 11:13:20 +00:00
Tom Westerhout
52f618c237 halide: ::aligned_alloc is not available on x86_64-darwin
(cherry picked from commit c841f93dd9)
2023-11-25 11:13:19 +00:00
Tom Westerhout
db01f00bfa halide: patch to remove dependency on Apple SDK
(cherry picked from commit b55f063caf)
2023-11-25 11:13:19 +00:00
Tom Westerhout
0e78324d00 halide: disable float16 support on aarch16-linux
(cherry picked from commit ed6e240d32)
2023-11-25 11:13:19 +00:00
Tom Westerhout
c3576b880d halide: build against llvmPackages_16
(cherry picked from commit 77486e6c93)
2023-11-25 11:13:19 +00:00
R. Ryantm
d8c31a16c5 halide: 15.0.1 -> 16.0.0
(cherry picked from commit 394763b583)
2023-11-25 11:13:19 +00:00
Tom Westerhout
cc582d08ed petsc: 3.19.2 -> 3.19.4, fix tests, add more options
(cherry picked from commit b48ec762e9)
2023-11-25 11:13:06 +00:00
Miguel de la Cruz
c4cb2e66c5 uptime-kuma: 1.23.6 -> 1.23.7
(cherry picked from commit 7887d99244)
2023-11-25 10:40:42 +00:00
Silvan Mosberger
a4f2191d13 Merge pull request #269832 from NixOS/backport-262437-to-release-23.11
[Backport release-23.11] gns3-gui: fix running on Wayland
2023-11-25 11:10:39 +01:00
Lorenz Brun
29cdb08127 gns3-gui: fix running on Wayland
When running GNS3 on Wayland it currently crashes on startup as it's
missing the Wayland backend.

(cherry picked from commit b2192f0e71)
2023-11-25 09:59:04 +00:00
Bobby Rong
744f7b7b7b Merge pull request #269814 from NixOS/backport-269795-to-release-23.11
[Backport release-23.11] vala-lint: unstable-2023-05-25 -> unstable-2023-11-12
2023-11-25 17:49:38 +08:00
h7x4
94629542a0 treewide: add mainProgram
(cherry picked from commit c9b3b8700d)
2023-11-25 10:48:56 +01:00
Chinmay D. Pai
60cb688079 netbird: 0.24.2 -> 0.24.3
Signed-off-by: Chinmay D. Pai <chinmay.pai@zerodha.com>
(cherry picked from commit 68ed814e09)
2023-11-25 10:48:18 +01:00
Antoine
32ec743c1b conan: 2.0.5 -> 2.0.14
Changelog: https://github.com/conan-io/conan/releases/tag/2.0.14
(cherry picked from commit 70ff5c1a9b)
2023-11-25 10:47:59 +01:00
Simon Žlender
07af2a3227 cargo-watch: fix build on darwin
(cherry picked from commit c4e7af7473)
2023-11-25 09:43:39 +00:00
Dmitry Kalinkin
e088eb4d35 root: fix excessive build log size
(cherry picked from commit 8ae6154b2b)
2023-11-25 09:38:39 +00:00
OTABI Tomoya
439a862a10 Merge pull request #269567 from NixOS/backport-269436-to-release-23.11
[Backport release-23.11] python313: 3.13.0a1 -> 3.13.0a2
2023-11-25 18:36:58 +09:00
natsukium
4540e59278 dssp: 4.4.4.1 -> 4.4.5
Diff: https://github.com/PDB-REDO/dssp/compare/refs/tags/v4.4.4.1...v4.4.5

Changelog: https://github.com/PDB-REDO/libcifpp/releases/tag/refs/tags/v4.4.5
(cherry picked from commit 87a4074d00)
2023-11-25 09:35:56 +00:00
Vladimír Čunát
d200f6ef4f Merge branch 'staging-23.11' into staging-next-23.11 2023-11-25 10:21:21 +01:00
Vladimír Čunát
243f960a13 Merge #269685: ghostscript: 10.02.0 -> 10.02.1
...into staging-23.11
2023-11-25 10:14:06 +01:00
Vladimír Čunát
bf42cf8236 Merge #269071: nss_latest: 3.94 -> 3.95
...into staging-23.11
2023-11-25 10:07:48 +01:00
Vladimír Čunát
778695e1df Merge #269174: cacert: 3.92 -> 3.95
...into staging-23.11
2023-11-25 09:54:03 +01:00
Vladimír Čunát
8cf78ec702 Merge #268529: libglvnd: enable 64-bit file APIs
...into staging-23.11
2023-11-25 09:52:20 +01:00
Bobby Rong
8b8f09c4e9 vala-lint: unstable-2023-05-25 -> unstable-2023-11-12
4d21b8a2be...95cf9e61a7
(cherry picked from commit 07714f67d5)
2023-11-25 08:36:09 +00:00
Mario Rodas
ecd2568166 Merge pull request #269743 from NixOS/backport-268028-to-release-23.11
[Backport release-23.11] rubyPackages: gtk2 -> gtk3
2023-11-24 22:00:05 -05:00
Anthony Roussel
aa8fed1cb4 usql: fix build with clang 12+
See #166205

(cherry picked from commit 811294e5f0)
2023-11-25 02:53:40 +00:00
Gaetan Lepage
c206b35f77 python311Packages.pytensor: 2.17.3 -> 2.18.1
Changelog: https://github.com/pymc-devs/pytensor/releases/tag/rel-2.18.1
(cherry picked from commit cdab9e2828)
2023-11-25 01:23:11 +00:00
Gaetan Lepage
37425567f2 python311Packages.pymc: 5.9.1 -> 5.9.2
Changelog: https://github.com/pymc-devs/pymc/releases/tag/v5.9.2
(cherry picked from commit c5fb2d5662)
2023-11-25 01:23:11 +00:00
Peder Bergebakken Sundt
56359ec4ad Merge pull request #269528 from NixOS/backport-269343-to-release-23.11
[Backport release-23.11] darling: unstable-2023-05-02 -> unstable-2023-11-07
2023-11-25 02:09:25 +01:00
Felix Schröter
6744b24594 mullvad-browser: 13.0.1 -> 13.0.4
https://github.com/mullvad/mullvad-browser/releases/tag/13.0.4
(cherry picked from commit 06580dcbaa)
2023-11-25 00:52:38 +00:00
Felix Schröter
6492aeeaac tor-browser: 13.0.1 -> 13.0.5
https://blog.torproject.org/new-release-tor-browser-1304/
https://blog.torproject.org/new-release-tor-browser-1305/
(cherry picked from commit ef557f0344)
2023-11-25 00:52:38 +00:00
Robert Scott
9b9033ea9f Merge pull request #269466 from NixOS/backport-269418-to-release-23.11
[Backport release-23.11] figlet: ignore implicit-function-declaration; fix build
2023-11-25 00:42:42 +00:00
Robert Scott
09bd1c87ba Merge pull request #269682 from NixOS/backport-268491-to-staging-23.11
[Backport staging-23.11] gnutls: 3.8.1 -> 3.8.2
2023-11-25 00:25:07 +00:00
github-actions[bot]
ac207af24f Merge staging-next-23.11 into staging-23.11 2023-11-25 00:14:04 +00:00
github-actions[bot]
db6959e96d Merge release-23.11 into staging-next-23.11 2023-11-25 00:13:33 +00:00
Kirill Radzikhovskyy
669b4c2e24 rubyPackages: gtk2 -> gtk3
gtk3 and gdk3

(cherry picked from commit b95976f77c)
2023-11-24 23:24:15 +00:00
Minijackson
c9e054502e meilisearch: 1.3.1 -> 1.5.0
(cherry picked from commit ed2d97a48b)
2023-11-24 21:58:49 +00:00
Peder Bergebakken Sundt
185b293e51 Merge pull request #269723 from NixOS/backport-265519-to-release-23.11
[Backport release-23.11] zxtune: init at r5054
2023-11-24 22:39:38 +01:00
EBADBEEF
546143ba5c zxtune: init at r5055
(cherry picked from commit 97ac308ed1)
2023-11-24 21:31:56 +00:00
EBADBEEF
38c2a27a44 maintainers: add EBADBEEF
(cherry picked from commit d2bfc75936)
2023-11-24 21:31:56 +00:00
Peder Bergebakken Sundt
ccaf52c1d4 Merge pull request #269722 from NixOS/backport-269336-to-release-23.11
[Backport release-23.11] hydrus: 552 -> 553
2023-11-24 22:29:57 +01:00
Daniel Olsen
d362dc8484 hydrus: 552 -> 553
Diff: https://github.com/hydrusnetwork/hydrus/compare/refs/tags/v552...v553
(cherry picked from commit bf0c433997)
2023-11-24 21:27:12 +00:00
Dawid Dziurla
19258c7c50 gnomeExtensions.pano: refresh patch
(cherry picked from commit 2b2e00caec)
2023-11-24 20:55:00 +00:00
Artturi
32daaa79e7 Merge pull request #269711 from NixOS/backport-268572-to-release-23.11 2023-11-24 22:32:35 +02:00
Paul Meyer
5f3cef1b26 rpm: declare darwin as badPlatform
(cherry picked from commit 7e2206c297)
2023-11-24 20:31:04 +00:00
Eduardo Quiros
6f4c768dbd signal-desktop: 6.39.0 -> 6.39.1, 6.40.0-beta.1 -> 6.40.0-beta.2
(cherry picked from commit 0e2441bd54)
2023-11-24 20:35:54 +01:00
Nick Cao
48e0e40743 Merge pull request #269653 from NixOS/backport-269545-to-release-23.11
[Backport release-23.11] miniflux: fix http user agent regression
2023-11-24 13:43:43 -05:00
Nick Cao
43b4e10194 Merge pull request #269655 from NixOS/backport-269613-to-release-23.11
[Backport release-23.11] nixos/caddy: Fixed RestartSec typo
2023-11-24 13:43:32 -05:00
Nick Cao
6d3a97b94b Merge pull request #269656 from NixOS/backport-269581-to-release-23.11
[Backport release-23.11] kyverno: 1.10.4 -> 1.10.5
2023-11-24 13:43:19 -05:00
Enno Richter
fc430d5f02 ghostscript: 10.02.0 -> 10.02.1
(cherry picked from commit 4df141fe3f)
2023-11-24 17:27:46 +00:00
Sergei Trofimovich
a246126b01 gnutls: 3.8.1 -> 3.8.2
Changes: https://lists.gnupg.org/pipermail/gnutls-help/2023-November/004837.html
(cherry picked from commit 2707f6791a)
2023-11-24 17:27:16 +00:00
Wanja Zaeske
ab58cb392d sssd: add adcli path
Fixes #268924

(cherry picked from commit 1f829e2700)
2023-11-24 17:32:30 +01:00
Robert Hensing
45096c64c2 Merge pull request #269458 from NixOS/backport-224611-to-release-23.11
[Backport release-23.11] Kafka: Settings and KRaft support
2023-11-24 17:27:47 +01:00
Emily
fa2be23fe0 Merge pull request #269615 from NixOS/backport-268168-to-release-23.11
[Backport release-23.11] stdenv Rust fixes
2023-11-24 15:56:49 +01:00
R. Ryantm
2f4b40cd93 kyverno: 1.10.4 -> 1.10.5
(cherry picked from commit 8d81d0a43f)
2023-11-24 14:47:26 +00:00
Jonathan Davies
85978b1c7a nixos/caddy: Fixed RestartSec typo.
(cherry picked from commit a1163912c2)
2023-11-24 14:41:37 +00:00
Martin Weinelt
1886553ee6 miniflux: fix http user agent regression
Miniflux in 2.0.5.0 introduced a regression in its HTTP client, where
the global user-agent would fall back to that of the generic Go library
it uses.

This user agent is banned/rate-limited on many pages, which causes feed
refreshes to be greeted by e.g. HTTP/403.

(cherry picked from commit 95469bd3e6)
2023-11-24 14:35:38 +00:00
Artturi
81e35cc8da Merge pull request #269626 from NixOS/backport-251671-to-release-23.11 2023-11-24 16:32:10 +02:00
Lily Foster
612b005233 Merge pull request #269542 from NixOS/backport-267733-to-staging-23.11
[Backport staging-23.11] gst-plugins-good: add openssl dependency
2023-11-24 08:34:43 -05:00
Lily Foster
f3ccc1ef42 Merge pull request #269544 from NixOS/backport-267581-to-release-23.11
[Backport release-23.11] touchosc: 1.2.4.180 -> 1.2.5.183
2023-11-24 08:33:57 -05:00
Robert Schütz
6d0eb53cd1 qutebrowser: use spliced qt6Packages
(cherry picked from commit 4bd758c963)
2023-11-24 12:30:54 +00:00
Robert Schütz
df48037fb4 qutebrowser-qt5: replace qt5.qutebrowser
Applications don't belong in the qt5 scope.

(cherry picked from commit d248a1e7f7)
2023-11-24 12:30:54 +00:00
Alyssa Ross
032a41d172 rustc-wasm32: fix targetPlatform
The previous version stopped working when we started elaborating Rust
metadata.  Here, I've made it a bit nicer by actually setting
targetPlatform to an elaborated system.  Setting the config to wasi to
get elaborate to understand it is a bit of a hack, but I think it's
less of a hack than what we had before.

The only actual difference this makes to the rustc-wasm32 derivation
compared to the previous working version, is that now crt-static is
set.  This is probably the right thing anyway.

Fixes: e3e57b8f18 ("lib.systems: elaborate Rust metadata")
(cherry picked from commit a578479a42)
2023-11-24 11:22:00 +00:00
Alyssa Ross
50152ef89e lib.systems.elaborate: fix passing rust
Usually, attributes passed explicitly to elaborate take precedence
over the elaborated ones, but since we also elaborate the nested
"rust" attrset, we need to push that one level down, so the rest of
"rust" is still filled in if you just pass
{ rust = { config = ... } }.

I've had to drop the assertion that checked that at most one of "rust"
and "rustc" was part of the un-elaborated system, because doing this
broke passing an elaborated system in, which should be idempotent.

For the same reason, I've also had to make it possible for
rust.rustcTargetSpec to be passed in.  Otherwise, on the second call,
since platform was filled in by the first, the custom target file
would be constructed.  The only other way to avoid this would be to
compare the platform attrs to all built in Rust targets to check it
wasn't one of those, and that isn't feasible.

Fixes: e3e57b8f18 ("lib.systems: elaborate Rust metadata")
(cherry picked from commit 886c89287f)
2023-11-24 11:22:00 +00:00
Sandro Jäckel
eeb2d5c57b nextcloud-notify_push: 0.6.3 -> 0.6.5
Changelog: https://github.com/nextcloud/notify_push/releases/tag/v0.6.4
Changelog: https://github.com/nextcloud/notify_push/releases/tag/v0.6.5
(cherry picked from commit 1a6f28cbd8)
2023-11-24 10:31:01 +00:00
Mario Rodas
ffcadd021d Merge pull request #269557 from NixOS/backport-269340-to-release-23.11
[Backport release-23.11] postgresqlPackages.postgis: fix build on clang 12+
2023-11-24 03:33:34 -05:00
K900
fdb9f5db5f Merge pull request #269576 from NixOS/backport-269515-to-release-23.11
[Backport release-23.11] wrapFirefox: fix error message
2023-11-24 09:49:12 +03:00
Dawid Ciężarkiewicz
f55a118c39 wrapFirefox: fix error message
See https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=nativeMessagingHosts

(cherry picked from commit 773778c16e)
2023-11-24 06:47:19 +00:00
OTABI Tomoya
c100f58bb5 Merge pull request #269531 from NixOS/backport-269382-to-release-23.11
[Backport release-23.11] python311Packages.nbconvert: 7.8.0 -> 7.11.0
2023-11-24 14:54:40 +09:00
OTABI Tomoya
045a661d9e Merge pull request #269530 from NixOS/backport-269370-to-release-23.11
[Backport release-23.11] python311Packages.jupyter-core: 5.3.1 -> 5.5.0
2023-11-24 14:54:26 +09:00
OTABI Tomoya
78ebe71cac Merge pull request #269529 from NixOS/backport-269427-to-release-23.11
[Backport release-23.11] python311Packages.labelbox: 3.52.0 -> 3.56.0; fix build
2023-11-24 14:53:58 +09:00
Martin Weinelt
319e946389 python313: 3.13.0a1 -> 3.13.0a2
https://www.python.org/downloads/release/python-3130a2/
(cherry picked from commit 0818809eae)
2023-11-24 05:53:08 +00:00
Maciej Krüger
23e39187dc Merge pull request #269565 from NixOS/backport-269564-to-release-23.11 2023-11-24 06:51:41 +01:00
Maciej Krüger
63a6e39b28 libnl-tiny: build only on linux
(cherry picked from commit 73f9b84ea6)
2023-11-24 05:51:19 +00:00
Randy Eckenrode
fb3b019f17 postgresqlPackages.postgis: fix build on clang 12+
Work around https://github.com/NixOS/nixpkgs/issues/166205

(cherry picked from commit b6d4be13d0)
2023-11-24 03:57:38 +00:00
Nick Cao
ffb83e9be9 Merge pull request #269526 from NixOS/backport-269202-to-release-23.11
[Backport release-23.11] cmospwd: restrict platform to x86_64-linux
2023-11-23 22:00:43 -05:00
R. Ryantm
7b779b216f touchosc: 1.2.4.180 -> 1.2.5.183
(cherry picked from commit e2f87ab385)
2023-11-24 02:19:26 +00:00
Max
eed8acbb00 gst-plugins-good: add openssl dependency
(cherry picked from commit b103e1e3d7)
2023-11-24 02:12:53 +00:00
github-actions[bot]
4b052e640e [Backport release-23.11] esphome: 2023.11.2 -> 2023.11.3 (#269537)
https://github.com/esphome/esphome/releases/tag/2023.11.3
https://github.com/esphome/esphome/releases/tag/2023.11.4
(cherry picked from commit 742709c0d2)

Co-authored-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2023-11-24 02:34:53 +01:00
github-actions[bot]
6f16b36417 [Backport release-23.11] vaultwarden: 1.30.0 -> 1.30.1 (#269534)
https://github.com/dani-garcia/vaultwarden/releases/tag/1.30.1
(cherry picked from commit 6fba05a99b)

Co-authored-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
2023-11-24 02:18:55 +01:00
Maciej Krüger
7f7851dfc5 Merge pull request #269532 from NixOS/backport-269178-to-release-23.11 2023-11-24 01:55:30 +01:00
Maciej Krüger
a6c3ec9e44 maintainers/lxd: fix double modules
Otherwise it results in <nixpkgs/nixos/modules/modules...> being loaded

(cherry picked from commit daff2bb01d)
2023-11-24 00:53:59 +00:00
natsukium
9fbcd770d5 python311Packages.nbconvert: update meta
(cherry picked from commit e64951cae4)
2023-11-24 00:52:33 +00:00
natsukium
cbc6754493 python311Packages.nbconvert: 7.8.0 -> 7.11.0
Diff: https://github.com/jupyter/nbconvert/compare/v7.8.0...v7.11.0

Changelog: https://github.com/jupyter/nbconvert/blob/v7.11.0/CHANGELOG.md
(cherry picked from commit 6c5041bc0a)
2023-11-24 00:52:33 +00:00
natsukium
5fc8ed1a0a python311Packages.jupyter-core: update meta
(cherry picked from commit ec3fa8c281)
2023-11-24 00:50:22 +00:00
natsukium
c2b7a23459 python311Packages.jupyter-core: 5.3.1 -> 5.5.0
Diff: https://github.com/jupyter/jupyter_core/compare/refs/tags/v5.3.1...v5.5.0
(cherry picked from commit 19362a6194)
2023-11-24 00:50:22 +00:00
natsukium
35ee23628b python311Packages.labelbox: 3.52.0 -> 3.56.0
Diff: https://github.com/Labelbox/labelbox-python/compare/v.3.52.0...v.3.56.0

Changelog: https://github.com/Labelbox/labelbox-python/blob/v.3.56.0/CHANGELOG.md
(cherry picked from commit 68c2c3d58f)
2023-11-24 00:37:16 +00:00
Peder Bergebakken Sundt
2bd64da8c0 darling: unstable-2023-05-02 -> unstable-2023-11-07
(cherry picked from commit 46b793f1d1)
2023-11-24 00:36:06 +00:00
Robert Scott
6f7cf3afc8 Merge pull request #269523 from NixOS/backport-269383-to-release-23.11
[Backport release-23.11] lean4: fix build on darwin
2023-11-24 00:33:28 +00:00
github-actions[bot]
fb1cf6cf41 Merge staging-next-23.11 into staging-23.11 2023-11-24 00:14:05 +00:00
github-actions[bot]
0118686dd9 Merge release-23.11 into staging-next-23.11 2023-11-24 00:13:36 +00:00
Nick Cao
9bec805c62 cmospwd: restrict platform to x86_64-linux
(cherry picked from commit e3df0bff98)
2023-11-24 00:06:06 +00:00
Tomas Antonio Lopez
0a287f45db protege-distribution: 5.5.0 -> 5.6.3
(cherry picked from commit b751c28f67)
2023-11-24 00:03:05 +00:00
Mario Rodas
1c6a646903 lean4: fix build on darwin
(cherry picked from commit b9a67f7317)
2023-11-23 23:41:32 +00:00
Silvan Mosberger
99df1ceec1 Merge pull request #269520 from NixOS/backport-266362-to-release-23.11
[Backport release-23.11] `lib.fileset.fileFilter`: Predicate attribute for file extension
2023-11-24 00:21:03 +01:00
Silvan Mosberger
cbe2dac146 lib.fileset.fileFilter: Predicate attribute for file extension
(cherry picked from commit 6816f28c96)
2023-11-23 23:16:12 +00:00
Robert Hensing
f57f9dba55 Merge pull request #269491 from NixOS/backport-269360-to-release-23.11
[Backport release-23.11] treewide: add mainProgram
2023-11-24 00:01:14 +01:00
Silvan Mosberger
eae7a7d239 Merge pull request #269509 from NixOS/backport-268871-to-release-23.11
[Backport release-23.11] rl-2311: Add release notes on lib
2023-11-23 23:45:30 +01:00
Silvan Mosberger
4202ab72e7 rl-2311: Add release notes on lib
NixOS releases are also `lib` releases :)

The release notes were collected from looking at the `git diff` since
22.11.

Since the NixOS and Nixpkgs manuals are rendered separately, I'm linking
to the "unstable" link to make sure the links definitely work on the time of
release. The "stable" link might take some time to become available

(cherry picked from commit 38664f70d1)
2023-11-23 22:21:56 +00:00
Lily Foster
0c393719ce Merge pull request #269472 from NixOS/backport-269406-to-release-23.11
[Backport release-23.11] teams-for-linux: 1.3.19 -> 1.3.22
2023-11-23 16:56:57 -05:00
Peder Bergebakken Sundt
4ce4354d70 Merge pull request #269275 from NixOS/backport-269193-to-release-23.11
[Backport release-23.11] python3Packages.skytemple-files: fix build
2023-11-23 21:43:53 +01:00
Finn Behrens
311bee1ee5 nixos: fix bcachefs filesystem with symlinks
(cherry picked from commit 6d461357c1)
2023-11-23 21:33:15 +01:00
Anthony Roussel
6dae3da256 exiftool: 12.68 -> 12.70
https://github.com/exiftool/exiftool/compare/12.68...12.70
https://exiftool.org/history.html
(cherry picked from commit f5e6159032)
2023-11-23 21:32:01 +01:00
Robert Schütz
6e4b084529 mousai: 0.7.5 -> 0.7.6
Diff: https://github.com/SeaDve/Mousai/compare/v0.7.5...v0.7.6

Changelog: https://github.com/SeaDve/Mousai/releases/tag/v0.7.6
(cherry picked from commit 35132b620c)
2023-11-23 21:28:09 +01:00
Pol Dellaiera
8e9b71f8a1 Merge pull request #269492 from NixOS/backport-269393-to-release-23.11
[Backport release-23.11] php: November bumps: (8.1.26, 8.2.13, 8.3.0)
2023-11-23 21:15:36 +01:00
Pol Dellaiera
da9fb9b25a php83: 8.3.0RC6 -> 8.3.0
(cherry picked from commit 169a309144)
2023-11-23 20:15:15 +00:00
Pol Dellaiera
b63c821505 php82: 8.2.12 -> 8.2.13
(cherry picked from commit 4b8b0fb9e6)
2023-11-23 20:15:15 +00:00
Pol Dellaiera
a29265b6b8 php81: 8.1.25 -> 8.1.26
(cherry picked from commit ca7ec92f3d)
2023-11-23 20:15:15 +00:00
h7x4
13b987dc25 treewide: add mainProgram
(cherry picked from commit 737ef800f1)
2023-11-23 20:04:47 +00:00
Yang, Bo
1f885ef065 [Backport release-23.11] nixos/nvidia: load nvidia-uvm kernel module via softdep (#269473)
(cherry picked from commit 932441c86d)
2023-11-23 19:31:34 +01:00
Charlotte Van Petegem
f2555ae98d teams-for-linux: 1.3.19 -> 1.3.22
https://github.com/IsmaelMartinez/teams-for-linux/releases/tag/v1.3.20
https://github.com/IsmaelMartinez/teams-for-linux/releases/tag/v1.3.21
https://github.com/IsmaelMartinez/teams-for-linux/releases/tag/v1.3.22
(cherry picked from commit dc2ac086bb)
2023-11-23 17:47:38 +00:00
annalee
0e83b3bc40 figlet: ignore implicit-function-declaration; fix build
figlet.c uses getopt from getopt.c with no function declaration.

(cherry picked from commit 8542cb349a)
2023-11-23 17:01:10 +00:00
Sarah Brofeldt
8e1bc033c2 nixos/apache-kafka: Add manual chapter
(cherry picked from commit cfe3ca1f2f)
2023-11-23 16:35:55 +00:00
Sarah Brofeldt
ab51d6159c nixos/apache-kafka: release notes
(cherry picked from commit 72d85cd36c)
2023-11-23 16:35:55 +00:00
Sarah Brofeldt
594940bd6c nixos/tests/kafka: test KRaft mode
(cherry picked from commit 56973b2dd1)
2023-11-23 16:35:55 +00:00
Sarah Brofeldt
2bce5b9c9a nixos/apache-kafka: structured settings
- Use lazyAttrs (for config references) settings for main server.properties.
- Drop dangerous default for "log.dirs"
- Drop apache-kafka homedir; unused and confusing
- Support formatting kraft logdirs

(cherry picked from commit 45f84cdfd5)
2023-11-23 16:35:54 +00:00
Maciej Krüger
ca3b90ebaf Merge pull request #269424 from NixOS/backport-266487-to-release-23.11
[Backport release-23.11] mpvScripts.thumbfast: unstable-2023-06-06 → 2023-06-08
2023-11-23 16:56:54 +01:00
Daniel Hill
86b9120436 bcachefs: fix lib.kernel.option miss use.
option is a function not a set.

(cherry picked from commit 34a58ce86f)
2023-11-23 15:53:52 +00:00
OTABI Tomoya
2835ea9eb6 Merge pull request #269451 from NixOS/backport-267545-to-release-23.11
[Backport release-23.11] fit-trackee: pin flask-sqlalchemy to 3.0.5
2023-11-24 00:23:50 +09:00
traxys
d0f248a982 fit-trackee: pin flask-sqlalchemy to 3.0.5
FitTrackee currently requires SQLAlchemy 1.4.49 (upstream has plans to
upgrade). The commit `e3c822682230` updated flask-sqlalchemy to 3.1.1,
and that version dropped support for pre 2.0 SQLAlchemy.

As such we pin the flask-sqlalchemy dependency to the last version
supporting the required SQLAlchemy version.

(cherry picked from commit 2be3382a1d)
2023-11-23 15:14:22 +00:00
Janik
4a2b4486d7 Merge pull request #269438 from NixOS/backport-243458-to-release-23.11 2023-11-23 15:34:05 +01:00
Lily Foster
a4955a67ff buildNpmPackage: add forceEmptyCache option
(cherry picked from commit 8e3009d95c)
2023-11-23 12:55:47 +00:00
Lily Foster
d740af5665 fetchNpmDeps: add forceEmptyCache option
(cherry picked from commit 05dc145e80)
2023-11-23 12:55:47 +00:00
Lily Foster
2127e0cfb2 prefetch-npm-deps: detect and error out when generating an empty cache
(cherry picked from commit ec51a56dfc)
2023-11-23 12:55:47 +00:00
nicoo
77d8247502 mpvScripts.thumbfast: unstable-2023-06-06 → 2023-06-08
Includes a bugfix for `audio=no` case.

(cherry picked from commit 9a360a73c0)
2023-11-23 10:43:16 +00:00
nicoo
376a09b8f9 mpvScripts.thumbfast: Refactor with buildLua
(cherry picked from commit d518566a30)
2023-11-23 10:43:16 +00:00
github-actions[bot]
afd5b1f3a1 chromium: add rpath to libGLESv2.so from libANGLE (#269414)
(cherry picked from commit 1a78569765)

Co-authored-by: Lily Foster <lily@lily.flowers>
2023-11-23 11:02:47 +01:00
github-actions[bot]
c98c75ad43 Revert "chromium: add libglvnd to rpath" (#269413)
(cherry picked from commit c65f18b186)

Co-authored-by: Yureka <yuka@yuka.dev>
2023-11-23 11:01:41 +01:00
K900
bba39cc364 Merge pull request #269411 from NixOS/backport-269384-to-release-23.11
[Backport release-23.11] wireplumber: 0.4.15 -> 0.4.16
2023-11-23 12:59:50 +03:00
K900
00d02da898 wireplumber: 0.4.15 -> 0.4.16
Diff: https://gitlab.freedesktop.org/pipewire/wireplumber/-/compare/0.4.15...0.4.16
(cherry picked from commit 80dff67e7b)
2023-11-23 09:55:53 +00:00
Florian Klink
ba74a39878 Merge pull request #268917 from NixOS/backport-267802-to-staging-23.11
[Backport staging-23.11] systemd: 254.3 -> 254.6
2023-11-23 11:47:10 +02:00
OTABI Tomoya
5cb990c555 Merge pull request #269371 from NixOS/backport-269189-to-release-23.11
[Backport release-23.11] python3Packages.plum-py: unbreak by disabling a test
2023-11-23 18:40:17 +09:00
Otavio Salvador
26bc332c30 python3Packages.lpc-checksum: init at 3.0.0
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
(cherry picked from commit 7b1d46017d)
2023-11-23 08:19:43 +00:00
OTABI Tomoya
087c8413f1 Merge pull request #269372 from NixOS/backport-269177-to-release-23.11
[Backport release-23.11] python3Packages.types-appdirs: Fix typo in `meta.homepage`
2023-11-23 14:58:16 +09:00
nicoo
cbceb3ce28 python3Packages.types-appdirs: Fix typo in meta.homepage
(cherry picked from commit 63869ecd54)
2023-11-23 05:21:07 +00:00
Peder Bergebakken Sundt
ec234b6e28 python3Packages.plum-py: unbreak by disabling a test
(cherry picked from commit eb7e8003be)
2023-11-23 05:19:40 +00:00
OTABI Tomoya
0395b5b87f Merge pull request #269327 from NixOS/backport-269158-to-release-23.11
[Backport release-23.11] python2Packages.pycairo: backport test fix
2023-11-23 14:14:09 +09:00
OTABI Tomoya
6148fa94c9 Merge pull request #269368 from NixOS/backport-262699-to-release-23.11
[Backport release-23.11] python311Packages.jupyter-server: 2.7.3 -> 2.10.1
2023-11-23 13:59:30 +09:00
natsukium
7b89a21a73 python311Packages.jupyter-server: 2.7.3 -> 2.10.1
Changelog: https://github.com/jupyter-server/jupyter_server/blob/v2.10.1/CHANGELOG.md
(cherry picked from commit c2bc209600)
2023-11-23 04:45:00 +00:00
Nick Cao
2081ae0dc8 Merge pull request #269320 from NixOS/backport-269214-to-release-23.11
[Backport release-23.11] sequoia-chameleon-gnupg: 0.3.2 -> unstable-2023-11-22
2023-11-22 23:14:47 -05:00
OTABI Tomoya
48fd1bc1c9 Merge pull request #269355 from NixOS/backport-269227-to-release-23.11
[Backport release-23.11] python311Packages.bqscales: fix build
2023-11-23 13:08:36 +09:00
annalee
8e3adbd6c6 python311Packages.polars: remove patch for rustc < 1.73; fix build
(cherry picked from commit ea4c2e92bc)
2023-11-23 03:51:31 +00:00
natsukium
1316a755dd python311Packages.bqscales: fix build
(cherry picked from commit e9fda01ca9)
2023-11-23 02:43:16 +00:00
github-actions[bot]
63eb681a6d [Backport release-23.11] python311Packages.homeassistant-stubs: 2023.11.2 -> 2023.11.3 (#269352)
https://github.com/KapJI/homeassistant-stubs/releases/tag/2023.11.3
(cherry picked from commit badb35e730)

Co-authored-by: Martin Weinelt <hexa@darmstadt.ccc.de>
2023-11-23 03:12:03 +01:00
github-actions[bot]
a8585e7052 aws2cli: fix urllib3 build (#269351)
Fixes the build by setting up the PEP517 builder to satisfy the format/pyproject requirement of python derivations.

> assert (pyproject != null) -> (format == null);

Co-authored-by: Carl Hjerpe <git@hjerpe.xyz>
Co-authored-by: P. <WolfangAukang@users.noreply.github.com>
Co-authored-by: André Vitor de Lima Matos <andre.vmatos@gmail.com>
2023-11-23 03:04:40 +01:00
github-actions[bot]
7fe7215bb7 Merge staging-next-23.11 into staging-23.11 2023-11-23 00:14:50 +00:00
github-actions[bot]
50e53436c1 Merge release-23.11 into staging-next-23.11 2023-11-23 00:14:23 +00:00
Martin Weinelt
b5387afec6 Merge pull request #269335 from NixOS/backport-269229-to-release-23.11
[Backport release-23.11] home-assistant: 2023.11.2 -> 2023.11.3
2023-11-23 01:13:15 +01:00
Martin Weinelt
21dc445192 home-assistant: 2023.11.2 -> 2023.11.3
https://github.com/home-assistant/core/releases/tag/2023.11.3
(cherry picked from commit 9952892cb6)
2023-11-22 23:33:21 +00:00
Martin Weinelt
3399b0839b python311Packages.zwave-js-server-python: 0.53.1 -> 0.54.0
https://github.com/home-assistant-libs/zwave-js-server-python/releases/tag/0.54.0
(cherry picked from commit ce47f8f7ae)
2023-11-22 23:33:21 +00:00
Martin Weinelt
3a2c716c7f python311Packages.velbus-aio: 2023.10.2 -> 2023.11.0
https://github.com/Cereal2nd/velbus-aio/releases/tag/2023.11.0
(cherry picked from commit 11450d22ff)
2023-11-22 23:33:21 +00:00
Martin Weinelt
876b46e494 python311Packages.python-matter-server: 4.0.1 -> 4.0.2
https://github.com/home-assistant-libs/python-matter-server/releases/tag/4.0.2
(cherry picked from commit dff079046d)
2023-11-22 23:33:21 +00:00
Martin Weinelt
ae397fd2c8 python311Packages.gcal-sync: 5.0.0 -> 6.0.1
https://github.com/allenporter/gcal_sync/releases/tag/6.0.0
https://github.com/allenporter/gcal_sync/releases/tag/6.0.1
(cherry picked from commit be884b15c4)
2023-11-22 23:33:21 +00:00
Martin Weinelt
e3240328ea python311Packages.ical: 5.1.1 -> 6.1.0
https://github.com/allenporter/ical/releases/tag/6.0.0
https://github.com/allenporter/ical/releases/tag/6.1.0
(cherry picked from commit 5614bbae90)
2023-11-22 23:33:21 +00:00
Martin Weinelt
1a20739927 python311Packages.aiocomelit: 0.5.0 -> 0.6.0
https://github.com/chemelli74/aiocomelit/blob/0.6.0/CHANGELOG.md
(cherry picked from commit d26a220d3b)
2023-11-22 23:33:21 +00:00
Otavio Salvador
c6ead3584b mcuboot-imgtool: fix pname
When I introduced the package I ended mixing projects, so now I am
fixing the pname as intended.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
(cherry picked from commit 1375f28c0e)
2023-11-22 23:30:54 +00:00
Bryan Lai
1eed75763e python2Packages.pycairo: backport test fix
Fix pytest failure of `test_svg_surface_get_document_unit`.

This fix is backported to python 2 from upstream. Upstream has dropped
support for python 2, but the fix works regardless of python versions.
Hence we backport the fix for python 2, since many nix packages still
depend on python2Packages.pycairo.

Upstream: 678edd94d8
Co-authored-by: Brian Leung <29217594+leungbk@users.noreply.github.com>
(cherry picked from commit 8a3eb935ac)
2023-11-22 23:11:43 +00:00
Nick Cao
6ef82175d9 Merge pull request #269265 from NixOS/backport-269225-to-release-23.11
[Backport release-23.11] consul-template: add meta.mainProgram
2023-11-22 18:10:06 -05:00
Nick Cao
3ca15d7e37 sequoia-chameleon-gnupg: 0.3.2 -> unstable-2023-11-22
Diff: https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/compare/v0.3.2...fd9df5a4e1ec3c3ca986a1a25bacf13f024c934a
(cherry picked from commit d09234229f)
2023-11-22 22:28:57 +00:00
lewo
a6ed8ddc03 Merge pull request #269181 from NixOS/backport-269124-to-release-23.11
[Backport release-23.11] rspamd: fix build on non-x86_64 platforms
2023-11-22 22:53:25 +01:00
Jack Wilsdon
84d566bc8a beets-minimal: fix building with no plugins
pytestCheckHook throws an error for non-existent disabled tests. This
commit removes any non-existent tests from the disabled tests list.

(cherry picked from commit 8bdeef4f81)
2023-11-22 22:12:26 +01:00
Jack Wilsdon
6abbe47575 beets: fix build with Sphinx 6
Sphinx 6.0.0 changed extlinks to always require placeholders in link
captions. This was fixed in beets in beetbox/beets@2106f47 but no
releases contain this fix.

Fixes #268516.

(cherry picked from commit e13fa51765)
2023-11-22 22:12:26 +01:00
Andrew Morgan
4a3e990ab7 peertube: Clarify option descriptions of listenHttp, listenWeb, enableWebHttps
(cherry picked from commit a8a58a904f)
2023-11-22 22:12:09 +01:00
Nick Cao
6ee6e25605 Merge pull request #269251 from NixOS/backport-269203-to-release-23.11
[Backport release-23.11] maddy: fix build with clang
2023-11-22 16:03:49 -05:00
Nick Cao
1f84039762 Merge pull request #269252 from NixOS/backport-269207-to-release-23.11
[Backport release-23.11] bpf-linker: add workaround for #166205
2023-11-22 15:52:58 -05:00
Nick Cao
e2bb6d2ac9 Merge pull request #269250 from NixOS/backport-269197-to-release-23.11
[Backport release-23.11] vulkan-utility-libraries: fix hash
2023-11-22 15:50:59 -05:00
Kamila Borowska
212f8b0cfc python3Packages.skytemple-files: fix build
(cherry picked from commit 885db56d0e)
2023-11-22 20:32:28 +00:00
Artturi
684d8d7186 Merge pull request #269269 from NixOS/backport-267485-to-release-23.11 2023-11-22 21:56:49 +02:00
Sefa Eyeoglu
76e4c1c598 prismlauncher: add pciutils to wrapper
The application uses lspci to print some system information to log

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
(cherry picked from commit c197424bb1)
2023-11-22 19:45:04 +00:00
Fernando Ayats
7f60317e21 consul-template: add meta.mainProgram
(cherry picked from commit ef1a9550bd)
2023-11-22 19:35:34 +00:00
Artturi
3de55ef6f9 Merge pull request #269260 from NixOS/backport-269185-to-release-23.11 2023-11-22 21:32:17 +02:00
Silvan Mosberger
55824d3991 Merge pull request #269259 from NixOS/backport-265964-to-release-23.11
[Backport release-23.11] `lib.fileset.maybeMissing`: init
2023-11-22 19:59:44 +01:00
fomichevmi
0b46d7a677 fluentd: fix service start up
"rexml" was moved from default to bundled gems in ruby 3.0.0. This causes fluentd service to fail with the error "aws-sdk-core/xml/parser.rb in `set_default_engine': Unable to find a compatible xml library)". This fix provides default xml engine and fixes fluentd startup problem.

(cherry picked from commit b478bbda9b)
2023-11-22 18:56:52 +00:00
Silvan Mosberger
da76c1c0f2 lib.fileset: Document decision for strict existence checks
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
(cherry picked from commit 827232d6dd)
2023-11-22 18:46:57 +00:00
Silvan Mosberger
9599321404 lib.fileset.maybeMissing: init
(cherry picked from commit 1cc2c2f13d)
2023-11-22 18:46:57 +00:00
John Ericson
a8df862a33 Merge pull request #269209 from NixOS/backport-269064-to-release-23.11
[Backport release-23.11] rapidcheck: Build shared/static following defaults
2023-11-22 13:42:17 -05:00
Nick Cao
ec1797cd7e bpf-linker: add workaround for #166205
(cherry picked from commit 9b158afe07)
2023-11-22 18:19:59 +00:00
Nick Cao
0c88c0c2a9 maddy: fix build with clang
(cherry picked from commit 1359116a9f)
2023-11-22 18:19:31 +00:00
Nick Cao
32231fe753 vulkan-utility-libraries: add nickcao to maintainers
(cherry picked from commit a7ad26fc43)
2023-11-22 18:16:09 +00:00
Nick Cao
64bacca4d0 vulkan-utility-libraries: fix hash
(cherry picked from commit 7c51cdf21f)
2023-11-22 18:16:09 +00:00
Robert Schütz
4eb81e6784 deltachat-desktop: 1.41.1 -> 1.41.4
Diff: https://github.com/deltachat/deltachat-desktop/compare/v1.41.1...v1.41.4

Changelog: https://github.com/deltachat/deltachat-desktop/blob/v1.41.4/CHANGELOG.md
(cherry picked from commit 8b636829b2)
2023-11-22 17:36:34 +00:00
Robert Schütz
4b91760ad2 libdeltachat: 1.131.1 -> 1.131.6
Diff: https://github.com/deltachat/deltachat-core-rust/compare/v1.131.1...v1.131.6

Changelog: https://github.com/deltachat/deltachat-core-rust/blob/v1.131.6/CHANGELOG.md
(cherry picked from commit 855bc363f5)
2023-11-22 17:36:34 +00:00
Nick Cao
4784a12198 Merge pull request #269210 from NixOS/backport-269027-to-release-23.11
[Backport release-23.11] bork: 7.0.1 → 7.0.2
2023-11-22 11:52:02 -05:00
sternenseemann
6ebb517555 gnatcoll-python3: use python 3.9
FFI glue code used by the package fails to compile against Python 3.10.

(cherry picked from commit 4fdaabaaa3)
2023-11-22 16:24:05 +00:00
sternenseemann
93b619458f emacs.pkgs.ada-mode: fix installPhase
The invocation of the install.sh script changed in 8.1.0 or 8.0 to no
longer accept the --prefix flag, instead the path needs to be given as
the first argument alone.

(cherry picked from commit 697f2b77b6)
2023-11-22 16:24:05 +00:00
sternenseemann
6df9af429d gnatcoll-*: 23.0.0 -> 24.0.0
(cherry picked from commit 47a20307b7)
2023-11-22 16:24:05 +00:00
sternenseemann
2da6e446f9 gprbuild: 23.0.0 -> 24.0.0
(cherry picked from commit 71db61c8ab)
2023-11-22 16:24:05 +00:00
R. Ryantm
61bf81e2cd xmlada: 23.0.0 -> 24.0.0
(cherry picked from commit 654e44f2a7)
2023-11-22 16:24:05 +00:00
nicoo
fbc6728f80 bork: 7.0.1 → 7.0.2
(cherry picked from commit 2e0be900aa)
2023-11-22 14:56:59 +00:00
github-actions[bot]
f98022bca0 akira-unstable: unbreak by removing vala-lint dependency
This is only used for tests: https://github.com/akiraux/Akira/blob/v0.0.16/meson.build#L41

(cherry picked from commit 4ff9b40c15)

Co-authored-by: Peder Bergebakken Sundt <pbsds@hotmail.com>
2023-11-22 22:53:15 +08:00
John Ericson
640ada079e nix: Fix build now that rapidcheck is a shared library
Backporting https://github.com/NixOS/nix/pull/9431

(cherry picked from commit 98bdc2b3bb)
2023-11-22 14:52:40 +00:00
John Ericson
f6857aca7f rapidcheck: Build shared/static following defaults
CMake defaults to static which is not what we want. It is
especially dangerous because this library has global variables ---
embedding multiple copies in downstream shared objects used by the same
final executable will cause problems.

(cherry picked from commit b2b9257186)
2023-11-22 14:52:40 +00:00
github-actions[bot]
089614f698 gitlab: downgrade Ruby from 3.2 to 3.1 (#269204)
Ruby 3.0 was dropped from nixpkgs in #264361 as it will soon become EOL
during the NixOS 23.11 release. As a result, the Ruby version in gitlab
was (accidentally) updated to 3.2.

However, gitlab does not officially support Ruby 3.2 yet.
[gitlab-org&9684] Official support for Ruby 3.1 will be introduced in
the December 2023 release of gitlab. [gitlab-org&10034] Packaging gitlab
with Ruby 3.1 in nixpkgs had been confimed working by a maintainer. As
such, it should be safe to downgrade the Ruby version to 3.1.

[gitlab-org&9684]: https://gitlab.com/groups/gitlab-org/-/epics/9684
[gitlab-org&10034]: https://gitlab.com/groups/gitlab-org/-/epics/10034

(cherry picked from commit 9056afd3ee)

Co-authored-by: Yaya <github@uwu.is>
2023-11-22 15:48:19 +01:00
Nick Cao
e32eaa82d3 Merge pull request #269100 from NixOS/backport-268992-to-release-23.11
[Backport release-23.11] dua: 2.20.2 -> 2.20.3
2023-11-22 09:26:05 -05:00
Emily Trau
fa0e9226fc Merge pull request #269195 from NixOS/backport-269066-to-release-23.11
[Backport release-23.11] redmine: 5.0.5 -> 5.0.6
2023-11-23 01:24:16 +11:00
Thomas Gerbet
93fea12ef3 redmine: 5.0.5 -> 5.0.6
Fixes CVE-2023-47258, CVE-2023-47259 and CVE-2023-47260.

Changelog:
https://www.redmine.org/projects/redmine/wiki/Changelog_5_0#506-2023-09-30
(cherry picked from commit 976711085d)
2023-11-22 14:16:09 +00:00
github-actions[bot]
a81f9412d2 ferretdb: 1.14.0 -> 1.15.0 (#269190)
(cherry picked from commit b2b85c4f11)

Co-authored-by: noisersup <patryk@kwiatek.xyz>
2023-11-22 14:58:06 +01:00
chayleaf
3cf5bb87d6 rspamd: fix build on non-x86_64 platforms
(cherry picked from commit c6e4eb5097)
2023-11-22 13:03:36 +00:00
Claudio Bley
eda04d71f7 haskell.compiler.ghc*: set abs paths for cctools bintools w/ hadrian
Fixes #267250.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2023-11-22 13:36:28 +01:00
OTABI Tomoya
add8bb5e46 Merge pull request #269151 from NixOS/backport-268988-to-release-23.11
[Backport release-23.11] python311Packages.jupyter-events: 0.7.0 -> 0.9.0
2023-11-22 21:23:55 +09:00
OTABI Tomoya
cf16dd5b5b Merge pull request #269149 from NixOS/backport-269126-to-release-23.11
[Backport release-23.11] python311Packages.speechbrain: 0.5.15 -> 0.5.16
2023-11-22 21:22:51 +09:00
ajs124
abaae41be0 cacert: 3.92 -> 3.95
- remove blacklisted certificates, because they aren't part of the bundle anymore
- switch to fetching from github, because they forgot/failed to upload a
  release tarball (again)
- https://github.com/nss-dev/nss/blob/NSS_3_95_RTM/doc/rst/releases/nss_3_95.rst

(cherry picked from commit ca7e857c13)
2023-11-22 12:03:59 +00:00
Janik
ef4943c70b Merge pull request #269137 from NixOS/backport-268128-to-release-23.11 2023-11-22 12:34:51 +01:00
happysalada
e4791cb56f python311Packages.xformers: 0.03 -> 0.0.22.post7
(cherry picked from commit bdf29479d0)
2023-11-22 11:02:39 +00:00
OTABI Tomoya
a6f845c2a3 Merge pull request #269093 from NixOS/backport-268990-to-release-23.11
[Backport release-23.11] python311Packages.jupyterlab-git: 0.50.0rc0 -> 0.50.0
2023-11-22 18:48:15 +09:00
natsukium
803b1b7c73 python311Packages.jupyter-events: 0.7.0 -> 0.9.0
Diff: https://github.com/jupyter/jupyter_events/compare/refs/tags/v0.7.0...v0.9.0

Changelog: https://github.com/jupyter/jupyter_events/releases/tag/v0.9.0
(cherry picked from commit f9ae83eeee)
2023-11-22 09:48:08 +00:00
Gaetan Lepage
d403f921ed python311Packages.speechbrain: 0.5.15 -> 0.5.16
Diff: https://github.com/speechbrain/speechbrain/compare/refs/tags/v0.5.15...v0.5.16

Changelog: https://github.com/speechbrain/speechbrain/releases/tag/v0.5.16
(cherry picked from commit 3f269a93b1)
2023-11-22 09:44:15 +00:00
Jennifer Graul
b3d8f751d5 pdk: init at 3.0.0
Closes #253423

(cherry picked from commit e9bddc495d)
2023-11-22 07:59:37 +00:00
K900
d756716f75 Merge pull request #269121 from NixOS/backport-264877-to-staging-23.11
[Backport staging-23.11] pyqt6: 6.5.2 -> 6.6.0
2023-11-22 09:19:42 +03:00
Timothy DeHerrera
6e674fa94f pyqt6: 6.5.2 -> 6.6.0
(cherry picked from commit cb6f270be2)
2023-11-22 06:19:05 +00:00
Fabián Heredia Montiel
431c3d8bc4 Merge pull request #269119 from NixOS/backport-269000-to-release-23.11
[Backport release-23.11] figma-linux: update src.hash
2023-11-22 06:03:56 +00:00
annalee
07fa2e054c figma-linux: update src.hash
looks like https://github.com/Figma-Linux/figma-linux/releases/download/v0.11.2/figma-linux_0.11.2_linux_amd64.deb
was modified after the last hash update https://github.com/NixOS/nixpkgs/pull/268358

commit log: Sat Nov 18 20:20:43 2023
Nov 18 21:57 figma-linux_0.11.2_linux_amd64.deb

(cherry picked from commit 365b4bc293)
2023-11-22 06:03:42 +00:00
Lily Foster
7426eab4c5 systemd: 254.3 -> 254.6
(cherry picked from commit f4b833961b)
2023-11-21 21:44:16 -05:00
figsoda
4f618d8b3e dua: 2.20.2 -> 2.20.3
Diff: https://github.com/Byron/dua-cli/compare/v2.20.2...v2.20.3

Changelog: https://github.com/Byron/dua-cli/blob/v2.20.3/CHANGELOG.md
(cherry picked from commit 0c920c71f0)
2023-11-22 02:21:37 +00:00
Silvan Mosberger
869398d84f Merge pull request #269094 from NixOS/backport-269092-to-release-23.11
[Backport release-23.11] workflows/check-by-name: If channel no existent, fall back to nixos-unstable
2023-11-22 02:22:35 +01:00
Silvan Mosberger
4b9684928c workflows/check-by-name: If channel no existent, fall back to nixos-unstable
(cherry picked from commit ad228aee4b)
2023-11-22 01:22:00 +00:00
natsukium
a40b7975ba python311Packages.jupyterlab-git: add meta.changelog
(cherry picked from commit 3368ddbbab)
2023-11-22 01:00:14 +00:00
natsukium
e8075ee25e python311Packages.jupyterlab-git: 0.50.0rc0 -> 0.50.0
Diff: https://github.com/jupyterlab/jupyterlab-git/compare/v0.50.0rc0...v0.50.0

Changelog: https://github.com/jupyterlab/jupyterlab-git/blob/v0.50.0/CHANGELOG.md
(cherry picked from commit f846ea989f)
2023-11-22 01:00:14 +00:00
ajs124
65a2e39b90 nss_latest: 3.94 -> 3.95
- https://github.com/nss-dev/nss/blob/NSS_3_95_RTM/doc/rst/releases/nss_3_95.rst
- switch to fetching from github, because they forgot/failed to upload a release tarball (again)

(cherry picked from commit 0e06e6f4f8)
2023-11-22 01:50:57 +01:00
OTABI Tomoya
68dc900c8e Merge pull request #269087 from NixOS/backport-268078-to-release-23.11
[Backport release-23.11] jupyter: fix runtime error
2023-11-22 09:47:44 +09:00
natsukium
52018b5324 jupyter: fix runtime error
fixed a bug reported in https://github.com/NixOS/nixpkgs/issues/255923

it occurred because the python runtime environment did not include the
jupyter share, etc directories.

(cherry picked from commit 43802570a9)
2023-11-22 00:28:27 +00:00
Silvan Mosberger
2b6bc00026 Merge pull request #269084 from NixOS/backport-265478-to-release-23.11
[Backport release-23.11] doc: Add lib.meta to the library functions ToC
2023-11-22 00:59:20 +01:00
Andreas Fuchs
dd027f27b7 doc: Add lib.meta to the library functions ToC
This seems like a pretty easy-to-fix oversight, and it documents the
getExe function, which I never knew about until one day I saw a PR
using it. Let's include it in the manual.

(cherry picked from commit 0cdbf88f83)
2023-11-21 23:57:56 +00:00
mjjs
f1d448db95 buildMozillaMach: unpin ffmpeg version
The pin was added when ffmpeg pointed to ffmpeg_4, which did not support
AV1 VAAPI decoding. Now ffmpeg points to ffmpeg_6.

(cherry picked from commit 552c0f2b04)
2023-11-22 00:38:21 +01:00
Felix Bühler
32f1166613 Merge pull request #269068 from NixOS/backport-269061-to-release-23.11
[Backport release-23.11] prefetch-yarn-deps: add cacert to provide certificates during fetches
2023-11-21 23:43:12 +01:00
Lily Foster
91fa380ed8 prefetch-yarn-deps: add cacert to provide certificates during fetches
Ideally fetch-yarn-deps could do like some other fetchers and support
using SSL_CERT_FILE if it exists and also only verify integrity on FOD
hash unless using an empty/test hash.

But this should keep at least the same semantics as before the recent
Node.js change to stop using the built-in certificate store in favor of
the system one (which does not exist by default in the build sandbox).

(cherry picked from commit ab99231a36)
2023-11-21 22:32:29 +00:00
Martin Weinelt
ac97c8793d Merge pull request #269057 from NixOS/backport-267501-to-release-23.11
[Backport release-23.11] ctranslate2: withCUDA sets stdenv = gcc11Stdenv
2023-11-21 22:49:40 +01:00
Martin Weinelt
f5948adb80 Merge pull request #269058 from NixOS/backport-268651-to-release-23.11
[Backport release-23.11] python311Packages.imageio: 2.32.0 -> 2.33.0
2023-11-21 22:27:32 +01:00
Martin Weinelt
05d600c42f python311Packages.imageio: disable failing tests on darwin
One test is crashing the interpreter, same as on pyav.

The others require ffmpeg with h264 encoding support, which for some
reason is not available on darwin.

(cherry picked from commit c4d5c9a794)
2023-11-21 21:26:23 +00:00
Martin Weinelt
a7116f7c0d python311Packages.av: disable crashing tests on darwin
(cherry picked from commit bad9e11066)
2023-11-21 21:26:22 +00:00
Gaetan Lepage
38ed39653e python311Packages.imageio: 2.32.0 -> 2.33.0
Changelog: https://github.com/imageio/imageio/releases/tag/v2.33.0
(cherry picked from commit 08c47e8d91)
2023-11-21 21:26:22 +00:00
MayNiklas
b81011b1e2 ctranslate2: withCUDA sets stdenv = gcc11Stdenv
(cherry picked from commit 8c99b64556)
2023-11-21 21:24:58 +00:00
K900
1e70b57e81 Merge pull request #269036 from NixOS/backport-269035-to-release-23.11
[Backport release-23.11] nixos/release: fix versionSuffix eval
2023-11-21 23:29:39 +03:00
figsoda
2b8994b9dd nixos/release: fix versionSuffix eval
(cherry picked from commit 625c450024)
2023-11-21 20:28:08 +00:00
Vladimír Čunát
dbdd427efb Merge #247766: GNOME: 44 -> 45
...into release-23.11
2023-11-21 20:46:16 +01:00
Sergei Trofimovich
1086c89ba1 libglvnd: enable 64-bit file APIs
Without the change 32-bit programs like `wine` or `mesa-demos` fail to
start on filesystems with 64-bit inodes.

Pull the patch pending upstream inclusion:
https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/288

(cherry picked from commit 8f0842b0ca)
2023-11-19 16:28:24 +00:00
12699 changed files with 230417 additions and 458542 deletions

View File

@@ -90,9 +90,6 @@ insert_final_newline = unset
indent_style = unset
trim_trailing_whitespace = unset
[pkgs/misc/documentation-highlighter/**]
insert_final_newline = unset
[pkgs/servers/dict/wordnet_structures.py]
trim_trailing_whitespace = unset

56
.github/CODEOWNERS vendored
View File

@@ -20,19 +20,13 @@
# Libraries
/lib @infinisil
/lib/systems @alyssais @ericson2314
/lib/systems @alyssais @ericson2314 @amjoseph-nixpkgs
/lib/generators.nix @infinisil @Profpatsch
/lib/cli.nix @infinisil @Profpatsch
/lib/debug.nix @infinisil @Profpatsch
/lib/asserts.nix @infinisil @Profpatsch
/lib/path.* @infinisil
/lib/path.* @infinisil @fricklerhandwerk
/lib/fileset @infinisil
## Libraries / Module system
/lib/modules.nix @infinisil @roberth
/lib/types.nix @infinisil @roberth
/lib/options.nix @infinisil @roberth
/lib/tests/modules.sh @infinisil @roberth
/lib/tests/modules @infinisil @roberth
# Nixpkgs Internals
/default.nix @Ericson2314
@@ -41,17 +35,17 @@
/pkgs/top-level/stage.nix @Ericson2314
/pkgs/top-level/splice.nix @Ericson2314
/pkgs/top-level/release-cross.nix @Ericson2314
/pkgs/stdenv/generic @Ericson2314
/pkgs/stdenv/generic @Ericson2314 @amjoseph-nixpkgs
/pkgs/stdenv/generic/check-meta.nix @Ericson2314 @piegamesde
/pkgs/stdenv/cross @Ericson2314
/pkgs/build-support/cc-wrapper @Ericson2314
/pkgs/stdenv/cross @Ericson2314 @amjoseph-nixpkgs
/pkgs/build-support/cc-wrapper @Ericson2314 @amjoseph-nixpkgs
/pkgs/build-support/bintools-wrapper @Ericson2314
/pkgs/build-support/setup-hooks @Ericson2314
/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
/pkgs/build-support/setup-hooks/auto-patchelf.py @layus
/pkgs/pkgs-lib @infinisil
## Format generators/serializers
/pkgs/pkgs-lib/formats/libconfig @ckiee @h7x4
/pkgs/pkgs-lib/formats/libconfig @ckiee
# pkgs/by-name
/pkgs/test/nixpkgs-check-by-name @infinisil
@@ -66,10 +60,6 @@
/doc/build-helpers/images/makediskimage.section.md @raitobezarius
/nixos/lib/make-disk-image.nix @raitobezarius
# Nix, the package manager
pkgs/tools/package-management/nix/ @raitobezarius
nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius
# Nixpkgs documentation
/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
/maintainers/scripts/doc @jtojnar @ryantm
@@ -77,8 +67,8 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius
# Contributor documentation
/CONTRIBUTING.md @infinisil
/.github/PULL_REQUEST_TEMPLATE.md @infinisil
/doc/contributing/ @infinisil
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @infinisil
/doc/contributing/ @fricklerhandwerk @infinisil
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @fricklerhandwerk @infinisil
/lib/README.md @infinisil
/doc/README.md @infinisil
/nixos/README.md @infinisil
@@ -109,9 +99,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius
/nixos/lib/systemd-*.nix @NixOS/systemd
/pkgs/os-specific/linux/systemd @NixOS/systemd
# Systemd-boot
/nixos/modules/system/boot/loader/systemd-boot @JulienMalka
# Images and installer media
/nixos/modules/installer/cd-dvd/ @samueldr
/nixos/modules/installer/sd-card/ @samueldr
@@ -157,7 +144,7 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius
/doc/languages-frameworks/rust.section.md @zowoq @winterqt @figsoda
# C compilers
/pkgs/development/compilers/gcc
/pkgs/development/compilers/gcc @amjoseph-nixpkgs
/pkgs/development/compilers/llvm @RaitoBezarius
/pkgs/development/compilers/emscripten @raitobezarius
/doc/languages-frameworks/emscripten.section.md @raitobezarius
@@ -170,8 +157,6 @@ nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius
# Browsers
/pkgs/applications/networking/browsers/firefox @mweinelt
/pkgs/applications/networking/browsers/chromium @emilylange
/nixos/tests/chromium.nix @emilylange
# Certificate Authorities
pkgs/data/misc/cacert/ @ajs124 @lukegb @mweinelt
@@ -219,7 +204,6 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/nixos/modules/services/networking/ntp @thoughtpolice
# Network
/pkgs/tools/networking/octodns @Janik-Haag
/pkgs/tools/networking/kea/default.nix @mweinelt
/pkgs/tools/networking/babeld/default.nix @mweinelt
/nixos/modules/services/networking/babeld.nix @mweinelt
@@ -274,6 +258,13 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/pkgs/development/php-packages @aanderse @drupol @etu @globin @ma27 @talyz
/pkgs/top-level/php-packages.nix @jtojnar @aanderse @drupol @etu @globin @ma27 @talyz
# Podman, CRI-O modules and related
/nixos/modules/virtualisation/containers.nix @adisbladis
/nixos/modules/virtualisation/cri-o.nix @adisbladis
/nixos/modules/virtualisation/podman @adisbladis
/nixos/tests/cri-o.nix @adisbladis
/nixos/tests/podman @adisbladis
# Docker tools
/pkgs/build-support/docker @roberth
/nixos/tests/docker-tools* @roberth
@@ -331,16 +322,15 @@ pkgs/applications/version-management/forgejo @bendlas @emilylange
/pkgs/development/ocaml-modules @ulrikstrid
# ZFS
pkgs/os-specific/linux/zfs/2_1.nix @raitobezarius
pkgs/os-specific/linux/zfs/generic.nix @raitobezarius
pkgs/os-specific/linux/zfs @raitobezarius
nixos/lib/make-single-disk-zfs-image.nix @raitobezarius
nixos/lib/make-multi-disk-zfs-image.nix @raitobezarius
nixos/modules/tasks/filesystems/zfs.nix @raitobezarius
nixos/tests/zfs.nix @raitobezarius
# Zig
/pkgs/development/compilers/zig @figsoda
/doc/hooks/zig.section.md @figsoda
/pkgs/development/compilers/zig @AndersonTorres @figsoda
/doc/hooks/zig.section.md @AndersonTorres @figsoda
# Buildbot
nixos/modules/services/continuous-integration/buildbot @Mic92 @zowoq
nixos/tests/buildbot.nix @Mic92 @zowoq
pkgs/development/tools/continuous-integration/buildbot @Mic92 @zowoq
# Linux Kernel
pkgs/os-specific/linux/kernel/manual-config.nix @amjoseph-nixpkgs

View File

@@ -40,7 +40,7 @@ Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
output here
```
---
### Priorities
Add a :+1: [reaction] to [issues you find important].

View File

@@ -38,7 +38,7 @@ Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
output here
```
---
### Priorities
Add a :+1: [reaction] to [issues you find important].

View File

@@ -30,7 +30,7 @@ assignees: ''
[open documentation issues]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+label%3A%229.needs%3A+documentation%22
[open documentation pull requests]: https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+is%3Apr+label%3A%228.has%3A+documentation%22%2C%226.topic%3A+documentation%22
---
### Priorities
Add a :+1: [reaction] to [issues you find important].

View File

@@ -27,7 +27,7 @@ There's a high chance that you'll have the new version right away while helping
Note for maintainers: Please tag this issue in your PR.
---
**Priorities**
Add a :+1: [reaction] to [issues you find important].

View File

@@ -18,7 +18,7 @@ assignees: ''
* license: mit, bsd, gpl2+ , ...
* platforms: unix, linux, darwin, ...
---
**Priorities**
Add a :+1: [reaction] to [issues you find important].

View File

@@ -86,7 +86,7 @@ nix log $(nix path-info --derivation nixpkgs#<package>)
(please share the relevant fragment of the diffoscope output here, and any
additional analysis you may have done)
---
### Priorities
Add a :+1: [reaction] to [issues you find important].

View File

@@ -24,7 +24,7 @@ For new packages please briefly describe the package or provide a link to its ho
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [24.05 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2405.section.md) (or backporting [23.05](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2305.section.md) and [23.11](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) Release notes)
- [23.11 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) (or backporting [23.05 Release notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2305.section.md))
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module
@@ -41,7 +41,7 @@ List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://nixos.org/manual/nixpkgs/unstable/#chap-reviewing-contributions
-->
---
### Priorities
Add a :+1: [reaction] to [pull requests you find important].

7
.github/labeler.yml vendored
View File

@@ -65,13 +65,6 @@
- pkgs/top-level/haskell-packages.nix
- pkgs/top-level/release-haskell.nix
"6.topic: jupyter":
- 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: kernel":
- pkgs/build-support/kernel/**/*
- pkgs/os-specific/linux/kernel/**/*

View File

@@ -20,11 +20,11 @@ jobs:
if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
uses: korthout/backport-action@08bafb375e6e9a9a2b53a744b987e5d81a133191 # v2.1.1
uses: korthout/backport-action@v2.1.1
with:
# Config README: https://github.com/korthout/backport-action#backport-action
copy_labels_pattern: 'severity:\ssecurity'

View File

@@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest
# we don't limit this action to only NixOS repo since the checks are cheap and useful developer feedback
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/cachix-action@v12
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci

View File

@@ -1,42 +1,28 @@
# Checks pkgs/by-name (see pkgs/by-name/README.md)
# using the nixpkgs-check-by-name tool (see pkgs/test/nixpkgs-check-by-name)
#
# When you make changes to this workflow, also update pkgs/test/nixpkgs-check-by-name/scripts/run-local.sh adequately
name: Check pkgs/by-name
# The tool is pinned to a pre-built version on Hydra,
# see pkgs/test/nixpkgs-check-by-name/scripts/README.md
# The pre-built tool is fetched from a channel,
# making it work predictable on all PRs.
on:
# Using pull_request_target instead of pull_request avoids having to approve first time contributors
pull_request_target
permissions:
# We need this permission to cancel the workflow run if there's a merge conflict
actions: write
# The tool doesn't need any permissions, it only outputs success or not based on the checkout
permissions: {}
jobs:
check:
# This is x86_64-linux, for which the tool is always prebuilt on the nixos-* channels,
# as specified in nixos/release-combined.nix
runs-on: ubuntu-latest
# This should take 1 minute at most, but let's be generous.
# The default of 6 hours is definitely too long
timeout-minutes: 10
steps:
# This step has to be in this file,
# because it's needed to determine which revision of the repository to fetch,
# and we can only use other files from the repository once it's fetched.
- name: Resolving the merge commit
env:
GH_TOKEN: ${{ github.token }}
run: |
# This checks for mergeability of a pull request as recommended in
# https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests
# Retry the API query this many times
retryCount=3
# Start with 5 seconds, but double every retry
retryInterval=5
while true; do
echo "Checking whether the pull request can be merged"
prInfo=$(gh api \
@@ -47,19 +33,10 @@ jobs:
mergedSha=$(jq -r .merge_commit_sha <<< "$prInfo")
if [[ "$mergeable" == "null" ]]; then
if (( retryCount == 0 )); then
echo "Not retrying anymore, probably GitHub is having internal issues"
exit 1
else
(( retryCount -= 1 )) || true
# null indicates that GitHub is still computing whether it's mergeable
# Wait a couple seconds before trying again
echo "GitHub is still computing whether this PR can be merged, waiting $retryInterval seconds before trying again ($retryCount retries left)"
sleep "$retryInterval"
(( retryInterval *= 2 )) || true
fi
# null indicates that GitHub is still computing whether it's mergeable
# Wait a couple seconds before trying again
echo "GitHub is still computing whether this PR can be merged, waiting 5 seconds before trying again"
sleep 5
else
break
fi
@@ -68,42 +45,135 @@ jobs:
if [[ "$mergeable" == "true" ]]; then
echo "The PR can be merged, checking the merge commit $mergedSha"
else
echo "The PR cannot be merged, it has a merge conflict, cancelling the workflow.."
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/"$GITHUB_REPOSITORY"/actions/runs/"$GITHUB_RUN_ID"/cancel
sleep 60
# If it's still not canceled after a minute, something probably went wrong, just exit
echo "The PR cannot be merged, it has a merge conflict"
exit 1
fi
echo "mergedSha=$mergedSha" >> "$GITHUB_ENV"
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: ${{ env.mergedSha }}
# Fetches the merge commit and its parents
fetch-depth: 2
- name: Checking out base branch
- name: Determining PR git hashes
run: |
base=$(mktemp -d)
git worktree add "$base" "$(git rev-parse HEAD^1)"
echo "base=$base" >> "$GITHUB_ENV"
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- name: Fetching the pinned tool
# Update the pinned version using pkgs/test/nixpkgs-check-by-name/scripts/update-pinned-tool.sh
# For pull_request_target this is the same as $GITHUB_SHA
echo "baseSha=$(git rev-parse HEAD^1)" >> "$GITHUB_ENV"
echo "headSha=$(git rev-parse HEAD^2)" >> "$GITHUB_ENV"
- uses: cachix/install-nix-action@v23
- name: Determining channel to use for dependencies
run: |
# Get the direct /nix/store path from the pin to avoid having to evaluate Nixpkgs
toolPath=$(jq -r '."ci-path"' pkgs/test/nixpkgs-check-by-name/scripts/pinned-tool.json)
# This asks the substituter for the path, which should be there because Hydra will have pre-built and pushed it
nix-store --realise "$toolPath" --add-root result
echo "Determining the preferred channel to use for PR base branch $GITHUB_BASE_REF"
if [[ "$GITHUB_BASE_REF" =~ ^(release|staging|staging-next)-([0-9][0-9]\.[0-9][0-9])$ ]]; then
# Use the release channel for all PRs to release-XX.YY, staging-XX.YY and staging-next-XX.YY
channel=nixos-${BASH_REMATCH[2]}
echo "PR is for a release branch, preferred channel is $channel"
else
# Use the nixos-unstable channel for all other PRs
channel=nixos-unstable
echo "PR is for a non-release branch, preferred channel is $channel"
fi
# Check that the channel exists. It doesn't exist for fresh release branches
if ! curl -fSs "https://channels.nixos.org/$channel"; then
# Fall back to nixos-unstable, makes sense for fresh release branches
echo "Preferred channel $channel could not be fetched, falling back to nixos-unstable"
channel=nixos-unstable
fi
echo "channel=$channel" >> "$GITHUB_ENV"
- name: Fetching latest version of channel
run: |
echo "Fetching latest version of channel $channel"
# This is probably the easiest way to get Nix to output the path to a downloaded channel!
nixpkgs=$(nix-instantiate --find-file nixpkgs -I nixpkgs=channel:"$channel")
# This file only exists in channels
rev=$(<"$nixpkgs"/.git-revision)
echo "Channel $channel is at revision $rev"
echo "nixpkgs=$nixpkgs" >> "$GITHUB_ENV"
echo "rev=$rev" >> "$GITHUB_ENV"
- name: Fetching pre-built nixpkgs-check-by-name from the channel
run: |
echo "Fetching pre-built nixpkgs-check-by-name from channel $channel at revision $rev"
# Passing --max-jobs 0 makes sure that we won't build anything
nix-build "$nixpkgs" -A tests.nixpkgs-check-by-name --max-jobs 0
- name: Running nixpkgs-check-by-name
run: |
if result/bin/nixpkgs-check-by-name --base "$base" .; then
exit 0
echo "Checking whether the check succeeds on the base branch $GITHUB_BASE_REF"
git checkout -q "$baseSha"
if baseOutput=$(result/bin/nixpkgs-check-by-name . 2>&1); then
baseSuccess=1
else
exitCode=$?
echo "To run locally: ./maintainers/scripts/check-by-name.sh $GITHUB_BASE_REF https://github.com/$GITHUB_REPOSITORY.git"
exit "$exitCode"
baseSuccess=
fi
printf "%s\n" "$baseOutput"
echo "Checking whether the check would succeed after merging this pull request"
git checkout -q "$mergedSha"
if mergedOutput=$(result/bin/nixpkgs-check-by-name . 2>&1); then
mergedSuccess=1
exitCode=0
else
mergedSuccess=
exitCode=1
fi
printf "%s\n" "$mergedOutput"
resultToEmoji() {
if [[ -n "$1" ]]; then
echo ":heavy_check_mark:"
else
echo ":x:"
fi
}
# Print a markdown summary in GitHub actions
{
echo "| Nixpkgs version | Check result |"
echo "| --- | --- |"
echo "| Latest base commit | $(resultToEmoji "$baseSuccess") |"
echo "| After merging this PR | $(resultToEmoji "$mergedSuccess") |"
echo ""
if [[ -n "$baseSuccess" ]]; then
if [[ -n "$mergedSuccess" ]]; then
echo "The check succeeds on both the base branch and after merging this PR"
else
echo "The check succeeds on the base branch, but would fail after merging this PR:"
echo "\`\`\`"
echo "$mergedOutput"
echo "\`\`\`"
echo ""
fi
else
if [[ -n "$mergedSuccess" ]]; then
echo "The check fails on the base branch, but this PR fixes it, nicely done!"
else
echo "The check fails on both the base branch and after merging this PR, unknown if only this PRs changes would satisfy the check, the base branch needs to be fixed first."
echo ""
echo "Failure on the base branch:"
echo "\`\`\`"
echo "$baseOutput"
echo "\`\`\`"
echo ""
echo "Failure after merging this PR:"
echo "\`\`\`"
echo "$mergedOutput"
echo "\`\`\`"
echo ""
fi
fi
echo "### Details"
echo "- nixpkgs-check-by-name tool:"
echo " - Channel: $channel"
echo " - Nixpkgs commit: [$rev](https://github.com/${GITHUB_REPOSITORY}/commit/$rev)"
echo " - Store path: \`$(realpath result)\`"
echo "- Tested Nixpkgs:"
echo " - Base branch: $GITHUB_BASE_REF"
echo " - Latest base branch commit: [$baseSha](https://github.com/${GITHUB_REPOSITORY}/commit/$baseSha)"
echo " - Latest PR commit: [$headSha](https://github.com/${GITHUB_REPOSITORY}/commit/$headSha)"
echo " - Merge commit: [$mergedSha](https://github.com/${GITHUB_REPOSITORY}/commit/$mergedSha)"
} >> "$GITHUB_STEP_SUMMARY"
exit "$exitCode"

View File

@@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- uses: cachix/install-nix-action@v23
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true

View File

@@ -24,11 +24,11 @@ jobs:
- name: print list of changed files
run: |
cat "$HOME/changed_files"
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- uses: cachix/install-nix-action@v23
with:
# nixpkgs commit is pinned so that it doesn't break
# editorconfig-checker 2.4.0

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
steps:
- uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0
- uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true

View File

@@ -14,15 +14,15 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- uses: cachix/install-nix-action@v23
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
- uses: cachix/cachix-action@v12
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci

View File

@@ -15,18 +15,18 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- uses: cachix/install-nix-action@v23
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
- uses: cachix/cachix-action@v12
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Building Nixpkgs manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true pkgs/top-level/release.nix -A manual -A manual.tests
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true pkgs/top-level/release.nix -A manual

View File

@@ -1,42 +0,0 @@
name: "Check whether nix files are parseable"
permissions: read-all
on:
# avoids approving first time contributors
pull_request_target:
branches-ignore:
- 'release-**'
jobs:
tests:
runs-on: ubuntu-latest
if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
steps:
- name: Get list of changed files from PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api \
repos/NixOS/nixpkgs/pulls/${{github.event.number}}/files --paginate \
| jq --raw-output '.[] | select(.status != "removed" and (.filename | endswith(".nix"))) | .filename' \
> "$HOME/changed_files"
if [[ -s "$HOME/changed_files" ]]; then
echo "CHANGED_FILES=$HOME/changed_files" > "$GITHUB_ENV"
fi
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
if: ${{ env.CHANGED_FILES && env.CHANGED_FILES != '' }}
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Parse all changed or added nix files
run: |
ret=0
while IFS= read -r file; do
out="$(nix-instantiate --parse "$file")" || { echo "$out" && ret=1; }
done < "$HOME/changed_files"
exit "$ret"
if: ${{ env.CHANGED_FILES && env.CHANGED_FILES != '' }}

View File

@@ -13,7 +13,6 @@ on:
# * is a special character in YAML so you have to quote this string
# Merge every 24 hours
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: read
@@ -39,16 +38,12 @@ jobs:
into: staging-next-23.05
- from: staging-next-23.05
into: staging-23.05
- from: release-23.11
into: staging-next-23.11
- from: staging-next-23.11
into: staging-23.11
name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
uses: devmasx/merge-branch@1.4.0
with:
type: now
from_branch: ${{ matrix.pairs.from }}
@@ -56,7 +51,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on failure
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
uses: peter-evans/create-or-update-comment@v3
if: ${{ failure() }}
with:
issue-number: 105153

View File

@@ -13,7 +13,6 @@ on:
# * is a special character in YAML so you have to quote this string
# Merge every 6 hours
- cron: '0 */6 * * *'
workflow_dispatch:
permissions:
contents: read
@@ -39,10 +38,10 @@ jobs:
into: staging
name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@v4
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
uses: devmasx/merge-branch@1.4.0
with:
type: now
from_branch: ${{ matrix.pairs.from }}
@@ -50,7 +49,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on failure
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0
uses: peter-evans/create-or-update-comment@v3
if: ${{ failure() }}
with:
issue-number: 105153

View File

@@ -16,8 +16,8 @@ jobs:
if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: setup
@@ -46,7 +46,7 @@ jobs:
run: |
git clean -f
- name: create PR
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
uses: peter-evans/create-pull-request@v5
with:
body: |
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
@@ -60,7 +60,7 @@ jobs:
Check that all providers build with:
```
@ofborg build opentofu.full
@ofborg build terraform.full
```
If there is more than ten commits in the PR `ofborg` won't build it automatically and you will need to use the above command.
branch: terraform-providers-update

View File

@@ -12,5 +12,3 @@ Sandro Jäckel <sandro.jaeckel@gmail.com> <sandro.jaeckel@sap.com>
superherointj <5861043+superherointj@users.noreply.github.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> StepBroBD <Hi@StepBroBD.com>
Yifei Sun <ysun@hey.com> <ysun+git@stepbrobd.com>

View File

@@ -1 +1 @@
24.05
23.11

View File

@@ -26,7 +26,7 @@ This file contains general contributing information, but individual parts also h
This section describes in some detail how changes can be made and proposed with pull requests.
> [!Note]
> **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 using GitHub and Git
@@ -273,7 +273,7 @@ Once a pull request has been merged into `master`, a backport pull request to th
### Automatically backporting changes
> [!Note]
> **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 pull request on the `master` branch.
@@ -285,17 +285,16 @@ This can be done on both open or already merged pull requests.
To manually create a backport pull request, follow [the standard pull request process][pr-create], with these notable differences:
- 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, that is a branch pointing to the tested release channel commit
> **Warning**
> Do not use the `nixos-YY.MM` branch, that is a branch pointing to the 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 from the pull request you'd like to backport.
Either `git cherry-pick -x <commit>` when the reason for the backport is obvious (such as minor versions, fixes, etc.), otherwise use `git cherry-pick -xe <commit>` to add a reason for the backport to the commit message.
Here is [an example](https://github.com/nixos/nixpkgs/commit/5688c39af5a6c5f3d646343443683da880eaefb8) of this.
> [!Warning]
> Ensure the commits exists 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.
> **Warning**
> Ensure the commits exists 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.
@@ -306,7 +305,7 @@ To manually create a backport pull request, follow [the standard pull request pr
## How to review pull requests
[pr-review]: #how-to-review-pull-requests
> [!Warning]
> **Warning**
> The following section is a draft, and the policy for reviewing is still being discussed in issues such as [#11166](https://github.com/NixOS/nixpkgs/issues/11166) and [#20836](https://github.com/NixOS/nixpkgs/issues/20836).
The Nixpkgs project receives a fairly high number of contributions via GitHub pull requests. Reviewing and approving these is an important task and a way to contribute to the project.
@@ -323,7 +322,7 @@ All the review template samples provided in this section are generic and meant a
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-reviewers](https://github.com/orgs/nixos/teams/documentation-reviewers) on the pull request.
If a pull request contains documentation changes that might require feedback from the documentation team, ping @NixOS/documentation-team on the pull request.
If you consider having 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. They will give you information about the reviewing process. The main reviewers for a topic can be hard to find as there is no list, but checking past pull requests to see who reviewed or git-blaming the code to see who committed to that topic can give some hints.
@@ -361,7 +360,7 @@ See [Nix Channel Status](https://status.nixos.org/) for the current channels and
Here's a brief overview of the main Git branches and what channels they're used for:
- `master`: The main branch, used for the unstable channels such as `nixpkgs-unstable`, `nixos-unstable` and `nixos-unstable-small`.
- `release-YY.MM` (e.g. `release-23.11`): The NixOS release branches, used for the stable channels such as `nixos-23.11`, `nixos-23.11-small` and `nixpkgs-23.11-darwin`.
- `release-YY.MM` (e.g. `release-23.05`): The NixOS release branches, used for the stable channels such as `nixos-23.05`, `nixos-23.05-small` and `nixpkgs-23.05-darwin`.
When a channel is updated, a corresponding Git branch is also updated to point to the corresponding commit.
So e.g. the [`nixpkgs-unstable` branch](https://github.com/nixos/nixpkgs/tree/nixpkgs-unstable) corresponds to the Git commit from the [`nixpkgs-unstable` channel](https://channels.nixos.org/nixpkgs-unstable).
@@ -378,14 +377,14 @@ The staging workflow exists to batch Hydra builds of many packages together.
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 direct commits in order to fix Hydra builds.
Once it is verified that there are no major regressions, it is merged into `master` using [a pull request](https://github.com/NixOS/nixpkgs/pulls?q=head%3Astaging-next).
Once it is verified that there are no major regressions, it is merged into `master` using [a pull requests](https://github.com/NixOS/nixpkgs/pulls?q=head%3Astaging-next).
This is done manually in order to ensure it's a good use of Hydra's computing resources.
By keeping the `staging-next` branch separate from `staging`, this batching does not block developers from merging changes into `staging`.
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 `staging`.
This is implemented using GitHub workflows [here](.github/workflows/periodic-merge-6h.yml) and [here](.github/workflows/periodic-merge-24h.yml).
> [!Note]
> **Note**
> Changes must be sufficiently tested before being merged into any branch.
> Hydra builds should not be used as testing platform.

View File

@@ -1,18 +1,14 @@
# Contributing to the Nixpkgs reference manual
# Contributing to the Nixpkgs manual
This directory houses the sources files for the Nixpkgs reference manual.
Going forward, it should only contain [reference](https://nix.dev/contributing/documentation/diataxis#reference) documentation.
For tutorials, guides and explanations, contribute to <https://nix.dev/> instead.
For documentation only relevant for contributors, use Markdown files and code comments in the source code.
Rendered documentation:
- [Unstable (from master)](https://nixos.org/manual/nixpkgs/unstable/)
- [Stable (from latest release)](https://nixos.org/manual/nixpkgs/stable/)
This directory houses the sources files for the Nixpkgs manual.
You can find the [rendered documentation for Nixpkgs `unstable` on nixos.org](https://nixos.org/manual/nixpkgs/unstable/).
The rendering tool is [nixos-render-docs](../pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs), sometimes abbreviated `nrd`.
[Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available.
If you're only getting started with Nix, go to [nixos.org/learn](https://nixos.org/learn).
## Contributing to this documentation
You can quickly check your edits with `nix-build`:
@@ -52,7 +48,7 @@ It uses the widely compatible [header attributes](https://github.com/jgm/commonm
## Syntax {#sec-contributing-markup}
```
> [!Note]
> **Note**
> NixOS option documentation does not support headings in general.
#### Inline Anchors
@@ -106,19 +102,6 @@ The following are supported:
- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
- [`example`](https://tdg.docbook.org/tdg/5.0/example.html)
Example admonitions require a title to work.
If you don't provide one, the manual won't be built.
```markdown
::: {.example #ex-showing-an-example}
# Title for this example
Text for the example.
:::
```
#### [Definition lists](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md)
@@ -152,62 +135,3 @@ watermelon
Closes #216321.
- If the commit contains more than just documentation changes, follow the commit message format relevant for the rest of the changes.
## Documentation conventions
In an effort to keep the Nixpkgs manual in a consistent style, please follow the conventions below, unless they prevent you from properly documenting something.
In that case, please open an issue about the particular documentation convention and tag it with a "needs: documentation" label.
- Put each sentence in its own line.
This makes reviews and suggestions much easier, since GitHub's review system is based on lines.
It also helps identifying long sentences at a glance.
- Use the [admonition syntax](#admonitions) for callouts and examples.
- Provide at least one example per function, and make examples self-contained.
This is easier to understand for beginners.
It also helps with testing that it actually works especially once we introduce automation.
Example code should be such that it can be passed to `pkgs.callPackage`.
Instead of something like:
```nix
pkgs.dockerTools.buildLayeredImage {
name = "hello";
contents = [ pkgs.hello ];
}
```
Write something like:
```nix
{ dockerTools, hello }:
dockerTools.buildLayeredImage {
name = "hello";
contents = [ hello ];
}
```
- Use [definition lists](#definition-lists) to document function arguments, and the attributes of such arguments. For example:
```markdown
# pkgs.coolFunction
Description of what `coolFunction` does.
`coolFunction` expects a single argument which should be an attribute set, with the following possible attributes:
`name`
: The name of the resulting image.
`tag` _optional_
: Tag of the generated image.
_Default value:_ the output path's hash.
```
## Getting help
If you need documentation-specific help or reviews, ping [@NixOS/documentation-reviewers](https://github.com/orgs/nixos/teams/documentation-reviewers) on your pull request.

View File

@@ -1,167 +1,48 @@
# pkgs.appimageTools {#sec-pkgs-appimageTools}
`pkgs.appimageTools` is a set of functions for extracting and wrapping [AppImage](https://appimage.org/) files.
They are meant to be used if traditional packaging from source is infeasible, or if it would take too long.
To quickly run an AppImage file, `pkgs.appimage-run` can be used as well.
`pkgs.appimageTools` is a set of functions for extracting and wrapping [AppImage](https://appimage.org/) files. They are meant to be used if traditional packaging from source is infeasible, or it would take too long. To quickly run an AppImage file, `pkgs.appimage-run` can be used as well.
::: {.warning}
The `appimageTools` API is unstable and may be subject to backwards-incompatible changes in the future.
:::
## AppImage formats {#ssec-pkgs-appimageTools-formats}
There are different formats for AppImages, see [the specification](https://github.com/AppImage/AppImageSpec/blob/74ad9ca2f94bf864a4a0dac1f369dd4f00bd1c28/draft.md#image-format) for details.
- Type 1 images are ISO 9660 files that are also ELF executables.
- Type 2 images are ELF executables with an appended filesystem.
They can be told apart with `file -k`:
```ShellSession
$ file -k type1.AppImage
type1.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) ISO 9660 CD-ROM filesystem data 'AppImage' (Lepton 3.x), scale 0-0,
spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 0.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=d629f6099d2344ad82818172add1d38c5e11bc6d, stripped\012- data
$ file -k type2.AppImage
type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x), scale 232-60668, spot sensor temperature -4.187500, color scheme 15, show scale bar, calibration: offset -0.000000, slope 0.000000 (Lepton 2.x), scale 4111-45000, spot sensor temperature 412442.250000, color scheme 3, minimum point enabled, calibration: offset -75402534979642766821519867692934234112.000000, slope 5815371847733706829839455140374904832.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79dcc4e55a61c293c5e19edbd8d65b202842579f, stripped\012- data
```
Note how the type 1 AppImage is described as an `ISO 9660 CD-ROM filesystem`, and the type 2 AppImage is not.
## Wrapping {#ssec-pkgs-appimageTools-wrapping}
Use `wrapType2` to wrap any AppImage.
This will create a FHS environment with many packages [expected to exist](https://github.com/AppImage/pkg2appimage/blob/master/excludelist) for the AppImage to work.
`wrapType2` expects an argument with the `src` attribute, and either a `name` attribute or `pname` and `version` attributes.
It will eventually call into [`buildFHSEnv`](#sec-fhs-environments), and any extra attributes in the argument to `wrapType2` will be passed through to it.
This means that you can pass the `extraInstallCommands` attribute, for example, and it will have the same effect as described in [`buildFHSEnv`](#sec-fhs-environments).
::: {.note}
In the past, `appimageTools` provided both `wrapType1` and `wrapType2`, to be used depending on the type of AppImage that was being wrapped.
However, [those were unified early 2020](https://github.com/NixOS/nixpkgs/pull/81833), meaning that both `wrapType1` and `wrapType2` have the same behaviour now.
:::
:::{.example #ex-wrapping-appimage-from-github}
# Wrapping an AppImage from GitHub
Depending on the type of AppImage you're wrapping, you'll have to use `wrapType1` or `wrapType2`.
```nix
{ appimageTools, fetchurl }:
let
pname = "nuclear";
version = "0.6.30";
appimageTools.wrapType2 { # or wrapType1
name = "patchwork";
src = fetchurl {
url = "https://github.com/nukeop/nuclear/releases/download/v${version}/${pname}-v${version}.AppImage";
hash = "sha256-he1uGC1M/nFcKpMM9JKY4oeexJcnzV0ZRxhTjtJz6xw=";
url = "https://github.com/ssbc/patchwork/releases/download/v3.11.4/Patchwork-3.11.4-linux-x86_64.AppImage";
hash = "sha256-OqTitCeZ6xmWbqYTXp8sDrmVgTNjPZNW0hzUPW++mq4=";
};
in
appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: with pkgs; [ ];
}
```
:::
The argument passed to `wrapType2` can also contain an `extraPkgs` attribute, which allows you to include additional packages inside the FHS environment your AppImage is going to run in.
`extraPkgs` must be a function that returns a list of packages.
There are a few ways to learn which dependencies an application needs:
- Looking through the extracted AppImage files, reading its scripts and running `patchelf` and `ldd` on its executables.
This can also be done in `appimage-run`, by setting `APPIMAGE_DEBUG_EXEC=bash`.
- `name` specifies the name of the resulting image.
- `src` specifies the AppImage file to extract.
- `extraPkgs` allows you to pass a function to include additional packages inside the FHS environment your AppImage is going to run in. There are a few ways to learn which dependencies an application needs:
- Looking through the extracted AppImage files, reading its scripts and running `patchelf` and `ldd` on its executables. This can also be done in `appimage-run`, by setting `APPIMAGE_DEBUG_EXEC=bash`.
- Running `strace -vfefile` on the wrapped executable, looking for libraries that can't be found.
:::{.example #ex-wrapping-appimage-with-extrapkgs}
# Wrapping an AppImage with extra packages
```nix
{ appimageTools, fetchurl }:
let
pname = "irccloud";
version = "0.16.0";
src = fetchurl {
url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage";
sha256 = "sha256-/hMPvYdnVB1XjKgU2v47HnVvW4+uC3rhRjbucqin4iI=";
};
in appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.at-spi2-core ];
}
```
:::
## Extracting {#ssec-pkgs-appimageTools-extracting}
Use `extract` if you need to extract the contents of an AppImage.
This is usually used in Nixpkgs to install extra files in addition to [wrapping](#ssec-pkgs-appimageTools-wrapping) the AppImage.
`extract` expects an argument with the `src` attribute, and either a `name` attribute or `pname` and `version` attributes.
::: {.note}
In the past, `appimageTools` provided both `extractType1` and `extractType2`, to be used depending on the type of AppImage that was being extracted.
However, [those were unified early 2020](https://github.com/NixOS/nixpkgs/pull/81572), meaning that both `extractType1` and `extractType2` have the same behaviour as `extract` now.
:::
:::{.example #ex-extracting-appimage}
# Extracting an AppImage to install extra files
This example was adapted from a real package in Nixpkgs to show how `extract` is usually used in combination with `wrapType2`.
Note how `appimageContents` is used in `extraInstallCommands` to install additional files that were extracted from the AppImage.
```nix
{ appimageTools, fetchurl }:
let
pname = "irccloud";
version = "0.16.0";
src = fetchurl {
url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage";
sha256 = "sha256-/hMPvYdnVB1XjKgU2v47HnVvW4+uC3rhRjbucqin4iI=";
};
appimageContents = appimageTools.extract {
inherit pname version src;
};
in appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.at-spi2-core ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/irccloud.desktop $out/share/applications/irccloud.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/irccloud.png \
$out/share/icons/hicolor/512x512/apps/irccloud.png
substituteInPlace $out/share/applications/irccloud.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
}
```
:::
The argument passed to `extract` can also contain a `postExtract` attribute, which allows you to execute additional commands after the files are extracted from the AppImage.
`postExtract` must be a string with commands to run.
:::{.example #ex-extracting-appimage-with-postextract}
# Extracting an AppImage to install extra files, using `postExtract`
This is a rewrite of [](#ex-extracting-appimage) to use `postExtract`.
```nix
{ appimageTools, fetchurl }:
let
pname = "irccloud";
version = "0.16.0";
src = fetchurl {
url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage";
sha256 = "sha256-/hMPvYdnVB1XjKgU2v47HnVvW4+uC3rhRjbucqin4iI=";
};
appimageContents = appimageTools.extract {
inherit pname version src;
postExtract = ''
substituteInPlace $out/irccloud.desktop --replace 'Exec=AppRun' 'Exec=${pname}'
'';
};
in appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.at-spi2-core ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/irccloud.desktop $out/share/applications/irccloud.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/irccloud.png \
$out/share/icons/hicolor/512x512/apps/irccloud.png
'';
}
```
:::

View File

@@ -1,58 +1,49 @@
# pkgs.mkBinaryCache {#sec-pkgs-binary-cache}
`pkgs.mkBinaryCache` is a function for creating Nix flat-file binary caches.
Such a cache exists as a directory on disk, and can be used as a Nix substituter by passing `--substituter file:///path/to/cache` to Nix commands.
`pkgs.mkBinaryCache` is a function for creating Nix flat-file binary caches. Such a cache exists as a directory on disk, and can be used as a Nix substituter by passing `--substituter file:///path/to/cache` to Nix commands.
Nix packages are most commonly shared between machines using [HTTP, SSH, or S3](https://nixos.org/manual/nix/stable/package-management/sharing-packages.html), but a flat-file binary cache can still be useful in some situations.
For example, you can copy it directly to another machine, or make it available on a network file system.
It can also be a convenient way to make some Nix packages available inside a container via bind-mounting.
Nix packages are most commonly shared between machines using [HTTP, SSH, or S3](https://nixos.org/manual/nix/stable/package-management/sharing-packages.html), but a flat-file binary cache can still be useful in some situations. For example, you can copy it directly to another machine, or make it available on a network file system. It can also be a convenient way to make some Nix packages available inside a container via bind-mounting.
`mkBinaryCache` expects an argument with the `rootPaths` attribute.
`rootPaths` must be a list of derivations.
The transitive closure of these derivations' outputs will be copied into the cache.
Note that this function is meant for advanced use-cases. The more idiomatic way to work with flat-file binary caches is via the [nix-copy-closure](https://nixos.org/manual/nix/stable/command-ref/nix-copy-closure.html) command. You may also want to consider [dockerTools](#sec-pkgs-dockerTools) for your containerization needs.
::: {.note}
This function is meant for advanced use cases.
The more idiomatic way to work with flat-file binary caches is via the [nix-copy-closure](https://nixos.org/manual/nix/stable/command-ref/nix-copy-closure.html) command.
You may also want to consider [dockerTools](#sec-pkgs-dockerTools) for your containerization needs.
:::
[]{#sec-pkgs-binary-cache-example}
:::{.example #ex-mkbinarycache-copying-package-closure}
# Copying a package and its closure to another machine with `mkBinaryCache`
## Example {#sec-pkgs-binary-cache-example}
The following derivation will construct a flat-file binary cache containing the closure of `hello`.
```nix
{ mkBinaryCache, hello }:
mkBinaryCache {
rootPaths = [hello];
}
```
Build the cache on a machine.
Note that the command still builds the exact nix package above, but adds some boilerplate to build it directly from an expression.
- `rootPaths` specifies a list of root derivations. The transitive closure of these derivations' outputs will be copied into the cache.
Here's an example of building and using the cache.
Build the cache on one machine, `host1`:
```shellSession
$ nix-build -E 'let pkgs = import <nixpkgs> {}; in pkgs.callPackage ({ mkBinaryCache, hello }: mkBinaryCache { rootPaths = [hello]; }) {}'
/nix/store/azf7xay5xxdnia4h9fyjiv59wsjdxl0g-binary-cache
nix-build -E 'with import <nixpkgs> {}; mkBinaryCache { rootPaths = [hello]; }'
```
Copy the resulting directory to another machine, which we'll call `host2`:
```shellSession
$ scp result host2:/tmp/hello-cache
/nix/store/cc0562q828rnjqjyfj23d5q162gb424g-binary-cache
```
At this point, the cache can be used as a substituter when building derivations on `host2`:
Copy the resulting directory to the other machine, `host2`:
```shellSession
$ nix-build -A hello '<nixpkgs>' \
scp result host2:/tmp/hello-cache
```
Substitute the derivation using the flat-file binary cache on the other machine, `host2`:
```shellSession
nix-build -A hello '<nixpkgs>' \
--option require-sigs false \
--option trusted-substituters file:///tmp/hello-cache \
--option substituters file:///tmp/hello-cache
/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1
```
:::
```shellSession
/nix/store/gl5a41azbpsadfkfmbilh9yk40dh5dl0-hello-2.12.1
```

View File

@@ -1,228 +1,33 @@
# pkgs.dockerTools {#sec-pkgs-dockerTools}
`pkgs.dockerTools` is a set of functions for creating and manipulating Docker images according to the [Docker Image Specification v1.3.0](https://github.com/moby/moby/blob/46f7ab808b9504d735d600e259ca0723f76fb164/image/spec/spec.md#image-json-field-descriptions).
Docker itself is not used to perform any of the operations done by these functions.
`pkgs.dockerTools` is a set of functions for creating and manipulating Docker images according to the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#docker-image-specification-v120). Docker itself is not used to perform any of the operations done by these functions.
## buildImage {#ssec-pkgs-dockerTools-buildImage}
This function builds a Docker-compatible repository tarball containing a single image.
As such, the result is suitable for being loaded in Docker with `docker load` (see [](#ex-dockerTools-buildImage) for how to do this).
This function is analogous to the `docker build` command, in that it can be used to build a Docker-compatible repository tarball containing a single image with one or multiple layers. As such, the result is suitable for being loaded in Docker with `docker load`.
This function will create a single layer for all files (and dependencies) that are specified in its argument.
Only new dependencies that are not already in the existing layers will be copied.
If you prefer to create multiple layers for the files and dependencies you want to add to the image, see [](#ssec-pkgs-dockerTools-buildLayeredImage) or [](#ssec-pkgs-dockerTools-streamLayeredImage) instead.
The parameters of `buildImage` with relative example values are described below:
This function allows a script to be run during the layer generation process, allowing custom behaviour to affect the final results of the image (see the documentation of the `runAsRoot` and `extraCommands` attributes).
The resulting repository tarball will list a single image as specified by the `name` and `tag` attributes.
By default, that image will use a static creation date (see documentation for the `created` attribute).
This allows `buildImage` to produce reproducible images.
:::{.tip}
When running an image built with `buildImage`, you might encounter certain errors depending on what you included in the image, especially if you did not start with any base image.
If you encounter errors similar to `getProtocolByName: does not exist (no such protocol name: tcp)`, you may need to add the contents of `pkgs.iana-etc` in the `copyToRoot` attribute.
Similarly, if you encounter errors similar to `Error_Protocol ("certificate has unknown CA",True,UnknownCa)`, you may need to add the contents of `pkgs.cacert` in the `copyToRoot` attribute.
:::
### Inputs {#ssec-pkgs-dockerTools-buildImage-inputs}
`buildImage` expects an argument with the following attributes:
`name` (String)
: The name of the generated image.
`tag` (String or Null; _optional_)
: Tag of the generated image.
If `null`, the hash of the nix derivation will be used as the tag.
_Default value:_ `null`.
`fromImage` (Path or Null; _optional_)
: The repository tarball of an image to be used as the base for the generated image.
It must be a valid Docker image, such as one exported by `docker save`, or another image built with the `dockerTools` utility functions.
This can be seen as an equivalent of `FROM fromImage` in a `Dockerfile`.
A value of `null` can be seen as an equivalent of `FROM scratch`.
If specified, the layer created by `buildImage` will be appended to the layers defined in the base image, resulting in an image with at least two layers (one or more layers from the base image, and the layer created by `buildImage`).
Otherwise, the resulting image with contain the single layer created by `buildImage`.
_Default value:_ `null`.
`fromImageName` (String or Null; _optional_)
: Used to specify the image within the repository tarball in case it contains multiple images.
A value of `null` means that `buildImage` will use the first image available in the repository.
:::{.note}
This must be used with `fromImageTag`. Using only `fromImageName` without `fromImageTag` will make `buildImage` use the first image available in the repository.
:::
_Default value:_ `null`.
`fromImageTag` (String or Null; _optional_)
: Used to specify the image within the repository tarball in case it contains multiple images.
A value of `null` means that `buildImage` will use the first image available in the repository.
:::{.note}
This must be used with `fromImageName`. Using only `fromImageTag` without `fromImageName` will make `buildImage` use the first image available in the repository
:::
_Default value:_ `null`.
`copyToRoot` (Path, List of Paths, or Null; _optional_)
: Files to add to the generated image.
Anything that coerces to a path (e.g. a derivation) can also be used.
This can be seen as an equivalent of `ADD contents/ /` in a `Dockerfile`.
_Default value:_ `null`.
`keepContentsDirlinks` (Boolean; _optional_)
: When adding files to the generated image (as specified by `copyToRoot`), this attribute controls whether to preserve symlinks to directories.
If `false`, the symlinks will be transformed into directories.
This behaves the same as `rsync -k` when `keepContentsDirlinks` is `false`, and the same as `rsync -K` when `keepContentsDirlinks` is `true`.
_Default value:_ `false`.
`runAsRoot` (String or Null; _optional_)
: A bash script that will run as root inside a VM that contains the existing layers of the base image and the new generated layer (including the files from `copyToRoot`).
The script will be run with a working directory of `/`.
This can be seen as an equivalent of `RUN ...` in a `Dockerfile`.
A value of `null` means that this step in the image generation process will be skipped.
See [](#ex-dockerTools-buildImage-runAsRoot) for how to work with this attribute.
:::{.caution}
Using this attribute requires the `kvm` device to be available, see [`system-features`](https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-system-features).
If the `kvm` device isn't available, you should consider using [`buildLayeredImage`](#ssec-pkgs-dockerTools-buildLayeredImage) or [`streamLayeredImage`](#ssec-pkgs-dockerTools-streamLayeredImage) instead.
Those functions allow scripts to be run as root without access to the `kvm` device.
:::
:::{.note}
At the time the script in `runAsRoot` is run, the files specified directly in `copyToRoot` will be present in the VM, but their dependencies might not be there yet.
Copying their dependencies into the generated image is a step that happens after `runAsRoot` finishes running.
:::
_Default value:_ `null`.
`extraCommands` (String; _optional_)
: A bash script that will run before the layer created by `buildImage` is finalised.
The script will be run on some (opaque) working directory which will become `/` once the layer is created.
This is similar to `runAsRoot`, but the script specified in `extraCommands` is **not** run as root, and does not involve creating a VM.
It is simply run as part of building the derivation that outputs the layer created by `buildImage`.
See [](#ex-dockerTools-buildImage-extraCommands) for how to work with this attribute, and subtle differences compared to `runAsRoot`.
_Default value:_ `""`.
`config` (Attribute Set; _optional_)
: Used to specify the configuration of the containers that will be started off the generated image.
Must be an attribute set, with each attribute as listed in the [Docker Image Specification v1.3.0](https://github.com/moby/moby/blob/46f7ab808b9504d735d600e259ca0723f76fb164/image/spec/spec.md#image-json-field-descriptions).
_Default value:_ `null`.
`architecture` (String; _optional_)
: Used to specify the image architecture.
This is useful for multi-architecture builds that don't need cross compiling.
If specified, its value should follow the [OCI Image Configuration Specification](https://github.com/opencontainers/image-spec/blob/main/config.md#properties), which should still be compatible with Docker.
According to the linked specification, all possible values for `$GOARCH` in [the Go docs](https://go.dev/doc/install/source#environment) should be valid, but will commonly be one of `386`, `amd64`, `arm`, or `arm64`.
_Default value:_ the same value from `pkgs.go.GOARCH`.
`diskSize` (Number; _optional_)
: Controls the disk size (in megabytes) of the VM used to run the script specified in `runAsRoot`.
This attribute is ignored if `runAsRoot` is `null`.
_Default value:_ 1024.
`buildVMMemorySize` (Number; _optional_)
: Controls the amount of memory (in megabytes) provisioned for the VM used to run the script specified in `runAsRoot`.
This attribute is ignored if `runAsRoot` is `null`.
_Default value:_ 512.
`created` (String; _optional_)
: Specifies the time of creation of the generated image.
This should be either a date and time formatted according to [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) or `"now"`, in which case `buildImage` will use the current date.
See [](#ex-dockerTools-buildImage-creatednow) for how to use `"now"`.
:::{.caution}
Using `"now"` means that the generated image will not be reproducible anymore (because the date will always change whenever it's built).
:::
_Default value:_ `"1970-01-01T00:00:01Z"`.
`uid` (Number; _optional_)
: The uid of the user that will own the files packed in the new layer built by `buildImage`.
_Default value:_ 0.
`gid` (Number; _optional_)
: The gid of the group that will own the files packed in the new layer built by `buildImage`.
_Default value:_ 0.
`contents` **DEPRECATED**
: This attribute is deprecated, and users are encouraged to use `copyToRoot` instead.
### Passthru outputs {#ssec-pkgs-dockerTools-buildImage-passthru-outputs}
`buildImage` defines a few [`passthru`](#var-stdenv-passthru) attributes:
`buildArgs` (Attribute Set)
: The argument passed to `buildImage` itself.
This allows you to inspect all attributes specified in the argument, as described above.
`layer` (Attribute Set)
: The derivation with the layer created by `buildImage`.
This allows easier inspection of the contents added by `buildImage` in the generated image.
`imageTag` (String)
: The tag of the generated image.
This is useful if no tag was specified in the attributes of the argument to `buildImage`, because an automatic tag will be used instead.
`imageTag` allows you to retrieve the value of the tag used in this case.
### Examples {#ssec-pkgs-dockerTools-buildImage-examples}
:::{.example #ex-dockerTools-buildImage}
# Building a Docker image
The following package builds a Docker image that runs the `redis-server` executable from the `redis` package.
The Docker image will have name `redis` and tag `latest`.
[]{#ex-dockerTools-buildImage}
[]{#ex-dockerTools-buildImage-runAsRoot}
```nix
{ dockerTools, buildEnv, redis }:
dockerTools.buildImage {
buildImage {
name = "redis";
tag = "latest";
copyToRoot = buildEnv {
fromImage = someBaseImage;
fromImageName = null;
fromImageTag = "latest";
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ redis ];
paths = [ pkgs.redis ];
pathsToLink = [ "/bin" ];
};
runAsRoot = ''
#!${pkgs.runtimeShell}
mkdir -p /data
'';
@@ -231,111 +36,68 @@ dockerTools.buildImage {
WorkingDir = "/data";
Volumes = { "/data" = { }; };
};
diskSize = 1024;
buildVMMemorySize = 512;
}
```
The result of building this package is a `.tar.gz` file that can be loaded into Docker:
The above example will build a Docker image `redis/latest` from the given base image. Loading and running this image in Docker results in `redis-server` being started automatically.
```shell
$ nix-build
(some output removed for clarity)
building '/nix/store/yw0adm4wpsw1w6j4fb5hy25b3arr9s1v-docker-image-redis.tar.gz.drv'...
Adding layer...
tar: Removing leading `/' from member names
Adding meta...
Cooking the image...
Finished.
/nix/store/p4dsg62inh9d2ksy3c7bv58xa851dasr-docker-image-redis.tar.gz
- `name` specifies the name of the resulting image. This is the only required argument for `buildImage`.
$ docker load -i /nix/store/p4dsg62inh9d2ksy3c7bv58xa851dasr-docker-image-redis.tar.gz
(some output removed for clarity)
Loaded image: redis:latest
- `tag` specifies the tag of the resulting image. By default it's `null`, which indicates that the nix output hash will be used as tag.
- `fromImage` is the repository tarball containing the base image. It must be a valid Docker image, such as exported by `docker save`. By default it's `null`, which can be seen as equivalent to `FROM scratch` of a `Dockerfile`.
- `fromImageName` can be used to further specify the base image within the repository, in case it contains multiple images. By default it's `null`, in which case `buildImage` will peek the first image available in the repository.
- `fromImageTag` can be used to further specify the tag of the base image within the repository, in case an image contains multiple tags. By default it's `null`, in which case `buildImage` will peek the first tag available for the base image.
- `copyToRoot` is a derivation that will be copied in the new layer of the resulting image. This can be similarly seen as `ADD contents/ /` in a `Dockerfile`. By default it's `null`.
- `runAsRoot` is a bash script that will run as root in an environment that overlays the existing layers of the base image with the new resulting layer, including the previously copied `contents` derivation. This can be similarly seen as `RUN ...` in a `Dockerfile`.
> **_NOTE:_** Using this parameter requires the `kvm` device to be available.
- `config` is used to specify the configuration of the containers that will be started off the built image in Docker. The available options are listed in the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions).
- `architecture` is _optional_ and used to specify the image architecture, this is useful for multi-architecture builds that don't need cross compiling. If not specified it will default to `hostPlatform`.
- `diskSize` is used to specify the disk size of the VM used to build the image in megabytes. By default it's 1024 MiB.
- `buildVMMemorySize` is used to specify the memory size of the VM to build the image in megabytes. By default it's 512 MiB.
After the new layer has been created, its closure (to which `contents`, `config` and `runAsRoot` contribute) will be copied in the layer itself. Only new dependencies that are not already in the existing layers will be copied.
At the end of the process, only one new single layer will be produced and added to the resulting image.
The resulting repository will only list the single image `image/tag`. In the case of [the `buildImage` example](#ex-dockerTools-buildImage), it would be `redis/latest`.
It is possible to inspect the arguments with which an image was built using its `buildArgs` attribute.
> **_NOTE:_** If you see errors similar to `getProtocolByName: does not exist (no such protocol name: tcp)` you may need to add `pkgs.iana-etc` to `contents`.
> **_NOTE:_** If you see errors similar to `Error_Protocol ("certificate has unknown CA",True,UnknownCa)` you may need to add `pkgs.cacert` to `contents`.
By default `buildImage` will use a static date of one second past the UNIX Epoch. This allows `buildImage` to produce binary reproducible images. When listing images with `docker images`, the newly created images will be listed like this:
```ShellSession
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest 08c791c7846e 48 years ago 25.2MB
```
:::
:::{.example #ex-dockerTools-buildImage-runAsRoot}
# Building a Docker image with `runAsRoot`
The following package builds a Docker image with the `hello` executable from the `hello` package.
It uses `runAsRoot` to create a directory and a file inside the image.
This works the same as [](#ex-dockerTools-buildImage-extraCommands), but uses `runAsRoot` instead of `extraCommands`.
You can break binary reproducibility but have a sorted, meaningful `CREATED` column by setting `created` to `now`.
```nix
{ dockerTools, buildEnv, hello }:
dockerTools.buildImage {
pkgs.dockerTools.buildImage {
name = "hello";
tag = "latest";
copyToRoot = buildEnv {
name = "image-root";
paths = [ hello ];
pathsToLink = [ "/bin" ];
};
runAsRoot = ''
mkdir -p /data
echo "some content" > my-file
'';
config = {
Cmd = [ "/bin/hello" ];
WorkingDir = "/data";
};
}
```
:::
:::{.example #ex-dockerTools-buildImage-extraCommands}
# Building a Docker image with `extraCommands`
The following package builds a Docker image with the `hello` executable from the `hello` package.
It uses `extraCommands` to create a directory and a file inside the image.
This works the same as [](#ex-dockerTools-buildImage-runAsRoot), but uses `extraCommands` instead of `runAsRoot`.
Note that with `extraCommands`, we can't directly reference `/` and must create files and directories as if we were already on `/`.
```nix
{ dockerTools, buildEnv, hello }:
dockerTools.buildImage {
name = "hello";
tag = "latest";
copyToRoot = buildEnv {
name = "image-root";
paths = [ hello ];
pathsToLink = [ "/bin" ];
};
extraCommands = ''
mkdir -p data
echo "some content" > my-file
'';
config = {
Cmd = [ "/bin/hello" ];
WorkingDir = "/data";
};
}
```
:::
:::{.example #ex-dockerTools-buildImage-creatednow}
# Building a Docker image with a creation date set to the current time
Note that using a value of `"now"` in the `created` attribute will break reproducibility.
```nix
{ dockerTools, buildEnv, hello }:
dockerTools.buildImage {
name = "hello";
tag = "latest";
created = "now";
copyToRoot = buildEnv {
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ hello ];
paths = [ pkgs.hello ];
pathsToLink = [ "/bin" ];
};
@@ -343,376 +105,139 @@ dockerTools.buildImage {
}
```
After importing the generated repository tarball with Docker, its CLI will display a reasonable date and sort the images as expected:
Now the Docker CLI will display a reasonable date and sort the images as expected:
```ShellSession
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest de2bf4786de6 About a minute ago 25.2MB
```
:::
However, the produced images will not be binary reproducible.
## buildLayeredImage {#ssec-pkgs-dockerTools-buildLayeredImage}
`buildLayeredImage` uses [`streamLayeredImage`](#ssec-pkgs-dockerTools-streamLayeredImage) underneath to build a compressed Docker-compatible repository tarball.
Basically, `buildLayeredImage` runs the script created by `streamLayeredImage` to save the compressed image in the Nix store.
`buildLayeredImage` supports the same options as `streamLayeredImage`, see [`streamLayeredImage`](#ssec-pkgs-dockerTools-streamLayeredImage) for details.
Create a Docker image with many of the store paths being on their own layer to improve sharing between images. The image is realized into the Nix store as a gzipped tarball. Depending on the intended usage, many users might prefer to use `streamLayeredImage` instead, which this function uses internally.
:::{.note}
Despite the similar name, [`buildImage`](#ssec-pkgs-dockerTools-buildImage) works completely differently from `buildLayeredImage` and `streamLayeredImage`.
`name`
Even though some of the arguments may seem related, they cannot be interchanged.
:::
: The name of the resulting image.
You can use this function to load an image in Docker with `docker load`.
See [](#ex-dockerTools-buildLayeredImage-hello) to see how to do that.
`tag` _optional_
### Examples {#ssec-pkgs-dockerTools-buildLayeredImage-examples}
: Tag of the generated image.
:::{.example #ex-dockerTools-buildLayeredImage-hello}
# Building a layered Docker image
*Default:* the output path's hash
The following package builds a layered Docker image that runs the `hello` executable from the `hello` package.
The Docker image will have name `hello` and tag `latest`.
`fromImage` _optional_
: The repository tarball containing the base image. It must be a valid Docker image, such as one exported by `docker save`.
*Default:* `null`, which can be seen as equivalent to `FROM scratch` of a `Dockerfile`.
`contents` _optional_
: Top-level paths in the container. Either a single derivation, or a list of derivations.
*Default:* `[]`
`config` _optional_
`architecture` is _optional_ and used to specify the image architecture, this is useful for multi-architecture builds that don't need cross compiling. If not specified it will default to `hostPlatform`.
: Run-time configuration of the container. A full list of the options available is in the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions).
*Default:* `{}`
`created` _optional_
: Date and time the layers were created. Follows the same `now` exception supported by `buildImage`.
*Default:* `1970-01-01T00:00:01Z`
`maxLayers` _optional_
: Maximum number of layers to create.
*Default:* `100`
*Maximum:* `125`
`extraCommands` _optional_
: Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files.
`fakeRootCommands` _optional_
: Shell commands to run while creating the archive for the final layer in a fakeroot environment. Unlike `extraCommands`, you can run `chown` to change the owners of the files in the archive, changing fakeroot's state instead of the real filesystem. The latter would require privileges that the build user does not have. Static binaries do not interact with the fakeroot environment. By default all files in the archive will be owned by root.
`enableFakechroot` _optional_
: Whether to run in `fakeRootCommands` in `fakechroot`, making programs behave as though `/` is the root of the image being created, while files in the Nix store are available as usual. This allows scripts that perform installation in `/` to work as expected. Considering that `fakechroot` is implemented via the same mechanism as `fakeroot`, the same caveats apply.
*Default:* `false`
### Behavior of `contents` in the final image {#dockerTools-buildLayeredImage-arg-contents}
Each path directly listed in `contents` will have a symlink in the root of the image.
For example:
```nix
{ dockerTools, hello }:
dockerTools.buildLayeredImage {
pkgs.dockerTools.buildLayeredImage {
name = "hello";
tag = "latest";
contents = [ hello ];
config.Cmd = [ "/bin/hello" ];
contents = [ pkgs.hello ];
}
```
The result of building this package is a `.tar.gz` file that can be loaded into Docker:
will create symlinks for all the paths in the `hello` package:
```shell
$ nix-build
(some output removed for clarity)
building '/nix/store/bk8bnrbw10nq7p8pvcmdr0qf57y6scha-hello.tar.gz.drv'...
No 'fromImage' provided
Creating layer 1 from paths: ['/nix/store/i93s7xxblavsacpy82zdbn4kplsyq48l-libunistring-1.1']
Creating layer 2 from paths: ['/nix/store/ji01n9vinnj22nbrb86nx8a1ssgpilx8-libidn2-2.3.4']
Creating layer 3 from paths: ['/nix/store/ldrslljw4rg026nw06gyrdwl78k77vyq-xgcc-12.3.0-libgcc']
Creating layer 4 from paths: ['/nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27']
Creating layer 5 from paths: ['/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1']
Creating layer 6 with customisation...
Adding manifests...
Done.
/nix/store/hxcz7snvw7f8rzhbh6mv8jq39d992905-hello.tar.gz
$ docker load -i /nix/store/hxcz7snvw7f8rzhbh6mv8jq39d992905-hello.tar.gz
(some output removed for clarity)
Loaded image: hello:latest
```ShellSession
/bin/hello -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/bin/hello
/share/info/hello.info -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/info/hello.info
/share/locale/bg/LC_MESSAGES/hello.mo -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/locale/bg/LC_MESSAGES/hello.mo
```
:::
### Automatic inclusion of `config` references {#dockerTools-buildLayeredImage-arg-config}
The closure of `config` is automatically included in the closure of the final image.
This allows you to make very simple Docker images with very little code. This container will start up and run `hello`:
```nix
pkgs.dockerTools.buildLayeredImage {
name = "hello";
config.Cmd = [ "${pkgs.hello}/bin/hello" ];
}
```
### Adjusting `maxLayers` {#dockerTools-buildLayeredImage-arg-maxLayers}
Increasing the `maxLayers` increases the number of layers which have a chance to be shared between different images.
Modern Docker installations support up to 128 layers, but older versions support as few as 42.
If the produced image will not be extended by other Docker builds, it is safe to set `maxLayers` to `128`. However, it will be impossible to extend the image further.
The first (`maxLayers-2`) most "popular" paths will have their own individual layers, then layer \#`maxLayers-1` will contain all the remaining "unpopular" paths, and finally layer \#`maxLayers` will contain the Image configuration.
Docker's Layers are not inherently ordered, they are content-addressable and are not explicitly layered until they are composed in to an Image.
## streamLayeredImage {#ssec-pkgs-dockerTools-streamLayeredImage}
`streamLayeredImage` builds a **script** which, when run, will stream to stdout a Docker-compatible repository tarball containing a single image, using multiple layers to improve sharing between images.
This means that `streamLayeredImage` does not output an image into the Nix store, but only a script that builds the image, saving on IO and disk/cache space, particularly with large images.
Builds a script which, when run, will stream an uncompressed tarball of a Docker image to stdout. The arguments to this function are as for `buildLayeredImage`. This method of constructing an image does not realize the image into the Nix store, so it saves on IO and disk/cache space, particularly with large images.
You can use this function to load an image in Docker with `docker load`.
See [](#ex-dockerTools-streamLayeredImage-hello) to see how to do that.
The image produced by running the output script can be piped directly into `docker load`, to load it into the local docker daemon:
For this function, you specify a [store path](https://nixos.org/manual/nix/stable/store/store-path) or a list of store paths to be added to the image, and the functions will automatically include any dependencies of those paths in the image.
The function will attempt to create one layer per object in the Nix store that needs to be added to the image.
In case there are more objects to include than available layers, the function will put the most ["popular"](https://github.com/NixOS/nixpkgs/tree/release-23.11/pkgs/build-support/references-by-popularity) objects in their own layers, and group all remaining objects into a single layer.
An additional layer will be created with symlinks to the store paths you specified to be included in the image.
These symlinks are built with [`symlinkJoin`](#trivial-builder-symlinkJoin), so they will be included in the root of the image.
See [](#ex-dockerTools-streamLayeredImage-exploringlayers) to understand how these symlinks are laid out in the generated image.
`streamLayeredImage` allows scripts to be run when creating the additional layer with symlinks, allowing custom behaviour to affect the final results of the image (see the documentation of the `extraCommands` and `fakeRootCommands` attributes).
The resulting repository tarball will list a single image as specified by the `name` and `tag` attributes.
By default, that image will use a static creation date (see documentation for the `created` attribute).
This allows the function to produce reproducible images.
### Inputs {#ssec-pkgs-dockerTools-streamLayeredImage-inputs}
`streamLayeredImage` expects one argument with the following attributes:
`name` (String)
: The name of the generated image.
`tag` (String; _optional_)
: Tag of the generated image.
If `null`, the hash of the nix derivation will be used as the tag.
_Default value:_ `null`.
`fromImage`(Path or Null; _optional_)
: The repository tarball of an image to be used as the base for the generated image.
It must be a valid Docker image, such as one exported by `docker save`, or another image built with the `dockerTools` utility functions.
This can be seen as an equivalent of `FROM fromImage` in a `Dockerfile`.
A value of `null` can be seen as an equivalent of `FROM scratch`.
If specified, the created layers will be appended to the layers defined in the base image.
_Default value:_ `null`.
`contents` (Path or List of Paths; _optional_) []{#dockerTools-buildLayeredImage-arg-contents}
: Directories whose contents will be added to the generated image.
Things that coerce to paths (e.g. a derivation) can also be used.
This can be seen as an equivalent of `ADD contents/ /` in a `Dockerfile`.
All the contents specified by `contents` will be added as a final layer in the generated image.
They will be added as links to the actual files (e.g. links to the store paths).
The actual files will be added in previous layers.
_Default value:_ `[]`
`config` (Attribute Set; _optional_) []{#dockerTools-buildLayeredImage-arg-config}
: Used to specify the configuration of the containers that will be started off the generated image.
Must be an attribute set, with each attribute as listed in the [Docker Image Specification v1.3.0](https://github.com/moby/moby/blob/46f7ab808b9504d735d600e259ca0723f76fb164/image/spec/spec.md#image-json-field-descriptions).
If any packages are used directly in `config`, they will be automatically included in the generated image.
See [](#ex-dockerTools-streamLayeredImage-configclosure) for an example.
_Default value:_ `null`.
`architecture` (String; _optional_)
: Used to specify the image architecture.
This is useful for multi-architecture builds that don't need cross compiling.
If specified, its value should follow the [OCI Image Configuration Specification](https://github.com/opencontainers/image-spec/blob/main/config.md#properties), which should still be compatible with Docker.
According to the linked specification, all possible values for `$GOARCH` in [the Go docs](https://go.dev/doc/install/source#environment) should be valid, but will commonly be one of `386`, `amd64`, `arm`, or `arm64`.
_Default value:_ the same value from `pkgs.go.GOARCH`.
`created` (String; _optional_)
: Specifies the time of creation of the generated image.
This should be either a date and time formatted according to [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) or `"now"`, in which case the current date will be used.
:::{.caution}
Using `"now"` means that the generated image will not be reproducible anymore (because the date will always change whenever it's built).
:::
_Default value:_ `"1970-01-01T00:00:01Z"`.
`maxLayers` (Number; _optional_) []{#dockerTools-buildLayeredImage-arg-maxLayers}
: The maximum number of layers that will be used by the generated image.
If a `fromImage` was specified, the number of layers used by `fromImage` will be subtracted from `maxLayers` to ensure that the image generated will have at most `maxLayers`.
:::{.caution}
Depending on the tool/runtime where the image will be used, there might be a limit to the number of layers that an image can have.
For Docker, see [this issue on GitHub](https://github.com/docker/docs/issues/8230).
:::
_Default value:_ 100.
`extraCommands` (String; _optional_)
: A bash script that will run in the context of the layer created with the contents specified by `contents`.
At the moment this script runs, only the contents directly specified by `contents` will be available as links.
_Default value:_ `""`.
`fakeRootCommands` (String; _optional_)
: A bash script that will run in the context of the layer created with the contents specified by `contents`.
During the process to generate that layer, the script in `extraCommands` will be run first, if specified.
After that, a {manpage}`fakeroot(1)` environment will be entered.
The script specified in `fakeRootCommands` runs inside the fakeroot environment, and the layer is then generated from the view of the files inside the fakeroot environment.
This is useful to change the owners of the files in the layer (by running `chown`, for example), or performing any other privileged operations related to file manipulation (by default, all files in the layer will be owned by root, and the build environment doesn't have enough privileges to directly perform privileged operations on these files).
For more details, see the manpage for {manpage}`fakeroot(1)`.
:::{.caution}
Due to how fakeroot works, static binaries cannot perform privileged file operations in `fakeRootCommands`, unless `enableFakechroot` is set to `true`.
:::
_Default value:_ `""`.
`enableFakechroot` (Boolean; _optional_)
: By default, the script specified in `fakeRootCommands` only runs inside a fakeroot environment.
If `enableFakechroot` is `true`, a more complete chroot environment will be created using [`proot`](https://proot-me.github.io/) before running the script in `fakeRootCommands`.
Files in the Nix store will be available.
This allows scripts that perform installation in `/` to work as expected.
This can be seen as an equivalent of `RUN ...` in a `Dockerfile`.
_Default value:_ `false`
`includeStorePaths` (Boolean; _optional_)
: The files specified in `contents` are put into layers in the generated image.
If `includeStorePaths` is `false`, the actual files will not be included in the generated image, and only links to them will be added instead.
It is **not recommended** to set this to `false` unless you have other tooling to insert the store paths via other means (such as bind mounting the host store) when running containers with the generated image.
If you don't provide any extra tooling, the generated image won't run properly.
See [](#ex-dockerTools-streamLayeredImage-exploringlayers) to understand the impact of setting `includeStorePaths` to `false`.
_Default value:_ `true`
`passthru` (Attribute Set; _optional_)
: Use this to pass any attributes as [passthru](#var-stdenv-passthru) for the resulting derivation.
_Default value:_ `{}`
### Passthru outputs {#ssec-pkgs-dockerTools-streamLayeredImage-passthru-outputs}
`streamLayeredImage` also defines its own [`passthru`](#var-stdenv-passthru) attributes:
`imageTag` (String)
: The tag of the generated image.
This is useful if no tag was specified in the attributes of the argument to the function, because an automatic tag will be used instead.
`imageTag` allows you to retrieve the value of the tag used in this case.
### Examples {#ssec-pkgs-dockerTools-streamLayeredImage-examples}
:::{.example #ex-dockerTools-streamLayeredImage-hello}
# Streaming a layered Docker image
The following package builds a **script** which, when run, will stream a layered Docker image that runs the `hello` executable from the `hello` package.
The Docker image will have name `hello` and tag `latest`.
```nix
{ dockerTools, hello }:
dockerTools.streamLayeredImage {
name = "hello";
tag = "latest";
contents = [ hello ];
config.Cmd = [ "/bin/hello" ];
}
```ShellSession
$(nix-build) | docker load
```
The result of building this package is a script.
Running this script and piping it into `docker load` gives you the same image that was built in [](#ex-dockerTools-buildLayeredImage-hello).
Note that in this case, the image is never added to the Nix store, but instead streamed directly into Docker.
Alternatively, the image be piped via `gzip` into `skopeo`, e.g., to copy it into a registry:
```shell
$ nix-build
(output removed for clarity)
/nix/store/wsz2xl8ckxnlb769irvq6jv1280dfvxd-stream-hello
$ /nix/store/wsz2xl8ckxnlb769irvq6jv1280dfvxd-stream-hello | docker load
No 'fromImage' provided
Creating layer 1 from paths: ['/nix/store/i93s7xxblavsacpy82zdbn4kplsyq48l-libunistring-1.1']
Creating layer 2 from paths: ['/nix/store/ji01n9vinnj22nbrb86nx8a1ssgpilx8-libidn2-2.3.4']
Creating layer 3 from paths: ['/nix/store/ldrslljw4rg026nw06gyrdwl78k77vyq-xgcc-12.3.0-libgcc']
Creating layer 4 from paths: ['/nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27']
Creating layer 5 from paths: ['/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1']
Creating layer 6 with customisation...
Adding manifests...
Done.
(some output removed for clarity)
Loaded image: hello:latest
```ShellSession
$(nix-build) | gzip --fast | skopeo copy docker-archive:/dev/stdin docker://some_docker_registry/myimage:tag
```
:::
:::{.example #ex-dockerTools-streamLayeredImage-exploringlayers}
# Exploring the layers in an image built with `streamLayeredImage`
Assume the following package, which builds a layered Docker image with the `hello` package.
```nix
{ dockerTools, hello }:
dockerTools.streamLayeredImage {
name = "hello";
contents = [ hello ];
}
```
The `hello` package depends on 4 other packages:
```shell
$ nix-store --query -R $(nix-build -A hello)
/nix/store/i93s7xxblavsacpy82zdbn4kplsyq48l-libunistring-1.1
/nix/store/ji01n9vinnj22nbrb86nx8a1ssgpilx8-libidn2-2.3.4
/nix/store/ldrslljw4rg026nw06gyrdwl78k77vyq-xgcc-12.3.0-libgcc
/nix/store/9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27
/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1
```
This means that all these packages will be included in the image generated by `streamLayeredImage`.
It will put each package in its own layer, for a total of 5 layers with actual files in them.
A final layer will be created only with symlinks for the `hello` package.
The image generated will have the following directory structure (some directories were collapsed for readability):
```
├── bin
│ └── hello → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/bin/hello
├── nix
│ └── store
│ ├─⊕ 9y8pmvk8gdwwznmkzxa6pwyah52xy3nk-glibc-2.38-27
│ ├─⊕ i93s7xxblavsacpy82zdbn4kplsyq48l-libunistring-1.1
│ ├─⊕ ji01n9vinnj22nbrb86nx8a1ssgpilx8-libidn2-2.3.4
│ ├─⊕ ldrslljw4rg026nw06gyrdwl78k77vyq-xgcc-12.3.0-libgcc
│ └─⊕ zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1
└── share
├── info
│ └── hello.info → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/share/info/hello.info
├─⊕ locale
└── man
└── man1
└── hello.1.gz → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/share/man/man1/hello.1.gz
```
Each of the packages in `/nix/store` comes from a layer in the image.
The final layer adds the `/bin` and `/share` directories, but they only contain links to the actual files in `/nix/store`.
If our package sets `includeStorePaths` to `false`, we'll end up with only the final layer with the links, but the actual files won't exist in the image:
```nix
{ dockerTools, hello }:
dockerTools.streamLayeredImage {
name = "hello";
contents = [ hello ];
}
```
After building this package, the image will have the following directory structure:
```
├── bin
│ └── hello → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/bin/hello
└── share
├── info
│ └── hello.info → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/share/info/hello.info
├─⊕ locale
└── man
└── man1
└── hello.1.gz → /nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1/share/man/man1/hello.1.gz
```
Note how the links point to paths in `/nix/store`, but they're not included in the image itself.
This is why you need extra tooling when using `includeStorePaths`:
a container created from such image won't find any of the files it needs to run otherwise.
:::
::: {.example #ex-dockerTools-streamLayeredImage-configclosure}
# Building a layered Docker image with packages directly in `config`
The closure of `config` is automatically included in the generated image.
The following package shows a more compact way to create the same output generated in [](#ex-dockerTools-streamLayeredImage-hello).
```nix
{ dockerTools, hello, lib }:
dockerTools.streamLayeredImage {
name = "hello";
tag = "latest";
config.Cmd = [ "${lib.getExe hello}" ];
}
```
:::
## pullImage {#ssec-pkgs-dockerTools-fetchFromRegistry}

View File

@@ -7,5 +7,4 @@ special/fhs-environments.section.md
special/makesetuphook.section.md
special/mkshell.section.md
special/vm-tools.section.md
special/checkpoint-build.section.md
```

View File

@@ -1,39 +0,0 @@
# pkgs.checkpointBuildTools {#sec-checkpoint-build}
`pkgs.checkpointBuildTools` provides a way to build derivations incrementally. It consists of two functions to make checkpoint builds using Nix possible.
For hermeticity, Nix derivations do not allow any state to be carried over between builds, making a transparent incremental build within a derivation impossible.
However, we can tell Nix explicitly what the previous build state was, by representing that previous state as a derivation output. This allows the passed build state to be used for an incremental build.
To change a normal derivation to a checkpoint based build, these steps must be taken:
- apply `prepareCheckpointBuild` on the desired derivation, e.g.
```nix
checkpointArtifacts = (pkgs.checkpointBuildTools.prepareCheckpointBuild pkgs.virtualbox);
```
- change something you want in the sources of the package, e.g. use a source override:
```nix
changedVBox = pkgs.virtualbox.overrideAttrs (old: {
src = path/to/vbox/sources;
});
```
- use `mkCheckpointBuild changedVBox checkpointArtifacts`
- enjoy shorter build times
## Example {#sec-checkpoint-build-example}
```nix
{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs.checkpointBuildTools)
prepareCheckpointBuild
mkCheckpointBuild
;
helloCheckpoint = prepareCheckpointBuild pkgs.hello;
changedHello = pkgs.hello.overrideAttrs (_: {
doCheck = false;
patchPhase = ''
sed -i 's/Hello, world!/Hello, Nix!/g' src/hello.c
'';
});
in mkCheckpointBuild changedHello helloCheckpoint
```

View File

@@ -29,10 +29,6 @@ pkgs.mkShell {
... all the attributes of `stdenv.mkDerivation`.
## Variants {#sec-pkgs-mkShell-variants}
`pkgs.mkShellNoCC` is a variant that uses `stdenvNoCC` instead of `stdenv` as base environment. This is useful if no C compiler is needed in the shell environment.
## Building the shell {#sec-pkgs-mkShell-building}
This derivation output will contain a text file that contains a reference to

View File

@@ -1,5 +1,4 @@
# Testers {#chap-testers}
This chapter describes several testing builders which are available in the `testers` namespace.
## `hasPkgConfigModules` {#tester-hasPkgConfigModules}
@@ -7,11 +6,19 @@ This chapter describes several testing builders which are available in the `test
<!-- Old anchor name so links still work -->
[]{#tester-hasPkgConfigModule}
Checks whether a package exposes a given list of `pkg-config` modules.
If the `moduleNames` argument is omitted, `hasPkgConfigModules` will use `meta.pkgConfigModules`.
If the `moduleNames` argument is omitted, `hasPkgConfigModules` will
use `meta.pkgConfigModules`.
:::{.example #ex-haspkgconfigmodules-defaultvalues}
Example:
# Check that `pkg-config` modules are exposed using default values
```nix
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "libfoo" ];
};
```
If the package in question has `meta.pkgConfigModules` set, it is even simpler:
```nix
passthru.tests.pkg-config = testers.hasPkgConfigModules {
@@ -21,66 +28,40 @@ passthru.tests.pkg-config = testers.hasPkgConfigModules {
meta.pkgConfigModules = [ "libfoo" ];
```
:::
:::{.example #ex-haspkgconfigmodules-explicitmodules}
# Check that `pkg-config` modules are exposed using explicit module names
```nix
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "libfoo" ];
};
```
:::
## `testVersion` {#tester-testVersion}
Checks that the output from running a command contains the specified version string in it as a whole word.
Checks the command output contains the specified version
Although simplistic, this test assures that the main program can run.
While there's no substitute for a real test case, it does catch dynamic linking errors and such.
It also provides some protection against accidentally building the wrong version, for example when using an "old" hash in a fixed-output derivation.
Although simplistic, this test assures that the main program
can run. While there's no substitute for a real test case,
it does catch dynamic linking errors and such. It also provides
some protection against accidentally building the wrong version,
for example when using an 'old' hash in a fixed-output derivation.
By default, the command to be run will be inferred from the given `package` attribute:
it will check `meta.mainProgram` first, and fall back to `pname` or `name`.
The default argument to the command is `--version`, and the version to be checked will be inferred from the given `package` attribute as well.
:::{.example #ex-testversion-hello}
# Check a program version using all the default values
This example will run the command `hello --version`, and then check that the version of the `hello` package is in the output of the command.
Examples:
```nix
passthru.tests.version = testers.testVersion { package = hello; };
```
:::
:::{.example #ex-testversion-different-commandversion}
# Check the program version using a specified command and expected version string
This example will run the command `leetcode -V`, and then check that `leetcode 0.4.2` is in the output of the command as a whole word (separated by whitespaces).
This means that an output like "leetcode 0.4.21" would fail the tests, and an output like "You're running leetcode 0.4.2" would pass the tests.
A common usage of the `version` attribute is to specify `version = "v${version}"`.
```nix
version = "0.4.2";
passthru.tests.version = testers.testVersion {
package = leetcode-cli;
command = "leetcode -V";
version = "leetcode ${version}";
package = seaweedfs;
command = "weed version";
};
passthru.tests.version = testers.testVersion {
package = key;
command = "KeY --help";
# Wrong '2.5' version in the code. Drop on next version.
version = "2.5";
};
passthru.tests.version = testers.testVersion {
package = ghr;
# The output needs to contain the 'version' string without any prefix or suffix.
version = "v${version}";
};
```
:::
## `testBuildFailure` {#tester-testBuildFailure}
Make sure that a build does not succeed. This is useful for testing testers.
@@ -91,18 +72,7 @@ This returns a derivation with an override on the builder, with the following ef
- Move `$out` to `$out/result`, if it exists (assuming `out` is the default output)
- Save the build log to `$out/testBuildFailure.log` (same)
While `testBuildFailure` is designed to keep changes to the original builder's environment to a minimum, some small changes are inevitable:
- The file `$TMPDIR/testBuildFailure.log` is present. It should not be deleted.
- `stdout` and `stderr` are a pipe instead of a tty. This could be improved.
- One or two extra processes are present in the sandbox during the original builder's execution.
- The derivation and output hashes are different, but not unusual.
- The derivation includes a dependency on `buildPackages.bash` and `expect-failure.sh`, which is built to include a transitive dependency on `buildPackages.coreutils` and possibly more.
These are not added to `PATH` or any other environment variable, so they should be hard to observe.
:::{.example #ex-testBuildFailure-showingenvironmentchanges}
# Check that a build fails, and verify the changes made during build
Example:
```nix
runCommand "example" {
@@ -119,15 +89,24 @@ runCommand "example" {
'';
```
:::
While `testBuildFailure` is designed to keep changes to the original builder's
environment to a minimum, some small changes are inevitable.
- The file `$TMPDIR/testBuildFailure.log` is present. It should not be deleted.
- `stdout` and `stderr` are a pipe instead of a tty. This could be improved.
- One or two extra processes are present in the sandbox during the original
builder's execution.
- The derivation and output hashes are different, but not unusual.
- The derivation includes a dependency on `buildPackages.bash` and
`expect-failure.sh`, which is built to include a transitive dependency on
`buildPackages.coreutils` and possibly more. These are not added to `PATH`
or any other environment variable, so they should be hard to observe.
## `testEqualContents` {#tester-equalContents}
Check that two paths have the same contents.
:::{.example #ex-testEqualContents-toyexample}
# Check that two paths have the same contents
Example:
```nix
testers.testEqualContents {
@@ -147,20 +126,17 @@ testers.testEqualContents {
}
```
:::
## `testEqualDerivation` {#tester-testEqualDerivation}
Checks that two packages produce the exact same build instructions.
This can be used to make sure that a certain difference of configuration, such as the presence of an overlay does not cause a cache miss.
This can be used to make sure that a certain difference of configuration,
such as the presence of an overlay does not cause a cache miss.
When the derivations are equal, the return value is an empty file.
Otherwise, the build log explains the difference via `nix-diff`.
:::{.example #ex-testEqualDerivation-hello}
# Check that two packages produce the same derivation
Example:
```nix
testers.testEqualDerivation
@@ -169,28 +145,29 @@ testers.testEqualDerivation
(hello.overrideAttrs(o: { doCheck = true; }))
```
:::
## `invalidateFetcherByDrvHash` {#tester-invalidateFetcherByDrvHash}
Use the derivation hash to invalidate the output via name, for testing.
Type: `(a@{ name, ... } -> Derivation) -> a -> Derivation`
Normally, fixed output derivations can and should be cached by their output hash only, but for testing we want to re-fetch everytime the fetcher changes.
Normally, fixed output derivations can and should be cached by their output
hash only, but for testing we want to re-fetch everytime the fetcher changes.
Changes to the fetcher become apparent in the drvPath, which is a hash of how to fetch, rather than a fixed store path.
By inserting this hash into the name, we can make sure to re-run the fetcher every time the fetcher changes.
Changes to the fetcher become apparent in the drvPath, which is a hash of
how to fetch, rather than a fixed store path.
By inserting this hash into the name, we can make sure to re-run the fetcher
every time the fetcher changes.
This relies on the assumption that Nix isn't clever enough to reuse its database of local store contents to optimize fetching.
This relies on the assumption that Nix isn't clever enough to reuse its
database of local store contents to optimize fetching.
You might notice that the "salted" name derives from the normal invocation, not the final derivation.
`invalidateFetcherByDrvHash` has to invoke the fetcher function twice:
once to get a derivation hash, and again to produce the final fixed output derivation.
You might notice that the "salted" name derives from the normal invocation,
not the final derivation. `invalidateFetcherByDrvHash` has to invoke the fetcher
function twice: once to get a derivation hash, and again to produce the final
fixed output derivation.
:::{.example #ex-invalidateFetcherByDrvHash-nix}
# Prevent nix from reusing the output of a fetcher
Example:
```nix
tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
@@ -201,17 +178,13 @@ tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
};
```
:::
## `runNixOSTest` {#tester-runNixOSTest}
A helper function that behaves exactly like the NixOS `runTest`, except it also assigns this Nixpkgs package set as the `pkgs` of the test and makes the `nixpkgs.*` options read-only.
If your test is part of the Nixpkgs repository, or if you need a more general entrypoint, see ["Calling a test" in the NixOS manual](https://nixos.org/manual/nixos/stable/index.html#sec-calling-nixos-tests).
:::{.example #ex-runNixOSTest-hello}
# Run a NixOS test using `runNixOSTest`
Example:
```nix
pkgs.testers.runNixOSTest ({ lib, ... }: {
@@ -225,17 +198,19 @@ pkgs.testers.runNixOSTest ({ lib, ... }: {
})
```
:::
## `nixosTest` {#tester-nixosTest}
Run a NixOS VM network test using this evaluation of Nixpkgs.
NOTE: This function is primarily for external use. NixOS itself uses `make-test-python.nix` directly. Packages defined in Nixpkgs [reuse NixOS tests via `nixosTests`, plural](#ssec-nixos-tests-linking).
It is mostly equivalent to the function `import ./make-test-python.nix` from the [NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests), except that the current application of Nixpkgs (`pkgs`) will be used, instead of letting NixOS invoke Nixpkgs anew.
It is mostly equivalent to the function `import ./make-test-python.nix` from the
[NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests),
except that the current application of Nixpkgs (`pkgs`) will be used, instead of
letting NixOS invoke Nixpkgs anew.
If a test machine needs to set NixOS options under `nixpkgs`, it must set only the `nixpkgs.pkgs` option.
If a test machine needs to set NixOS options under `nixpkgs`, it must set only the
`nixpkgs.pkgs` option.
### Parameter {#tester-nixosTest-parameter}

View File

@@ -1,7 +1,6 @@
# Trivial build helpers {#chap-trivial-builders}
Nixpkgs provides a variety of wrapper functions that help build commonly useful derivations.
Like [`stdenv.mkDerivation`](#sec-using-stdenv), each of these build helpers creates a derivation, but the arguments passed are different (usually simpler) from those required by `stdenv.mkDerivation`.
Nixpkgs provides a couple of functions that help with building derivations. The most important one, `stdenv.mkDerivation`, has already been documented above. The following functions wrap `stdenv.mkDerivation`, making it easier to use in certain cases.
## `runCommand` {#trivial-builder-runCommand}
@@ -59,416 +58,63 @@ Variant of `runCommand` that forces the derivation to be built locally, it is no
This sets [`allowSubstitutes` to `false`](https://nixos.org/nix/manual/#adv-attr-allowSubstitutes), so only use `runCommandLocal` if you are certain the user will always have a builder for the `system` of the derivation. This should be true for most trivial use cases (e.g., just copying some files to a different location or adding symlinks) because there the `system` is usually the same as `builtins.currentSystem`.
:::
## Writing text files {#trivial-builder-text-writing}
## `writeTextFile`, `writeText`, `writeTextDir`, `writeScript`, `writeScriptBin` {#trivial-builder-writeText}
Nixpkgs provides the following functions for producing derivations which write text files or executable scripts into the Nix store.
They are useful for creating files from Nix expression, and are all implemented as convenience wrappers around `writeTextFile`.
These functions write `text` to the Nix store. This is useful for creating scripts from Nix expressions. `writeTextFile` takes an attribute set and expects two arguments, `name` and `text`. `name` corresponds to the name used in the Nix store path. `text` will be the contents of the file. You can also set `executable` to true to make this file have the executable bit set.
Each of these functions will cause a derivation to be produced.
When you coerce the result of each of these functions to a string with [string interpolation](https://nixos.org/manual/nix/stable/language/string-interpolation) or [`builtins.toString`](https://nixos.org/manual/nix/stable/language/builtins#builtins-toString), it will evaluate to the [store path](https://nixos.org/manual/nix/stable/store/store-path) of this derivation.
:::: {.note}
Some of these functions will put the resulting files within a directory inside the [derivation output](https://nixos.org/manual/nix/stable/language/derivations#attr-outputs).
If you need to refer to the resulting files somewhere else in a Nix expression, append their path to the derivation's store path.
For example, if the file destination is a directory:
```nix
my-file = writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
destination = "/share/my-file";
}
```
Remember to append "/share/my-file" to the resulting store path when using it elsewhere:
```nix
writeShellScript "evaluate-my-file.sh" ''
cat ${my-file}/share/my-file
'';
```
::::
### `writeTextFile` {#trivial-builder-writeTextFile}
Write a text file to the Nix store.
`writeTextFile` takes an attribute set with the following possible attributes:
`name` (String)
: Corresponds to the name used in the Nix store path identifier.
`text` (String)
: The contents of the file.
`executable` (Bool, _optional_)
: Make this file have the executable bit set.
Default: `false`
`destination` (String, _optional_)
: A subpath under the derivation's output path into which to put the file.
Subdirectories are created automatically when the derivation is realised.
By default, the store path itself will be a file containing the text contents.
Default: `""`
`checkPhase` (String, _optional_)
: Commands to run after generating the file.
Default: `""`
`meta` (Attribute set, _optional_)
: Additional metadata for the derivation.
Default: `{}`
`allowSubstitutes` (Bool, _optional_)
: Whether to allow substituting from a binary cache.
Passed through to [`allowSubsitutes`](https://nixos.org/manual/nix/stable/language/advanced-attributes#adv-attr-allowSubstitutes) of the underlying call to `builtins.derivation`.
It defaults to `false`, as running the derivation's simple `builder` executable locally is assumed to be faster than network operations.
Set it to true if the `checkPhase` step is expensive.
Default: `false`
`preferLocalBuild` (Bool, _optional_)
: Whether to prefer building locally, even if faster [remote build machines](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-substituters) are available.
Passed through to [`preferLocalBuild`](https://nixos.org/manual/nix/stable/language/advanced-attributes#adv-attr-preferLocalBuild) of the underlying call to `builtins.derivation`.
It defaults to `true` for the same reason `allowSubstitutes` defaults to `false`.
Default: `true`
The resulting store path will include some variation of the name, and it will be a file unless `destination` is used, in which case it will be a directory.
::: {.example #ex-writeTextFile}
# Usage 1 of `writeTextFile`
Write `my-file` to `/nix/store/<store path>/some/subpath/my-cool-script`, making it executable.
Also run a check on the resulting file in a `checkPhase`, and supply values for the less-used options.
```nix
writeTextFile {
name = "my-cool-script";
text = ''
#!/bin/sh
echo "This is my cool script!"
'';
executable = true;
destination = "/some/subpath/my-cool-script";
checkPhase = ''
${pkgs.shellcheck}/bin/shellcheck $out/some/subpath/my-cool-script
'';
meta = {
license = pkgs.lib.licenses.cc0;
};
allowSubstitutes = true;
preferLocalBuild = false;
};
```
:::
::: {.example #ex2-writeTextFile}
# Usage 2 of `writeTextFile`
Write the string `Contents of File` to `/nix/store/<store path>`.
See also the [](#trivial-builder-writeText) helper function.
Many more commands wrap `writeTextFile` including `writeText`, `writeTextDir`, `writeScript`, and `writeScriptBin`. These are convenience functions over `writeTextFile`.
Here are a few examples:
```nix
# Writes my-file to /nix/store/<store path>
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
}
```
:::
# See also the `writeText` helper function below.
::: {.example #ex3-writeTextFile}
# Usage 3 of `writeTextFile`
Write an executable script `my-script` to `/nix/store/<store path>/bin/my-script`.
See also the [](#trivial-builder-writeScriptBin) helper function.
```nix
# Writes executable my-file to /nix/store/<store path>/bin/my-file
writeTextFile {
name = "my-script";
name = "my-file";
text = ''
echo "hi"
Contents of File
'';
executable = true;
destination = "/bin/my-script";
destination = "/bin/my-file";
}
```
:::
### `writeText` {#trivial-builder-writeText}
Write a text file to the Nix store
`writeText` takes the following arguments:
a string.
`name` (String)
: The name used in the Nix store path.
`text` (String)
: The contents of the file.
The store path will include the name, and it will be a file.
::: {.example #ex-writeText}
# Usage of `writeText`
Write the string `Contents of File` to `/nix/store/<store path>`:
```nix
# Writes contents of file to /nix/store/<store path>
writeText "my-file"
''
Contents of File
'';
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
}
```
### `writeTextDir` {#trivial-builder-writeTextDir}
Write a text file within a subdirectory of the Nix store.
`writeTextDir` takes the following arguments:
`path` (String)
: The destination within the Nix store path under which to create the file.
`text` (String)
: The contents of the file.
The store path will be a directory.
::: {.example #ex-writeTextDir}
# Usage of `writeTextDir`
Write the string `Contents of File` to `/nix/store/<store path>/share/my-file`:
```nix
# Writes contents of file to /nix/store/<store path>/share/my-file
writeTextDir "share/my-file"
''
Contents of File
'';
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
destination = "share/my-file";
}
```
### `writeScript` {#trivial-builder-writeScript}
Write an executable script file to the Nix store.
`writeScript` takes the following arguments:
`name` (String)
: The name used in the Nix store path.
`text` (String)
: The contents of the file.
The created file is marked as executable.
The store path will include the name, and it will be a file.
::: {.example #ex-writeScript}
# Usage of `writeScript`
Write the string `Contents of File` to `/nix/store/<store path>` and make the file executable.
```nix
# Writes my-file to /nix/store/<store path> and makes executable
writeScript "my-file"
''
Contents of File
'';
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
executable = true;
}
```
### `writeScriptBin` {#trivial-builder-writeScriptBin}
Write a script within a `bin` subirectory of a directory in the Nix store.
This is for consistency with the convention of software packages placing executables under `bin`.
`writeScriptBin` takes the following arguments:
`name` (String)
: The name used in the Nix store path and within the file created under the store path.
`text` (String)
: The contents of the file.
The created file is marked as executable.
The file's contents will be put into `/nix/store/<store path>/bin/<name>`.
The store path will include the the name, and it will be a directory.
::: {.example #ex-writeScriptBin}
# Usage of `writeScriptBin`
```nix
writeScriptBin "my-script"
# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.
writeScriptBin "my-file"
''
echo "hi"
Contents of File
'';
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-script";
text = ''
echo "hi"
'';
executable = true;
destination = "bin/my-script"
}
```
### `writeShellScript` {#trivial-builder-writeShellScript}
Write a Bash script to the store.
`writeShellScript` takes the following arguments:
`name` (String)
: The name used in the Nix store path.
`text` (String)
: The contents of the file.
The created file is marked as executable.
The store path will include the name, and it will be a file.
This function is almost exactly like [](#trivial-builder-writeScript), except that it prepends to the file a [shebang](https://en.wikipedia.org/wiki/Shebang_%28Unix%29) line that points to the version of Bash used in Nixpkgs.
<!-- this cannot be changed in practice, so there is no point pretending it's somehow generic -->
::: {.example #ex-writeShellScript}
# Usage of `writeShellScript`
```nix
writeShellScript "my-script"
# Writes my-file to /nix/store/<store path> and makes executable.
writeShellScript "my-file"
''
echo "hi"
Contents of File
'';
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-script";
text = ''
#! ${pkgs.runtimeShell}
echo "hi"
'';
executable = true;
}
```
### `writeShellScriptBin` {#trivial-builder-writeShellScriptBin}
Write a Bash script to a "bin" subdirectory of a directory in the Nix store.
`writeShellScriptBin` takes the following arguments:
`name` (String)
: The name used in the Nix store path and within the file generated under the store path.
`text` (String)
: The contents of the file.
The file's contents will be put into `/nix/store/<store path>/bin/<name>`.
The store path will include the the name, and it will be a directory.
This function is a combination of [](#trivial-builder-writeShellScript) and [](#trivial-builder-writeScriptBin).
::: {.example #ex-writeShellScriptBin}
# Usage of `writeShellScriptBin`
```nix
writeShellScriptBin "my-script"
# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.
writeShellScriptBin "my-file"
''
echo "hi"
Contents of File
'';
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-script";
text = ''
#! ${pkgs.runtimeShell}
echo "hi"
'';
executable = true;
destination = "bin/my-script"
}
```
## `concatTextFile`, `concatText`, `concatScript` {#trivial-builder-concatText}

View File

@@ -149,26 +149,4 @@ in pkgs.stdenv.mkDerivation {
echo "doc manual $dest ${common.indexPath}" >> $out/nix-support/hydra-build-products
echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
'';
passthru.tests.manpage-urls = with pkgs; testers.invalidateFetcherByDrvHash
({ name ? "manual_check-manpage-urls"
, script
, urlsFile
}: runCommand name {
nativeBuildInputs = [
cacert
(python3.withPackages (p: with p; [
aiohttp
rich
structlog
]))
];
outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; # Empty output
} ''
python3 ${script} ${urlsFile}
touch $out
'') {
script = ./tests/manpage-urls.py;
urlsFile = ./manpage-urls.json;
};
}

View File

@@ -68,45 +68,16 @@ All new projects should use the CUDA redistributables available in [`cudaPackage
### Updating CUDA redistributables {#updating-cuda-redistributables}
1. Go to NVIDIA's index of CUDA redistributables: <https://developer.download.nvidia.com/compute/cuda/redist/>
2. Make a note of the new version of CUDA available.
3. Run
2. Copy the `redistrib_*.json` corresponding to the release to `pkgs/development/compilers/cudatoolkit/redist/manifests`.
3. Generate the `redistrib_features_*.json` file by running:
```bash
nix run github:connorbaker/cuda-redist-find-features -- \
download-manifests \
--log-level DEBUG \
--version <newest CUDA version> \
https://developer.download.nvidia.com/compute/cuda/redist \
./pkgs/development/cuda-modules/cuda/manifests
```
```bash
nix run github:ConnorBaker/cuda-redist-find-features -- <path to manifest>
```
This will download a copy of the manifest for the new version of CUDA.
4. Run
That command will generate the `redistrib_features_*.json` file in the same directory as the manifest.
```bash
nix run github:connorbaker/cuda-redist-find-features -- \
process-manifests \
--log-level DEBUG \
--version <newest CUDA version> \
https://developer.download.nvidia.com/compute/cuda/redist \
./pkgs/development/cuda-modules/cuda/manifests
```
This will generate a `redistrib_features_<newest CUDA version>.json` file in the same directory as the manifest.
5. Update the `cudaVersionMap` attribute set in `pkgs/development/cuda-modules/cuda/extension.nix`.
### Updating cuTensor {#updating-cutensor}
1. Repeat the steps present in [Updating CUDA redistributables](#updating-cuda-redistributables) with the following changes:
- Use the index of cuTensor redistributables: <https://developer.download.nvidia.com/compute/cutensor/redist>
- Use the newest version of cuTensor available instead of the newest version of CUDA.
- Use `pkgs/development/cuda-modules/cutensor/manifests` instead of `pkgs/development/cuda-modules/cuda/manifests`.
- Skip the step of updating `cudaVersionMap` in `pkgs/development/cuda-modules/cuda/extension.nix`.
### Updating supported compilers and GPUs {#updating-supported-compilers-and-gpus}
1. Update `nvcc-compatibilities.nix` in `pkgs/development/cuda-modules/` to include the newest release of NVCC, as well as any newly supported host compilers.
2. Update `gpus.nix` in `pkgs/development/cuda-modules/` to include any new GPUs supported by the new release of CUDA.
4. Include the path to the new manifest in `pkgs/development/compilers/cudatoolkit/redist/extension.nix`.
### Updating the CUDA Toolkit runfile installer {#updating-the-cuda-toolkit}
@@ -128,7 +99,7 @@ All new projects should use the CUDA redistributables available in [`cudaPackage
nix store prefetch-file --hash-type sha256 <link>
```
4. Update `pkgs/development/cuda-modules/cudatoolkit/releases.nix` to include the release.
4. Update `pkgs/development/compilers/cudatoolkit/versions.toml` to include the release.
### Updating the CUDA package set {#updating-the-cuda-package-set}
@@ -136,7 +107,7 @@ All new projects should use the CUDA redistributables available in [`cudaPackage
- NOTE: Changing the default CUDA package set should occur in a separate PR, allowing time for additional testing.
2. Successfully build the closure of the new package set, updating `pkgs/development/cuda-modules/cuda/overrides.nix` as needed. Below are some common failures:
2. Successfully build the closure of the new package set, updating `pkgs/development/compilers/cudatoolkit/redist/overrides.nix` as needed. Below are some common failures:
| Unable to ... | During ... | Reason | Solution | Note |
| --- | --- | --- | --- | --- |

View File

@@ -4,33 +4,22 @@
The function `buildDartApplication` builds Dart applications managed with pub.
It fetches its Dart dependencies automatically through `pub2nix`, and (through a series of hooks) builds and installs the executables specified in the pubspec file. The hooks can be used in other derivations, if needed. The phases can also be overridden to do something different from installing binaries.
It fetches its Dart dependencies automatically through `fetchDartDeps`, and (through a series of hooks) builds and installs the executables specified in the pubspec file. The hooks can be used in other derivations, if needed. The phases can also be overridden to do something different from installing binaries.
If you are packaging a Flutter desktop application, use [`buildFlutterApplication`](#ssec-dart-flutter) instead.
`pubspecLock` is the parsed pubspec.lock file. pub2nix uses this to download required packages.
This can be converted to JSON from YAML with something like `yq . pubspec.lock`, and then read by Nix.
`vendorHash`: is the hash of the output of the dependency fetcher derivation. To obtain it, set it to `lib.fakeHash` (or omit it) and run the build ([more details here](#sec-source-hashes)).
Alternatively, `autoPubspecLock` can be used instead, and set to a path to a regular `pubspec.lock` file. This relies on import-from-derivation, and is not permitted in Nixpkgs, but can be useful at other times.
If the upstream source is missing a `pubspec.lock` file, you'll have to vendor one and specify it using `pubspecLockFile`. If it is needed, one will be generated for you and printed when attempting to build the derivation.
::: {.warning}
When using `autoPubspecLock` with a local source directory, make sure to use a
concatenation operator (e.g. `autoPubspecLock = src + "/pubspec.lock";`), and
not string interpolation.
String interpolation will copy your entire source directory to the Nix store and
use its store path, meaning that unrelated changes to your source tree will
cause the generated `pubspec.lock` derivation to rebuild!
:::
If the package has Git package dependencies, the hashes must be provided in the `gitHashes` set. If a hash is missing, an error message prompting you to add it will be shown.
The `depsListFile` must always be provided when packaging in Nixpkgs. It will be generated and printed if the derivation is attempted to be built without one. Alternatively, `autoDepsList` may be set to `true` only when outside of Nixpkgs, as it relies on import-from-derivation.
The `dart` commands run can be overridden through `pubGetScript` and `dartCompileCommand`, you can also add flags using `dartCompileFlags` or `dartJitFlags`.
Dart supports multiple [outputs types](https://dart.dev/tools/dart-compile#types-of-output), you can choose between them using `dartOutputType` (defaults to `exe`). If you want to override the binaries path or the source path they come from, you can use `dartEntryPoints`. Outputs that require a runtime will automatically be wrapped with the relevant runtime (`dartaotruntime` for `aot-snapshot`, `dart run` for `jit-snapshot` and `kernel`, `node` for `js`), this can be overridden through `dartRuntimeCommand`.
```nix
{ lib, buildDartApplication, fetchFromGitHub }:
{ buildDartApplication, fetchFromGitHub }:
buildDartApplication rec {
pname = "dart-sass";
@@ -43,55 +32,12 @@ buildDartApplication rec {
hash = "sha256-U6enz8yJcc4Wf8m54eYIAnVg/jsGi247Wy8lp1r1wg4=";
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
pubspecLockFile = ./pubspec.lock;
depsListFile = ./deps.json;
vendorHash = "sha256-Atm7zfnDambN/BmmUf4BG0yUz/y6xWzf0reDw3Ad41s=";
}
```
### Patching dependencies {#ssec-dart-applications-patching-dependencies}
Some Dart packages require patches or build environment changes. Package derivations can be customised with the `customSourceBuilders` argument.
A collection of such customisations can be found in Nixpkgs, in the `development/compilers/dart/package-source-builders` directory.
This allows fixes for packages to be shared between all applications that use them. It is strongly recommended to add to this collection instead of including fixes in your application derivation itself.
### Running executables from dev_dependencies {#ssec-dart-applications-build-tools}
Many Dart applications require executables from the `dev_dependencies` section in `pubspec.yaml` to be run before building them.
This can be done in `preBuild`, in one of two ways:
1. Packaging the tool with `buildDartApplication`, adding it to Nixpkgs, and running it like any other application
2. Running the tool from the package cache
Of these methods, the first is recommended when using a tool that does not need
to be of a specific version.
For the second method, the `packageRun` function from the `dartConfigHook` can be used.
This is an alternative to `dart run` that does not rely on Pub.
e.g., for `build_runner`:
```bash
packageRun build_runner build
```
Do _not_ use `dart run <package_name>`, as this will attempt to download dependencies with Pub.
### Usage with nix-shell {#ssec-dart-applications-nix-shell}
#### Using dependencies from the Nix store {#ssec-dart-applications-nix-shell-deps}
As `buildDartApplication` provides dependencies instead of `pub get`, Dart needs to be explicitly told where to find them.
Run the following commands in the source directory to configure Dart appropriately.
Do not use `pub` after doing so; it will download the dependencies itself and overwrite these changes.
```bash
cp --no-preserve=all "$pubspecLockFilePath" pubspec.lock
mkdir -p .dart_tool && cp --no-preserve=all "$packageConfig" .dart_tool/package_config.json
```
## Flutter applications {#ssec-dart-flutter}
The function `buildFlutterApplication` builds Flutter applications.
@@ -105,9 +51,6 @@ flutter.buildFlutterApplication {
pname = "firmware-updater";
version = "unstable-2023-04-30";
# To build for the Web, use the targetFlutterPlatform argument.
# targetFlutterPlatform = "web";
src = fetchFromGitHub {
owner = "canonical";
repo = "firmware-updater";
@@ -116,21 +59,8 @@ flutter.buildFlutterApplication {
fetchSubmodules = true;
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
pubspecLockFile = ./pubspec.lock;
depsListFile = ./deps.json;
vendorHash = "sha256-cdMO+tr6kYiN5xKXa+uTMAcFf2C75F3wVPrn21G4QPQ=";
}
```
### Usage with nix-shell {#ssec-dart-flutter-nix-shell}
Flutter-specific `nix-shell` usage notes are included here. See the [Dart documentation](#ssec-dart-applications-nix-shell) for general `nix-shell` instructions.
#### Entering the shell {#ssec-dart-flutter-nix-shell-enter}
By default, dependencies for only the `targetFlutterPlatform` are available in the
build environment. This is useful for keeping closures small, but be problematic
during development. It's common, for example, to build Web apps for Linux during
development to take advantage of native features such as stateful hot reload.
To enter a shell with all the usual target platforms available, use the `multiShell` attribute.
e.g. `nix-shell '<nixpkgs>' -A fluffychat-web.multiShell`.

View File

@@ -1,41 +1,26 @@
# Go {#sec-language-go}
## Building Go modules with `buildGoModule` {#ssec-language-go}
## Go modules {#ssec-language-go}
The function `buildGoModule` builds Go programs managed with Go modules. It builds [Go Modules](https://github.com/golang/go/wiki/Modules) through a two phase build:
The function `buildGoModule` builds Go programs managed with Go modules. It builds a [Go Modules](https://github.com/golang/go/wiki/Modules) through a two phase build:
- An intermediate fetcher derivation called `goModules`. This derivation will be used to fetch all the dependencies of the Go module.
- An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
- A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
### Attributes of `buildGoModule` {#buildgomodule-parameters}
The `buildGoModule` function accepts the following parameters in addition to the [attributes accepted by both Go builders](#ssec-go-common-attributes):
- `vendorHash`: is the hash of the output of the intermediate fetcher derivation (the dependencies of the Go modules).
`vendorHash` can be set to `null`.
In that case, rather than fetching the dependencies, the dependencies already vendored in the `vendor` directory of the source repo will be used.
To avoid updating this field when dependencies change, run `go mod vendor` in your source repo and set `vendorHash = null;`.
You can read more about [vendoring in the Go documentation](https://go.dev/ref/mod#vendoring).
To obtain the actual hash, set `vendorHash = lib.fakeHash;` and run the build ([more details here](#sec-source-hashes)).
- `proxyVendor`: If `true`, the intermediate fetcher downloads dependencies from the
[Go module proxy](https://go.dev/ref/mod#module-proxy) (using `go mod download`) instead of vendoring them. The resulting
[module cache](https://go.dev/ref/mod#module-cache) is then passed to the final derivation.
This is useful if your code depends on C code and `go mod tidy` does not include the needed sources to build or
if any dependency has case-insensitive conflicts which will produce platform-dependent `vendorHash` checksums.
Defaults to `false`.
- `modPostBuild`: Shell commands to run after the build of the goModules executes `go mod vendor`, and before calculating fixed output derivation's `vendorHash`.
Note that if you change this attribute, you need to update `vendorHash` attribute.
- `modRoot`: The root directory of the Go module that contains the `go.mod` file.
Defaults to `./`, which is the root of `src`.
### Example for `buildGoModule` {#ex-buildGoModule}
The following is an example expression using `buildGoModule`:
In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function:
- `vendorHash`: is the hash of the output of the intermediate fetcher derivation.
`vendorHash` can also be set to `null`.
In that case, rather than fetching the dependencies and vendoring them, the dependencies vendored in the source repo will be used.
To avoid updating this field when dependencies change, run `go mod vendor` in your source repo and set `vendorHash = null;`
To obtain the actual hash, set `vendorHash = lib.fakeHash;` and run the build ([more details here](#sec-source-hashes)).
- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform-dependent `vendorHash` checksums.
- `modPostBuild`: Shell commands to run after the build of the goModules executes `go mod vendor`, and before calculating fixed output derivation's `vendorHash`. Note that if you change this attribute, you need to update `vendorHash` attribute.
```nix
pet = buildGoModule rec {
@@ -66,7 +51,7 @@ The function `buildGoPackage` builds legacy Go programs, not supporting Go modul
### Example for `buildGoPackage` {#example-for-buildgopackage}
In the following is an example expression using `buildGoPackage`, the following arguments are of special significance to the function:
In the following is an example expression using buildGoPackage, the following arguments are of special significance to the function:
- `goPackagePath` specifies the package's canonical Go import path.
- `goDeps` is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate `deps.nix` file for readability. The dependency data structure is described below.
@@ -118,7 +103,7 @@ The `goDeps` attribute can be imported from a separate `nix` file that defines w
]
```
To extract dependency information from a Go package in automated way use [go2nix (deprecated)](https://github.com/kamilchm/go2nix). It can produce complete derivation and `goDeps` file for Go programs.
To extract dependency information from a Go package in automated way use [go2nix](https://github.com/kamilchm/go2nix). It can produce complete derivation and `goDeps` file for Go programs.
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
@@ -128,7 +113,7 @@ for p in $NIX_PROFILES; do
done
```
## Attributes used by both builders {#ssec-go-common-attributes}
## Attributes used by the builders {#ssec-go-common-attributes}
Many attributes [controlling the build phase](#variables-controlling-the-build-phase) are respected by both `buildGoModule` and `buildGoPackage`. Note that `buildGoModule` reads the following attributes also when building the `vendor/` goModules fixed output derivation as well:
@@ -139,21 +124,15 @@ Many attributes [controlling the build phase](#variables-controlling-the-build-p
- [`postPatch`](#var-stdenv-postPatch)
- [`preBuild`](#var-stdenv-preBuild)
To control test execution of the build derivation, the following attributes are of interest:
- [`checkInputs`](#var-stdenv-checkInputs)
- [`preCheck`](#var-stdenv-preCheck)
- [`checkFlags`](#var-stdenv-checkFlags)
In addition to the above attributes, and the many more variables respected also by `stdenv.mkDerivation`, both `buildGoModule` and `buildGoPackage` respect Go-specific attributes that tweak them to behave slightly differently:
### `ldflags` {#var-go-ldflags}
A string list of flags to pass to the Go linker tool via the `-ldflags` argument of `go build`. Possible values can be retrieved by running `go tool link --help`.
The most common use case for this argument is to make the resulting executable aware of its own version by injecting the value of string variable using the `-X` flag. For example:
Arguments to pass to the Go linker tool via the `-ldflags` argument of `go build`. The most common use case for this argument is to make the resulting executable aware of its own version. For example:
```nix
ldflags = [
"-s" "-w"
"-X main.Version=${version}"
"-X main.Commit=${version}"
];
@@ -161,7 +140,7 @@ The most common use case for this argument is to make the resulting executable a
### `tags` {#var-go-tags}
A string list of [Go build tags (also called build constraints)](https://pkg.go.dev/cmd/go#hdr-Build_constraints) that are passed via the `-tags` argument of `go build`. These constraints control whether Go files from the source should be included in the build. For example:
Arguments to pass to the Go via the `-tags` argument of `go build`. For example:
```nix
tags = [
@@ -170,101 +149,18 @@ A string list of [Go build tags (also called build constraints)](https://pkg.go.
];
```
Tags can also be set conditionally:
```nix
tags = [ "production" ] ++ lib.optionals withSqlite [ "sqlite" ];
```
### `deleteVendor` {#var-go-deleteVendor}
If set to `true`, removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
Removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.
### `subPackages` {#var-go-subPackages}
Specified as a string or list of strings. Limits the builder from building child packages that have not been listed. If `subPackages` is not specified, all child packages will be built.
Many Go projects keep the main package in a `cmd` directory.
Following example could be used to only build the example-cli and example-server binaries:
```nix
subPackages = [
"cmd/example-cli"
"cmd/example-server"
];
```
### `excludedPackages` {#var-go-excludedPackages}
Specified as a string or list of strings. Causes the builder to skip building child packages that match any of the provided values.
### `CGO_ENABLED` {#var-go-CGO_ENABLED}
When set to `0`, the [cgo](https://pkg.go.dev/cmd/cgo) command is disabled. As consequence, the build
program can't link against C libraries anymore, and the resulting binary is statically linked.
When building with CGO enabled, Go will likely link some packages from the Go standard library against C libraries,
even when the target code does not explicitly call into C dependencies. With `CGO_ENABLED = 0;`, Go
will always use the Go native implementation of these internal packages. For reference see
[net](https://pkg.go.dev/net#hdr-Name_Resolution) and [os/user](https://pkg.go.dev/os/user#pkg-overview) packages.
Notice that the decision whether these packages should use native Go implementation or not can also be controlled
on a per package level using build tags (`tags`). In case CGO is disabled, these tags have no additional effect.
When a Go program depends on C libraries, place those dependencies in `buildInputs`:
```nix
buildInputs = [
libvirt
libxml2
];
```
`CGO_ENABLED` defaults to `1`.
### `enableParallelBuilding` {#var-go-enableParallelBuilding}
Whether builds and tests should run in parallel.
Defaults to `true`.
### `allowGoReference` {#var-go-allowGoReference}
Whether the build result should be allowed to contain references to the Go tool chain. This might be needed for programs that are coupled with the compiler, but shouldn't be set without a good reason.
Defaults to `false`
## Controlling the Go environment {#ssec-go-environment}
The Go build can be further tweaked by setting environment variables. In most cases, this isn't needed. Possible values can be found in the [Go documentation of accepted environment variables](https://pkg.go.dev/cmd/go#hdr-Environment_variables). Notice that some of these flags are set by the builder itself and should not be set explicitly. If in doubt, grep the implementation of the builder.
## Skipping tests {#ssec-skip-go-tests}
`buildGoModule` runs tests by default. Failing tests can be disabled using the `checkFlags` parameter.
This is done with the [`-skip` or `-run`](https://pkg.go.dev/cmd/go#hdr-Testing_flags) flags of the `go test` command.
For example, only a selection of tests could be run with:
```nix
# -run and -skip accept regular expressions
checkFlags = [
"-run=^Test(Simple|Fast)$"
];
```
If a larger amount of tests should be skipped, the following pattern can be used:
```nix
checkFlags =
let
# Skip tests that require network access
skippedTests = [
"TestNetwork"
"TestDatabase/with_mysql" # exclude only the subtest
"TestIntegration"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
```
To disable tests altogether, set `doCheck = false;`.
`buildGoPackage` does not execute tests by default.
Specified as a string or list of strings. Causes the builder to skip building child packages that match any of the provided values. If `excludedPackages` is not specified, all child packages will be built.

View File

@@ -1,47 +0,0 @@
# Idris2 {#sec-idris2}
In addition to exposing the Idris2 compiler itself, Nixpkgs exposes an `idris2Packages.buildIdris` helper to make it a bit more ergonomic to build Idris2 executables or libraries.
The `buildIdris` function takes a package set that defines at a minimum the `src` and `projectName` of the package to be built and any `idrisLibraries` required to build it. The `src` is the same source you're familiar with but the `projectName` must be the name of the `ipkg` file for the project (omitting the `.ipkg` extension). The `idrisLibraries` is a list of other library derivations created with `buildIdris`. You can optionally specify other derivation properties as needed but sensible defaults for `configurePhase`, `buildPhase`, and `installPhase` are provided.
Importantly, `buildIdris` does not create a single derivation but rather an attribute set with two properties: `executable` and `library`. The `executable` property is a derivation and the `library` property is a function that will return a derivation for the library with or without source code included. Source code need not be included unless you are aiming to use IDE or LSP features that are able to jump to definitions within an editor.
A simple example of a fully packaged library would be the [`LSP-lib`](https://github.com/idris-community/LSP-lib) found in the `idris-community` GitHub organization.
```nix
{ fetchFromGitHub, idris2Packages }:
let lspLibPkg = idris2Packages.buildIdris {
projectName = "lsp-lib";
src = fetchFromGitHub {
owner = "idris-community";
repo = "LSP-lib";
rev = "main";
hash = "sha256-EvSyMCVyiy9jDZMkXQmtwwMoLaem1GsKVFqSGNNHHmY=";
};
idrisLibraries = [ ];
};
in lspLibPkg.library
```
The above results in a derivation with the installed library results (with sourcecode).
A slightly more involved example of a fully packaged executable would be the [`idris2-lsp`](https://github.com/idris-community/idris2-lsp) which is an Idris2 language server that uses the `LSP-lib` found above.
```nix
{ callPackage, fetchFromGitHub, idris2Packages }:
# Assuming the previous example lives in `lsp-lib.nix`:
let lspLib = callPackage ./lsp-lib.nix { };
lspPkg = idris2Packages.buildIdris {
projectName = "idris2-lsp";
src = fetchFromGitHub {
owner = "idris-community";
repo = "idris2-lsp";
rev = "main";
hash = "sha256-vQTzEltkx7uelDtXOHc6QRWZ4cSlhhm5ziOqWA+aujk=";
};
idrisLibraries = [(idris2Packages.idris2Api { }) (lspLib { })];
};
in lspPkg.executable
```
The above uses the default value of `withSource = false` for both of the two required Idris libraries that the `idris2-lsp` executable depends on. `idris2Api` in the above derivation comes built in with `idris2Packages`. This library exposes many of the otherwise internal APIs of the Idris2 compiler.

View File

@@ -21,11 +21,9 @@ go.section.md
haskell.section.md
hy.section.md
idris.section.md
idris2.section.md
ios.section.md
java.section.md
javascript.section.md
julia.section.md
lisp.section.md
lua.section.md
maven.section.md

View File

@@ -354,7 +354,6 @@ mkYarnPackage rec {
- The `echo 9` steps comes from this answer: <https://stackoverflow.com/a/49139496>
- Exporting the headers in `npm_config_nodedir` comes from this issue: <https://github.com/nodejs/node-gyp/issues/1191#issuecomment-301243919>
- `offlineCache` (described [above](#javascript-yarn2nix-preparation)) must be specified to avoid [Import From Derivation](#ssec-import-from-derivation) (IFD) when used inside Nixpkgs.
## Outside Nixpkgs {#javascript-outside-nixpkgs}

View File

@@ -1,69 +0,0 @@
# Julia {#language-julia}
## Introduction {#julia-introduction}
Nixpkgs includes Julia as the `julia` derivation.
You can get specific versions by looking at the other `julia*` top-level derivations available.
For example, `julia_19` corresponds to Julia 1.9.
We also provide the current stable version as `julia-stable`, and an LTS version as `julia-lts`.
Occasionally, a Julia version has been too difficult to build from source in Nixpkgs and has been fetched prebuilt instead.
These Julia versions are differentiated with the `*-bin` suffix; for example, `julia-stable-bin`.
## julia.withPackages {#julia-withpackage}
The basic Julia derivations only provide the built-in packages that come with the distribution.
You can build Julia environments with additional packages using the `julia.withPackages` command.
This function accepts a list of strings representing Julia package names.
For example, you can build a Julia environment with the `Plots` package as follows.
```nix
julia.withPackages ["Plots"]
```
Arguments can be passed using `.override`.
For example:
```nix
(julia.withPackages.override {
precompile = false; # Turn off precompilation
}) ["Plots"]
```
Here's a nice way to run a Julia environment with a shell one-liner:
```sh
nix-shell -p 'julia.withPackages ["Plots"]' --run julia
```
### Arguments {#julia-withpackage-arguments}
* `precompile`: Whether to run `Pkg.precompile()` on the generated environment.
This will make package imports faster, but may fail in some cases.
For example, there is an upstream issue with `Gtk.jl` that prevents precompilation from working in the Nix build sandbox, because the precompiled code tries to access a display.
Packages like this will work fine if you build with `precompile=false`, and then precompile as needed once your environment starts.
Defaults: `true`
* `extraLibs`: Extra library dependencies that will be placed on the `LD_LIBRARY_PATH` for Julia.
Should not be needed as we try to obtain library dependencies automatically using Julia's artifacts system.
* `makeWrapperArgs`: Extra arguments to pass to the `makeWrapper` call which we use to wrap the Julia binary.
* `setDefaultDepot`: Whether to automatically prepend `$HOME/.julia` to the `JULIA_DEPOT_PATH`.
This is useful because Julia expects a writable depot path as the first entry, which the one we build in Nixpkgs is not.
If there's no writable depot, then Julia will show a warning and be unable to save command history logs etc.
Default: `true`
* `packageOverrides`: Allows you to override packages by name by passing an alternative source.
For example, you can use a custom version of the `LanguageServer` package by passing `packageOverrides = { "LanguageServer" = fetchFromGitHub {...}; }`.
* `augmentedRegistry`: Allows you to change the registry from which Julia packages are drawn.
This normally points at a special augmented version of the Julia [General packages registry](https://github.com/JuliaRegistries/General).
If you want to use a bleeding-edge version to pick up the latest package updates, you can plug in a later revision than the one in Nixpkgs.

View File

@@ -1,38 +1,74 @@
# Nim {#nim}
The Nim compiler and a builder function is available.
Nim programs are built using `buildNimPackage` and a lockfile containing Nim dependencies.
## Overview {#nim-overview}
The Nim compiler, a builder function, and some packaged libraries are available
in Nixpkgs. Until now each compiler release has been effectively backwards
compatible so only the latest version is available.
## Nim program packages in Nixpkgs {#nim-program-packages-in-nixpkgs}
Nim programs can be built using `nimPackages.buildNimPackage`. In the
case of packages not containing exported library code the attribute
`nimBinOnly` should be set to `true`.
The following example shows a Nim program that depends only on Nim libraries:
```nix
{ lib, buildNimPackage, fetchFromGitHub }:
buildNimPackage { } (finalAttrs: {
```nix
{ lib, nimPackages, fetchFromGitHub }:
nimPackages.buildNimPackage (finalAttrs: {
pname = "ttop";
version = "1.2.7";
version = "1.0.1";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "inv2004";
repo = "ttop";
rev = "v${finalAttrs.version}";
hash = "sha256-oPdaUqh6eN1X5kAYVvevOndkB/xnQng9QVLX9bu5P5E=";
hash = "sha256-x4Uczksh6p3XX/IMrOFtBxIleVHdAPX9e8n32VAUTC4=";
};
lockFile = ./lock.json;
buildInputs = with nimPackages; [ asciigraph illwill parsetoml zippy ];
nimFlags = [
"-d:NimblePkgVersion=${finalAttrs.version}"
];
})
```
## Nim library packages in Nixpkgs {#nim-library-packages-in-nixpkgs}
Nim libraries can also be built using `nimPackages.buildNimPackage`, but
often the product of a fetcher is sufficient to satisfy a dependency.
The `fetchgit`, `fetchFromGitHub`, and `fetchNimble` functions yield an
output that can be discovered during the `configurePhase` of `buildNimPackage`.
Nim library packages are listed in
[pkgs/top-level/nim-packages.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/nim-packages.nix) and implemented at
[pkgs/development/nim-packages](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/nim-packages).
The following example shows a Nim library that propagates a dependency on a
non-Nim package:
```nix
{ lib, buildNimPackage, fetchNimble, SDL2 }:
buildNimPackage (finalAttrs: {
pname = "sdl2";
version = "2.0.4";
src = fetchNimble {
inherit (finalAttrs) pname version;
hash = "sha256-Vtcj8goI4zZPQs2TbFoBFlcR5UqDtOldaXSH/+/xULk=";
};
propagatedBuildInputs = [ SDL2 ];
})
```
## `buildNimPackage` parameters {#buildnimpackage-parameters}
The `buildNimPackage` function takes an attrset of parameters that are passed on to `stdenv.mkDerivation`.
All parameters from `stdenv.mkDerivation` function are still supported. The
following are specific to `buildNimPackage`:
The following parameters are specific to `buildNimPackage`:
* `lockFile`: JSON formatted lockfile.
* `nimBinOnly ? false`: If `true` then build only the programs listed in
the Nimble file in the packages sources.
* `nimbleFile`: Specify the Nimble file location of the package being built
rather than discover the file at build-time.
* `nimRelease ? true`: Build the package in *release* mode.
@@ -41,85 +77,6 @@ The following parameters are specific to `buildNimPackage`:
Use this to specify defines with arguments in the form of `-d:${name}=${value}`.
* `nimDoc` ? false`: Build and install HTML documentation.
## Lockfiles {#nim-lockfiles}
Nim lockfiles are created with the `nim_lk` utility.
Run `nim_lk` with the source directory as an argument and it will print a lockfile to stdout.
```sh
$ cd nixpkgs
$ nix build -f . ttop.src
$ nix run -f . nim_lk ./result | jq --sort-keys > pkgs/by-name/tt/ttop/lock.json
```
## Overriding Nim packages {#nim-overrides}
The `buildNimPackage` function generates flags and additional build dependencies from the `lockFile` parameter passed to `buildNimPackage`. Using [`overrideAttrs`](#sec-pkg-overrideAttrs) on the final package will apply after this has already been generated, so this can't be used to override the `lockFile` in a package built with `buildNimPackage`. To be able to override parameters before flags and build dependencies are generated from the `lockFile`, use `overrideNimAttrs` instead with the same syntax as `overrideAttrs`:
```nix
pkgs.nitter.overrideNimAttrs {
# using a different source which has different dependencies from the standard package
src = pkgs.fetchFromGithub { /* */ };
# new lock file generated from the source
lockFile = ./custom-lock.json;
}
```
## Lockfile dependency overrides {#nim-lock-overrides}
The `buildNimPackage` function matches the libraries specified by `lockFile` to attrset of override functions that are then applied to the package derivation.
The default overrides are maintained as the top-level `nimOverrides` attrset at `pkgs/top-level/nim-overrides.nix`.
For example, to propagate a dependency on SDL2 for lockfiles that select the Nim `sdl2` library, an overlay is added to the set in the `nim-overrides.nix` file:
```nix
{ lib
/* */
, SDL2
/* */
}:
{
/* */
sdl2 =
lockAttrs:
finalAttrs:
{ buildInputs ? [ ], ... }:
{
buildInputs = buildInputs ++ [ SDL2 ];
};
/* */
}
```
The annotations in the `nim-overrides.nix` set are functions that take three arguments and return a new attrset to be overlayed on the package being built.
- lockAttrs: the attrset for this library from within a lockfile. This can be used to implement library version constraints, such as marking libraries as broken or insecure.
- finalAttrs: the final attrset passed by `buildNimPackage` to `stdenv.mkDerivation`.
- prevAttrs: the attrset produced by initial arguments to `buildNimPackage` and any preceding lockfile overlays.
### Overriding an Nim library override {#nim-lock-overrides-overrides}
The `nimOverrides` attrset makes it possible to modify overrides in a few different ways.
Override a package internal to its definition:
```nix
{ lib, buildNimPackage, nimOverrides, libressl }:
let
buildNimPackage' = buildNimPackage.override {
nimOverrides = nimOverrides.override { openssl = libressl; };
};
in buildNimPackage' (finalAttrs: {
pname = "foo";
# …
})
```
Override a package externally:
```nix
{ pkgs }: {
foo = pkgs.foo.override {
buildNimPackage = pkgs.buildNimPackage.override {
nimOverrides = pkgs.nimOverrides.override { openssl = libressl; };
};
};
}
```
* `buildInputs` ? []: The packages listed here will be searched for `*.nimble`
files which are used to populate the Nim library path. Otherwise the standard
behavior is in effect.

View File

@@ -299,13 +299,14 @@ python3Packages.buildPythonApplication rec {
hash = "sha256-Pe229rT0aHwA98s+nTHQMEFKZPo/yw6sot8MivFDvAw=";
};
nativeBuildInputs = with python3Packages; [
setuptools
nativeBuildInputs = [
python3Packages.setuptools
python3Packages.wheel
];
propagatedBuildInputs = with python3Packages; [
tornado
python-daemon
propagatedBuildInputs = [
python3Packages.tornado
python3Packages.python-daemon
];
meta = with lib; {
@@ -2060,7 +2061,7 @@ and create update commits, and supports the `fetchPypi`, `fetchurl` and
hosted on GitHub, exporting a `GITHUB_API_TOKEN` is highly recommended.
Updating packages in bulk leads to lots of breakages, which is why a
stabilization period on the `python-updates` branch is required.
stabilization period on the `python-unstable` branch is required.
If a package is fragile and often breaks during these bulks updates, it
may be reasonable to set `passthru.skipBulkUpdate = true` in the

View File

@@ -26,17 +26,6 @@ It is important to import Qt modules directly, that is: `qtbase`, `qtdeclarative
Additionally all Qt packages must include `wrapQtAppsHook` in `nativeBuildInputs`, or you must explicitly set `dontWrapQtApps`.
`pkgs.callPackage` does not provide injections for `qtbase` or the like.
Instead you want to either use `pkgs.libsForQt5.callPackage`, or `pkgs.qt6Packages.callPackage`, depending on the Qt version you want to use.
For example (from [here](https://github.com/NixOS/nixpkgs/blob/2f9286912cb215969ece465147badf6d07aa43fe/pkgs/top-level/all-packages.nix#L30106))
```nix
zeal-qt5 = libsForQt5.callPackage ../data/documentation/zeal { };
zeal-qt6 = qt6Packages.callPackage ../data/documentation/zeal { };
zeal = zeal-qt5;
```
## Locating runtime dependencies {#qt-runtime-dependencies}
Qt applications must be wrapped to find runtime dependencies.

View File

@@ -2,13 +2,13 @@
## Using Ruby {#using-ruby}
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby. The attribute `ruby` refers to the default Ruby interpreter, which is currently MRI 3.1. It's also possible to refer to specific versions, e.g. `ruby_3_y`, `jruby`, or `mruby`.
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby. The attribute `ruby` refers to the default Ruby interpreter, which is currently MRI 2.6. It's also possible to refer to specific versions, e.g. `ruby_2_y`, `jruby`, or `mruby`.
In the Nixpkgs tree, Ruby packages can be found throughout, depending on what they do, and are called from the main package set. Ruby gems, however are separate sets, and there's one default set for each interpreter (currently MRI only).
There are two main approaches for using Ruby with gems. One is to use a specifically locked `Gemfile` for an application that has very strict dependencies. The other is to depend on the common gems, which we'll explain further down, and rely on them being updated regularly.
The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_3_2.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
The interpreters have common attributes, namely `gems`, and `withPackages`. So you can refer to `ruby.gems.nokogiri`, or `ruby_2_7.gems.nokogiri` to get the Nokogiri gem already compiled and ready to use.
Since not all gems have executables like `nokogiri`, it's usually more convenient to use the `withPackages` function like this: `ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the Ruby in your environment will be able to find the gem and it can be used in your Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"` as usual.
@@ -33,7 +33,7 @@ Again, it's possible to launch the interpreter from the shell. The Ruby interpre
#### Load Ruby environment from `.nix` expression {#load-ruby-environment-from-.nix-expression}
As explained [in the `nix-shell` section](https://nixos.org/manual/nix/stable/command-ref/nix-shell) of the Nix manual, `nix-shell` can also load an expression from a `.nix` file.
Say we want to have Ruby, `nokogori`, and `pry`. Consider a `shell.nix` file with:
Say we want to have Ruby 2.6, `nokogori`, and `pry`. Consider a `shell.nix` file with:
```nix
with import <nixpkgs> {};
@@ -114,7 +114,7 @@ With this file in your directory, you can run `nix-shell` to build and use the g
The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that all the `/lib` and `/bin` directories will be available, and the executables of all gems (even of indirect dependencies) will end up in your `$PATH`. The `wrappedRuby` provides you with all executables that come with Ruby itself, but wrapped so they can easily find the gems in your gemset.
One common issue that you might have is that you have Ruby, but also `bundler` in your gemset. That leads to a conflict for `/bin/bundle` and `/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems in a `lowPrio` call. So in order to give the `bundler` from your gemset priority, it would be used like this:
One common issue that you might have is that you have Ruby 2.6, but also `bundler` in your gemset. That leads to a conflict for `/bin/bundle` and `/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems in a `lowPrio` call. So in order to give the `bundler` from your gemset priority, it would be used like this:
```nix
# ...

View File

@@ -44,22 +44,21 @@ rustPlatform.buildRustPackage rec {
}
```
`buildRustPackage` requires either the `cargoHash` or the `cargoSha256`
attribute which is computed over all crate sources of this package.
`cargoSha256` is used for traditional Nix SHA-256 hashes. `cargoHash` should
instead be used for [SRI](https://www.w3.org/TR/SRI/) hashes and should be
preferred. For example:
`buildRustPackage` requires either the `cargoSha256` or the
`cargoHash` attribute which is computed over all crate sources of this
package. `cargoHash256` is used for traditional Nix SHA-256 hashes,
such as the one in the example above. `cargoHash` should instead be
used for [SRI](https://www.w3.org/TR/SRI/) hashes. For example:
Exception: If the application has cargo `git` dependencies, the `cargoHash`/`cargoSha256`
approach will not work, and you will need to copy the `Cargo.lock` file of the application
to nixpkgs and continue with the next section for specifying the options of the`cargoLock`
section.
```nix
cargoHash = "sha256-l1vL2ZdtDRxSGvP0X/l3nMw8+6WF67KPutJEzUROjg8=";
```
Exception: If the application has cargo `git` dependencies, the `cargoHash`/`cargoSha256`
approach will not work, and you will need to copy the `Cargo.lock` file of the application
to nixpkgs and continue with the next section for specifying the options of the `cargoLock`
section.
Both types of hashes are permitted when contributing to nixpkgs. The
Cargo hash is obtained by inserting a fake checksum into the
expression and building the package once. The correct checksum can
@@ -964,7 +963,7 @@ repository:
lib.updateManyAttrsByPath [{
path = [ "packages" "stable" ];
update = old: old.overrideScope(final: prev: {
rustc-unwrapped = prev.rustc-unwrapped.overrideAttrs (_: {
rustc = prev.rustc.overrideAttrs (_: {
src = lib.cleanSource /git/scratch/rust;
# do *not* put passthru.isReleaseTarball=true here
});
@@ -1004,3 +1003,4 @@ nix-build $NIXPKGS -A package-broken-by-rust-changes
The `git submodule update --init` and `cargo vendor` commands above
require network access, so they can't be performed from within the
`rustc` derivation, unfortunately.

View File

@@ -208,23 +208,3 @@ EOF
cp test.pdf $out
''
```
## LuaLaTeX font cache {#sec-language-texlive-lualatex-font-cache}
The font cache for LuaLaTeX is written to `$HOME`.
Therefore, it is necessary to set `$HOME` to a writable path, e.g. [before using LuaLaTeX in nix derivations](https://github.com/NixOS/nixpkgs/issues/180639):
```nix
runCommandNoCC "lualatex-hello-world" {
buildInputs = [ texliveFull ];
} ''
mkdir $out
echo '\documentclass{article} \begin{document} Hello world \end{document}' > main.tex
env HOME=$(mktemp -d) lualatex -interaction=nonstopmode -output-format=pdf -output-directory=$out ./main.tex
''
```
Additionally, [the cache of a user can diverge from the nix store](https://github.com/NixOS/nixpkgs/issues/278718).
To resolve font issues that might follow, the cache can be removed by the user:
```ShellSession
luaotfload-tool --cache=erase --flush-lookups --force
```

View File

@@ -1,318 +1,34 @@
{
"gnunet.conf(5)": "https://docs.gnunet.org/latest/users/configuration.html",
"gnunet.conf(5)": "https://docs.gnunet.org/users/configuration.html",
"mpd(1)": "https://mpd.readthedocs.io/en/latest/mpd.1.html",
"mpd.conf(5)": "https://mpd.readthedocs.io/en/latest/mpd.conf.5.html",
"nix.conf(5)": "https://nixos.org/manual/nix/stable/command-ref/conf-file.html",
"portals.conf(5)": "https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in",
"bootctl(1)": "https://www.freedesktop.org/software/systemd/man/bootctl.html",
"busctl(1)": "https://www.freedesktop.org/software/systemd/man/busctl.html",
"coredumpctl(1)": "https://www.freedesktop.org/software/systemd/man/coredumpctl.html",
"homectl(1)": "https://www.freedesktop.org/software/systemd/man/homectl.html",
"hostnamectl(1)": "https://www.freedesktop.org/software/systemd/man/hostnamectl.html",
"init(1)": "https://www.freedesktop.org/software/systemd/man/init.html",
"journalctl(1)": "https://www.freedesktop.org/software/systemd/man/journalctl.html",
"localectl(1)": "https://www.freedesktop.org/software/systemd/man/localectl.html",
"loginctl(1)": "https://www.freedesktop.org/software/systemd/man/loginctl.html",
"machinectl(1)": "https://www.freedesktop.org/software/systemd/man/machinectl.html",
"mount.ddi(1)": "https://www.freedesktop.org/software/systemd/man/mount.ddi.html",
"networkctl(1)": "https://www.freedesktop.org/software/systemd/man/networkctl.html",
"oomctl(1)": "https://www.freedesktop.org/software/systemd/man/oomctl.html",
"portablectl(1)": "https://www.freedesktop.org/software/systemd/man/portablectl.html",
"resolvconf(1)": "https://www.freedesktop.org/software/systemd/man/resolvconf.html",
"resolvectl(1)": "https://www.freedesktop.org/software/systemd/man/resolvectl.html",
"systemctl(1)": "https://www.freedesktop.org/software/systemd/man/systemctl.html",
"systemd-ac-power(1)": "https://www.freedesktop.org/software/systemd/man/systemd-ac-power.html",
"systemd-analyze(1)": "https://www.freedesktop.org/software/systemd/man/systemd-analyze.html",
"systemd-ask-password(1)": "https://www.freedesktop.org/software/systemd/man/systemd-ask-password.html",
"systemd-cat(1)": "https://www.freedesktop.org/software/systemd/man/systemd-cat.html",
"systemd-cgls(1)": "https://www.freedesktop.org/software/systemd/man/systemd-cgls.html",
"systemd-cgtop(1)": "https://www.freedesktop.org/software/systemd/man/systemd-cgtop.html",
"systemd-creds(1)": "https://www.freedesktop.org/software/systemd/man/systemd-creds.html",
"systemd-cryptenroll(1)": "https://www.freedesktop.org/software/systemd/man/systemd-cryptenroll.html",
"systemd-delta(1)": "https://www.freedesktop.org/software/systemd/man/systemd-delta.html",
"systemd-detect-virt(1)": "https://www.freedesktop.org/software/systemd/man/systemd-detect-virt.html",
"systemd-dissect(1)": "https://www.freedesktop.org/software/systemd/man/systemd-dissect.html",
"systemd-escape(1)": "https://www.freedesktop.org/software/systemd/man/systemd-escape.html",
"systemd-id128(1)": "https://www.freedesktop.org/software/systemd/man/systemd-id128.html",
"systemd-inhibit(1)": "https://www.freedesktop.org/software/systemd/man/systemd-inhibit.html",
"systemd-machine-id-setup(1)": "https://www.freedesktop.org/software/systemd/man/systemd-machine-id-setup.html",
"systemd-measure(1)": "https://www.freedesktop.org/software/systemd/man/systemd-measure.html",
"systemd-mount(1)": "https://www.freedesktop.org/software/systemd/man/systemd-mount.html",
"systemd-notify(1)": "https://www.freedesktop.org/software/systemd/man/systemd-notify.html",
"systemd-nspawn(1)": "https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html",
"systemd-path(1)": "https://www.freedesktop.org/software/systemd/man/systemd-path.html",
"systemd-run(1)": "https://www.freedesktop.org/software/systemd/man/systemd-run.html",
"systemd-socket-activate(1)": "https://www.freedesktop.org/software/systemd/man/systemd-socket-activate.html",
"systemd-stdio-bridge(1)": "https://www.freedesktop.org/software/systemd/man/systemd-stdio-bridge.html",
"systemd-tty-ask-password-agent(1)": "https://www.freedesktop.org/software/systemd/man/systemd-tty-ask-password-agent.html",
"systemd-umount(1)": "https://www.freedesktop.org/software/systemd/man/systemd-umount.html",
"systemd(1)": "https://www.freedesktop.org/software/systemd/man/systemd.html",
"timedatectl(1)": "https://www.freedesktop.org/software/systemd/man/timedatectl.html",
"userdbctl(1)": "https://www.freedesktop.org/software/systemd/man/userdbctl.html",
"binfmt.d(5)": "https://www.freedesktop.org/software/systemd/man/binfmt.d.html",
"coredump.conf(5)": "https://www.freedesktop.org/software/systemd/man/coredump.conf.html",
"coredump.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/coredump.conf.d.html",
"crypttab(5)": "https://www.freedesktop.org/software/systemd/man/crypttab.html",
"dnssec-trust-anchors.d(5)": "https://www.freedesktop.org/software/systemd/man/dnssec-trust-anchors.d.html",
"environment.d(5)": "https://www.freedesktop.org/software/systemd/man/environment.d.html",
"extension-release(5)": "https://www.freedesktop.org/software/systemd/man/extension-release.html",
"homed.conf(5)": "https://www.freedesktop.org/software/systemd/man/homed.conf.html",
"homed.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/homed.conf.d.html",
"hostname(5)": "https://www.freedesktop.org/software/systemd/man/hostname.html",
"initrd-release(5)": "https://www.freedesktop.org/software/systemd/man/initrd-release.html",
"integritytab(5)": "https://www.freedesktop.org/software/systemd/man/integritytab.html",
"iocost.conf(5)": "https://www.freedesktop.org/software/systemd/man/iocost.conf.html",
"journal-remote.conf(5)": "https://www.freedesktop.org/software/systemd/man/journal-remote.conf.html",
"journal-remote.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/journal-remote.conf.d.html",
"journal-upload.conf(5)": "https://www.freedesktop.org/software/systemd/man/journal-upload.conf.html",
"journal-upload.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/journal-upload.conf.d.html",
"journald.conf(5)": "https://www.freedesktop.org/software/systemd/man/journald.conf.html",
"journald.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/journald.conf.d.html",
"journald@.conf(5)": "https://www.freedesktop.org/software/systemd/man/journald@.conf.html",
"loader.conf(5)": "https://www.freedesktop.org/software/systemd/man/loader.conf.html",
"locale.conf(5)": "https://www.freedesktop.org/software/systemd/man/locale.conf.html",
"localtime(5)": "https://www.freedesktop.org/software/systemd/man/localtime.html",
"logind.conf(5)": "https://www.freedesktop.org/software/systemd/man/logind.conf.html",
"logind.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/logind.conf.d.html",
"machine-id(5)": "https://www.freedesktop.org/software/systemd/man/machine-id.html",
"machine-info(5)": "https://www.freedesktop.org/software/systemd/man/machine-info.html",
"modules-load.d(5)": "https://www.freedesktop.org/software/systemd/man/modules-load.d.html",
"networkd.conf(5)": "https://www.freedesktop.org/software/systemd/man/networkd.conf.html",
"networkd.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/networkd.conf.d.html",
"oomd.conf(5)": "https://www.freedesktop.org/software/systemd/man/oomd.conf.html",
"oomd.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/oomd.conf.d.html",
"org.freedesktop.LogControl1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.LogControl1.html",
"org.freedesktop.home1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.home1.html",
"org.freedesktop.hostname1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.hostname1.html",
"org.freedesktop.import1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.import1.html",
"org.freedesktop.locale1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.locale1.html",
"org.freedesktop.login1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.login1.html",
"org.freedesktop.machine1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.machine1.html",
"org.freedesktop.network1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.network1.html",
"org.freedesktop.oom1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.oom1.html",
"org.freedesktop.portable1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.portable1.html",
"org.freedesktop.resolve1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.resolve1.html",
"org.freedesktop.systemd1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.systemd1.html",
"org.freedesktop.timedate1(5)": "https://www.freedesktop.org/software/systemd/man/org.freedesktop.timedate1.html",
"os-release(5)": "https://www.freedesktop.org/software/systemd/man/os-release.html",
"pstore.conf(5)": "https://www.freedesktop.org/software/systemd/man/pstore.conf.html",
"pstore.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/pstore.conf.d.html",
"repart.d(5)": "https://www.freedesktop.org/software/systemd/man/repart.d.html",
"resolved.conf(5)": "https://www.freedesktop.org/software/systemd/man/resolved.conf.html",
"resolved.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/resolved.conf.d.html",
"sleep.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/sleep.conf.d.html",
"sysctl.d(5)": "https://www.freedesktop.org/software/systemd/man/sysctl.d.html",
"system.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/system.conf.d.html",
"systemd-sleep.conf(5)": "https://www.freedesktop.org/software/systemd/man/systemd-sleep.conf.html",
"systemd-system.conf(5)": "https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html",
"systemd-user-runtime-dir(5)": "https://www.freedesktop.org/software/systemd/man/systemd-user-runtime-dir.html",
"systemd-user.conf(5)": "https://www.freedesktop.org/software/systemd/man/systemd-user.conf.html",
"systemd.automount(5)": "https://www.freedesktop.org/software/systemd/man/systemd.automount.html",
"systemd.device(5)": "https://www.freedesktop.org/software/systemd/man/systemd.device.html",
"systemd.dnssd(5)": "https://www.freedesktop.org/software/systemd/man/systemd.dnssd.html",
"systemd.exec(5)": "https://www.freedesktop.org/software/systemd/man/systemd.exec.html",
"systemd.kill(5)": "https://www.freedesktop.org/software/systemd/man/systemd.kill.html",
"systemd.link(5)": "https://www.freedesktop.org/software/systemd/man/systemd.link.html",
"systemd.mount(5)": "https://www.freedesktop.org/software/systemd/man/systemd.mount.html",
"systemd.negative(5)": "https://www.freedesktop.org/software/systemd/man/systemd.negative.html",
"systemd.netdev(5)": "https://www.freedesktop.org/software/systemd/man/systemd.netdev.html",
"systemd.network(5)": "https://www.freedesktop.org/software/systemd/man/systemd.network.html",
"systemd.nspawn(5)": "https://www.freedesktop.org/software/systemd/man/systemd.nspawn.html",
"systemd.path(5)": "https://www.freedesktop.org/software/systemd/man/systemd.path.html",
"systemd.positive(5)": "https://www.freedesktop.org/software/systemd/man/systemd.positive.html",
"systemd.preset(5)": "https://www.freedesktop.org/software/systemd/man/systemd.preset.html",
"systemd.resource-control(5)": "https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html",
"systemd.scope(5)": "https://www.freedesktop.org/software/systemd/man/systemd.scope.html",
"systemd.service(5)": "https://www.freedesktop.org/software/systemd/man/systemd.service.html",
"systemd.slice(5)": "https://www.freedesktop.org/software/systemd/man/systemd.slice.html",
"systemd.socket(5)": "https://www.freedesktop.org/software/systemd/man/systemd.socket.html",
"systemd.swap(5)": "https://www.freedesktop.org/software/systemd/man/systemd.swap.html",
"systemd.target(5)": "https://www.freedesktop.org/software/systemd/man/systemd.target.html",
"systemd.timer(5)": "https://www.freedesktop.org/software/systemd/man/systemd.timer.html",
"systemd.unit(5)": "https://www.freedesktop.org/software/systemd/man/systemd.unit.html",
"sysupdate.d(5)": "https://www.freedesktop.org/software/systemd/man/sysupdate.d.html",
"sysusers.d(5)": "https://www.freedesktop.org/software/systemd/man/sysusers.d.html",
"systemd-system.conf(5)": "https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html",
"systemd-user.conf(5)": "https://www.freedesktop.org/software/systemd/man/systemd-user.conf.html",
"timesyncd.conf(5)": "https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html",
"timesyncd.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/timesyncd.conf.d.html",
"tmpfiles.d(5)": "https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html",
"udev.conf(5)": "https://www.freedesktop.org/software/systemd/man/udev.conf.html",
"user-runtime-dir@.service(5)": "https://www.freedesktop.org/software/systemd/man/user-runtime-dir@.service.html",
"user.conf.d(5)": "https://www.freedesktop.org/software/systemd/man/user.conf.d.html",
"user@.service(5)": "https://www.freedesktop.org/software/systemd/man/user@.service.html",
"vconsole.conf(5)": "https://www.freedesktop.org/software/systemd/man/vconsole.conf.html",
"veritytab(5)": "https://www.freedesktop.org/software/systemd/man/veritytab.html",
"bootup(7)": "https://www.freedesktop.org/software/systemd/man/bootup.html",
"daemon(7)": "https://www.freedesktop.org/software/systemd/man/daemon.html",
"file-hierarchy(7)": "https://www.freedesktop.org/software/systemd/man/file-hierarchy.html",
"hwdb(7)": "https://www.freedesktop.org/software/systemd/man/hwdb.html",
"kernel-command-line(7)": "https://www.freedesktop.org/software/systemd/man/kernel-command-line.html",
"linuxaa64.efi.stub(7)": "https://www.freedesktop.org/software/systemd/man/linuxaa64.efi.stub.html",
"linuxia32.efi.stub(7)": "https://www.freedesktop.org/software/systemd/man/linuxia32.efi.stub.html",
"linuxx64.efi.stub(7)": "https://www.freedesktop.org/software/systemd/man/linuxx64.efi.stub.html",
"sd-boot(7)": "https://www.freedesktop.org/software/systemd/man/sd-boot.html",
"sd-stub(7)": "https://www.freedesktop.org/software/systemd/man/sd-stub.html",
"smbios-type-11(7)": "https://www.freedesktop.org/software/systemd/man/smbios-type-11.html",
"systemd-boot(7)": "https://www.freedesktop.org/software/systemd/man/systemd-boot.html",
"systemd-stub(7)": "https://www.freedesktop.org/software/systemd/man/systemd-stub.html",
"systemd.directives(7)": "https://www.freedesktop.org/software/systemd/man/systemd.directives.html",
"systemd.environment-generator(7)": "https://www.freedesktop.org/software/systemd/man/systemd.environment-generator.html",
"systemd.generator(7)": "https://www.freedesktop.org/software/systemd/man/systemd.generator.html",
"systemd.image-policy(7)": "https://www.freedesktop.org/software/systemd/man/systemd.image-policy.html",
"systemd.index(7)": "https://www.freedesktop.org/software/systemd/man/systemd.index.html",
"systemd.journal-fields(7)": "https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html",
"systemd.net-naming-scheme(7)": "https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html",
"systemd.offline-updates(7)": "https://www.freedesktop.org/software/systemd/man/systemd.offline-updates.html",
"systemd.special(7)": "https://www.freedesktop.org/software/systemd/man/systemd.special.html",
"systemd.syntax(7)": "https://www.freedesktop.org/software/systemd/man/systemd.syntax.html",
"systemd.system-credentials(7)": "https://www.freedesktop.org/software/systemd/man/systemd.system-credentials.html",
"systemd.time(7)": "https://www.freedesktop.org/software/systemd/man/systemd.time.html",
"udev(7)": "https://www.freedesktop.org/software/systemd/man/udev.html",
"30-systemd-environment-d-generator(8)": "https://www.freedesktop.org/software/systemd/man/30-systemd-environment-d-generator.html",
"halt(8)": "https://www.freedesktop.org/software/systemd/man/halt.html",
"kernel-install(8)": "https://www.freedesktop.org/software/systemd/man/kernel-install.html",
"libnss_myhostname.so.2(8)": "https://www.freedesktop.org/software/systemd/man/libnss_myhostname.so.2.html",
"libnss_mymachines.so.2(8)": "https://www.freedesktop.org/software/systemd/man/libnss_mymachines.so.2.html",
"libnss_resolve.so.2(8)": "https://www.freedesktop.org/software/systemd/man/libnss_resolve.so.2.html",
"libnss_systemd.so.2(8)": "https://www.freedesktop.org/software/systemd/man/libnss_systemd.so.2.html",
"nss-myhostname(8)": "https://www.freedesktop.org/software/systemd/man/nss-myhostname.html",
"nss-mymachines(8)": "https://www.freedesktop.org/software/systemd/man/nss-mymachines.html",
"nss-resolve(8)": "https://www.freedesktop.org/software/systemd/man/nss-resolve.html",
"nss-systemd(8)": "https://www.freedesktop.org/software/systemd/man/nss-systemd.html",
"pam_systemd(8)": "https://www.freedesktop.org/software/systemd/man/pam_systemd.html",
"pam_systemd_home(8)": "https://www.freedesktop.org/software/systemd/man/pam_systemd_home.html",
"poweroff(8)": "https://www.freedesktop.org/software/systemd/man/poweroff.html",
"reboot(8)": "https://www.freedesktop.org/software/systemd/man/reboot.html",
"shutdown(8)": "https://www.freedesktop.org/software/systemd/man/shutdown.html",
"systemd-ask-password-console.path(8)": "https://www.freedesktop.org/software/systemd/man/systemd-ask-password-console.path.html",
"systemd-ask-password-console.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-ask-password-console.service.html",
"systemd-ask-password-wall.path(8)": "https://www.freedesktop.org/software/systemd/man/systemd-ask-password-wall.path.html",
"systemd-ask-password-wall.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-ask-password-wall.service.html",
"systemd-backlight(8)": "https://www.freedesktop.org/software/systemd/man/systemd-backlight.html",
"systemd-backlight@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-backlight@.service.html",
"systemd-battery-check(8)": "https://www.freedesktop.org/software/systemd/man/systemd-battery-check.html",
"systemd-binfmt(8)": "https://www.freedesktop.org/software/systemd/man/systemd-binfmt.html",
"systemd-bless-boot-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-bless-boot-generator.html",
"systemd-bless-boot(8)": "https://www.freedesktop.org/software/systemd/man/systemd-bless-boot.html",
"systemd-boot-check-no-failures(8)": "https://www.freedesktop.org/software/systemd/man/systemd-boot-check-no-failures.html",
"systemd-boot-random-seed.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-boot-random-seed.service.html",
"systemd-confext(8)": "https://www.freedesktop.org/software/systemd/man/systemd-confext.html",
"systemd-confext.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-confext.service.html",
"systemd-coredump(8)": "https://www.freedesktop.org/software/systemd/man/systemd-coredump.html",
"systemd-coredump.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-coredump.socket.html",
"systemd-coredump@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-coredump@.service.html",
"systemd-cryptsetup-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-cryptsetup-generator.html",
"systemd-cryptsetup(8)": "https://www.freedesktop.org/software/systemd/man/systemd-cryptsetup.html",
"systemd-cryptsetup@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-cryptsetup@.service.html",
"systemd-debug-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-debug-generator.html",
"systemd-environment-d-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-environment-d-generator.html",
"systemd-fsck-root.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-fsck-root.service.html",
"systemd-fsck-usr.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-fsck-usr.service.html",
"systemd-fsck(8)": "https://www.freedesktop.org/software/systemd/man/systemd-fsck.html",
"systemd-fsck@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-fsck@.service.html",
"systemd-fstab-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html",
"systemd-getty-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-getty-generator.html",
"systemd-gpt-auto-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html",
"systemd-growfs-root.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-growfs-root.service.html",
"systemd-growfs(8)": "https://www.freedesktop.org/software/systemd/man/systemd-growfs.html",
"systemd-growfs@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-growfs@.service.html",
"systemd-halt.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-halt.service.html",
"systemd-hibernate-resume-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-hibernate-resume-generator.html",
"systemd-hibernate-resume(8)": "https://www.freedesktop.org/software/systemd/man/systemd-hibernate-resume.html",
"systemd-hibernate.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-hibernate.service.html",
"systemd-homed(8)": "https://www.freedesktop.org/software/systemd/man/systemd-homed.html",
"systemd-hostnamed(8)": "https://www.freedesktop.org/software/systemd/man/systemd-hostnamed.html",
"systemd-hwdb(8)": "https://www.freedesktop.org/software/systemd/man/systemd-hwdb.html",
"systemd-hybrid-sleep.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-hybrid-sleep.service.html",
"systemd-importd(8)": "https://www.freedesktop.org/software/systemd/man/systemd-importd.html",
"systemd-integritysetup-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-integritysetup-generator.html",
"systemd-integritysetup(8)": "https://www.freedesktop.org/software/systemd/man/systemd-integritysetup.html",
"systemd-integritysetup@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-integritysetup@.service.html",
"systemd-journal-gatewayd(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.html",
"systemd-journal-gatewayd.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.socket.html",
"systemd-journal-remote(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.html",
"systemd-journal-remote.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.socket.html",
"systemd-journal-upload(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journal-upload.html",
"systemd-journald-audit.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journald-audit.socket.html",
"systemd-journald-dev-log.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journald-dev-log.socket.html",
"systemd-journald-varlink@.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journald-varlink@.socket.html",
"systemd-journald(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journald.html",
"systemd-journald.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journald.socket.html",
"systemd-journald@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journald@.service.html",
"systemd-journald@.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-journald@.socket.html",
"systemd-kexec.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-kexec.service.html",
"systemd-localed(8)": "https://www.freedesktop.org/software/systemd/man/systemd-localed.html",
"systemd-logind(8)": "https://www.freedesktop.org/software/systemd/man/systemd-logind.html",
"systemd-machine-id-commit.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-machine-id-commit.service.html",
"systemd-machined(8)": "https://www.freedesktop.org/software/systemd/man/systemd-machined.html",
"systemd-makefs(8)": "https://www.freedesktop.org/software/systemd/man/systemd-makefs.html",
"systemd-makefs@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-makefs@.service.html",
"systemd-mkswap@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-mkswap@.service.html",
"systemd-modules-load(8)": "https://www.freedesktop.org/software/systemd/man/systemd-modules-load.html",
"systemd-network-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-network-generator.html",
"systemd-networkd-wait-online(8)": "https://www.freedesktop.org/software/systemd/man/systemd-networkd-wait-online.html",
"systemd-networkd-wait-online@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-networkd-wait-online@.service.html",
"systemd-networkd(8)": "https://www.freedesktop.org/software/systemd/man/systemd-networkd.html",
"systemd-oomd(8)": "https://www.freedesktop.org/software/systemd/man/systemd-oomd.html",
"systemd-pcrfs-root.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-pcrfs-root.service.html",
"systemd-pcrfs@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-pcrfs@.service.html",
"systemd-pcrmachine.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-pcrmachine.service.html",
"systemd-pcrphase-initrd.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-pcrphase-initrd.service.html",
"systemd-pcrphase-sysinit.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-pcrphase-sysinit.service.html",
"systemd-pcrphase(8)": "https://www.freedesktop.org/software/systemd/man/systemd-pcrphase.html",
"systemd-portabled(8)": "https://www.freedesktop.org/software/systemd/man/systemd-portabled.html",
"systemd-poweroff.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-poweroff.service.html",
"systemd-pstore(8)": "https://www.freedesktop.org/software/systemd/man/systemd-pstore.html",
"systemd-random-seed(8)": "https://www.freedesktop.org/software/systemd/man/systemd-random-seed.html",
"systemd-reboot.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-reboot.service.html",
"systemd-remount-fs(8)": "https://www.freedesktop.org/software/systemd/man/systemd-remount-fs.html",
"systemd-repart(8)": "https://www.freedesktop.org/software/systemd/man/systemd-repart.html",
"systemd-repart.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-repart.service.html",
"systemd-resolved(8)": "https://www.freedesktop.org/software/systemd/man/systemd-resolved.html",
"systemd-rfkill(8)": "https://www.freedesktop.org/software/systemd/man/systemd-rfkill.html",
"systemd-rfkill.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-rfkill.socket.html",
"systemd-run-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-run-generator.html",
"systemd-shutdown(8)": "https://www.freedesktop.org/software/systemd/man/systemd-shutdown.html",
"systemd-sleep(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sleep.html",
"systemd-socket-proxyd(8)": "https://www.freedesktop.org/software/systemd/man/systemd-socket-proxyd.html",
"systemd-soft-reboot.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-soft-reboot.service.html",
"systemd-suspend-then-hibernate.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-suspend-then-hibernate.service.html",
"systemd-suspend.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-suspend.service.html",
"systemd-sysctl(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysctl.html",
"systemd-sysext(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysext.html",
"systemd-sysext.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysext.service.html",
"systemd-system-update-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-system-update-generator.html",
"systemd-sysupdate-reboot.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysupdate-reboot.service.html",
"systemd-sysupdate-reboot.timer(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysupdate-reboot.timer.html",
"systemd-sysupdate(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.html",
"systemd-sysupdate.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.service.html",
"systemd-sysupdate.timer(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.timer.html",
"systemd-sysusers(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysusers.html",
"systemd-sysusers.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-sysusers.service.html",
"systemd-time-wait-sync(8)": "https://www.freedesktop.org/software/systemd/man/systemd-time-wait-sync.html",
"systemd-timedated(8)": "https://www.freedesktop.org/software/systemd/man/systemd-timedated.html",
"systemd-timesyncd(8)": "https://www.freedesktop.org/software/systemd/man/systemd-timesyncd.html",
"systemd-tmpfiles-clean.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles-clean.service.html",
"systemd-tmpfiles-clean.timer(8)": "https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles-clean.timer.html",
"systemd-tmpfiles-setup-dev-early.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles-setup-dev-early.service.html",
"systemd-tmpfiles-setup-dev.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles-setup-dev.service.html",
"systemd-tmpfiles-setup.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles-setup.service.html",
"systemd-tmpfiles(8)": "https://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html",
"systemd-udev-settle.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-udev-settle.service.html",
"systemd-udevd-control.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-udevd-control.socket.html",
"systemd-udevd-kernel.socket(8)": "https://www.freedesktop.org/software/systemd/man/systemd-udevd-kernel.socket.html",
"systemd-udevd(8)": "https://www.freedesktop.org/software/systemd/man/systemd-udevd.html",
"systemd-update-done(8)": "https://www.freedesktop.org/software/systemd/man/systemd-update-done.html",
"systemd-update-utmp-runlevel.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-update-utmp-runlevel.service.html",
"systemd-update-utmp(8)": "https://www.freedesktop.org/software/systemd/man/systemd-update-utmp.html",
"systemd-user-sessions(8)": "https://www.freedesktop.org/software/systemd/man/systemd-user-sessions.html",
"systemd-userdbd(8)": "https://www.freedesktop.org/software/systemd/man/systemd-userdbd.html",
"systemd-vconsole-setup(8)": "https://www.freedesktop.org/software/systemd/man/systemd-vconsole-setup.html",
"systemd-veritysetup-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-veritysetup-generator.html",
"systemd-veritysetup(8)": "https://www.freedesktop.org/software/systemd/man/systemd-veritysetup.html",
"systemd-veritysetup@.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-veritysetup@.service.html",
"systemd-volatile-root(8)": "https://www.freedesktop.org/software/systemd/man/systemd-volatile-root.html",
"systemd-xdg-autostart-generator(8)": "https://www.freedesktop.org/software/systemd/man/systemd-xdg-autostart-generator.html",
"udevadm(8)": "https://www.freedesktop.org/software/systemd/man/udevadm.html"
"systemd-networkd-wait-online.service(8)": "https://www.freedesktop.org/software/systemd/man/systemd-networkd-wait-online.service.html"
}

View File

@@ -1,4 +1,4 @@
# Nixpkgs Reference Manual {#nixpkgs-manual}
# Nixpkgs Manual {#nixpkgs-manual}
## Version @MANUAL_VERSION@
```{=include=} chapters

View File

@@ -2,112 +2,40 @@
The Nix expressions to build the Linux kernel are in [`pkgs/os-specific/linux/kernel`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel).
The function [`pkgs.buildLinux`](https://github.com/NixOS/nixpkgs/blob/d77bda728d5041c1294a68fb25c79e2d161f62b9/pkgs/os-specific/linux/kernel/generic.nix) builds a kernel with [common configuration values](https://github.com/NixOS/nixpkgs/blob/d77bda728d5041c1294a68fb25c79e2d161f62b9/pkgs/os-specific/linux/kernel/common-config.nix).
This is the preferred option unless you have a very specific use case.
Most kernels packaged in Nixpkgs are built that way, and it will also generate kernels suitable for NixOS.
[`pkgs.linuxManualConfig`](https://github.com/NixOS/nixpkgs/blob/d77bda728d5041c1294a68fb25c79e2d161f62b9/pkgs/os-specific/linux/kernel/manual-config.nix) requires a complete configuration to be passed.
It has fewer additional features than `pkgs.buildLinux`, which provides common configuration values and exposes the `features` attribute, as explained below.
The function that builds the kernel has an argument `kernelPatches` which should be a list of `{name, patch, extraConfig}` attribute sets, where `name` is the name of the patch (which is included in the kernels `meta.description` attribute), `patch` is the patch itself (possibly compressed), and `extraConfig` (optional) is a string specifying extra options to be concatenated to the kernel configuration file (`.config`).
Both functions have an argument `kernelPatches` which should be a list of `{name, patch, extraConfig}` attribute sets, where `name` is the name of the patch (which is included in the kernels `meta.description` attribute), `patch` is the patch itself (possibly compressed), and `extraConfig` (optional) is a string specifying extra options to be concatenated to the kernel configuration file (`.config`).
The kernel derivation created with `pkgs.buildLinux` exports an attribute `features` specifying whether optional functionality is or isnt enabled. This is used in NixOS to implement kernel-specific behaviour.
If you are using a kernel packaged in Nixpkgs, you can customize it by overriding its arguments. For details on how each argument affects the generated kernel, refer to [the `pkgs.buildLinux` source code](https://github.com/NixOS/nixpkgs/blob/d77bda728d5041c1294a68fb25c79e2d161f62b9/pkgs/os-specific/linux/kernel/generic.nix).
:::{.example #ex-overriding-kernel-derivation}
# Overriding the kernel derivation
Assuming you are using the kernel from `pkgs.linux_latest`:
The kernel derivation exports an attribute `features` specifying whether optional functionality is or isnt enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the `iwlwifi` feature (i.e., has built-in support for Intel wireless chipsets), then NixOS doesnt have to build the external `iwlwifi` package:
```nix
pkgs.linux_latest.override {
ignoreConfigErrors = true;
autoModules = false;
kernelPreferBuiltin = true;
extraStructuredConfig = with lib.kernel; {
DEBUG_KERNEL = yes;
FRAME_POINTER = yes;
KGDB = yes;
KGDB_SERIAL_CONSOLE = yes;
DEBUG_INFO = yes;
};
}
modulesTree = [kernel]
++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
++ ...;
```
:::
How to add a new (major) version of the Linux kernel to Nixpkgs:
## Manual kernel configuration {#sec-manual-kernel-configuration}
1. Copy the old Nix expression (e.g., `linux-2.6.21.nix`) to the new one (e.g., `linux-2.6.22.nix`) and update it.
Sometimes it may not be desirable to use kernels built with `pkgs.buildLinux`, especially if most of the common configuration has to be altered or disabled to achieve a kernel as expected by the target use case.
An example of this is building a kernel for use in a VM or micro VM. You can use `pkgs.linuxManualConfig` in these cases. It requires the `src`, `version`, and `configfile` attributes to be specified.
2. Add the new kernel to the `kernels` attribute set in `linux-kernels.nix` (e.g., create an attribute `kernel_2_6_22`).
:::{.example #ex-using-linux-manual-config}
3. Now were going to update the kernel configuration. First unpack the kernel. Then for each supported platform (`i686`, `x86_64`, `uml`) do the following:
# Using `pkgs.linuxManualConfig` with a specific source, version, and config file
1. Make a copy from the old config (e.g., `config-2.6.21-i686-smp`) to the new one (e.g., `config-2.6.22-i686-smp`).
```nix
{ pkgs, ... }: {
version = "6.1.55";
src = pkgs.fetchurl {
url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${version}.tar.xz";
hash = "sha256:1h0mzx52q9pvdv7rhnvb8g68i7bnlc9rf8gy9qn4alsxq4g28zm8";
};
configfile = ./path_to_config_file;
linux = pkgs.linuxManualConfig {
inherit version src configfile;
allowImportFromDerivation = true;
};
}
```
2. Copy the config file for this platform (e.g., `config-2.6.22-i686-smp`) to `.config` in the kernel source tree.
If necessary, the version string can be slightly modified to explicitly mark it as a custom version. If you do so, ensure the `modDirVersion` attribute matches the source's version, otherwise the build will fail.
3. Run `make oldconfig ARCH={i386,x86_64,um}` and answer all questions. (For the uml configuration, also add `SHELL=bash`.) Make sure to keep the configuration consistent between platforms (i.e., dont enable some feature on `i686` and disable it on `x86_64`).
```nix
{ pkgs, ... }: {
version = "6.1.55-custom";
modDirVersion = "6.1.55";
src = pkgs.fetchurl {
url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${modDirVersion}.tar.xz";
hash = "sha256:1h0mzx52q9pvdv7rhnvb8g68i7bnlc9rf8gy9qn4alsxq4g28zm8";
};
configfile = ./path_to_config_file;
linux = pkgs.linuxManualConfig {
inherit version modDirVersion src configfile;
allowImportFromDerivation = true;
};
}
```
4. If needed, you can also run `make menuconfig`:
:::
```ShellSession
$ nix-env -f "<nixpkgs>" -iA ncurses
$ export NIX_CFLAGS_LINK=-lncurses
$ make menuconfig ARCH=arch
```
Additional attributes can be used with `linuxManualConfig` for further customisation. You're encouraged to read [the `pkgs.linuxManualConfig` source code](https://github.com/NixOS/nixpkgs/blob/d77bda728d5041c1294a68fb25c79e2d161f62b9/pkgs/os-specific/linux/kernel/manual-config.nix) to understand how to use them.
5. Copy `.config` over the new config file (e.g., `config-2.6.22-i686-smp`).
To edit the `.config` file for Linux X.Y from within Nix, proceed as follows:
4. Test building the kernel: `nix-build -A linuxKernel.kernels.kernel_2_6_22`. If it compiles, ship it! For extra credit, try booting NixOS with it.
```ShellSession
$ nix-shell '<nixpkgs>' -A linuxKernel.kernels.linux_X_Y.configEnv
$ unpackPhase
$ cd linux-*
$ make nconfig
```
## Developing kernel modules {#sec-linux-kernel-developing-modules}
When developing kernel modules it's often convenient to run the edit-compile-run loop as quickly as possible.
See the snippet below as an example.
:::{.example #ex-edit-compile-run-kernel-modules}
# Edit-compile-run loop when developing `mellanox` drivers
```ShellSession
$ nix-build '<nixpkgs>' -A linuxPackages.kernel.dev
$ nix-shell '<nixpkgs>' -A linuxPackages.kernel
$ unpackPhase
$ cd linux-*
$ make -C $dev/lib/modules/*/build M=$(pwd)/drivers/net/ethernet/mellanox modules
# insmod ./drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
```
:::
5. It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the `linuxPackagesFor` function in `linux-kernels.nix` (such as the NVIDIA drivers, AUFS, etc.). If the updated packages arent backwards compatible with older kernels, you may need to keep the older versions around.

View File

@@ -8,4 +8,4 @@ HTTP has a couple of different mechanisms for caching to prevent clients from ha
Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the [`ETag`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) response header. The value of the `ETag` header specifies some identifier for the particular content that the server is sending (e.g., a hash). When a client makes a second request for the same resource, it sends that value back in an `If-None-Match` header. If the ETag value is unchanged, then the server does not need to resend the content.
As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of `/nix/store`, the hash in the store path is used as the `ETag` header in the HTTP response, thus providing proper caching functionality. With NixOS 24.05 and later, the `ETag` additionally includes the response content length, to ensure files served with static compression do not share `ETag`s with their uncompressed version. This `ETag` functionality is enabled automatically; you do not need to do modify any configuration to get this behavior.
As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of `/nix/store`, the hash in the store path is used as the `ETag` header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.

View File

@@ -6,15 +6,11 @@ The Nix Packages collection (Nixpkgs) is a set of thousands of packages for the
Packages are available for several platforms, and can be used with the Nix
package manager on most GNU/Linux distributions as well as [NixOS](https://nixos.org/nixos).
This document is the user [_reference_](https://nix.dev/contributing/documentation/diataxis#reference) manual for Nixpkgs.
It describes entire public interface of Nixpkgs in a concise and orderly manner, and all relevant behaviors, with examples and cross-references.
To discover other kinds of documentation:
- [nix.dev](https://nix.dev/): Tutorials and guides for getting things done with Nix
- [NixOS **Option Search**](https://search.nixos.org/options) and reference documentation
- [Nixpkgs **Package Search**](https://search.nixos.org/packages)
- [**NixOS** manual](https://nixos.org/manual/nixos/stable/): Reference documentation for the NixOS Linux distribution
- [`CONTRIBUTING.md`](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md): Contributing to Nixpkgs, including this manual
This manual primarily describes how to write packages for the Nix Packages collection
(Nixpkgs). Thus its mainly for packagers and developers who want to add packages to
Nixpkgs. If you like to learn more about the Nix package manager and the Nix
expression language, then you are kindly referred to the [Nix manual](https://nixos.org/nix/manual/).
The NixOS distribution is documented in the [NixOS manual](https://nixos.org/nixos/manual/).
## Overview of Nixpkgs {#overview-of-nixpkgs}

View File

@@ -261,50 +261,14 @@ For more complex cases, like libraries linked into an executable which is then e
As described in the Nix manual, almost any `*.drv` store path in a derivations attribute set will induce a dependency on that derivation. `mkDerivation`, however, takes a few attributes intended to include all the dependencies of a package. This is done both for structure and consistency, but also so that certain other setup can take place. For example, certain dependencies need their bin directories added to the `PATH`. That is built-in, but other setup is done via a pluggable mechanism that works in conjunction with these dependency attributes. See [](#ssec-setup-hooks) for details.
Dependencies can be broken down along these axes: their host and target platforms relative to the new derivations. The platform distinctions are motivated by cross compilation; see [](#chap-cross) for exactly what each platform means. [^footnote-stdenv-ignored-build-platform] But even if one is not cross compiling, the platforms imply whether a dependency is needed at run-time or build-time.
Dependencies can be broken down along three axes: their host and target platforms relative to the new derivations, and whether they are propagated. The platform distinctions are motivated by cross compilation; see [](#chap-cross) for exactly what each platform means. [^footnote-stdenv-ignored-build-platform] But even if one is not cross compiling, the platforms imply whether or not the dependency is needed at run-time or build-time, a concept that makes perfect sense outside of cross compilation. By default, the run-time/build-time distinction is just a hint for mental clarity, but with `strictDeps` set it is mostly enforced even in the native case.
The extension of `PATH` with dependencies, alluded to above, proceeds according to the relative platforms alone. The process is carried out only for dependencies whose host platform matches the new derivations build platform i.e. dependencies which run on the platform where the new derivation will be built. [^footnote-stdenv-native-dependencies-in-path] For each dependency \<dep\> of those dependencies, `dep/bin`, if present, is added to the `PATH` environment variable.
### Dependency propagation {#ssec-stdenv-dependencies-propagated}
A dependency is said to be **propagated** when some of its other-transitive (non-immediate) downstream dependencies also need it as an immediate dependency.
[^footnote-stdenv-propagated-dependencies]
Propagated dependencies are made available to all downstream dependencies.
This is particularly useful for interpreted languages, where all transitive dependencies have to be present in the same environment.
Therefore it is used for the Python infrastructure in Nixpkgs.
:::{.note}
Propagated dependencies should be used with care, because they obscure the actual build inputs of dependent derivations and cause side effects through setup hooks.
This can lead to conflicting dependencies that cannot easily be resolved.
:::
:::{.example}
# A propagated dependency
```nix
with import <nixpkgs> {};
let
bar = stdenv.mkDerivation {
name = "bar";
dontUnpack = true;
# `hello` is also made available to dependents, such as `foo`
propagatedBuildInputs = [ hello ];
postInstall = "mkdir $out";
};
foo = stdenv.mkDerivation {
name = "foo";
dontUnpack = true;
# `bar` is a direct dependency, which implicitly includes the propagated `hello`
buildInputs = [ bar ];
# The `hello` binary is available!
postInstall = "hello > $out";
};
in
foo
```
:::
Dependency propagation takes cross compilation into account, meaning that dependencies that cross platform boundaries are properly adjusted.
To determine the exact rules for dependency propagation, we start by assigning to each dependency a couple of ternary numbers (`-1` for `build`, `0` for `host`, and `1` for `target`) representing its [dependency type](#possible-dependency-types), which captures how its host and target platforms are each "offset" from the depending derivations host and target platforms. The following table summarize the different combinations that can be obtained:
It is important to note that dependencies are not necessarily propagated as the same sort of dependency that they were before, but rather as the corresponding sort so that the platform rules still line up. To determine the exact rules for dependency propagation, we start by assigning to each dependency a couple of ternary numbers (`-1` for `build`, `0` for `host`, and `1` for `target`) representing its [dependency type](#possible-dependency-types), which captures how its host and target platforms are each "offset" from the depending derivations host and target platforms. The following table summarize the different combinations that can be obtained:
| `host → target` | attribute name | offset |
| ------------------- | ------------------- | -------- |
@@ -475,11 +439,11 @@ A script to be run by `maintainers/scripts/update.nix` when the package is match
```nix
passthru.updateScript = writeScript "update-zoom-us" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pcre2 common-updater-scripts
#!nix-shell -i bash -p curl pcre common-updater-scripts
set -eu -o pipefail
version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcre2grep -o1 '/(([0-9]\.?)+)/')"
version="$(curl -sI https://zoom.us/client/latest/zoom_x86_64.tar.xz | grep -Fi 'Location:' | pcregrep -o1 '/(([0-9]\.?)+)/')"
update-source-version zoom-us "$version"
'';
```
@@ -627,7 +591,7 @@ See also the section about [`passthru.tests`](#var-meta-tests).
`stdenv.mkDerivation` sets the Nix [derivation](https://nixos.org/manual/nix/stable/expressions/derivations.html#derivations)'s builder to a script that loads the stdenv `setup.sh` bash library and calls `genericBuild`. Most packaging functions rely on this default builder.
This generic command either invokes a script at *buildCommandPath*, or a *buildCommand*, or a number of *phases*. Package builds are split into phases to make it easier to override specific parts of the build (e.g., unpacking the sources or installing the binaries).
This generic command invokes a number of *phases*. Package builds are split into phases to make it easier to override specific parts of the build (e.g., unpacking the sources or installing the binaries).
Each phase can be overridden in its entirety either by setting the environment variable `namePhase` to a string containing some shell commands to be executed, or by redefining the shell function `namePhase`. The former is convenient to override a phase from the derivation, while the latter is convenient from a build script. However, typically one only wants to *add* some commands to a phase, e.g. by defining `postInstall` or `preFixup`, as skipping some of the default actions may have unexpected consequences. The default script for each phase is defined in the file `pkgs/stdenv/generic/setup.sh`.
@@ -867,7 +831,7 @@ Note that shell arrays cannot be passed through environment variables, so you ca
##### `buildFlags` / `buildFlagsArray` {#var-stdenv-buildFlags}
A list of strings passed as additional flags to `make`. Like `makeFlags` and `makeFlagsArray`, but only used by the build phase. Any build targets should be specified as part of the `buildFlags`.
A list of strings passed as additional flags to `make`. Like `makeFlags` and `makeFlagsArray`, but only used by the build phase.
##### `preBuild` {#var-stdenv-preBuild}
@@ -908,7 +872,7 @@ If unset, use `check` if it exists, otherwise `test`; if neither is found, do no
##### `checkFlags` / `checkFlagsArray` {#var-stdenv-checkFlags}
A list of strings passed as additional flags to `make`. Like `makeFlags` and `makeFlagsArray`, but only used by the check phase. Unlike with `buildFlags`, the `checkTarget` is automatically added to the `make` invocation in addition to any `checkFlags` specified.
A list of strings passed as additional flags to `make`. Like `makeFlags` and `makeFlagsArray`, but only used by the check phase.
##### `checkInputs` {#var-stdenv-checkInputs}
@@ -950,7 +914,7 @@ installTargets = "install-bin install-doc";
##### `installFlags` / `installFlagsArray` {#var-stdenv-installFlags}
A list of strings passed as additional flags to `make`. Like `makeFlags` and `makeFlagsArray`, but only used by the install phase. Unlike with `buildFlags`, the `installTargets` are automatically added to the `make` invocation in addition to any `installFlags` specified.
A list of strings passed as additional flags to `make`. Like `makeFlags` and `makeFlagsArray`, but only used by the install phase.
##### `preInstall` {#var-stdenv-preInstall}

View File

@@ -1,109 +0,0 @@
#! /usr/bin/env nix-shell
#! nix-shell -i "python3 -I" -p "python3.withPackages(p: with p; [ aiohttp rich structlog ])"
from argparse import ArgumentParser, Namespace
from collections import defaultdict
from collections.abc import Mapping, Sequence
from enum import IntEnum
from http import HTTPStatus
from pathlib import Path
from typing import Optional
import asyncio, json, logging
import aiohttp, structlog
from structlog.contextvars import bound_contextvars as log_context
LogLevel = IntEnum('LogLevel', {
lvl: getattr(logging, lvl)
for lvl in ('DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL')
})
LogLevel.__str__ = lambda self: self.name
EXPECTED_STATUS=frozenset((
HTTPStatus.OK, HTTPStatus.FOUND,
HTTPStatus.NOT_FOUND,
))
async def check(session: aiohttp.ClientSession, manpage: str, url: str) -> HTTPStatus:
with log_context(manpage=manpage, url=url):
logger.debug("Checking")
async with session.head(url) as resp:
st = HTTPStatus(resp.status)
match st:
case HTTPStatus.OK | HTTPStatus.FOUND:
logger.debug("OK!")
case HTTPStatus.NOT_FOUND:
logger.error("Broken link!")
case _ if st < 400:
logger.info("Unexpected code", status=st)
case _ if 400 <= st < 600:
logger.warn("Unexpected error", status=st)
return st
async def main(urls_path: Path) -> Mapping[HTTPStatus, int]:
logger.info(f"Parsing {urls_path}")
with urls_path.open() as urls_file:
urls = json.load(urls_file)
count: defaultdict[HTTPStatus, int] = defaultdict(lambda: 0)
logger.info(f"Checking URLs from {urls_path}")
async with aiohttp.ClientSession() as session:
for status in asyncio.as_completed([
check(session, manpage, url)
for manpage, url in urls.items()
]):
count[await status]+=1
ok = count[HTTPStatus.OK] + count[HTTPStatus.FOUND]
broken = count[HTTPStatus.NOT_FOUND]
unknown = sum(c for st, c in count.items() if st not in EXPECTED_STATUS)
logger.info(f"Done: {broken} broken links, "
f"{ok} correct links, and {unknown} unexpected status")
return count
def parse_args(args: Optional[Sequence[str]] = None) -> Namespace:
parser = ArgumentParser(
prog = 'check-manpage-urls',
description = 'Check the validity of the manpage URLs linked in the nixpkgs manual',
)
parser.add_argument(
'-l', '--log-level',
default = os.getenv('LOG_LEVEL', 'INFO'),
type = lambda s: LogLevel[s],
choices = list(LogLevel),
)
parser.add_argument(
'file',
type = Path,
nargs = '?',
)
return parser.parse_args(args)
if __name__ == "__main__":
import os, sys
args = parse_args()
structlog.configure(
wrapper_class=structlog.make_filtering_bound_logger(args.log_level),
)
logger = structlog.getLogger("check-manpage-urls.py")
urls_path = args.file
if urls_path is None:
REPO_ROOT = Path(__file__).parent.parent.parent.parent
logger.info(f"Assuming we are in a nixpkgs repo rooted at {REPO_ROOT}")
urls_path = REPO_ROOT / 'doc' / 'manpage-urls.json'
count = asyncio.run(main(urls_path))
sys.exit(0 if count[HTTPStatus.NOT_FOUND] == 0 else 1)

View File

@@ -9,8 +9,7 @@
nixpkgs = self;
};
libVersionInfoOverlay = import ./lib/flake-version-info.nix self;
lib = (import ./lib).extend libVersionInfoOverlay;
lib = import ./lib;
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
in
@@ -21,38 +20,22 @@
nixosSystem = args:
import ./nixos/lib/eval-config.nix (
{
lib = final;
args // {
modules = args.modules ++ [{
system.nixos.versionSuffix =
".${final.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}.${self.shortRev or "dirty"}";
system.nixos.revision = final.mkIf (self ? rev) self.rev;
}];
} // lib.optionalAttrs (! args?system) {
# Allow system to be set modularly in nixpkgs.system.
# We set it to null, to remove the "legacy" entrypoint's
# non-hermetic default.
system = null;
} // args
}
);
});
checks.x86_64-linux = {
tarball = jobs.tarball;
# Test that ensures that the nixosSystem function can accept a lib argument
# Note: prefer not to extend or modify `lib`, especially if you want to share reusable modules
# alternatives include: `import` a file, or put a custom library in an option or in `_module.args.<libname>`
nixosSystemAcceptsLib = (self.lib.nixosSystem {
lib = self.lib.extend (final: prev: {
ifThisFunctionIsMissingTheTestFails = final.id;
});
modules = [
./nixos/modules/profiles/minimal.nix
({ lib, ... }: lib.ifThisFunctionIsMissingTheTestFails {
# Define a minimal config without eval warnings
nixpkgs.hostPlatform = "x86_64-linux";
boot.loader.grub.enable = false;
fileSystems."/".device = "nodev";
# See https://search.nixos.org/options?show=system.stateVersion&query=stateversion
system.stateVersion = lib.versions.majorMinor lib.version; # DON'T do this in real configs!
})
];
}).config.system.build.toplevel;
};
checks.x86_64-linux.tarball = jobs.tarball;
htmlDocs = {
nixpkgsManual = jobs.manual;
@@ -70,11 +53,7 @@
# attribute it displays `omitted` instead of evaluating all packages,
# which keeps `nix flake show` on Nixpkgs reasonably fast, though less
# information rich.
legacyPackages = forAllSystems (system:
(import ./. { inherit system; }).extend (final: prev: {
lib = prev.lib.extend libVersionInfoOverlay;
})
);
legacyPackages = forAllSystems (system: import ./. { inherit system; });
nixosModules = {
notDetected = ./nixos/modules/installer/scan/not-detected.nix;

View File

@@ -36,76 +36,13 @@ The [module system](https://nixos.org/manual/nixpkgs/#module-system) spans multi
- [`options.nix`](options.nix): `lib.options` for anything relating to option definitions
- [`types.nix`](types.nix): `lib.types` for module system types
## PR Guidelines
Follow these guidelines for proposing a change to the interface of `lib`.
### Provide a Motivation
Clearly describe why the change is necessary and its use cases.
Make sure that the change benefits the user more than the added mental effort of looking it up and keeping track of its definition.
If the same can reasonably be done with the existing interface,
consider just updating the documentation with more examples and links.
This is also known as the [Fairbairn Threshold](https://wiki.haskell.org/Fairbairn_threshold).
Through this principle we avoid the human cost of duplicated functionality in an overly large library.
### Make one PR for each change
Don't have multiple changes in one PR, instead split it up into multiple ones.
This keeps the conversation focused and has a higher chance of getting merged.
### Name the interface appropriately
When introducing new names to the interface, such as new function, or new function attributes,
make sure to name it appropriately.
Names should be self-explanatory and consistent with the rest of `lib`.
If there's no obvious best name, include the alternatives you considered.
### Write documentation
Update the [reference documentation](#reference-documentation) to reflect the change.
Be generous with links to related functionality.
### Write tests
Add good test coverage for the change, including:
- Tests for edge cases, such as empty values or lists.
- Tests for tricky inputs, such as a string with string context or a path that doesn't exist.
- Test all code paths, such as `if-then-else` branches and returned attributes.
- If the tests for the sub-library are written in bash,
test messages of custom errors, such as `throw` or `abortMsg`,
At the time this is only not necessary for sub-libraries tested with [`tests/misc.nix`](./tests/misc.nix).
See [running tests](#running-tests) for more details on the test suites.
### Write tidy code
Name variables well, even if they're internal.
The code should be as self-explanatory as possible.
Be generous with code comments when appropriate.
As a baseline, follow the [Nixpkgs code conventions](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#code-conventions).
### Write efficient code
Nix generally does not have free abstractions.
Be aware that seemingly straightforward changes can cause more allocations and a decrease in performance.
That said, don't optimise prematurely, especially in new code.
## Reference documentation
Reference documentation for library functions is written above each function as a multi-line comment.
These comments are processed using [nixdoc](https://github.com/nix-community/nixdoc) and [rendered in the Nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/#chap-functions).
The nixdoc README describes the [comment format](https://github.com/nix-community/nixdoc#comment-format).
See [doc/README.md](../doc/README.md) for how to build the manual.
See the [chapter on contributing to the Nixpkgs manual](https://nixos.org/manual/nixpkgs/#chap-contributing) for how to build the manual.
## Running tests

View File

@@ -14,14 +14,6 @@ rec {
/* Return an attribute from nested attribute sets.
Nix has an [attribute selection operator `. or`](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:
```nix
(x.a.b or 6) == attrByPath ["a" "b"] 6 x
# and
(x.${f p}."example.com" or 6) == attrByPath [ (f p) "example.com" ] 6 x
```
Example:
x = { a = { b = 3; }; }
# ["a" "b"] is equivalent to x.a.b
@@ -42,44 +34,21 @@ rec {
default:
# The nested attribute set to select values from
set:
let
lenAttrPath = length attrPath;
attrByPath' = n: s: (
if n == lenAttrPath then s
else (
let
attr = elemAt attrPath n;
in
if s ? ${attr} then attrByPath' (n + 1) s.${attr}
else default
)
);
let attr = head attrPath;
in
attrByPath' 0 set;
if attrPath == [] then set
else if set ? ${attr}
then attrByPath (tail attrPath) default set.${attr}
else default;
/* Return if an attribute from nested attribute set exists.
Nix has a [has attribute operator `?`](https://nixos.org/manual/nix/stable/language/operators#has-attribute), which is sufficient for such queries, as long as the number of attributes is static. For example:
```nix
(x?a.b) == hasAttryByPath ["a" "b"] x
# and
(x?${f p}."example.com") == hasAttryByPath [ (f p) "example.com" ] x
```
**Laws**:
1. ```nix
hasAttrByPath [] x == true
```
Example:
x = { a = { b = 3; }; }
hasAttrByPath ["a" "b"] x
=> true
hasAttrByPath ["z" "z"] x
=> false
hasAttrByPath [] (throw "no need")
=> true
Type:
hasAttrByPath :: [String] -> AttrSet -> Bool
@@ -89,84 +58,13 @@ rec {
attrPath:
# The nested attribute set to check
e:
let
lenAttrPath = length attrPath;
hasAttrByPath' = n: s: (
n == lenAttrPath || (
let
attr = elemAt attrPath n;
in
if s ? ${attr} then hasAttrByPath' (n + 1) s.${attr}
else false
)
);
let attr = head attrPath;
in
hasAttrByPath' 0 e;
if attrPath == [] then true
else if e ? ${attr}
then hasAttrByPath (tail attrPath) e.${attr}
else false;
/*
Return the longest prefix of an attribute path that refers to an existing attribute in a nesting of attribute sets.
Can be used after [`mapAttrsRecursiveCond`](#function-library-lib.attrsets.mapAttrsRecursiveCond) to apply a condition,
although this will evaluate the predicate function on sibling attributes as well.
Note that the empty attribute path is valid for all values, so this function only throws an exception if any of its inputs does.
**Laws**:
1. ```nix
attrsets.longestValidPathPrefix [] x == []
```
2. ```nix
hasAttrByPath (attrsets.longestValidPathPrefix p x) x == true
```
Example:
x = { a = { b = 3; }; }
attrsets.longestValidPathPrefix ["a" "b" "c"] x
=> ["a" "b"]
attrsets.longestValidPathPrefix ["a"] x
=> ["a"]
attrsets.longestValidPathPrefix ["z" "z"] x
=> []
attrsets.longestValidPathPrefix ["z" "z"] (throw "no need")
=> []
Type:
attrsets.longestValidPathPrefix :: [String] -> Value -> [String]
*/
longestValidPathPrefix =
# A list of strings representing the longest possible path that may be returned.
attrPath:
# The nested attribute set to check.
v:
let
lenAttrPath = length attrPath;
getPrefixForSetAtIndex =
# The nested attribute set to check, if it is an attribute set, which
# is not a given.
remainingSet:
# The index of the attribute we're about to check, as well as
# the length of the prefix we've already checked.
remainingPathIndex:
if remainingPathIndex == lenAttrPath then
# All previously checked attributes exist, and no attr names left,
# so we return the whole path.
attrPath
else
let
attr = elemAt attrPath remainingPathIndex;
in
if remainingSet ? ${attr} then
getPrefixForSetAtIndex
remainingSet.${attr} # advance from the set to the attribute value
(remainingPathIndex + 1) # advance the path
else
# The attribute doesn't exist, so we return the prefix up to the
# previously checked length.
take remainingPathIndex attrPath;
in
getPrefixForSetAtIndex v 0;
/* Create a new attribute set with `value` set at the nested attribute location specified in `attrPath`.
@@ -193,14 +91,6 @@ rec {
/* Like `attrByPath`, but without a default value. If it doesn't find the
path it will throw an error.
Nix has an [attribute selection operator](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:
```nix
x.a.b == getAttrByPath ["a" "b"] x
# and
x.${f p}."example.com" == getAttrByPath [ (f p) "example.com" ] x
```
Example:
x = { a = { b = 3; }; }
getAttrFromPath ["a" "b"] x
@@ -993,10 +883,7 @@ rec {
recursiveUpdateUntil (path: lhs: rhs: !(isAttrs lhs && isAttrs rhs)) lhs rhs;
/*
Recurse into every attribute set of the first argument and check that:
- Each attribute path also exists in the second argument.
- If the attribute's value is not a nested attribute set, it must have the same value in the right argument.
/* Returns true if the pattern is contained in the set. False otherwise.
Example:
matchAttrs { cpu = {}; } { cpu = { bits = 64; }; }
@@ -1008,24 +895,16 @@ rec {
matchAttrs =
# Attribute set structure to match
pattern:
# Attribute set to check
# Attribute set to find patterns in
attrs:
assert isAttrs pattern;
all
( # Compare equality between `pattern` & `attrs`.
attr:
# Missing attr, not equal.
attrs ? ${attr} && (
let
lhs = pattern.${attr};
rhs = attrs.${attr};
in
# If attrset check recursively
if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs
else lhs == rhs
)
)
(attrNames pattern);
all id (attrValues (zipAttrsWithNames (attrNames pattern) (n: values:
let pat = head values; val = elemAt values 1; in
if length values == 1 then false
else if isAttrs pat then isAttrs val && matchAttrs pat val
else pat == val
) [pattern attrs]));
/* Override only the attributes that are already present in the old set
useful for deep-overriding.

View File

@@ -1,17 +1,5 @@
{ lib }:
let
inherit (builtins)
intersectAttrs;
inherit (lib)
functionArgs isFunction mirrorFunctionArgs isAttrs setFunctionArgs
optionalAttrs attrNames filter elemAt concatStringsSep sortOn take length
filterAttrs optionalString flip pathIsDirectory head pipe isDerivation listToAttrs
mapAttrs seq flatten deepSeq warnIf isInOldestRelease extends
;
inherit (lib.strings) levenshtein levenshteinAtMost;
in
rec {
@@ -55,15 +43,15 @@ rec {
overrideDerivation = drv: f:
let
newDrv = derivation (drv.drvAttrs // (f drv));
in flip (extendDerivation (seq drv.drvPath true)) newDrv (
in lib.flip (extendDerivation (builtins.seq drv.drvPath true)) newDrv (
{ meta = drv.meta or {};
passthru = if drv ? passthru then drv.passthru else {};
}
//
(drv.passthru or {})
//
optionalAttrs (drv ? __spliced) {
__spliced = {} // (mapAttrs (_: sDrv: overrideDerivation sDrv f) drv.__spliced);
lib.optionalAttrs (drv ? __spliced) {
__spliced = {} // (lib.mapAttrs (_: sDrv: overrideDerivation sDrv f) drv.__spliced);
});
@@ -91,30 +79,30 @@ rec {
makeOverridable = f:
let
# Creates a functor with the same arguments as f
mirrorArgs = mirrorFunctionArgs f;
mirrorArgs = lib.mirrorFunctionArgs f;
in
mirrorArgs (origArgs:
let
result = f origArgs;
# Changes the original arguments with (potentially a function that returns) a set of new attributes
overrideWith = newArgs: origArgs // (if isFunction newArgs then newArgs origArgs else newArgs);
overrideWith = newArgs: origArgs // (if lib.isFunction newArgs then newArgs origArgs else newArgs);
# Re-call the function but with different arguments
overrideArgs = mirrorArgs (newArgs: makeOverridable f (overrideWith newArgs));
# Change the result of the function call by applying g to it
overrideResult = g: makeOverridable (mirrorArgs (args: g (f args))) origArgs;
in
if isAttrs result then
if builtins.isAttrs result then
result // {
override = overrideArgs;
overrideDerivation = fdrv: overrideResult (x: overrideDerivation x fdrv);
${if result ? overrideAttrs then "overrideAttrs" else null} = fdrv:
overrideResult (x: x.overrideAttrs fdrv);
}
else if isFunction result then
else if lib.isFunction result then
# Transform the result into a functor while propagating its arguments
setFunctionArgs result (functionArgs result) // {
lib.setFunctionArgs result (lib.functionArgs result) // {
override = overrideArgs;
}
else result);
@@ -152,39 +140,39 @@ rec {
*/
callPackageWith = autoArgs: fn: args:
let
f = if isFunction fn then fn else import fn;
fargs = functionArgs f;
f = if lib.isFunction fn then fn else import fn;
fargs = lib.functionArgs f;
# All arguments that will be passed to the function
# This includes automatic ones and ones passed explicitly
allArgs = intersectAttrs fargs autoArgs // args;
allArgs = builtins.intersectAttrs fargs autoArgs // args;
# a list of argument names that the function requires, but
# wouldn't be passed to it
missingArgs =
missingArgs = lib.attrNames
# Filter out arguments that have a default value
(filterAttrs (name: value: ! value)
(lib.filterAttrs (name: value: ! value)
# Filter out arguments that would be passed
(removeAttrs fargs (attrNames allArgs)));
(removeAttrs fargs (lib.attrNames allArgs)));
# Get a list of suggested argument names for a given missing one
getSuggestions = arg: pipe (autoArgs // args) [
attrNames
getSuggestions = arg: lib.pipe (autoArgs // args) [
lib.attrNames
# Only use ones that are at most 2 edits away. While mork would work,
# levenshteinAtMost is only fast for 2 or less.
(filter (levenshteinAtMost 2 arg))
(lib.filter (lib.strings.levenshteinAtMost 2 arg))
# Put strings with shorter distance first
(sortOn (levenshtein arg))
(lib.sort (x: y: lib.strings.levenshtein x arg < lib.strings.levenshtein y arg))
# Only take the first couple results
(take 3)
(lib.take 3)
# Quote all entries
(map (x: "\"" + x + "\""))
];
prettySuggestions = suggestions:
if suggestions == [] then ""
else if length suggestions == 1 then ", did you mean ${elemAt suggestions 0}?"
else ", did you mean ${concatStringsSep ", " (lib.init suggestions)} or ${lib.last suggestions}?";
else if lib.length suggestions == 1 then ", did you mean ${lib.elemAt suggestions 0}?"
else ", did you mean ${lib.concatStringsSep ", " (lib.init suggestions)} or ${lib.last suggestions}?";
errorForArg = arg:
let
@@ -192,22 +180,16 @@ rec {
# loc' can be removed once lib/minver.nix is >2.3.4, since that includes
# https://github.com/NixOS/nix/pull/3468 which makes loc be non-null
loc' = if loc != null then loc.file + ":" + toString loc.line
else if ! isFunction fn then
toString fn + optionalString (pathIsDirectory fn) "/default.nix"
else if ! lib.isFunction fn then
toString fn + lib.optionalString (lib.sources.pathIsDirectory fn) "/default.nix"
else "<unknown location>";
in "Function called without required argument \"${arg}\" at "
+ "${loc'}${prettySuggestions (getSuggestions arg)}";
# Only show the error for the first missing argument
error = errorForArg (head (attrNames missingArgs));
error = errorForArg (lib.head missingArgs);
in if missingArgs == {}
then makeOverridable f allArgs
# This needs to be an abort so it can't be caught with `builtins.tryEval`,
# which is used by nix-env and ofborg to filter out packages that don't evaluate.
# This way we're forced to fix such errors in Nixpkgs,
# which is especially relevant with allowAliases = false
else abort "lib.customisation.callPackageWith: ${error}";
in if missingArgs == [] then makeOverridable f allArgs else abort error;
/* Like callPackage, but for a function that returns an attribute
@@ -219,17 +201,17 @@ rec {
*/
callPackagesWith = autoArgs: fn: args:
let
f = if isFunction fn then fn else import fn;
auto = intersectAttrs (functionArgs f) autoArgs;
f = if lib.isFunction fn then fn else import fn;
auto = builtins.intersectAttrs (lib.functionArgs f) autoArgs;
origArgs = auto // args;
pkgs = f origArgs;
mkAttrOverridable = name: _: makeOverridable (newArgs: (f newArgs).${name}) origArgs;
in
if isDerivation pkgs then throw
if lib.isDerivation pkgs then throw
("function `callPackages` was called on a *single* derivation "
+ ''"${pkgs.name or "<unknown-name>"}";''
+ " did you mean to use `callPackage` instead?")
else mapAttrs mkAttrOverridable pkgs;
else lib.mapAttrs mkAttrOverridable pkgs;
/* Add attributes to each output of a derivation without changing
@@ -242,7 +224,7 @@ rec {
let
outputs = drv.outputs or [ "out" ];
commonAttrs = drv // (listToAttrs outputsList) //
commonAttrs = drv // (builtins.listToAttrs outputsList) //
({ all = map (x: x.value) outputsList; }) // passthru;
outputToAttrListElement = outputName:
@@ -256,7 +238,7 @@ rec {
# TODO: give the derivation control over the outputs.
# `overrideAttrs` may not be the only attribute that needs
# updating when switching outputs.
optionalAttrs (passthru?overrideAttrs) {
lib.optionalAttrs (passthru?overrideAttrs) {
# TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing.
overrideAttrs = f: (passthru.overrideAttrs f).${outputName};
};
@@ -282,11 +264,11 @@ rec {
commonAttrs =
{ inherit (drv) name system meta; inherit outputs; }
// optionalAttrs (drv._hydraAggregate or false) {
// lib.optionalAttrs (drv._hydraAggregate or false) {
_hydraAggregate = true;
constituents = map hydraJob (flatten drv.constituents);
constituents = map hydraJob (lib.flatten drv.constituents);
}
// (listToAttrs outputsList);
// (lib.listToAttrs outputsList);
makeOutput = outputName:
let output = drv.${outputName}; in
@@ -301,9 +283,9 @@ rec {
outputsList = map makeOutput outputs;
drv' = (head outputsList).value;
drv' = (lib.head outputsList).value;
in if drv == null then null else
deepSeq drv' drv';
lib.deepSeq drv' drv';
/* Make a set of packages with a common scope. All packages called
with the provided `callPackage` will be evaluated with the same
@@ -322,11 +304,11 @@ rec {
let self = f self // {
newScope = scope: newScope (self // scope);
callPackage = self.newScope {};
overrideScope = g: makeScope newScope (extends g f);
overrideScope = g: makeScope newScope (lib.fixedPoints.extends g f);
# Remove after 24.11 is released.
overrideScope' = g: warnIf (isInOldestRelease 2311)
overrideScope' = g: lib.warnIf (lib.isInOldestRelease 2311)
"`overrideScope'` (from `lib.makeScope`) has been renamed to `overrideScope`."
(makeScope newScope (extends g f));
(makeScope newScope (lib.fixedPoints.extends g f));
packages = f;
};
in self;
@@ -402,7 +384,7 @@ rec {
overrideScope = g: (makeScopeWithSplicing'
{ inherit splicePackages newScope; }
{ inherit otherSplices keep extra;
f = extends g f;
f = lib.fixedPoints.extends g f;
});
packages = f;
};

View File

@@ -91,7 +91,7 @@ let
inherit (self.lists) singleton forEach foldr fold foldl foldl' imap0 imap1
concatMap flatten remove findSingle findFirst any all count
optional optionals toList range replicate partition zipListsWith zipLists
reverseList listDfs toposort sort sortOn naturalSort compareLists take
reverseList listDfs toposort sort naturalSort compareLists take
drop sublist last init crossLists unique allUnique intersectLists
subtractLists mutuallyExclusive groupBy groupBy';
inherit (self.strings) concatStrings concatMapStrings concatImapStrings
@@ -120,8 +120,7 @@ let
inherit (self.meta) addMetaAttrs dontDistribute setName updateName
appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio
hiPrioSet getLicenseFromSpdxId getExe getExe';
inherit (self.filesystem) pathType pathIsDirectory pathIsRegularFile
packagesFromDirectoryRecursive;
inherit (self.filesystem) pathType pathIsDirectory pathIsRegularFile;
inherit (self.sources) cleanSourceFilter
cleanSource sourceByRegex sourceFilesBySuffices
commitIdFromGitRepo cleanSourceWith pathHasContext

View File

@@ -107,7 +107,7 @@ let
_printFileset
_intersection
_difference
_fromFetchGit
_mirrorStorePath
_fetchGitSubmodulesMinver
_emptyWithoutBase
;
@@ -148,6 +148,7 @@ let
inherit (lib.trivial)
isFunction
pipe
inPureEvalMode
;
in {
@@ -753,22 +754,23 @@ in {
This directory must contain a `.git` file or subdirectory.
*/
path:
_fromFetchGit
"gitTracked"
"argument"
path
{};
# See the gitTrackedWith implementation for more explanatory comments
let
fetchResult = builtins.fetchGit path;
in
if inPureEvalMode then
throw "lib.fileset.gitTracked: This function is currently not supported in pure evaluation mode, since it currently relies on `builtins.fetchGit`. See https://github.com/NixOS/nix/issues/9292."
else if ! isPath path then
throw "lib.fileset.gitTracked: Expected the argument to be a path, but it's a ${typeOf path} instead."
else if ! pathExists (path + "/.git") then
throw "lib.fileset.gitTracked: Expected the argument (${toString path}) to point to a local working tree of a Git repository, but it's not."
else
_mirrorStorePath path fetchResult.outPath;
/*
Create a file set containing all [Git-tracked files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) in a repository.
The first argument allows configuration with an attribute set,
while the second argument is the path to the Git working tree.
`gitTrackedWith` does not perform any filtering when the path is a [Nix store path](https://nixos.org/manual/nix/stable/store/store-path.html#store-path) and not a repository.
In this way, it accommodates the use case where the expression that makes the `gitTracked` call does not reside in an actual git repository anymore,
and has presumably already been fetched in a way that excludes untracked files.
Fetchers with such equivalent behavior include `builtins.fetchGit`, `builtins.fetchTree` (experimental), and `pkgs.fetchgit` when used without `leaveDotGit`.
If you don't need the configuration,
you can use [`gitTracked`](#function-library-lib.fileset.gitTracked) instead.
@@ -805,19 +807,35 @@ in {
This directory must contain a `.git` file or subdirectory.
*/
path:
if ! isBool recurseSubmodules then
throw "lib.fileset.gitTrackedWith: Expected the attribute `recurseSubmodules` of the first argument to be a boolean, but it's a ${typeOf recurseSubmodules} instead."
else if recurseSubmodules && versionOlder nixVersion _fetchGitSubmodulesMinver then
throw "lib.fileset.gitTrackedWith: Setting the attribute `recurseSubmodules` to `true` is only supported for Nix version ${_fetchGitSubmodulesMinver} and after, but Nix version ${nixVersion} is used."
else
_fromFetchGit
"gitTrackedWith"
"second argument"
path
let
# This imports the files unnecessarily, which currently can't be avoided
# because `builtins.fetchGit` is the only function exposing which files are tracked by Git.
# With the [lazy trees PR](https://github.com/NixOS/nix/pull/6530),
# the unnecessarily import could be avoided.
# However a simpler alternative still would be [a builtins.gitLsFiles](https://github.com/NixOS/nix/issues/2944).
fetchResult = builtins.fetchGit {
url = path;
# This is the only `fetchGit` parameter that makes sense in this context.
# We can't just pass `submodules = recurseSubmodules` here because
# this would fail for Nix versions that don't support `submodules`.
(lib.optionalAttrs recurseSubmodules {
submodules = true;
});
${if recurseSubmodules then "submodules" else null} = true;
};
in
if inPureEvalMode then
throw "lib.fileset.gitTrackedWith: This function is currently not supported in pure evaluation mode, since it currently relies on `builtins.fetchGit`. See https://github.com/NixOS/nix/issues/9292."
else if ! isBool recurseSubmodules then
throw "lib.fileset.gitTrackedWith: Expected the attribute `recurseSubmodules` of the first argument to be a boolean, but it's a ${typeOf recurseSubmodules} instead."
else if recurseSubmodules && versionOlder nixVersion _fetchGitSubmodulesMinver then
throw "lib.fileset.gitTrackedWith: Setting the attribute `recurseSubmodules` to `true` is only supported for Nix version ${_fetchGitSubmodulesMinver} and after, but Nix version ${nixVersion} is used."
else if ! isPath path then
throw "lib.fileset.gitTrackedWith: Expected the second argument to be a path, but it's a ${typeOf path} instead."
# We can identify local working directories by checking for .git,
# see https://git-scm.com/docs/gitrepository-layout#_description.
# Note that `builtins.fetchGit` _does_ work for bare repositories (where there's no `.git`),
# even though `git ls-files` wouldn't return any files in that case.
else if ! pathExists (path + "/.git") then
throw "lib.fileset.gitTrackedWith: Expected the second argument (${toString path}) to point to a local working tree of a Git repository, but it's not."
else
_mirrorStorePath path fetchResult.outPath;
}

View File

@@ -10,7 +10,6 @@ let
split
trace
typeOf
fetchGit
;
inherit (lib.attrsets)
@@ -41,8 +40,6 @@ let
inherit (lib.path)
append
splitRoot
hasStorePathPrefix
splitStorePath
;
inherit (lib.path.subpath)
@@ -58,9 +55,6 @@ let
hasSuffix
;
inherit (lib.trivial)
inPureEvalMode
;
in
# Rare case of justified usage of rec:
# - This file is internal, so the return value doesn't matter, no need to make things overridable
@@ -858,61 +852,4 @@ rec {
in
_create localPath
(recurse storePath);
# Create a file set from the files included in the result of a fetchGit call
# Type: String -> String -> Path -> Attrs -> FileSet
_fromFetchGit = function: argument: path: extraFetchGitAttrs:
let
# The code path for when isStorePath is true
tryStorePath =
if pathExists (path + "/.git") then
# If there is a `.git` directory in the path,
# it means that the path was imported unfiltered into the Nix store.
# This function should throw in such a case, because
# - `fetchGit` doesn't generally work with `.git` directories in store paths
# - Importing the entire path could include Git-tracked files
throw ''
lib.fileset.${function}: The ${argument} (${toString path}) is a store path within a working tree of a Git repository.
This indicates that a source directory was imported into the store using a method such as `import "''${./.}"` or `path:.`.
This function currently does not support such a use case, since it currently relies on `builtins.fetchGit`.
You could make this work by using a fetcher such as `fetchGit` instead of copying the whole repository.
If you can't avoid copying the repo to the store, see https://github.com/NixOS/nix/issues/9292.''
else
# Otherwise we're going to assume that the path was a Git directory originally,
# but it was fetched using a method that already removed files not tracked by Git,
# such as `builtins.fetchGit`, `pkgs.fetchgit` or others.
# So we can just import the path in its entirety.
_singleton path;
# The code path for when isStorePath is false
tryFetchGit =
let
# This imports the files unnecessarily, which currently can't be avoided
# because `builtins.fetchGit` is the only function exposing which files are tracked by Git.
# With the [lazy trees PR](https://github.com/NixOS/nix/pull/6530),
# the unnecessarily import could be avoided.
# However a simpler alternative still would be [a builtins.gitLsFiles](https://github.com/NixOS/nix/issues/2944).
fetchResult = fetchGit ({
url = path;
} // extraFetchGitAttrs);
in
# We can identify local working directories by checking for .git,
# see https://git-scm.com/docs/gitrepository-layout#_description.
# Note that `builtins.fetchGit` _does_ work for bare repositories (where there's no `.git`),
# even though `git ls-files` wouldn't return any files in that case.
if ! pathExists (path + "/.git") then
throw "lib.fileset.${function}: Expected the ${argument} (${toString path}) to point to a local working tree of a Git repository, but it's not."
else
_mirrorStorePath path fetchResult.outPath;
in
if ! isPath path then
throw "lib.fileset.${function}: Expected the ${argument} to be a path, but it's a ${typeOf path} instead."
else if pathType path != "directory" then
throw "lib.fileset.${function}: Expected the ${argument} (${toString path}) to be a directory, but it's a file instead."
else if hasStorePathPrefix path then
tryStorePath
else
tryFetchGit;
}

View File

@@ -43,17 +43,29 @@ crudeUnquoteJSON() {
cut -d \" -f2
}
prefixExpression='
let
lib = import <nixpkgs/lib>;
internal = import <nixpkgs/lib/fileset/internal.nix> {
inherit lib;
};
in
with lib;
with internal;
with lib.fileset;
'
prefixExpression() {
echo 'let
lib =
(import <nixpkgs/lib>)
'
if [[ "${1:-}" == "--simulate-pure-eval" ]]; then
echo '
.extend (final: prev: {
trivial = prev.trivial // {
inPureEvalMode = true;
};
})'
fi
echo '
;
internal = import <nixpkgs/lib/fileset/internal.nix> {
inherit lib;
};
in
with lib;
with internal;
with lib.fileset;'
}
# Check that two nix expression successfully evaluate to the same value.
# The expressions have `lib.fileset` in scope.
@@ -62,7 +74,7 @@ expectEqual() {
local actualExpr=$1
local expectedExpr=$2
if actualResult=$(nix-instantiate --eval --strict --show-trace 2>"$tmp"/actualStderr \
--expr "$prefixExpression ($actualExpr)"); then
--expr "$(prefixExpression) ($actualExpr)"); then
actualExitCode=$?
else
actualExitCode=$?
@@ -70,7 +82,7 @@ expectEqual() {
actualStderr=$(< "$tmp"/actualStderr)
if expectedResult=$(nix-instantiate --eval --strict --show-trace 2>"$tmp"/expectedStderr \
--expr "$prefixExpression ($expectedExpr)"); then
--expr "$(prefixExpression) ($expectedExpr)"); then
expectedExitCode=$?
else
expectedExitCode=$?
@@ -98,7 +110,7 @@ expectEqual() {
expectStorePath() {
local expr=$1
if ! result=$(nix-instantiate --eval --strict --json --read-write-mode --show-trace 2>"$tmp"/stderr \
--expr "$prefixExpression ($expr)"); then
--expr "$(prefixExpression) ($expr)"); then
cat "$tmp/stderr" >&2
die "$expr failed to evaluate, but it was expected to succeed"
fi
@@ -111,10 +123,16 @@ expectStorePath() {
# The expression has `lib.fileset` in scope.
# Usage: expectFailure NIX REGEX
expectFailure() {
if [[ "$1" == "--simulate-pure-eval" ]]; then
maybePure="--simulate-pure-eval"
shift
else
maybePure=""
fi
local expr=$1
local expectedErrorRegex=$2
if result=$(nix-instantiate --eval --strict --read-write-mode --show-trace 2>"$tmp/stderr" \
--expr "$prefixExpression $expr"); then
--expr "$(prefixExpression $maybePure) $expr"); then
die "$expr evaluated successfully to $result, but it was expected to fail"
fi
stderr=$(<"$tmp/stderr")
@@ -131,12 +149,12 @@ expectTrace() {
local expectedTrace=$2
nix-instantiate --eval --show-trace >/dev/null 2>"$tmp"/stderrTrace \
--expr "$prefixExpression trace ($expr)" || true
--expr "$(prefixExpression) trace ($expr)" || true
actualTrace=$(sed -n 's/^trace: //p' "$tmp/stderrTrace")
nix-instantiate --eval --show-trace >/dev/null 2>"$tmp"/stderrTraceVal \
--expr "$prefixExpression traceVal ($expr)" || true
--expr "$(prefixExpression) traceVal ($expr)" || true
actualTraceVal=$(sed -n 's/^trace: //p' "$tmp/stderrTraceVal")
@@ -1299,12 +1317,6 @@ rm -rf -- *
expectFailure 'gitTracked null' 'lib.fileset.gitTracked: Expected the argument to be a path, but it'\''s a null instead.'
expectFailure 'gitTrackedWith {} null' 'lib.fileset.gitTrackedWith: Expected the second argument to be a path, but it'\''s a null instead.'
# The path must be a directory
touch a
expectFailure 'gitTracked ./a' 'lib.fileset.gitTracked: Expected the argument \('"$work"'/a\) to be a directory, but it'\''s a file instead'
expectFailure 'gitTrackedWith {} ./a' 'lib.fileset.gitTrackedWith: Expected the second argument \('"$work"'/a\) to be a directory, but it'\''s a file instead'
rm -rf -- *
# The path has to contain a .git directory
expectFailure 'gitTracked ./.' 'lib.fileset.gitTracked: Expected the argument \('"$work"'\) to point to a local working tree of a Git repository, but it'\''s not.'
expectFailure 'gitTrackedWith {} ./.' 'lib.fileset.gitTrackedWith: Expected the second argument \('"$work"'\) to point to a local working tree of a Git repository, but it'\''s not.'
@@ -1313,7 +1325,7 @@ expectFailure 'gitTrackedWith {} ./.' 'lib.fileset.gitTrackedWith: Expected the
expectFailure 'gitTrackedWith { recurseSubmodules = null; } ./.' 'lib.fileset.gitTrackedWith: Expected the attribute `recurseSubmodules` of the first argument to be a boolean, but it'\''s a null instead.'
# recurseSubmodules = true is not supported on all Nix versions
if [[ "$(nix-instantiate --eval --expr "$prefixExpression (versionAtLeast builtins.nixVersion _fetchGitSubmodulesMinver)")" == true ]]; then
if [[ "$(nix-instantiate --eval --expr "$(prefixExpression) (versionAtLeast builtins.nixVersion _fetchGitSubmodulesMinver)")" == true ]]; then
fetchGitSupportsSubmodules=1
else
fetchGitSupportsSubmodules=
@@ -1383,60 +1395,10 @@ createGitRepo() {
git -C "$1" commit -q --allow-empty -m "Empty commit"
}
# Check that gitTracked[With] works as expected when evaluated out-of-tree
## First we create a git repositories (and a subrepository) with `default.nix` files referring to their local paths
## Simulating how it would be used in the wild
# Check the error message for pure eval mode
createGitRepo .
echo '{ fs }: fs.toSource { root = ./.; fileset = fs.gitTracked ./.; }' > default.nix
git add .
## We can evaluate it locally just fine, `fetchGit` is used underneath to filter git-tracked files
expectEqual '(import ./. { fs = lib.fileset; }).outPath' '(builtins.fetchGit ./.).outPath'
## We can also evaluate when importing from fetched store paths
storePath=$(expectStorePath 'builtins.fetchGit ./.')
expectEqual '(import '"$storePath"' { fs = lib.fileset; }).outPath' \""$storePath"\"
## But it fails if the path is imported with a fetcher that doesn't remove .git (like just using "${./.}")
expectFailure 'import "${./.}" { fs = lib.fileset; }' 'lib.fileset.gitTracked: The argument \(.*\) is a store path within a working tree of a Git repository.
\s*This indicates that a source directory was imported into the store using a method such as `import "\$\{./.\}"` or `path:.`.
\s*This function currently does not support such a use case, since it currently relies on `builtins.fetchGit`.
\s*You could make this work by using a fetcher such as `fetchGit` instead of copying the whole repository.
\s*If you can'\''t avoid copying the repo to the store, see https://github.com/NixOS/nix/issues/9292.'
## Even with submodules
if [[ -n "$fetchGitSupportsSubmodules" ]]; then
## Both the main repo with the submodule
echo '{ fs }: fs.toSource { root = ./.; fileset = fs.gitTrackedWith { recurseSubmodules = true; } ./.; }' > default.nix
createGitRepo sub
git submodule add ./sub sub >/dev/null
## But also the submodule itself
echo '{ fs }: fs.toSource { root = ./.; fileset = fs.gitTracked ./.; }' > sub/default.nix
git -C sub add .
## We can evaluate it locally just fine, `fetchGit` is used underneath to filter git-tracked files
expectEqual '(import ./. { fs = lib.fileset; }).outPath' '(builtins.fetchGit { url = ./.; submodules = true; }).outPath'
expectEqual '(import ./sub { fs = lib.fileset; }).outPath' '(builtins.fetchGit ./sub).outPath'
## We can also evaluate when importing from fetched store paths
storePathWithSub=$(expectStorePath 'builtins.fetchGit { url = ./.; submodules = true; }')
expectEqual '(import '"$storePathWithSub"' { fs = lib.fileset; }).outPath' \""$storePathWithSub"\"
storePathSub=$(expectStorePath 'builtins.fetchGit ./sub')
expectEqual '(import '"$storePathSub"' { fs = lib.fileset; }).outPath' \""$storePathSub"\"
## But it fails if the path is imported with a fetcher that doesn't remove .git (like just using "${./.}")
expectFailure 'import "${./.}" { fs = lib.fileset; }' 'lib.fileset.gitTrackedWith: The second argument \(.*\) is a store path within a working tree of a Git repository.
\s*This indicates that a source directory was imported into the store using a method such as `import "\$\{./.\}"` or `path:.`.
\s*This function currently does not support such a use case, since it currently relies on `builtins.fetchGit`.
\s*You could make this work by using a fetcher such as `fetchGit` instead of copying the whole repository.
\s*If you can'\''t avoid copying the repo to the store, see https://github.com/NixOS/nix/issues/9292.'
expectFailure 'import "${./.}/sub" { fs = lib.fileset; }' 'lib.fileset.gitTracked: The argument \(.*/sub\) is a store path within a working tree of a Git repository.
\s*This indicates that a source directory was imported into the store using a method such as `import "\$\{./.\}"` or `path:.`.
\s*This function currently does not support such a use case, since it currently relies on `builtins.fetchGit`.
\s*You could make this work by using a fetcher such as `fetchGit` instead of copying the whole repository.
\s*If you can'\''t avoid copying the repo to the store, see https://github.com/NixOS/nix/issues/9292.'
fi
expectFailure --simulate-pure-eval 'toSource { root = ./.; fileset = gitTracked ./.; }' 'lib.fileset.gitTracked: This function is currently not supported in pure evaluation mode, since it currently relies on `builtins.fetchGit`. See https://github.com/NixOS/nix/issues/9292.'
expectFailure --simulate-pure-eval 'toSource { root = ./.; fileset = gitTrackedWith {} ./.; }' 'lib.fileset.gitTrackedWith: This function is currently not supported in pure evaluation mode, since it currently relies on `builtins.fetchGit`. See https://github.com/NixOS/nix/issues/9292.'
rm -rf -- *
# Go through all stages of Git files

View File

@@ -9,22 +9,11 @@ let
inherit (builtins)
readDir
pathExists
toString
;
inherit (lib.attrsets)
mapAttrs'
filterAttrs
;
inherit (lib.filesystem)
pathType
;
inherit (lib.strings)
hasSuffix
removeSuffix
;
in
{
@@ -165,147 +154,4 @@ in
dir + "/${name}"
) (builtins.readDir dir));
/*
Transform a directory tree containing package files suitable for
`callPackage` into a matching nested attribute set of derivations.
For a directory tree like this:
```
my-packages
a.nix
b.nix
c
my-extra-feature.patch
package.nix
support-definitions.nix
my-namespace
d.nix
e.nix
f
package.nix
```
`packagesFromDirectoryRecursive` will produce an attribute set like this:
```nix
# packagesFromDirectoryRecursive {
# callPackage = pkgs.callPackage;
# directory = ./my-packages;
# }
{
a = pkgs.callPackage ./my-packages/a.nix { };
b = pkgs.callPackage ./my-packages/b.nix { };
c = pkgs.callPackage ./my-packages/c/package.nix { };
my-namespace = {
d = pkgs.callPackage ./my-packages/my-namespace/d.nix { };
e = pkgs.callPackage ./my-packages/my-namespace/e.nix { };
f = pkgs.callPackage ./my-packages/my-namespace/f/package.nix { };
};
}
```
In particular:
- If the input directory contains a `package.nix` file, then
`callPackage <directory>/package.nix { }` is returned.
- Otherwise, the input directory's contents are listed and transformed into
an attribute set.
- If a file name has the `.nix` extension, it is turned into attribute
where:
- The attribute name is the file name without the `.nix` extension
- The attribute value is `callPackage <file path> { }`
- Other files are ignored.
- Directories are turned into an attribute where:
- The attribute name is the name of the directory
- The attribute value is the result of calling
`packagesFromDirectoryRecursive { ... }` on the directory.
As a result, directories with no `.nix` files (including empty
directories) will be transformed into empty attribute sets.
Example:
packagesFromDirectoryRecursive {
inherit (pkgs) callPackage;
directory = ./my-packages;
}
=> { ... }
lib.makeScope pkgs.newScope (
self: packagesFromDirectoryRecursive {
callPackage = self.callPackage;
directory = ./my-packages;
}
)
=> { ... }
Type:
packagesFromDirectoryRecursive :: AttrSet -> AttrSet
*/
packagesFromDirectoryRecursive =
# Options.
{
/*
`pkgs.callPackage`
Type:
Path -> AttrSet -> a
*/
callPackage,
/*
The directory to read package files from
Type:
Path
*/
directory,
...
}:
let
# Determine if a directory entry from `readDir` indicates a package or
# directory of packages.
directoryEntryIsPackage = basename: type:
type == "directory" || hasSuffix ".nix" basename;
# List directory entries that indicate packages in the given `path`.
packageDirectoryEntries = path:
filterAttrs directoryEntryIsPackage (readDir path);
# Transform a directory entry (a `basename` and `type` pair) into a
# package.
directoryEntryToAttrPair = subdirectory: basename: type:
let
path = subdirectory + "/${basename}";
in
if type == "regular"
then
{
name = removeSuffix ".nix" basename;
value = callPackage path { };
}
else
if type == "directory"
then
{
name = basename;
value = packagesFromDirectory path;
}
else
throw
''
lib.filesystem.packagesFromDirectoryRecursive: Unsupported file type ${type} at path ${toString subdirectory}
'';
# Transform a directory into a package (if there's a `package.nix`) or
# set of packages (otherwise).
packagesFromDirectory = path:
let
defaultPackagePath = path + "/package.nix";
in
if pathExists defaultPackagePath
then callPackage defaultPackagePath { }
else mapAttrs'
(directoryEntryToAttrPair path)
(packageDirectoryEntries path);
in
packagesFromDirectory directory;
}

View File

@@ -103,155 +103,42 @@ rec {
else converge f x';
/*
Extend a function using an overlay.
Overlays allow modifying and extending fixed-point functions, specifically ones returning attribute sets.
A fixed-point function is a function which is intended to be evaluated by passing the result of itself as the argument.
This is possible due to Nix's lazy evaluation.
A fixed-point function returning an attribute set has the form
Modify the contents of an explicitly recursive attribute set in a way that
honors `self`-references. This is accomplished with a function
```nix
final: { # attributes }
g = self: super: { foo = super.foo + " + "; }
```
where `final` refers to the lazily evaluated attribute set returned by the fixed-point function.
that has access to the unmodified input (`super`) as well as the final
non-recursive representation of the attribute set (`self`). `extends`
differs from the native `//` operator insofar as that it's applied *before*
references to `self` are resolved:
An overlay to such a fixed-point function has the form
```nix
final: prev: { # attributes }
```
nix-repl> fix (extends g f)
{ bar = "bar"; foo = "foo + "; foobar = "foo + bar"; }
```
where `prev` refers to the result of the original function to `final`, and `final` is the result of the composition of the overlay and the original function.
The name of the function is inspired by object-oriented inheritance, i.e.
think of it as an infix operator `g extends f` that mimics the syntax from
Java. It may seem counter-intuitive to have the "base class" as the second
argument, but it's nice this way if several uses of `extends` are cascaded.
Applying an overlay is done with `extends`:
To get a better understanding how `extends` turns a function with a fix
point (the package set we start with) into a new function with a different fix
point (the desired packages set) lets just see, how `extends g f`
unfolds with `g` and `f` defined above:
```nix
let
f = final: { # attributes };
overlay = final: prev: { # attributes };
in extends overlay f;
```
To get the value of `final`, use `lib.fix`:
```nix
let
f = final: { # attributes };
overlay = final: prev: { # attributes };
g = extends overlay f;
in fix g
extends g f = self: let super = f self; in super // g self super;
= self: let super = { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; }; in super // g self super
= self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } // g self { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; }
= self: { foo = "foo"; bar = "bar"; foobar = self.foo + self.bar; } // { foo = "foo" + " + "; }
= self: { foo = "foo + "; bar = "bar"; foobar = self.foo + self.bar; }
```
:::{.example}
# Extend a fixed-point function with an overlay
Define a fixed-point function `f` that expects its own output as the argument `final`:
```nix-repl
f = final: {
# Constant value a
a = 1;
# b depends on the final value of a, available as final.a
b = final.a + 2;
}
```
Evaluate this using [`lib.fix`](#function-library-lib.fixedPoints.fix) to get the final result:
```nix-repl
fix f
=> { a = 1; b = 3; }
```
An overlay represents a modification or extension of such a fixed-point function.
Here's an example of an overlay:
```nix-repl
overlay = final: prev: {
# Modify the previous value of a, available as prev.a
a = prev.a + 10;
# Extend the attribute set with c, letting it depend on the final values of a and b
c = final.a + final.b;
}
```
Use `extends overlay f` to apply the overlay to the fixed-point function `f`.
This produces a new fixed-point function `g` with the combined behavior of `f` and `overlay`:
```nix-repl
g = extends overlay f
```
The result is a function, so we can't print it directly, but it's the same as:
```nix-repl
g' = final: {
# The constant from f, but changed with the overlay
a = 1 + 10;
# Unchanged from f
b = final.a + 2;
# Extended in the overlay
c = final.a + final.b;
}
```
Evaluate this using [`lib.fix`](#function-library-lib.fixedPoints.fix) again to get the final result:
```nix-repl
fix g
=> { a = 11; b = 13; c = 24; }
```
:::
Type:
extends :: (Attrs -> Attrs -> Attrs) # The overlay to apply to the fixed-point function
-> (Attrs -> Attrs) # A fixed-point function
-> (Attrs -> Attrs) # The resulting fixed-point function
Example:
f = final: { a = 1; b = final.a + 2; }
fix f
=> { a = 1; b = 3; }
fix (extends (final: prev: { a = prev.a + 10; }) f)
=> { a = 11; b = 13; }
fix (extends (final: prev: { b = final.a + 5; }) f)
=> { a = 1; b = 6; }
fix (extends (final: prev: { c = final.a + final.b; }) f)
=> { a = 1; b = 3; c = 4; }
:::{.note}
The argument to the given fixed-point function after applying an overlay will *not* refer to its own return value, but rather to the value after evaluating the overlay function.
The given fixed-point function is called with a separate argument than if it was evaluated with `lib.fix`.
The new argument
:::
*/
extends =
# The overlay to apply to the fixed-point function
overlay:
# The fixed-point function
f:
# Wrap with parenthesis to prevent nixdoc from rendering the `final` argument in the documentation
# The result should be thought of as a function, the argument of that function is not an argument to `extends` itself
(
final:
let
prev = f final;
in
prev // overlay final prev
);
extends = f: rattrs: self: let super = rattrs self; in super // f self super;
/*
Compose two extending functions of the type expected by 'extends'

View File

@@ -1,20 +0,0 @@
# This function produces a lib overlay to be used by the nixpkgs
# & nixpkgs/lib flakes to provide meaningful values for
# `lib.trivial.version` et al..
#
# Internal and subject to change, don't use this anywhere else!
# Instead, consider using a public interface, such as this flake here
# in this directory, `lib/`, or use the nixpkgs flake, which applies
# this logic for you in its `lib` output attribute.
self: # from the flake
finalLib: prevLib: # lib overlay
{
trivial = prevLib.trivial // {
versionSuffix =
".${finalLib.substring 0 8 (self.lastModifiedDate or "19700101")}.${self.shortRev or "dirty"}";
revisionWithDefault = default: self.rev or default;
};
}

View File

@@ -1,10 +1,5 @@
{
description = "Library of low-level helper functions for nix expressions.";
outputs = { self }:
let
lib0 = import ./.;
in {
lib = lib0.extend (import ./flake-version-info.nix self);
};
outputs = { self }: { lib = import ./.; };
}

View File

@@ -525,8 +525,6 @@ ${expr "" v}
"(${v.expr})"
else if v == { } then
"{}"
else if libAttr.isDerivation v then
''"${toString v}"''
else
"{${introSpace}${concatItems (
lib.attrsets.mapAttrsToList (key: value: "[${builtins.toJSON key}] = ${toLua innerArgs value}") v

View File

@@ -38,13 +38,6 @@ in mkLicense lset) ({
redistributable = false;
};
activision = {
# https://doomwiki.org/wiki/Raven_source_code_licensing
fullName = "Activision EULA";
url = "https://www.doomworld.com/eternity/activision_eula.txt";
free = false;
};
afl20 = {
spdxId = "AFL-2.0";
fullName = "Academic Free License v2.0";
@@ -104,7 +97,6 @@ in mkLicense lset) ({
};
arphicpl = {
spdxId = "Arphic-1999";
fullName = "Arphic Public License";
url = "https://www.freedesktop.org/wiki/Arphic_Public_License/";
};
@@ -237,7 +229,6 @@ in mkLicense lset) ({
};
cal10 = {
spdxId = "CAL-1.0";
fullName = "Cryptographic Autonomy License version 1.0 (CAL-1.0)";
url = "https://opensource.org/licenses/CAL-1.0";
};
@@ -431,7 +422,6 @@ in mkLicense lset) ({
};
elastic20 = {
spdxId = "Elastic-2.0";
fullName = "Elastic License 2.0";
url = "https://github.com/elastic/elasticsearch/blob/main/licenses/ELASTIC-LICENSE-2.0.txt";
free = false;
@@ -601,7 +591,6 @@ in mkLicense lset) ({
# Intel's license, seems free
iasl = {
spdxId = "Intel-ACPI";
fullName = "iASL";
url = "https://old.calculate-linux.org/packages/licenses/iASL";
};
@@ -613,7 +602,7 @@ in mkLicense lset) ({
imagemagick = {
fullName = "ImageMagick License";
spdxId = "ImageMagick";
spdxId = "imagemagick";
};
imlib2 = {
@@ -807,7 +796,6 @@ in mkLicense lset) ({
};
miros = {
spdxId = "MirOS";
fullName = "MirOS License";
url = "https://opensource.org/licenses/MirOS";
};
@@ -1073,12 +1061,6 @@ in mkLicense lset) ({
url = "https://github.com/thestk/stk/blob/master/LICENSE";
};
sudo = {
shortName = "sudo";
fullName = "Sudo License (ISC-style)";
url = "https://www.sudo.ws/about/license/";
};
sustainableUse = {
shortName = "sustainable";
fullName = "Sustainable Use License";
@@ -1143,7 +1125,6 @@ in mkLicense lset) ({
};
upl = {
spdxId = "UPL-1.0";
fullName = "Universal Permissive License";
url = "https://oss.oracle.com/licenses/upl/";
};
@@ -1200,7 +1181,6 @@ in mkLicense lset) ({
};
xfig = {
spdxId = "Xfig";
fullName = "xfig";
url = "https://mcj.sourceforge.net/authors.html#xfig";
};

View File

@@ -4,7 +4,6 @@ let
inherit (lib.strings) toInt;
inherit (lib.trivial) compare min id;
inherit (lib.attrsets) mapAttrs;
inherit (lib.lists) sort;
in
rec {
@@ -592,15 +591,9 @@ rec {
the second argument. The returned list is sorted in an increasing
order. The implementation does a quick-sort.
See also [`sortOn`](#function-library-lib.lists.sortOn), which applies the
default comparison on a function-derived property, and may be more efficient.
Example:
sort (p: q: p < q) [ 5 3 7 ]
sort (a: b: a < b) [ 5 3 7 ]
=> [ 3 5 7 ]
Type:
sort :: (a -> a -> Bool) -> [a] -> [a]
*/
sort = builtins.sort or (
strictLess: list:
@@ -619,42 +612,6 @@ rec {
if len < 2 then list
else (sort strictLess pivot.left) ++ [ first ] ++ (sort strictLess pivot.right));
/*
Sort a list based on the default comparison of a derived property `b`.
The items are returned in `b`-increasing order.
**Performance**:
The passed function `f` is only evaluated once per item,
unlike an unprepared [`sort`](#function-library-lib.lists.sort) using
`f p < f q`.
**Laws**:
```nix
sortOn f == sort (p: q: f p < f q)
```
Example:
sortOn stringLength [ "aa" "b" "cccc" ]
=> [ "b" "aa" "cccc" ]
Type:
sortOn :: (a -> b) -> [a] -> [a], for comparable b
*/
sortOn = f: list:
let
# Heterogenous list as pair may be ugly, but requires minimal allocations.
pairs = map (x: [(f x) x]) list;
in
map
(x: builtins.elemAt x 1)
(sort
# Compare the first element of the pairs
# Do not factor out the `<`, to avoid calls in hot code; duplicate instead.
(a: b: head a < head b)
pairs);
/* Compare two lists element-by-element.
Example:

View File

@@ -4,8 +4,8 @@
{ lib }:
let
inherit (lib) matchAttrs any all isDerivation getBin assertMsg;
inherit (builtins) isString match typeOf;
inherit (lib) matchAttrs any all;
inherit (builtins) isString;
in
rec {
@@ -154,12 +154,16 @@ rec {
getExe pkgs.mustache-go
=> "/nix/store/am9ml4f4ywvivxnkiaqwr0hyxka1xjsf-mustache-go-1.3.0/bin/mustache"
*/
getExe = x: getExe' x (x.meta.mainProgram or (
# This could be turned into an error when 23.05 is at end of life
lib.warn "getExe: Package ${lib.strings.escapeNixIdentifier x.meta.name or x.pname or x.name} does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo \"bar\"."
lib.getName
x
));
getExe = x:
let
y = x.meta.mainProgram or (
# This could be turned into an error when 23.05 is at end of life
lib.warn "getExe: Package ${lib.strings.escapeNixIdentifier x.meta.name or x.pname or x.name} does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo \"bar\"."
lib.getName
x
);
in
getExe' x y;
/* Get the path of a program of a derivation.
@@ -171,11 +175,11 @@ rec {
=> "/nix/store/5rs48jamq7k6sal98ymj9l4k2bnwq515-imagemagick-7.1.1-15/bin/convert"
*/
getExe' = x: y:
assert assertMsg (isDerivation x)
"lib.meta.getExe': The first argument is of type ${typeOf x}, but it should be a derivation instead.";
assert assertMsg (isString y)
"lib.meta.getExe': The second argument is of type ${typeOf y}, but it should be a string instead.";
assert assertMsg (match ".*\/.*" y == null)
"lib.meta.getExe': The second argument \"${y}\" is a nested path with a \"/\" character, but it should just be the name of the executable instead.";
"${getBin x}/bin/${y}";
assert lib.assertMsg (lib.isDerivation x)
"lib.meta.getExe': The first argument is of type ${builtins.typeOf x}, but it should be a derivation instead.";
assert lib.assertMsg (lib.isString y)
"lib.meta.getExe': The second argument is of type ${builtins.typeOf y}, but it should be a string instead.";
assert lib.assertMsg (builtins.length (lib.splitString "/" y) == 1)
"lib.meta.getExe': The second argument \"${y}\" is a nested path with a \"/\" character, but it should just be the name of the executable instead.";
"${lib.getBin x}/bin/${y}";
}

View File

@@ -275,8 +275,6 @@ let
"The option `${optText}' does not exist. Definition values:${defText}";
in
if attrNames options == [ "_module" ]
# No options were declared at all (`_module` is built in)
# but we do have unmatched definitions, and no freeformType (earlier conditions)
then
let
optionName = showOption prefix;

View File

@@ -9,7 +9,6 @@ let
split
match
typeOf
storeDir
;
inherit (lib.lists)
@@ -25,8 +24,6 @@ let
drop
;
listHasPrefix = lib.lists.hasPrefix;
inherit (lib.strings)
concatStringsSep
substring
@@ -123,28 +120,6 @@ let
else recurse ([ (baseNameOf base) ] ++ components) (dirOf base);
in recurse [];
# The components of the store directory, typically [ "nix" "store" ]
storeDirComponents = splitRelPath ("./" + storeDir);
# The number of store directory components, typically 2
storeDirLength = length storeDirComponents;
# Type: [ String ] -> Bool
#
# Whether path components have a store path as a prefix, according to
# https://nixos.org/manual/nix/stable/store/store-path.html#store-path.
componentsHaveStorePathPrefix = components:
# path starts with the store directory (typically /nix/store)
listHasPrefix storeDirComponents components
# is not the store directory itself, meaning there's at least one extra component
&& storeDirComponents != components
# and the first component after the store directory has the expected format.
# NOTE: We could change the hash regex to be [0-9a-df-np-sv-z],
# because these are the actual ASCII characters used by Nix's base32 implementation,
# but this is not fully specified, so let's tie this too much to the currently implemented concept of store paths.
# Similar reasoning applies to the validity of the name part.
# We care more about discerning store path-ness on realistic values. Making it airtight would be fragile and slow.
&& match ".{32}-.+" (elemAt components storeDirLength) != null;
in /* No rec! Add dependencies on this file at the top. */ {
/*
@@ -346,62 +321,6 @@ in /* No rec! Add dependencies on this file at the top. */ {
subpath = joinRelPath deconstructed.components;
};
/*
Whether a [path](https://nixos.org/manual/nix/stable/language/values.html#type-path)
has a [store path](https://nixos.org/manual/nix/stable/store/store-path.html#store-path)
as a prefix.
:::{.note}
As with all functions of this `lib.path` library, it does not work on paths in strings,
which is how you'd typically get store paths.
Instead, this function only handles path values themselves,
which occur when Nix files in the store use relative path expressions.
:::
Type:
hasStorePathPrefix :: Path -> Bool
Example:
# Subpaths of derivation outputs have a store path as a prefix
hasStorePathPrefix /nix/store/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo/bar/baz
=> true
# The store directory itself is not a store path
hasStorePathPrefix /nix/store
=> false
# Derivation outputs are store paths themselves
hasStorePathPrefix /nix/store/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo
=> true
# Paths outside the Nix store don't have a store path prefix
hasStorePathPrefix /home/user
=> false
# Not all paths under the Nix store are store paths
hasStorePathPrefix /nix/store/.links/10gg8k3rmbw8p7gszarbk7qyd9jwxhcfq9i6s5i0qikx8alkk4hq
=> false
# Store derivations are also store paths themselves
hasStorePathPrefix /nix/store/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo.drv
=> true
*/
hasStorePathPrefix = path:
let
deconstructed = deconstructPath path;
in
assert assertMsg
(isPath path)
"lib.path.hasStorePathPrefix: Argument is of type ${typeOf path}, but a path was expected";
assert assertMsg
# This function likely breaks or needs adjustment if used with other filesystem roots, if they ever get implemented.
# Let's try to error nicely in such a case, though it's unclear how an implementation would work even and whether this could be detected.
# See also https://github.com/NixOS/nix/pull/6530#discussion_r1422843117
(deconstructed.root == /. && toString deconstructed.root == "/")
"lib.path.hasStorePathPrefix: Argument has a filesystem root (${toString deconstructed.root}) that's not /, which is currently not supported.";
componentsHaveStorePathPrefix deconstructed.components;
/*
Whether a value is a valid subpath string.

View File

@@ -3,10 +3,7 @@
{ libpath }:
let
lib = import libpath;
inherit (lib.path) hasPrefix removePrefix append splitRoot hasStorePathPrefix subpath;
# This is not allowed generally, but we're in the tests here, so we'll allow ourselves.
storeDirPath = /. + builtins.storeDir;
inherit (lib.path) hasPrefix removePrefix append splitRoot subpath;
cases = lib.runTests {
# Test examples from the lib.path.append documentation
@@ -94,31 +91,6 @@ let
expected = false;
};
testHasStorePathPrefixExample1 = {
expr = hasStorePathPrefix (storeDirPath + "/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo/bar/baz");
expected = true;
};
testHasStorePathPrefixExample2 = {
expr = hasStorePathPrefix storeDirPath;
expected = false;
};
testHasStorePathPrefixExample3 = {
expr = hasStorePathPrefix (storeDirPath + "/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo");
expected = true;
};
testHasStorePathPrefixExample4 = {
expr = hasStorePathPrefix /home/user;
expected = false;
};
testHasStorePathPrefixExample5 = {
expr = hasStorePathPrefix (storeDirPath + "/.links/10gg8k3rmbw8p7gszarbk7qyd9jwxhcfq9i6s5i0qikx8alkk4hq");
expected = false;
};
testHasStorePathPrefixExample6 = {
expr = hasStorePathPrefix (storeDirPath + "/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo.drv");
expected = true;
};
# Test examples from the lib.path.subpath.isValid documentation
testSubpathIsValidExample1 = {
expr = subpath.isValid null;

View File

@@ -715,12 +715,12 @@ rec {
getName pkgs.youtube-dl
=> "youtube-dl"
*/
getName = let
parse = drv: (parseDrvName drv).name;
in x:
if isString x
then parse x
else x.pname or (parse x.name);
getName = x:
let
parse = drv: (parseDrvName drv).name;
in if isString x
then parse x
else x.pname or (parse x.name);
/* This function takes an argument that's either a derivation or a
derivation's "name" attribute and extracts the version part from that
@@ -732,12 +732,12 @@ rec {
getVersion pkgs.youtube-dl
=> "2016.01.01"
*/
getVersion = let
parse = drv: (parseDrvName drv).version;
in x:
if isString x
then parse x
else x.version or (parse x.name);
getVersion = x:
let
parse = drv: (parseDrvName drv).version;
in if isString x
then parse x
else x.version or (parse x.name);
/* Extract name with version from URL. Ask for separator which is
supposed to start extension.
@@ -771,13 +771,12 @@ rec {
cmakeOptionType "string" "ENGINE" "sdl2"
=> "-DENGINE:STRING=sdl2"
*/
cmakeOptionType = let
types = [ "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL" ];
in type: feature: value:
assert (elem (toUpper type) types);
assert (isString feature);
assert (isString value);
"-D${feature}:${toUpper type}=${value}";
cmakeOptionType = type: feature: value:
assert (lib.elem (lib.toUpper type)
[ "BOOL" "FILEPATH" "PATH" "STRING" "INTERNAL" ]);
assert (lib.isString feature);
assert (lib.isString value);
"-D${feature}:${lib.toUpper type}=${value}";
/* Create a -D<condition>={TRUE,FALSE} string that can be passed to typical
CMake invocations.
@@ -978,11 +977,9 @@ rec {
Many types of value are coercible to string this way, including int, float,
null, bool, list of similarly coercible values.
*/
isConvertibleWithToString = let
types = [ "null" "int" "float" "bool" ];
in x:
isConvertibleWithToString = x:
isStringLike x ||
elem (typeOf x) types ||
elem (typeOf x) [ "null" "int" "float" "bool" ] ||
(isList x && lib.all isConvertibleWithToString x);
/* Check whether a value can be coerced to a string.

View File

@@ -89,13 +89,6 @@ rec {
# is why we use the more obscure "bfd" and not "binutils" for this
# choice.
else "bfd";
# The standard lib directory name that non-nixpkgs binaries distributed
# for this platform normally assume.
libDir = if final.isLinux then
if final.isx86_64 || final.isMips64 || final.isPower64
then "lib64"
else "lib"
else null;
extensions = lib.optionalAttrs final.hasSharedLibraries {
sharedLibrary =
if final.isDarwin then ".dylib"
@@ -331,8 +324,7 @@ rec {
"riscv64" = "riscv64gc";
}.${cpu.name} or cpu.name;
vendor_ = final.rust.platform.vendor;
# TODO: deprecate args.rustc in favour of args.rust after 23.05 is EOL.
in args.rust.rustcTarget or args.rustc.config
in rust.config
or "${cpu_}-${vendor_}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
# The name of the rust target if it is standard, or the json file

View File

@@ -62,8 +62,7 @@ rec {
is32bit = { cpu = { bits = 32; }; };
is64bit = { cpu = { bits = 64; }; };
isILP32 = [ { cpu = { family = "wasm"; bits = 32; }; } ] ++
map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ];
isILP32 = map (a: { abi = { abi = a; }; }) [ "n32" "ilp32" "x32" ];
isBigEndian = { cpu = { significantByte = significantBytes.bigEndian; }; };
isLittleEndian = { cpu = { significantByte = significantBytes.littleEndian; }; };
@@ -99,9 +98,6 @@ rec {
{ cpu = { family = "riscv"; }; }
{ cpu = { family = "x86"; }; }
];
isElf = { kernel.execFormat = execFormats.elf; };
isMacho = { kernel.execFormat = execFormats.macho; };
};
# given two patterns, return a pattern which is their logical AND.

View File

@@ -650,28 +650,6 @@ runTests {
expected = [2 30 40 42];
};
testSortOn = {
expr = sortOn stringLength [ "aa" "b" "cccc" ];
expected = [ "b" "aa" "cccc" ];
};
testSortOnEmpty = {
expr = sortOn (throw "nope") [ ];
expected = [ ];
};
testSortOnIncomparable = {
expr =
map
(x: x.f x.ok)
(sortOn (x: x.ok) [
{ ok = 1; f = x: x; }
{ ok = 3; f = x: x + 3; }
{ ok = 2; f = x: x; }
]);
expected = [ 1 2 6 ];
};
testReplicate = {
expr = replicate 3 "a";
expected = ["a" "a" "a"];
@@ -697,51 +675,6 @@ runTests {
expected = false;
};
testHasAttrByPathNonStrict = {
expr = hasAttrByPath [] (throw "do not use");
expected = true;
};
testLongestValidPathPrefix_empty_empty = {
expr = attrsets.longestValidPathPrefix [ ] { };
expected = [ ];
};
testLongestValidPathPrefix_empty_nonStrict = {
expr = attrsets.longestValidPathPrefix [ ] (throw "do not use");
expected = [ ];
};
testLongestValidPathPrefix_zero = {
expr = attrsets.longestValidPathPrefix [ "a" (throw "do not use") ] { d = null; };
expected = [ ];
};
testLongestValidPathPrefix_zero_b = {
expr = attrsets.longestValidPathPrefix [ "z" "z" ] "remarkably harmonious";
expected = [ ];
};
testLongestValidPathPrefix_one = {
expr = attrsets.longestValidPathPrefix [ "a" "b" "c" ] { a = null; };
expected = [ "a" ];
};
testLongestValidPathPrefix_two = {
expr = attrsets.longestValidPathPrefix [ "a" "b" "c" ] { a.b = null; };
expected = [ "a" "b" ];
};
testLongestValidPathPrefix_three = {
expr = attrsets.longestValidPathPrefix [ "a" "b" "c" ] { a.b.c = null; };
expected = [ "a" "b" "c" ];
};
testLongestValidPathPrefix_three_extra = {
expr = attrsets.longestValidPathPrefix [ "a" "b" "c" ] { a.b.c.d = throw "nope"; };
expected = [ "a" "b" "c" ];
};
testFindFirstIndexExample1 = {
expr = lists.findFirstIndex (x: x > 3) (abort "index found, so a default must not be evaluated") [ 1 6 4 ];
expected = 1;
@@ -898,26 +831,6 @@ runTests {
};
};
testMatchAttrsMatchingExact = {
expr = matchAttrs { cpu = { bits = 64; }; } { cpu = { bits = 64; }; };
expected = true;
};
testMatchAttrsMismatch = {
expr = matchAttrs { cpu = { bits = 128; }; } { cpu = { bits = 64; }; };
expected = false;
};
testMatchAttrsMatchingImplicit = {
expr = matchAttrs { cpu = { }; } { cpu = { bits = 64; }; };
expected = true;
};
testMatchAttrsMissingAttrs = {
expr = matchAttrs { cpu = {}; } { };
expected = false;
};
testOverrideExistingEmpty = {
expr = overrideExisting {} { a = 1; };
expected = {};
@@ -1959,18 +1872,6 @@ runTests {
expr = (with types; int).description;
expected = "signed integer";
};
testTypeDescriptionIntsPositive = {
expr = (with types; ints.positive).description;
expected = "positive integer, meaning >0";
};
testTypeDescriptionIntsPositiveOrEnumAuto = {
expr = (with types; either ints.positive (enum ["auto"])).description;
expected = ''positive integer, meaning >0, or value "auto" (singular enum)'';
};
testTypeDescriptionListOfPositive = {
expr = (with types; listOf ints.positive).description;
expected = "list of (positive integer, meaning >0)";
};
testTypeDescriptionListOfInt = {
expr = (with types; listOf int).description;
expected = "list of signed integer";
@@ -2067,37 +1968,4 @@ runTests {
expr = meta.platformMatch { } "x86_64-linux";
expected = false;
};
testPackagesFromDirectoryRecursive = {
expr = packagesFromDirectoryRecursive {
callPackage = path: overrides: import path overrides;
directory = ./packages-from-directory;
};
expected = {
a = "a";
b = "b";
# Note: Other files/directories in `./test-data/c/` are ignored and can be
# used by `package.nix`.
c = "c";
my-namespace = {
d = "d";
e = "e";
f = "f";
my-sub-namespace = {
g = "g";
h = "h";
};
};
};
};
# Check that `packagesFromDirectoryRecursive` can process a directory with a
# top-level `package.nix` file into a single package.
testPackagesFromDirectoryRecursiveTopLevelPackageNix = {
expr = packagesFromDirectoryRecursive {
callPackage = path: overrides: import path overrides;
directory = ./packages-from-directory/c;
};
expected = "c";
};
}

View File

@@ -24,14 +24,14 @@ evalConfig() {
local attr=$1
shift
local script="import ./default.nix { modules = [ $* ];}"
nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace --read-write-mode --json
nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace --read-write-mode
}
reportFailure() {
local attr=$1
shift
local script="import ./default.nix { modules = [ $* ];}"
echo 2>&1 "$ nix-instantiate -E '$script' -A '$attr' --eval-only --json"
echo 2>&1 "$ nix-instantiate -E '$script' -A '$attr' --eval-only"
evalConfig "$attr" "$@" || true
((++fail))
}
@@ -94,14 +94,6 @@ checkConfigOutput '^true$' config.result ./module-argument-default.nix
# gvariant
checkConfigOutput '^true$' config.assertion ./gvariant.nix
# https://github.com/NixOS/nixpkgs/pull/131205
# We currently throw this error already in `config`, but throwing in `config.wrong1` would be acceptable.
checkConfigError 'It seems as if you.re trying to declare an option by placing it into .config. rather than .options.' config.wrong1 ./error-mkOption-in-config.nix
# We currently throw this error already in `config`, but throwing in `config.nest.wrong2` would be acceptable.
checkConfigError 'It seems as if you.re trying to declare an option by placing it into .config. rather than .options.' config.nest.wrong2 ./error-mkOption-in-config.nix
checkConfigError 'The option .sub.wrong2. does not exist. Definition values:' config.sub ./error-mkOption-in-submodule-config.nix
checkConfigError '.*This can happen if you e.g. declared your options in .types.submodule.' config.sub ./error-mkOption-in-submodule-config.nix
# types.pathInStore
checkConfigOutput '".*/store/0lz9p8xhf89kb1c1kk6jxrzskaiygnlh-bash-5.2-p15.drv"' config.pathInStore.ok1 ./types.nix
checkConfigOutput '".*/store/0fb3ykw9r5hpayd05sr0cizwadzq1d8q-bash-5.2-p15"' config.pathInStore.ok2 ./types.nix
@@ -119,12 +111,6 @@ checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*'
checkConfigError 'while evaluating a definition from `.*/define-enable-abort.nix' config.enable ./define-enable-abort.nix
checkConfigError 'while evaluating the error message for definitions for .enable., which is an option that does not exist' config.enable ./define-enable-abort.nix
# Check boolByOr type.
checkConfigOutput '^false$' config.value.falseFalse ./boolByOr.nix
checkConfigOutput '^true$' config.value.trueFalse ./boolByOr.nix
checkConfigOutput '^true$' config.value.falseTrue ./boolByOr.nix
checkConfigOutput '^true$' config.value.trueTrue ./boolByOr.nix
checkConfigOutput '^1$' config.bare-submodule.nested ./declare-bare-submodule.nix ./declare-bare-submodule-nested-option.nix
checkConfigOutput '^2$' config.bare-submodule.deep ./declare-bare-submodule.nix ./declare-bare-submodule-deep-option.nix
checkConfigOutput '^42$' config.bare-submodule.nested ./declare-bare-submodule.nix ./declare-bare-submodule-nested-option.nix ./declare-bare-submodule-deep-option.nix ./define-bare-submodule-values.nix
@@ -148,7 +134,7 @@ checkConfigOutput '^42$' config.value ./declare-either.nix ./define-value-int-po
checkConfigOutput '^"24"$' config.value ./declare-either.nix ./define-value-string.nix
# types.oneOf
checkConfigOutput '^42$' config.value ./declare-oneOf.nix ./define-value-int-positive.nix
checkConfigOutput '^\[\]$' config.value ./declare-oneOf.nix ./define-value-list.nix
checkConfigOutput '^\[ \]$' config.value ./declare-oneOf.nix ./define-value-list.nix
checkConfigOutput '^"24"$' config.value ./declare-oneOf.nix ./define-value-string.nix
# Check mkForce without submodules.
@@ -328,7 +314,7 @@ checkConfigOutput '^"24"$' config.value ./freeform-attrsOf.nix ./define-value-st
# Shorthand modules interpret `meta` and `class` as config items
checkConfigOutput '^true$' options._module.args.value.result ./freeform-attrsOf.nix ./define-freeform-keywords-shorthand.nix
# No freeform assignments shouldn't make it error
checkConfigOutput '^{}$' config ./freeform-attrsOf.nix
checkConfigOutput '^{ }$' config ./freeform-attrsOf.nix
# but only if the type matches
checkConfigError 'A definition for option .* is not of type .*' config.value ./freeform-attrsOf.nix ./define-value-list.nix
# and properties should be applied
@@ -366,19 +352,19 @@ checkConfigError 'The option .* has conflicting definitions' config.value ./type
checkConfigOutput '^0$' config.value.int ./types-anything/equal-atoms.nix
checkConfigOutput '^false$' config.value.bool ./types-anything/equal-atoms.nix
checkConfigOutput '^""$' config.value.string ./types-anything/equal-atoms.nix
checkConfigOutput '^"/[^"]+"$' config.value.path ./types-anything/equal-atoms.nix
checkConfigOutput '^/$' config.value.path ./types-anything/equal-atoms.nix
checkConfigOutput '^null$' config.value.null ./types-anything/equal-atoms.nix
checkConfigOutput '^0.1$' config.value.float ./types-anything/equal-atoms.nix
# Functions can't be merged together
checkConfigError "The option .value.multiple-lambdas.<function body>. has conflicting option types" config.applied.multiple-lambdas ./types-anything/functions.nix
checkConfigOutput '^true$' config.valueIsFunction.single-lambda ./types-anything/functions.nix
checkConfigOutput '^<LAMBDA>$' config.value.single-lambda ./types-anything/functions.nix
checkConfigOutput '^null$' config.applied.merging-lambdas.x ./types-anything/functions.nix
checkConfigOutput '^null$' config.applied.merging-lambdas.y ./types-anything/functions.nix
# Check that all mk* modifiers are applied
checkConfigError 'attribute .* not found' config.value.mkiffalse ./types-anything/mk-mods.nix
checkConfigOutput '^{}$' config.value.mkiftrue ./types-anything/mk-mods.nix
checkConfigOutput '^{ }$' config.value.mkiftrue ./types-anything/mk-mods.nix
checkConfigOutput '^1$' config.value.mkdefault ./types-anything/mk-mods.nix
checkConfigOutput '^{}$' config.value.mkmerge ./types-anything/mk-mods.nix
checkConfigOutput '^{ }$' config.value.mkmerge ./types-anything/mk-mods.nix
checkConfigOutput '^true$' config.value.mkbefore ./types-anything/mk-mods.nix
checkConfigOutput '^1$' config.value.nested.foo ./types-anything/mk-mods.nix
checkConfigOutput '^"baz"$' config.value.nested.bar.baz ./types-anything/mk-mods.nix
@@ -398,16 +384,16 @@ checkConfigOutput '^"a b y z"$' config.resultFooBar ./declare-variants.nix ./def
checkConfigOutput '^"a b c"$' config.resultFooFoo ./declare-variants.nix ./define-variant.nix
## emptyValue's
checkConfigOutput "\[\]" config.list.a ./emptyValues.nix
checkConfigOutput "{}" config.attrs.a ./emptyValues.nix
checkConfigOutput "[ ]" config.list.a ./emptyValues.nix
checkConfigOutput "{ }" config.attrs.a ./emptyValues.nix
checkConfigOutput "null" config.null.a ./emptyValues.nix
checkConfigOutput "{}" config.submodule.a ./emptyValues.nix
checkConfigOutput "{ }" config.submodule.a ./emptyValues.nix
# These types don't have empty values
checkConfigError 'The option .int.a. is used but not defined' config.int.a ./emptyValues.nix
checkConfigError 'The option .nonEmptyList.a. is used but not defined' config.nonEmptyList.a ./emptyValues.nix
## types.raw
checkConfigOutput '^true$' config.unprocessedNestingEvaluates.success ./raw.nix
checkConfigOutput "{ foo = <CODE>; }" config.unprocessedNesting ./raw.nix
checkConfigOutput "10" config.processedToplevel ./raw.nix
checkConfigError "The option .multiple. is defined multiple times" config.multiple ./raw.nix
checkConfigOutput "bar" config.priorities ./raw.nix
@@ -441,13 +427,13 @@ checkConfigOutput 'ok' config.freeformItems.foo.bar ./adhoc-freeformType-survive
checkConfigOutput '^1$' config.sub.specialisation.value ./extendModules-168767-imports.nix
# Class checks, evalModules
checkConfigOutput '^{}$' config.ok.config ./class-check.nix
checkConfigOutput '^{ }$' config.ok.config ./class-check.nix
checkConfigOutput '"nixos"' config.ok.class ./class-check.nix
checkConfigError 'The module .*/module-class-is-darwin.nix was imported into nixos instead of darwin.' config.fail.config ./class-check.nix
checkConfigError 'The module foo.nix#darwinModules.default was imported into nixos instead of darwin.' config.fail-anon.config ./class-check.nix
# Class checks, submoduleWith
checkConfigOutput '^{}$' config.sub.nixosOk ./class-check.nix
checkConfigOutput '^{ }$' config.sub.nixosOk ./class-check.nix
checkConfigError 'The module .*/module-class-is-darwin.nix was imported into nixos instead of darwin.' config.sub.nixosFail.config ./class-check.nix
# submoduleWith type merge with different class

View File

@@ -1,14 +0,0 @@
{ lib, ... }: {
options.value = lib.mkOption {
type = lib.types.lazyAttrsOf lib.types.boolByOr;
};
config.value = {
falseFalse = lib.mkMerge [ false false ];
trueFalse = lib.mkMerge [ true false ];
falseTrue = lib.mkMerge [ false true ];
trueTrue = lib.mkMerge [ true true ];
};
}

View File

@@ -1,14 +0,0 @@
{ lib, ... }:
let
inherit (lib) mkOption;
in
{
wrong1 = mkOption {
};
# This is not actually reported separately, so could be omitted from the test
# but it makes the example more realistic.
# Making it parse this _config_ as options would too risky. What if it's not
# options but other values, that abort, throw, diverge, etc?
nest.wrong2 = mkOption {
};
}

View File

@@ -1,12 +0,0 @@
{ lib, ... }:
let
inherit (lib) mkOption;
in
{
options.sub = lib.mkOption {
type = lib.types.submodule {
wrong2 = mkOption {};
};
default = {};
};
}

View File

@@ -1,4 +1,4 @@
{ lib, config, ... }: {
{ lib, ... }: {
options = {
processedToplevel = lib.mkOption {
@@ -13,9 +13,6 @@
priorities = lib.mkOption {
type = lib.types.raw;
};
unprocessedNestingEvaluates = lib.mkOption {
default = builtins.tryEval config.unprocessedNesting;
};
};
config = {

View File

@@ -9,7 +9,7 @@
value.int = 0;
value.bool = false;
value.string = "";
value.path = ./.;
value.path = /.;
value.null = null;
value.float = 0.1;
}
@@ -17,7 +17,7 @@
value.int = 0;
value.bool = false;
value.string = "";
value.path = ./.;
value.path = /.;
value.null = null;
value.float = 0.1;
}

View File

@@ -1,9 +1,5 @@
{ lib, config, ... }: {
options.valueIsFunction = lib.mkOption {
default = lib.mapAttrs (name: lib.isFunction) config.value;
};
options.value = lib.mkOption {
type = lib.types.anything;
};

View File

@@ -1,2 +0,0 @@
{ }:
"a"

View File

@@ -1,2 +0,0 @@
{ }:
"b"

View File

@@ -1,2 +0,0 @@
{ }:
"c"

View File

@@ -1,2 +0,0 @@
{ }:
"d"

View File

@@ -1,2 +0,0 @@
{ }:
"e"

View File

@@ -1,2 +0,0 @@
{ }:
"f"

View File

@@ -67,17 +67,5 @@ let
in
pkgs.symlinkJoin {
name = "nixpkgs-lib-tests";
paths = map testWithNix nixVersions ++
#
# TEMPORARY MIGRATION MECHANISM
#
# This comment and the expression which follows it should be
# removed as part of resolving this issue:
#
# https://github.com/NixOS/nixpkgs/issues/272591
#
[(import ../../pkgs/test/release {})]
;
paths = map testWithNix nixVersions;
}

View File

@@ -1,18 +1,6 @@
{ lib }:
let
inherit (lib.trivial)
isFunction
isInt
functionArgs
pathExists
release
setFunctionArgs
toBaseDigits
version
versionSuffix
warn;
in {
rec {
## Simple (higher order) functions
@@ -70,7 +58,9 @@ in {
of the next function, and the last function returns the
final value.
*/
pipe = builtins.foldl' (x: f: f x);
pipe = val: functions:
let reverseApply = x: f: f x;
in builtins.foldl' reverseApply val functions;
# note please dont add a function like `compose = flip pipe`.
# This would confuse users, because the order of the functions
@@ -205,7 +195,7 @@ in {
On each release the first letter is bumped and a new animal is chosen
starting with that new letter.
*/
codeName = "Uakari";
codeName = "Tapir";
/* Returns the current nixpkgs version suffix as string. */
versionSuffix =
@@ -449,7 +439,7 @@ in {
*/
functionArgs = f:
if f ? __functor
then f.__functionArgs or (functionArgs (f.__functor f))
then f.__functionArgs or (lib.functionArgs (f.__functor f))
else builtins.functionArgs f;
/* Check whether something is a function or something
@@ -520,20 +510,22 @@ in {
toHexString 250 => "FA"
*/
toHexString = let
hexDigits = {
"10" = "A";
"11" = "B";
"12" = "C";
"13" = "D";
"14" = "E";
"15" = "F";
};
toHexDigit = d:
if d < 10
then toString d
else hexDigits.${toString d};
in i: lib.concatMapStrings toHexDigit (toBaseDigits 16 i);
toHexString = i:
let
toHexDigit = d:
if d < 10
then toString d
else
{
"10" = "A";
"11" = "B";
"12" = "C";
"13" = "D";
"14" = "E";
"15" = "F";
}.${toString d};
in
lib.concatMapStrings toHexDigit (toBaseDigits 16 i);
/* `toBaseDigits base i` converts the positive integer i to a list of its
digits in the given base. For example:

View File

@@ -67,7 +67,6 @@ let
;
outer_types =
rec {
__attrsFailEvaluation = true;
isType = type: x: (x._type or "") == type;
setType = typeName: value: value // {
@@ -113,14 +112,9 @@ rec {
, # Description of the type, defined recursively by embedding the wrapped type if any.
description ? null
# A hint for whether or not this description needs parentheses. Possible values:
# - "noun": a noun phrase
# Example description: "positive integer",
# - "conjunction": a phrase with a potentially ambiguous "or" connective
# Example description: "int or string"
# - "noun": a simple noun phrase such as "positive integer"
# - "conjunction": a phrase with a potentially ambiguous "or" connective.
# - "composite": a phrase with an "of" connective
# Example description: "list of string"
# - "nonRestrictiveClause": a noun followed by a comma and a clause
# Example description: "positive integer, meaning >0"
# See the `optionDescriptionPhrase` function.
, descriptionClass ? null
, # DO NOT USE WITHOUT KNOWING WHAT YOU ARE DOING!
@@ -281,22 +275,6 @@ rec {
merge = mergeEqualOption;
};
boolByOr = mkOptionType {
name = "boolByOr";
description = "boolean (merged using or)";
descriptionClass = "noun";
check = isBool;
merge = loc: defs:
foldl'
(result: def:
# Under the assumption that .check always runs before merge, we can assume that all defs.*.value
# have been forced, and therefore we assume we don't introduce order-dependent strictness here
result || def.value
)
false
defs;
};
int = mkOptionType {
name = "int";
description = "signed integer";
@@ -343,12 +321,10 @@ rec {
unsigned = addCheck types.int (x: x >= 0) // {
name = "unsignedInt";
description = "unsigned integer, meaning >=0";
descriptionClass = "nonRestrictiveClause";
};
positive = addCheck types.int (x: x > 0) // {
name = "positiveInt";
description = "positive integer, meaning >0";
descriptionClass = "nonRestrictiveClause";
};
u8 = unsign 8 256;
u16 = unsign 16 65536;
@@ -390,12 +366,10 @@ rec {
nonnegative = addCheck number (x: x >= 0) // {
name = "numberNonnegative";
description = "nonnegative integer or floating point number, meaning >=0";
descriptionClass = "nonRestrictiveClause";
};
positive = addCheck number (x: x > 0) // {
name = "numberPositive";
description = "positive integer or floating point number, meaning >0";
descriptionClass = "nonRestrictiveClause";
};
};
@@ -472,7 +446,6 @@ rec {
passwdEntry = entryType: addCheck entryType (str: !(hasInfix ":" str || hasInfix "\n" str)) // {
name = "passwdEntry ${entryType.name}";
description = "${optionDescriptionPhrase (class: class == "noun") entryType}, not containing newlines or colons";
descriptionClass = "nonRestrictiveClause";
};
attrs = mkOptionType {
@@ -880,13 +853,7 @@ rec {
# Either value of type `t1` or `t2`.
either = t1: t2: mkOptionType rec {
name = "either";
description =
if t1.descriptionClass or null == "nonRestrictiveClause"
then
# Plain, but add comma
"${t1.description}, or ${optionDescriptionPhrase (class: class == "noun" || class == "conjunction") t2}"
else
"${optionDescriptionPhrase (class: class == "noun" || class == "conjunction") t1} or ${optionDescriptionPhrase (class: class == "noun" || class == "conjunction" || class == "composite") t2}";
description = "${optionDescriptionPhrase (class: class == "noun" || class == "conjunction") t1} or ${optionDescriptionPhrase (class: class == "noun" || class == "conjunction" || class == "composite") t2}";
descriptionClass = "conjunction";
check = x: t1.check x || t2.check x;
merge = loc: defs:

View File

@@ -165,10 +165,3 @@ team after giving the existing members a few days to respond.
*Important:* If a team says it is a closed group, do not merge additions
to the team without an approval by at least one existing member.
# Maintainer scripts
Various utility scripts, which are mainly useful for nixpkgs maintainers,
are available under `./scripts/`. See its [README](./scripts/README.md)
for further information.

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