Compare commits

..

347 Commits

Author SHA1 Message Date
Janne Heß
ce6aa13369 Release 22.05
(cherry picked from commit cbaacfb8df)
2022-05-30 20:51:36 +02:00
Thiago Kenji Okada
2c1f2cc193 Merge pull request #175441 from NixOS/backport-175211-to-release-22.05
[Backport release-22.05] liblouis: fix darwin build with patch
2022-05-30 18:04:50 +01:00
Thiago Kenji Okada
b0aae9a820 Merge pull request #175481 from NixOS/backport-173349-to-release-22.05
[Backport release-22.05] python310Packages.robotframework: 5.0 -> 5.0.1
2022-05-30 18:03:47 +01:00
Janne Heß
a634c8f6c1 Merge pull request #175482 from NixOS/backport-175480-to-release-22.05
[Backport release-22.05] libportal/libqalculate: Unbreak
2022-05-30 16:21:43 +02:00
Janne Heß
6494478c35 libportal/libqalculate: Unbreak
This blocks release because the tested jobset depends on these
indirectly.

(cherry picked from commit cd0956e5d8)
2022-05-30 14:16:41 +00:00
R. Ryantm
9b7dd0976e python310Packages.robotframework: 5.0 -> 5.0.1
(cherry picked from commit e5cb66e9f9)
2022-05-30 13:53:43 +00:00
Maximilian Bosch
e44c82bfec Merge pull request #175168 from NixOS/backport-175024-to-release-22.05
[Backport release-22.05] wiki-js: 2.5.282 -> 2.5.283
2022-05-30 15:52:01 +02:00
Yorick van Pelt
e0fa35aeeb asterisk: 16.25.1 -> 16.26.1, 18.11.1 -> 18.12.1, 19.3.1 -> 19.4.1
(cherry picked from commit 5d62b7f79f)
2022-05-30 12:46:57 +00:00
Yorick van Pelt
99633af7af asterisk: update updateScript to include python deps
(cherry picked from commit 237b5838d3)
2022-05-30 12:46:57 +00:00
Janne Heß
64c18203e2 Merge pull request #175472 from helsinki-systems/feat/mark-broken
[22.05] treewide: mark broken packages as broken
2022-05-30 14:46:33 +02:00
Rick van Schijndel
658fd8317a robomachine: mark broken
(cherry picked from commit 26243136fe)
2022-05-30 14:20:07 +02:00
Rick van Schijndel
43072cd017 treewide: pkgs/development/python-modules: mark broken for aarch64-linux
(cherry picked from commit afbb0f6ff4)
2022-05-30 14:20:06 +02:00
Rick van Schijndel
a8cd66256f mps: mark broken
(cherry picked from commit 7da0ca2e25)
2022-05-30 14:19:33 +02:00
Rick van Schijndel
cdea6a07de swift: mark broken
(cherry picked from commit cd19a0e7b4)
2022-05-30 14:19:33 +02:00
Rick van Schijndel
f078cea543 treewide: pkgs/development: mark broken for aarch64-linux
(cherry picked from commit 11ee22d797)
2022-05-30 14:19:32 +02:00
Rick van Schijndel
ff7cd38205 treewide: pkgs/applications: mark broken for aarch64-linux
(cherry picked from commit 433701147a)
2022-05-30 14:19:24 +02:00
Rick van Schijndel
2a7b9a3fcb treewide: mark broken for darwin
(cherry picked from commit 010f6ee30d)
2022-05-30 14:19:21 +02:00
Rick van Schijndel
95a3b63e81 luaPackages.luxio: mark broken for darwin
(cherry picked from commit 82ccbc08de)
2022-05-30 14:19:04 +02:00
Rick van Schijndel
184877600b treewide: pkgs/desktops: mark broken for darwin
(cherry picked from commit 7a68548822)
2022-05-30 14:19:04 +02:00
Rick van Schijndel
1ea48d9664 treewide: pkgs/servers/sql: mark 2 psql extension broken
(cherry picked from commit 033d5579c2)
2022-05-30 14:19:04 +02:00
Rick van Schijndel
b29dbdf474 treewide: pkgs/servers: mark broken for darwin
(cherry picked from commit 879d278253)
2022-05-30 14:19:04 +02:00
Rick van Schijndel
d911a85d84 speedcrunch: mark broken on darwin
(cherry picked from commit a0dd8198cd)
2022-05-30 14:19:04 +02:00
Rick van Schijndel
5874279f95 tippecanoe: mark broken on darwin as well
(cherry picked from commit c312ae98a1)
2022-05-30 14:19:03 +02:00
Rick van Schijndel
744167bc9e blender: mark broken on all darwins
(cherry picked from commit 117ee3af2a)
2022-05-30 14:19:03 +02:00
Rick van Schijndel
8d86a47ea1 libresprite: mark broken on darwin
(cherry picked from commit da846421fc)
2022-05-30 14:19:03 +02:00
Rick van Schijndel
da3b873b79 pqrs: mark broken
(cherry picked from commit edde4da42e)
2022-05-30 14:19:03 +02:00
Rick van Schijndel
b516917c56 treewide: pkgs/development: mark broken for darwin
(cherry picked from commit 03bc571744)
2022-05-30 14:19:03 +02:00
Rick van Schijndel
86baa2411e treewide: pkgs/development/libraries: mark broken for darwin
(cherry picked from commit 7d58a30286)
2022-05-30 14:19:02 +02:00
Rick van Schijndel
3644535053 treewide: pkgs/development/python-modules: mark broken for darwin
(cherry picked from commit 65db3b17a8)
2022-05-30 14:19:02 +02:00
Rick van Schijndel
11af55b8b3 treewide: pkgs/development/tools: mark broken for darwin
(cherry picked from commit 13e0d33703)
2022-05-30 14:19:02 +02:00
Rick van Schijndel
e315d48b2b treewide: pkgs/development/compilers: mark broken for darwin
(cherry picked from commit 0b45cae8a3)
2022-05-30 14:19:02 +02:00
Rick van Schijndel
941826b663 treewide: pkgs/applications: mark broken for darwin
(cherry picked from commit 37c633f7ae)
2022-05-30 14:19:01 +02:00
Rick van Schijndel
90c49a6acd treewide: pkgs/games: mark broken for darwin
(cherry picked from commit f97a7e634f)
2022-05-30 14:19:01 +02:00
Rick van Schijndel
4de437620a treewide: pkgs/tools: mark broken for darwin
All packages that were failing on x86_64-darwin are marked broken.
I'm assuming here that these are also broken on aarch64-darwin.

(cherry picked from commit cd3c25616d)
2022-05-30 14:19:01 +02:00
Rick van Schijndel
0c269335a9 ccl: mark broken on x86_64-darwin
(cherry picked from commit 6d9a33741e)
2022-05-30 14:19:01 +02:00
Rick van Schijndel
0dc1602b92 cataclysm-dda-git: mark broken on x86_64-darwin
(cherry picked from commit 941458e0b9)
2022-05-30 14:19:01 +02:00
Rick van Schijndel
779dcac6fc cargo-modules: mark broken on x86_64-darwin
(cherry picked from commit 2542b4d60e)
2022-05-30 14:19:00 +02:00
Rick van Schijndel
96e8c48c1f cargo-deb: mark broken on x86_64-darwin
(cherry picked from commit ed7599305f)
2022-05-30 14:19:00 +02:00
Rick van Schijndel
ce94f5ee41 cardinal: mark broken on darwin
(cherry picked from commit dd6e61fa54)
2022-05-30 14:19:00 +02:00
Rick van Schijndel
1dd5dabfc9 bupstash: mark broken on x86_64-darwin
Related to https://github.com/NixOS/nixpkgs/issues/101229

(cherry picked from commit c3fa68c928)
2022-05-30 14:19:00 +02:00
Rick van Schijndel
6ebd1794aa bullet-roboschool: mark broken on x86_64-darwin
(cherry picked from commit bc286911d8)
2022-05-30 14:19:00 +02:00
Rick van Schijndel
4304f69306 bsnes-hd: mark broken on x86_64-darwin
(cherry picked from commit d898e26892)
2022-05-30 14:18:59 +02:00
Rick van Schijndel
3f8c71eff2 boofuzz: mark broken on x86_64-darwin
(cherry picked from commit 1f88f6a2c0)
2022-05-30 14:18:59 +02:00
Rick van Schijndel
41b16eb3b5 boinc: mark broken for aarch64
(cherry picked from commit 90869787c5)
2022-05-30 14:18:59 +02:00
Rick van Schijndel
528ab12cb7 blender: mark broken on x86_64-darwin
(cherry picked from commit 53d8d81656)
2022-05-30 14:18:59 +02:00
Rick van Schijndel
3893752d12 bigloo: mark broken on x86_64 Darwin
(cherry picked from commit 8152b170e2)
2022-05-30 14:18:59 +02:00
Rick van Schijndel
2eaf7db352 binwalk: mark broken on x86_64-darwin
Probably some issues with signatures.
Disabling this test may or may not also help.

(cherry picked from commit ce7a64713e)
2022-05-30 14:18:58 +02:00
Rick van Schijndel
667e5d3a64 bakelite: only supports linux
(cherry picked from commit 5d8ec2adc1)
2022-05-30 14:18:58 +02:00
Rick van Schijndel
cc1e49cf6a awless: mark broken for aarch64-linux
Unclear if this ever worked.

asm: InitTextSym double init for .Syscall
panic: invalid use of LSym - NewFuncInfo with Extra of type *obj.FuncInfo

goroutine 1 [running]:
cmd/internal/obj.(*LSym).NewFuncInfo(0x400015e100)
        /nix/store/9nqp0vlgakl12c6irdn3qvicqsvc2zl8-go-1.17.10/share/go/src/cmd/internal/obj/link.go:496 +0x134
cmd/internal/obj.(*Link).InitTextSym(0x400017c000, 0x400015e100, 0x4)
        /nix/store/9nqp0vlgakl12c6irdn3qvicqsvc2zl8-go-1.17.10/share/go/src/cmd/internal/obj/plist.go:153 +0x10c
cmd/asm/internal/asm.(*Parser).asmText(0x400013fe60, {0x400013fd00, 0x3, 0x3})
        /nix/store/9nqp0vlgakl12c6irdn3qvicqsvc2zl8-go-1.17.10/share/go/src/cmd/asm/internal/asm/asm.go:180 +0x4f0
cmd/asm/internal/asm.(*Parser).pseudo(0x400013fe60, {0x4000130460, 0x4}, {0x400013fd00, 0x3, 0x3})
        /nix/store/9nqp0vlgakl12c6irdn3qvicqsvc2zl8-go-1.17.10/share/go/src/cmd/asm/internal/asm/parse.go:297 +0x7c
cmd/asm/internal/asm.(*Parser).Parse(0x400013fe60)
        /nix/store/9nqp0vlgakl12c6irdn3qvicqsvc2zl8-go-1.17.10/share/go/src/cmd/asm/internal/asm/parse.go:105 +0xcc
main.main()
        /nix/store/9nqp0vlgakl12c6irdn3qvicqsvc2zl8-go-1.17.10/share/go/src/cmd/asm/main.go:91 +0x814

(cherry picked from commit 223184228c)
2022-05-30 14:18:58 +02:00
Rick van Schijndel
277a046219 aspino: mark broken for x86_64 Darwin
Been broken for a few years already too.

(cherry picked from commit 5e1adacaf0)
2022-05-30 14:18:58 +02:00
Rick van Schijndel
92315bf58b alttpr-opentracker: only enable on x86_64-linux
It was failing to build on aarch64-linux with:

Executing dotnetConfigureHook
  Determining projects to restore...
  Restored /build/source/OpenTracker.UnitTests/OpenTracker.UnitTests.csproj (in 35.07 sec).
  Restored /build/source/OpenTracker.Models/OpenTracker.Models.csproj (in 520 ms).
  Restored /build/source/OpenTracker.Utils/OpenTracker.Utils.csproj (in 48 ms).
/build/source/OpenTracker/OpenTracker.csproj : error NU1101: Unable to find package Microsoft.NETCore.App.Host.linux-arm64. No packages exist with this id in source(s): /nix/store/x82zwgmqdbp4xykx1nkrjin8hicm8jld-opentracker-1.8.2-nuget-source/lib [/build/source/OpenTracker.sln]
  Failed to restore /build/source/OpenTracker/OpenTracker.csproj (in 12.45 sec).
  Restored /build/source/Avalonia.ThemeManager/Avalonia.ThemeManager.csproj (in 56 ms).

(cherry picked from commit b465f1a92f)
2022-05-30 14:18:58 +02:00
Rick van Schijndel
e0206b48ca adwaita-qt: mark broken on Darwin since it doesn't build with qt514
Darwin is still using qt514 instead of qt515.

(cherry picked from commit 70c66de145)
2022-05-30 14:18:57 +02:00
Rick van Schijndel
f18b0b125a CHOWTapeModel: mark broken on aarch64
(cherry picked from commit 859aa7da13)
2022-05-30 14:18:57 +02:00
Janne Heß
bc7824cc01 Merge pull request #175458 from NixOS/backport-175445-to-release-22.05
[Backport release-22.05] nixos/vmware-guest: Remove the video driver
2022-05-30 12:56:26 +02:00
Janne Heß
ecc36827c6 nixos/vmware-guest: Remove the video driver
This breaks isos since https://github.com/NixOS/nixpkgs/pull/172668
because vmware is enabled there. @K900 tested this and confirmed that
the GPU acceleration still works.

(cherry picked from commit 5157246aa4)
2022-05-30 10:37:15 +00:00
7c6f434c
be5e3632be Merge pull request #175434 from NixOS/backport-175426-to-release-22.05
[Backport release-22.05] gajim: 1.4.1 → 1.4.2
2022-05-30 07:48:35 +00:00
Robert Scott
44aa4d1566 liblouis: fix darwin build with patch
(cherry picked from commit 327af2f90f)
2022-05-30 07:15:15 +00:00
Vincent Laporte
362889b5c2 gajim: 1.4.1 → 1.4.2
(cherry picked from commit 1593316a21)
2022-05-30 06:29:45 +00:00
Robert Scott
7f7e833e0b Merge pull request #175373 from NixOS/backport-175357-to-release-22.05
[Backport release-22.05] python3Packages.cnvkit: 0.9.7 -> 0.9.9, skip broken test
2022-05-30 00:22:50 +01:00
Robert Scott
2830ce4133 Merge pull request #175371 from NixOS/backport-175336-to-release-22.05
[Backport release-22.05] python3Packages.pomegranate: 0.13.5 -> 0.14.8
2022-05-30 00:17:17 +01:00
Robert Scott
d20913a939 python3Packages.cnvkit: 0.9.7 -> 0.9.9, skip broken test
(cherry picked from commit 798d9f9f3b)
2022-05-29 23:11:56 +00:00
Robert Scott
7ac55c542a python3Packages.pomegranate: 0.13.5 -> 0.14.8
(cherry picked from commit 17003648fe)
2022-05-29 22:52:35 +00:00
Bjørn Forsman
10c86be5af genimage: 9 -> 15
It still doesn't install any documenation, the README now has .rst file
extension.

(cherry picked from commit 42b247f7e7)
2022-05-29 23:26:35 +02:00
Martin Weinelt
49de89df1a Merge pull request #175338 from NixOS/backport-175095-to-release-22.05 2022-05-29 23:14:57 +02:00
sternenseemann
66160e08c4 fcft: 3.1.1 -> 3.1.2
https://codeberg.org/dnkl/fcft/releases/tag/3.1.2
(cherry picked from commit ebfcc109b2)
2022-05-29 23:12:36 +02:00
maxine [they]
6ee6788cb0 Merge pull request #175277 from NixOS/backport-175236-to-release-22.05
[Backport release-22.05] gnome.gnome-terminal: 3.44.0 -> 3.44.1
2022-05-29 22:49:44 +02:00
maxine [they]
23d2d93e19 Merge pull request #175276 from NixOS/backport-175230-to-release-22.05
[Backport release-22.05] gnome.aisleriot: 3.22.22 -> 3.22.23
2022-05-29 22:49:41 +02:00
Janne Heß
889c107a29 Merge pull request #174967 from NixOS/backport-174734-to-release-22.05
[Backport release-22.05] release: Slightly adjust release-critical packages
2022-05-29 21:34:05 +02:00
Janne Heß
6ffcbe6bc8 Merge pull request #174980 from NixOS/backport-174639-to-release-22.05
[Backport release-22.05] nixos/version: add trailing newline to os-release
2022-05-29 21:33:21 +02:00
Janne Heß
e495381dad Merge pull request #175190 from NixOS/backport-174795-to-release-22.05
[Backport release-22.05] openmoji-black,openmoji-color: fix hanging builds
2022-05-29 21:29:18 +02:00
Martin Weinelt
5d4a350660 nixos/doc/rl-2205: add slapd argon2 module rename hint
(cherry picked from commit 173fdcb251)
2022-05-29 18:54:06 +00:00
Thiago Kenji Okada
388410bd28 Merge pull request #175329 from NixOS/backport-175302-to-release-22.05
[Backport release-22.05] distrobox: 1.2.15 -> 1.3.0
2022-05-29 18:58:00 +01:00
AtilaSaraiva
ee30f081ef distrobox: 1.2.15 -> 1.3.0
(cherry picked from commit 4330af7dd8)
2022-05-29 17:38:02 +00:00
Robert Scott
489b52c6b7 Merge pull request #175318 from NixOS/backport-174522-to-release-22.05
[Backport release-22.05] python39Packages.graspologic: mark as broken
2022-05-29 16:51:43 +01:00
Fabian Affolter
0a553b0ace python39Packages.graspologic: mark as broken
(cherry picked from commit 9102b1cc65)
2022-05-29 15:32:23 +00:00
Bobby Rong
ec8c383af7 Merge pull request #175229 from NixOS/backport-175112-to-release-22.05
[Backport release-22.05] snowflake: 2.0.1 -> 2.2.0
2022-05-29 21:17:26 +08:00
Thiago Kenji Okada
db78278ff2 Merge pull request #175280 from NixOS/backport-175221-to-release-22.05
[Backport release-22.05] argocd-autopilot: 0.3.5 -> 0.3.7
2022-05-29 12:06:52 +01:00
Bryan A. S
2e263afbd0 argocd-autopilot: 0.3.5 -> 0.3.7
- bump version

- fix typo in ldflags to make sure default manifests url works

(cherry picked from commit 063471168d)
2022-05-29 10:39:01 +00:00
Rick van Schijndel
2a64cd672b Merge pull request #175263 from NixOS/backport-174762-to-release-22.05
[Backport release-22.05] u-boot: embiggen RPi kernel allocation again, again
2022-05-29 12:19:19 +02:00
R. Ryantm
623b1681a6 gnome.gnome-terminal: 3.44.0 -> 3.44.1
(cherry picked from commit 87fd72101b)
2022-05-29 10:12:29 +00:00
R. Ryantm
49d24ce4d8 gnome.aisleriot: 3.22.22 -> 3.22.23
(cherry picked from commit 9344541ff2)
2022-05-29 10:11:14 +00:00
maxine [they]
82d155a8ef Merge pull request #175237 from NixOS/backport-175233-to-release-22.05 2022-05-29 11:12:44 +02:00
maxine [they]
88215e69ae Merge pull request #175234 from NixOS/backport-175231-to-release-22.05 2022-05-29 11:12:31 +02:00
Vladimír Čunát
d21a6faf85 Merge #174340: e2fsprogs: apply patch unconditionally
...into release-22.05
2022-05-29 10:45:19 +02:00
K900
d42735f21b u-boot: embiggen RPi kernel allocation again, again
(cherry picked from commit ff391e0f0d)
2022-05-29 07:47:42 +00:00
R. Ryantm
cd7af3091d gnome.gnome-maps: 42.1 -> 42.2
(cherry picked from commit d64d4c8fcc)
2022-05-29 04:19:49 +00:00
Robert Schütz
ca7b592395 python310Packages.ocrmypdf: fix build on Darwin
With enabled sandbox we get
    PermissionError: [Errno 1] Operation not permitted
when calling os.nice().

(cherry picked from commit 65450988a5)
2022-05-28 21:18:52 -07:00
Robert Schütz
fb9306521f python310Packages.pikepdf: fix build on aarch64-darwin
(cherry picked from commit f0eb6d2059)
2022-05-28 21:18:52 -07:00
R. Ryantm
361309a694 gnome.eog: 42.1 -> 42.2
(cherry picked from commit 213cac429f)
2022-05-29 04:06:08 +00:00
Robert Schütz
6daced223a python310Packages.miniaudio: fix build on Darwin
(cherry picked from commit 57436c50ee)
2022-05-28 20:45:53 -07:00
Yaya
a87c409c9d snowflake: 2.0.1 -> 2.2.0
(cherry picked from commit 45109ffcb8)
2022-05-29 03:30:01 +00:00
Bobby Rong
fc206e3522 Merge pull request #175036 from NixOS/backport-173947-to-release-22.05
[Backport release-22.05] vkdisplayinfo: init at 0.1
2022-05-29 11:27:18 +08:00
Mario Rodas
1ae0feedfb Merge pull request #175213 from NixOS/backport-173501-to-release-22.05
[Backport release-22.05] mysql: 8.0.28 -> 8.0.29
2022-05-28 20:44:21 -05:00
Aaron Jheng
47e85c3a34 mysql: 8.0.28 -> 8.0.29
(cherry picked from commit 0ce4fec785)
2022-05-29 00:12:17 +00:00
Martin Weinelt
53d60246da Merge pull request #175115 from NixOS/backport-172849-to-release-22.05 2022-05-29 01:59:45 +02:00
Robert Scott
3ef0aa0806 Merge pull request #175184 from NixOS/backport-174997-to-release-22.05
[Backport release-22.05] python3Packages.aioftp: skip pasv-mode test on darwin
2022-05-29 00:34:23 +01:00
Thiago Kenji Okada
d4efa1d822 Merge pull request #175203 from NixOS/backport-174897-to-release-22.05
[Backport release-22.05] each: 0.1.3 -> 0.2.0
2022-05-28 23:18:50 +01:00
Rick van Schijndel
8e5e8a366b Merge pull request #175181 from NixOS/backport-173198-to-release-22.05
[Backport release-22.05] nlohmann_json: 3.10.2 -> 3.10.5
2022-05-28 23:42:54 +02:00
R. Ryantm
7327559ad1 each: 0.1.3 -> 0.2.0
(cherry picked from commit 635d185f91)
2022-05-28 21:41:11 +00:00
Rick van Schijndel
38c57eb610 Merge pull request #175176 from NixOS/backport-173132-to-release-22.05
[Backport release-22.05] sigi: 3.3.0 -> 3.4.0
2022-05-28 23:23:47 +02:00
Francesco Gazzetta
fa71687b27 openmoji-black,openmoji-color: fix hanging builds
...by downgrading fontforge.

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

(cherry picked from commit 6ee6794c8c)
2022-05-28 20:17:21 +00:00
Niklas Hambüchen
96d30fd819 Merge pull request #175164 from NixOS/backport-173370-to-release-22.05
[Backport release-22.05] turbovnc: 2.2.7 -> 3.0, unvendor libs
2022-05-28 21:58:09 +02:00
Robert Scott
53544f8d64 python3Packages.aioftp: skip pasv-mode test on darwin
(cherry picked from commit cd07879440)
2022-05-28 19:42:15 +00:00
Markus S. Wamser
cfc4f9536a nlohmann_json: 3.10.2 -> 3.10.5
(cherry picked from commit 1dfba65a22)
2022-05-28 19:29:36 +00:00
hiljusti
921f8b4bd6 sigi: 3.3.0 -> 3.4.0
(cherry picked from commit 96467f286f)
2022-05-28 18:59:47 +00:00
Maximilian Bosch
515f7e95a6 wiki-js: 2.5.282 -> 2.5.283
ChangeLog: https://github.com/requarks/wiki/releases/tag/v2.5.283
(cherry picked from commit 9b11851ccf)
2022-05-28 18:24:20 +00:00
R. Ryantm
f1f0c4c1ac avrdudess: 2.13 -> 2.14
(cherry picked from commit 84ebb9b9f6)
2022-05-28 19:58:52 +02:00
Markus S. Wamser
d3c1f66ebb turbovnc: 2.2.7 -> 3.0, unvendor libs
(cherry picked from commit 891df4eec9)
2022-05-28 17:58:52 +00:00
Gabriel Ebner
f01602e62a Merge pull request #175155 from NixOS/backport-175139-to-release-22.05
[Backport release-22.05] linuxPackages.digimend: unstable-2019-06-18 -> 10
2022-05-28 19:02:30 +02:00
Mario Rodas
db69d106a5 Merge pull request #174963 from NixOS/backport-174937-to-release-22.05
[Backport release-22.05] plantuml: 1.2022.3 -> 1.2022.5
2022-05-28 11:30:10 -05:00
Gabriel Ebner
ff48f1faa1 linuxPackages.digimend: unstable-2019-06-18 -> 10
(cherry picked from commit ddf273588e)
2022-05-28 16:08:50 +00:00
Artturi
1328a1b0e8 Merge pull request #175054 from NixOS/backport-170545-to-release-22.05
[Backport release-22.05] kitty: 0.24.4 -> 0.25.0
2022-05-28 18:46:02 +03:00
Bjørn Forsman
61bd5ce6a8 pulseview: hotfix build
libsForQt514 uses a custom stdenv that cause breakage when mixed with
boost built with normal stdenv. Fix it by building boost with the same
stdenv as libsForQt514.

This is a dirty fix compared to https://github.com/NixOS/nixpkgs/pull/171380,
but without mass rebuilds.

(cherry picked from commit 8d5481d01c)
2022-05-28 17:30:14 +02:00
José Romildo Malaquias
13209ddf33 Merge pull request #175141 from NixOS/backport-174931-to-release-22.05
[Backport release-22.05] xfce: move legacy aliases outside the scope of xfce
2022-05-28 12:22:08 -03:00
José Romildo
4e63ae1e0f xfce: move legacy aliases outside the scope of xfce
(cherry picked from commit 52beb63f4e)
2022-05-28 15:00:27 +00:00
José Romildo Malaquias
7429d1dec3 Merge pull request #175113 from NixOS/backport-174277-to-release-22.05
[Backport release-22.05] xfce: convert old aliases to throws, and remove old throws
2022-05-28 11:55:02 -03:00
José Romildo Malaquias
5870c4f0fb Merge pull request #175131 from NixOS/backport-174197-to-release-22.05
[Backport release-22.05] xfce.xfce4-terminal: 1.0.3 -> 1.0.4
2022-05-28 11:52:49 -03:00
Jörg Thalheim
812751d57f Merge pull request #175043 from NixOS/backport-174776-to-release-22.05
[Backport release-22.05] xkcd-font: fix build
2022-05-28 15:35:29 +01:00
Jörg Thalheim
aada3dbffd Merge pull request #175120 from NixOS/backport-175108-to-release-22.05
[Backport release-22.05] docs: document using labels for backporting in CONTRIBUTING.md
2022-05-28 15:33:08 +01:00
Bobby Rong
f00aef2d38 Merge pull request #174588 from NixOS/backport-169312-to-release-22.05
[Backport release-22.05] apko: init at 0.3.3
2022-05-28 22:11:31 +08:00
José Romildo
730e258412 xfce.xfce4-terminal: 1.0.3 -> 1.0.4
(cherry picked from commit e4dad6d606)
2022-05-28 13:58:20 +00:00
Arnout Engelen
49db510d94 CONTRIBUTING.md: document using labels for backporting
(cherry picked from commit d73290c6dd)
2022-05-28 12:36:25 +00:00
Robert Scott
95d85ef635 Merge pull request #175116 from NixOS/backport-175039-to-release-22.05
[Backport release-22.05] clingcon: fix build
2022-05-28 13:21:44 +01:00
Azat Bahawi
817e0854f7 clingcon: fix build
Fix build https://hydra.nixos.org/build/178237905

(cherry picked from commit aa8447dd0c)
2022-05-28 11:45:54 +00:00
maxine [they]
812ec6fbca Merge pull request #175102 from NixOS/backport-175067-to-release-22.05 2022-05-28 13:38:03 +02:00
Matthias Treydte
fd46fd58f2 nixos/systemd-boot: fix systemd-boot-builder dowgrade to fail
Since, 4ddc78818e systemd-boot-builder
is broken in two ways:

  * if no systemd-boot is currently installed *and* the NIXOS_INSTALL_BOOTLOADER
    env variable is not set, it will try to run "bootctl update", which will fail
  * if the currently installed systemd-boot version is newer than the version
    we're about to install, it will also try to run "bootctl update", which will fail

This patch changes the behaviour,

  * for the first case to still fail, but not even bother to try running
    "bootctl update" and instead erroring out with an exception
  * for the second case to leave the newer version in place, restoring
    the pre - 4ddc78818e behaviour

To do the proper version check a new "should_update" helper function was introduced,
mimicing the compare_product C function from bootctl. If the following systemd
issue gets resolved, we would have a nice way to get rid of this function:

> https://github.com/systemd/systemd/issues/23450

This change allows to again switch to a different NixOS configuration which contains
an older systemd-boot.

Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
(cherry picked from commit a30de3b849)
2022-05-28 11:29:14 +00:00
José Romildo
f52be30c02 xfce: convert old aliases to throws, and remove old throws
(cherry picked from commit 886d8b7ecf)
2022-05-28 11:21:28 +00:00
Janne Heß
d1086907f5 Merge pull request #174961 from NixOS/backport-174722-to-release-22.05
[Backport release-22.05] perl*Packages: Fix all packages
2022-05-28 12:29:49 +02:00
R. Ryantm
92d6058128 gnome.gnome-control-center: 42.1 -> 42.2
(cherry picked from commit 2fe8fe3ec6)
2022-05-28 10:12:53 +00:00
José Romildo Malaquias
714c4cce49 Merge pull request #175025 from NixOS/backport-173031-to-release-22.05
[Backport release-22.05] lxqt.libqtxdg: 3.9.0 -> 3.9.1
2022-05-28 06:54:05 -03:00
Bobby Rong
1127044143 Merge pull request #175085 from NixOS/backport-175059-to-release-22.05
[Backport release-22.05] pantheon.elementary-feedback: 6.1.0 -> 6.1.1
2022-05-28 17:10:15 +08:00
maxine [they]
69fd269a46 Merge pull request #175073 from NixOS/backport-175065-to-release-22.05
[Backport release-22.05] gnome.gnome-calculator: 42.0 -> 42.1
2022-05-28 11:08:27 +02:00
maxine [they]
1cf16ebae9 Merge pull request #175078 from NixOS/backport-175074-to-release-22.05
[Backport release-22.05] _1password: fix hashes
2022-05-28 11:05:21 +02:00
Michele Guerini Rocco
a840724b0c Merge pull request #175037 from NixOS/backport-174757-to-release-22.05
[Backport release-22.05] qutebrowser: 2.5.0 -> 2.5.1
2022-05-28 10:47:02 +02:00
Bobby Rong
fa127ed2cf pantheon.elementary-feedback: load metadata from correct location
(cherry picked from commit 874fb627c4)
2022-05-28 08:33:41 +00:00
Bobby Rong
3df1b42267 pantheon.elementary-feedback: 6.1.0 -> 6.1.1
(cherry picked from commit e741166e62)
2022-05-28 08:33:40 +00:00
Jörg Thalheim
8160ad8247 Merge pull request #175081 from NixOS/backport-152437-to-release-22.05
[Backport release-22.05] picoscope: fix sources
2022-05-28 09:02:38 +01:00
Jörg Thalheim
1e4ab9e339 picoscope: fix sources
(cherry picked from commit a3a93502f1)
2022-05-28 07:44:15 +00:00
Mario Rodas
971ad1c5b5 _1password: fix hashes
The latest version bump only updated the hash for x86_64-linux.

(cherry picked from commit dab999d541)
2022-05-28 07:34:14 +00:00
Jörg Thalheim
9af86f3121 Merge pull request #174944 from NixOS/backport-174680-to-release-22.05
[Backport release-22.05] nix-ld: disable build on non-linux platforms
2022-05-28 08:30:27 +01:00
Wael Nasreddine
08be99ada5 Merge pull request #175076 from NixOS/backport-175026-to-release-22.05 2022-05-28 00:21:08 -07:00
Maximilian Bosch
b1426df893 packer: 1.8.0 -> 1.8.1
ChangeLog: https://github.com/hashicorp/packer/blob/v1.8.1/CHANGELOG.md#181-may-27-2022
(cherry picked from commit 125e0b9f5c)
2022-05-28 06:52:50 +00:00
R. Ryantm
a883bac308 gnome.gnome-calculator: 42.0 -> 42.1
(cherry picked from commit cdcf234ef3)
2022-05-28 05:02:56 +00:00
Malo Bourgon
9f7197cff3 kitty: 0.24.4 -> 0.25.0
(cherry picked from commit 41d4a16961)
2022-05-28 01:27:13 +00:00
Robert Schütz
71be98ead1 ostinato: fix desktop file
(cherry picked from commit dcd7915d17)
2022-05-27 17:16:49 -07:00
midchildan
01895ff5df xkcd-font: add comment
(cherry picked from commit 05e4997ae9)
2022-05-27 23:30:12 +00:00
midchildan
72727d16fe xkcd-font: remove dotfiles from output
(cherry picked from commit 736905b7e8)
2022-05-27 23:30:12 +00:00
midchildan
6bf9570279 xkcd-font: fix build
(cherry picked from commit ef97620b66)
2022-05-27 23:30:12 +00:00
Robert Schütz
b4d2bc6726 qutebrowser: 2.5.0 -> 2.5.1
https://github.com/qutebrowser/qutebrowser/releases/tag/v2.5.1
(cherry picked from commit 2be2461a98)
2022-05-27 22:58:16 +00:00
Luna Nova
75a28d908b vkdisplayinfo: init at 0.1
https://github.com/ChristophHaag/vkdisplayinfo

Apply suggestions from @SuperSandro2000's code review

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Don't use pipefail

(cherry picked from commit 108dea5cda)
2022-05-27 22:55:15 +00:00
José Romildo
894508e63b lxqt.lxqt-session: 1.1.0 -> 1.1.1
(cherry picked from commit 1c884fb5bd)
2022-05-27 22:32:43 +00:00
José Romildo
b5b02698f6 lxqt.qtxdg-tools: init at 3.9.1
(cherry picked from commit 6a69317900)
2022-05-27 22:32:42 +00:00
José Romildo
976a934df5 lxqt.libqtxdg: 3.9.0 -> 3.9.1
(cherry picked from commit 3ab2cf2279)
2022-05-27 22:32:42 +00:00
Niklas Hambüchen
33f78039b4 Merge pull request #174983 from NixOS/backport-174669-to-release-22.05
[Backport release-22.05] consul: 1.12.0 -> 1.12.1
2022-05-27 22:32:06 +02:00
Robert Scott
c5e45824da Merge pull request #174973 from NixOS/backport-174817-to-release-22.05
[Backport release-22.05] curl: deduplicate definition of `passthru.tests`
2022-05-27 20:30:24 +01:00
Robert Scott
f344c2bb1a Merge pull request #174976 from NixOS/backport-174820-to-release-22.05
[Backport release-22.05] python3Packages.nitime: disable test test_FilterAnalyzer
2022-05-27 20:30:10 +01:00
Robert Scott
3e89701b6f Merge pull request #174972 from NixOS/backport-174818-to-release-22.05
[Backport release-22.05] gecode_3: fix on darwin using same patch as gecode_6
2022-05-27 20:29:30 +01:00
techknowlogick
201b09125f consul: 1.12.0 -> 1.12.1
(cherry picked from commit 933a7b06bc)
2022-05-27 17:44:34 +00:00
Matthew Toohey
c3aa32bed0 nixos/version: add trailing newline to os-release
(cherry picked from commit e41c423b01)
2022-05-27 17:34:48 +00:00
Robert Scott
aaf38814a7 python3Packages.nitime: disable test test_FilterAnalyzer
fails on all platforms after scipy 1.8.0 bump

(cherry picked from commit f01cef9982)
2022-05-27 17:16:15 +00:00
Robert Scott
889b6d813b curl: deduplicate definition of passthru.tests
(cherry picked from commit e9a0f109e5)
2022-05-27 16:59:21 +00:00
Robert Scott
fc72e35403 gecode_3: fix on darwin using same patch as gecode_6
(cherry picked from commit dd41e3832a)
2022-05-27 16:58:28 +00:00
Janne Heß
6e466b727d release: Slightly adjust release-critical packages
Removing Python 2 because it's EOL and most packages don't use it
anymore.
Also replace thunderbird with firefox because more people use it and it
feels better maintained in general

(cherry picked from commit 24bd72fd83)
2022-05-27 16:29:15 +00:00
Thomas Gerbet
44c1444338 plantuml: 1.2022.3 -> 1.2022.5
Fixes CVE-2022-1231.
https://plantuml.com/en/changes

(cherry picked from commit b6e3591669)
2022-05-27 15:53:55 +00:00
Janne Heß
c7bcba0389 perl*Packages: Fix all packages
This is mostly done by disabling the tests or the entire package on
Darwin

(cherry picked from commit 2997839463)
2022-05-27 15:39:24 +00:00
Rick van Schijndel
7ec4e53390 Merge pull request #174602 from NixOS/backport-174222-to-release-22.05
[Backport release-22.05] linuxPackages.rtw88: 2021-04-19 to 2022-05-08, removed broken mark.
2022-05-27 16:07:22 +02:00
Jörg Thalheim
1f0b10ae8b nix-ld: disable build on non-linux platforms
(cherry picked from commit fcb339e294)
2022-05-27 13:57:09 +00:00
Kerstin Humm
7bb3e009c1 mastodon: 3.5.2 -> 3.5.3
(cherry picked from commit db795b8f2b)
2022-05-27 14:50:30 +02:00
maxine [they]
779e2f50f8 Merge pull request #174902 from NixOS/backport-174794-to-release-22.05
[Backport release-22.05] kind: 0.11.1 -> 0.14.0
2022-05-27 12:39:42 +02:00
Maxine Aubrey
9ffa7a7abb kind: 0.11.1 -> 0.14.0
- https://github.com/kubernetes-sigs/kind/releases/tag/v0.12.0
- https://github.com/kubernetes-sigs/kind/releases/tag/v0.13.0
- https://github.com/kubernetes-sigs/kind/releases/tag/v0.14.0

Changes:
- update/fix nixos specific kernel module path patch
- change build options to match upstream
- pin major go version to match upstream

(cherry picked from commit 5b062820b6)
2022-05-27 10:38:20 +00:00
maxine [they]
dddcef9ef7 Merge pull request #174549 from NixOS/backport-174524-to-release-22.05
[Backport release-22.05] coredns: 1.9.1 -> 1.9.2
2022-05-27 12:23:27 +02:00
maxine [they]
86631674f3 Merge pull request #174889 from NixOS/backport-174851-to-release-22.05
[Backport release-22.05] gnome.gnome-initial-setup: 42.1.1 -> 42.2
2022-05-27 12:17:31 +02:00
maxine [they]
31a0fe22f4 Merge pull request #174882 from NixOS/backport-174848-to-release-22.05
[Backport release-22.05] gnome.gedit: 42.0 -> 42.1
2022-05-27 12:17:17 +02:00
R. Ryantm
27d041e617 gnome.gnome-initial-setup: 42.1.1 -> 42.2
(cherry picked from commit c49b38e057)
2022-05-27 08:44:26 +00:00
Timo Kaufmann
41d80aaff9 Merge pull request #174785 from NixOS/backport-174139-to-release-22.05
[Backport release-22.05] sage: fix passthru.kernelspec regression
2022-05-27 10:38:43 +02:00
R. Ryantm
a76201ad78 gnome.gedit: 42.0 -> 42.1
(cherry picked from commit c7acf6a4ac)
2022-05-27 07:54:53 +00:00
Maximilian Bosch
e7dbbc76e7 Merge pull request #174813 from NixOS/backport-174773-to-release-22.05
[Backport release-22.05] Linux kernel updates 2022-05-25
2022-05-27 07:56:02 +02:00
Kerstin Humm
308d79072c python3Packages.python-louvain: fix test karate
Also add pandas, scipy to checkInputs

(cherry picked from commit 22f3d34c93)
2022-05-27 04:39:54 +02:00
R. Ryantm
357ab17bb7 vorta: 0.8.4 -> 0.8.6
(cherry picked from commit a64bf22230)
2022-05-26 17:55:37 -07:00
Maximilian Bosch
0102a71727 linux/hardened/patches/5.4: 5.4.195-hardened1 -> 5.4.196-hardened1
(cherry picked from commit 75f4c62775)
2022-05-26 22:52:40 +00:00
Maximilian Bosch
54ad2d59b7 linux/hardened/patches/5.17: 5.17.9-hardened1 -> 5.17.11-hardened1
(cherry picked from commit ec4b2a871d)
2022-05-26 22:52:40 +00:00
Maximilian Bosch
70426590f0 linux/hardened/patches/5.15: 5.15.41-hardened1 -> 5.15.43-hardened1
(cherry picked from commit e97b03a780)
2022-05-26 22:52:40 +00:00
Maximilian Bosch
27b7a0686f linux/hardened/patches/5.10: 5.10.117-hardened1 -> 5.10.118-hardened1
(cherry picked from commit d8d0dd929e)
2022-05-26 22:52:40 +00:00
Maximilian Bosch
921fbe2c57 linux/hardened/patches/4.19: 4.19.244-hardened1 -> 4.19.245-hardened1
(cherry picked from commit 63192641bb)
2022-05-26 22:52:40 +00:00
Maximilian Bosch
65395800a0 linux/hardened/patches/4.14: 4.14.280-hardened1 -> 4.14.281-hardened1
(cherry picked from commit 08daee172e)
2022-05-26 22:52:40 +00:00
Maximilian Bosch
9c6daf44c5 linux: 5.4.195 -> 5.4.196
(cherry picked from commit d505557a29)
2022-05-26 22:52:40 +00:00
Maximilian Bosch
488dabf121 linux: 5.17.9 -> 5.17.11
(cherry picked from commit c57d757e1b)
2022-05-26 22:52:40 +00:00
Maximilian Bosch
b95e3c00d4 linux: 5.15.41 -> 5.15.43
(cherry picked from commit bc0db57d53)
2022-05-26 22:52:39 +00:00
Maximilian Bosch
bbfd3b5093 linux: 5.10.117 -> 5.10.118
(cherry picked from commit ec5629f3f2)
2022-05-26 22:52:39 +00:00
Maximilian Bosch
0de9fe65fb linux: 4.9.315 -> 4.9.316
(cherry picked from commit 110b58f77e)
2022-05-26 22:52:39 +00:00
Maximilian Bosch
d979074177 linux: 4.19.244 -> 4.19.245
(cherry picked from commit b5c4a60bbe)
2022-05-26 22:52:39 +00:00
Maximilian Bosch
3fa5c1831f linux: 4.14.280 -> 4.14.281
(cherry picked from commit f2e1f34e4c)
2022-05-26 22:52:39 +00:00
Martin Weinelt
6477b12bae python3Packages.sanic: disable some tests again
Apparently those tests still need to be disabled.

(cherry picked from commit b79448d4ee)
2022-05-26 15:17:01 -07:00
Robert Schütz
b00c255692 python310Packages.uvicorn: 0.17.5 -> 0.17.6
https://github.com/encode/uvicorn/releases/tag/0.17.6
(cherry picked from commit 58667dbd53)
2022-05-26 15:17:01 -07:00
sternenseemann
6eeedcd742 Merge pull request #174798 from NixOS/backport-174777-to-release-22.05
[Backport release-22.05] gajim: fix plugin support
2022-05-26 23:40:40 +02:00
Robert Schütz
88e092f22c python3Packages.pykeepass: 4.0.1 -> 4.0.2
https://github.com/libkeepass/pykeepass/blob/v4.0.2/CHANGELOG.rst
(cherry picked from commit 09cce3f3e2)
2022-05-26 14:16:59 -07:00
Robert Scott
fbfe922658 Merge pull request #174779 from NixOS/backport-174617-to-release-22.05
[Backport release-22.05] python3Packages.pot: fix build on darwin
2022-05-26 22:04:13 +01:00
sternenseemann
79d2667dd0 gajim: update download page
(cherry picked from commit 9559ad7758)
2022-05-26 20:45:13 +00:00
sternenseemann
5dc61208df gajim: add dependency on gssapi
Not sure what this is necessary for precisely, but Gajim would complain
about missing it on startup.

(cherry picked from commit 65cc6305ee)
2022-05-26 20:45:13 +00:00
sternenseemann
b904d062b2 gajim: don't vendor old plugin_installer
With 1.4.0 the plugin_installer was added to the main Gajim source tree,
so we no longer need to fetch the plugins repository.

(cherry picked from commit f63c5a45c2)
2022-05-26 20:45:13 +00:00
Manuel Bärenz
6848cb6bfc scribus: Rename scribus{,Unstable} -> scribus{_1_4,}
(cherry picked from commit 28c8201955)
2022-05-26 21:29:30 +02:00
Mauricio Collares
325eb23722 sage: fix passthru.kernelspec regression
(cherry picked from commit 8711501e96)
2022-05-26 19:11:07 +00:00
Martin Weinelt
7212933299 Merge pull request #174768 from NixOS/backport-174716-to-release-22.05 2022-05-26 20:23:13 +02:00
Martin Weinelt
fd840b999a Merge pull request #174766 from NixOS/backport-174718-to-release-22.05 2022-05-26 20:22:02 +02:00
Robert Scott
64a0e6fe03 python3Packages.pot: fix build on darwin
(cherry picked from commit 0cdff58b3f)
2022-05-26 18:19:39 +00:00
Robert Scott
ae77c60007 Merge pull request #174631 from NixOS/backport-174618-to-release-22.05
[Backport release-22.05] coredns: fix tests on darwin
2022-05-26 19:15:26 +01:00
Martin Weinelt
8f2211f0c6 python3Packages.sanic-auth: disable failing test
(cherry picked from commit 664bd428bd)
2022-05-26 17:37:26 +00:00
Martin Weinelt
6dfa1d5a2c python3Packages.elastic-apm: fix tests with sanic>=22.3.0
(cherry picked from commit 39e8b8b42f)
2022-05-26 17:37:25 +00:00
Martin Weinelt
7ea428e9a1 python3Packages.sanic: 21.12.1 -> 22.3.2
(cherry picked from commit c95ab3cc25)
2022-05-26 17:37:25 +00:00
Martin Weinelt
4ef9f03873 python3Packages.sanic-resting: 0.8.2 -> 22.3.0
(cherry picked from commit 1fda638640)
2022-05-26 17:37:25 +00:00
Martin Weinelt
9893de5cfd python3Packages.sanic-routing: 0.7.2 -> 22.3.0
(cherry picked from commit 17273c5fcf)
2022-05-26 17:37:25 +00:00
Martin Weinelt
4b71257186 python3Packages.sentry-sdk: stop testing integrations
They're fragile and break on most dependency upgrades and the upstream
is too slow to catch up in a reasonable timeframe.

Also implement optional-depdencies passthru attr set and clean up unused
dependencies.

(cherry picked from commit df64a670ae)
2022-05-26 17:19:34 +00:00
Kai Wohlfahrt
787b1647a9 python3Packages.aiohttp: remove trustme test dependency on aarch64-darwin
This is an optional test dependency dependency is no longer needed, and
makes the package unbuildable on aarch64-darwin, as it transitively
depends on pyopenssl, which is marked broken.

(cherry picked from commit df1f9ecd9b)
2022-05-26 08:19:38 -07:00
Martin Weinelt
67cdf5099c Merge pull request #174743 from NixOS/backport-174717-to-release-22.05 2022-05-26 16:46:56 +02:00
Martin Weinelt
e409cfe8e9 python3Packages.lomond: disable tornado_4 tests on python3.10
And organize a makeover for the package.

(cherry picked from commit 9c295d34e1)
2022-05-26 14:27:50 +00:00
Martin Weinelt
b1671eaf7f Merge pull request #174739 from NixOS/backport-174719-to-release-22.05 2022-05-26 16:09:15 +02:00
Martin Weinelt
88fc18d34a python3Packages.pyfronius: add patch for python310 compat
(cherry picked from commit 27d3429a3f)
2022-05-26 14:04:44 +00:00
maxine [they]
300811fa8f Merge pull request #174699 from NixOS/backport-174064-to-release-22.05
[Backport release-22.05] golangci-lint: 1.45.2 -> 1.46.2
2022-05-26 15:54:27 +02:00
Martin Weinelt
ca7506ce15 Merge pull request #174723 from NixOS/backport-169430-to-release-22.05 2022-05-26 14:30:56 +02:00
Fabian Möller
718104684b breitbandmessung: don't use bundled electron
(cherry picked from commit 92e2e3b3f4)
2022-05-26 12:27:17 +00:00
Gabriel Ebner
dcc69df9cb Merge pull request #174704 from NixOS/backport-174624-to-release-22.05
[Backport release-22.05] elinks: disable perl support on darwin
2022-05-26 13:19:45 +02:00
Robert Scott
d96ad18485 elinks: disable perl support on darwin
currently causes a header mixup with LIST_HEAD macros

(cherry picked from commit 9b103fac08)
2022-05-26 09:59:13 +00:00
Michael Weiss
282ea22a18 Merge pull request #174449 from NixOS/backport-174338-to-release-22.05
[Backport release-22.05] chromium: 101.0.4951.64 -> 102.0.5005.61
2022-05-26 11:49:31 +02:00
Jan Tojnar
84070c8154 Remove myself from maintainers
Done with `sed -i -E '/^\s+jtojnar\s*$/d;s/ @?jtojnar//g' (rg ' jtojnar|^\s+jtojnar\s*$' -l -g '!maintainers/maintainer-list.nix')`.
(Always check the `rg` result beforehand to avoid corruption.)
2022-05-26 11:30:50 +02:00
Zane van Iperen
28bdfbef5b golangci-lint: 1.45.2 -> 1.46.2
(cherry picked from commit 4a029b2477)
2022-05-26 09:30:49 +00:00
maxine [they]
34f12f5e45 Merge pull request #174561 from NixOS/backport-174102-to-release-22.05
[Backport release-22.05] GNOME updates
2022-05-26 11:00:30 +02:00
adisbladis
192c0dcfc7 Merge pull request #174693 from NixOS/backport-174689-to-release-22.05
[Backport release-22.05] compressFirmwareXz: fix with empty lib/firmware
2022-05-26 16:58:37 +08:00
Alyssa Ross
6fd97eadd7 compressFirmwareXz: fix with empty lib/firmware
Fixes: 8aa8e0ce7f ("nixos/udev: compress all firmware if supported")
(cherry picked from commit 76405e3077)
2022-05-26 08:07:05 +00:00
Jörg Thalheim
99acd989ad Merge pull request #174622 from NixOS/backport-174491-to-release-22.05
[Backport release-22.05] ghidra-bin: 10.1.1 -> 10.1.4
2022-05-26 07:15:59 +01:00
adisbladis
aebc7fd7e2 Merge pull request #174661 from NixOS/backport-174178-to-release-22.05
[Backport release-22.05] emacsPackages.melpaBuild: Update package-build, avoid monkey-patch
2022-05-26 13:55:22 +08:00
Tad Fisher
c8bb3de96e emacsPackages.melpaBuild: Update package-build, avoid monkey-patch
(cherry picked from commit b4e4982e6c)
2022-05-26 02:53:28 +00:00
Robert Scott
794428305f coredns: fix tests on darwin
(cherry picked from commit e9c36e2d76)
2022-05-25 23:26:10 +00:00
Martin Weinelt
e3a8165d29 Merge pull request #174625 from NixOS/backport-174285-to-release-22.05 2022-05-26 01:20:35 +02:00
Tobias Mayer
01ad3873a6 pkgsStatic.python3: fix build
GCC does not come with a `libgcc_eh.a` for the target platform if
it was built without `--enable-shared`. That flag was removed with
c6dd11ca39, meaning we should no longer
attempt to link against that lib.

(cherry picked from commit 1e447d7898)
2022-05-25 22:39:57 +00:00
sintemal
511b94b525 ghidra-bin: 10.1.1 -> 10.1.4
(cherry picked from commit d079f3654d)
2022-05-25 22:21:58 +00:00
Alyssa Ross
55636a152d linuxPackages.openafs: mark broken on Linux 5.18
(cherry picked from commit d7446ec467)
2022-05-25 22:21:48 +00:00
Alyssa Ross
a2a6e71985 linuxPackages.vmware: mark broken on Linux 5.18
(cherry picked from commit f688305451)
2022-05-25 22:21:48 +00:00
Alyssa Ross
3c23c47c69 linuxPackages.virtualbox: mark broken on Linux 5.18
(cherry picked from commit 11ab41731c)
2022-05-25 22:21:48 +00:00
Alyssa Ross
b3d8309c8a linuxPackages.rtl88xxau-aircrack: mark broken on Linux 5.18
(cherry picked from commit 90b308ddf8)
2022-05-25 22:21:48 +00:00
Alyssa Ross
46e171dba1 linuxPackages.rtl8821ce: mark broken on Linux 5.18
(cherry picked from commit de2fc99ca6)
2022-05-25 22:21:48 +00:00
Alyssa Ross
ccec3f70c2 linuxPackages.rtl8192eu: mark broken on Linux 5.18
(cherry picked from commit 044f1204c7)
2022-05-25 22:21:48 +00:00
Alyssa Ross
778388bdff linuxPackages.nvidiabl: mark broken on Linux 5.18
(cherry picked from commit c494537902)
2022-05-25 22:21:48 +00:00
Alyssa Ross
7348038c72 linuxPackages.lttng-modules: mark broken on Linux 5.18
(cherry picked from commit 87fd0b8f5e)
2022-05-25 22:21:48 +00:00
Alyssa Ross
2dba8c3408 linuxPackages.kvmfr: mark broken on Linux 5.18
(cherry picked from commit 4f8a58791b)
2022-05-25 22:21:48 +00:00
Alyssa Ross
c1e01debe7 linuxPackages.kvdo: mark broken on Linux 5.17+
(cherry picked from commit 9da14eb0a6)
2022-05-25 22:21:48 +00:00
Alyssa Ross
7436afa22d linuxPackages.intel-speed-select: mark broken on Linux 5.18
(cherry picked from commit e34fb41128)
2022-05-25 22:21:48 +00:00
Alyssa Ross
f83ace1305 linuxPackages.facetimehd: mark broken on Linux 5.18
(cherry picked from commit cd6418bfe1)
2022-05-25 22:21:48 +00:00
Alyssa Ross
a274814c07 linuxPackages.dpdk: mark broken on Linux 5.18
(cherry picked from commit 5dfffe13e7)
2022-05-25 22:21:48 +00:00
Alyssa Ross
0042f455d1 linuxPackages.dpdk-kmods: mark broken on Linux 5.18
(cherry picked from commit ffbb348e7b)
2022-05-25 22:21:48 +00:00
Alyssa Ross
09a0b5f4d4 linuxPackages.dddvb: mark broken on Linux 5.18
(cherry picked from commit 2e82459fdc)
2022-05-25 22:21:48 +00:00
Alyssa Ross
79e93660fe linuxPackages.bbswitch: mark broken on Linux 5.18
(cherry picked from commit 48d76730a3)
2022-05-25 22:21:48 +00:00
Alyssa Ross
410c3f046b linuxPackages.akvcam: mark broken on Linux 5.18
(cherry picked from commit cac2231057)
2022-05-25 22:21:48 +00:00
Alyssa Ross
aac57c30ea linuxPackages.vendor-reset: enable parallel building
Tested at -j48.

(cherry picked from commit 9dab6bc077)
2022-05-25 22:21:32 +00:00
Alyssa Ross
113012804c linuxPackages.vendor-reset: patch for Linux 5.18
(cherry picked from commit d851e2f78a)
2022-05-25 22:21:32 +00:00
Alyssa Ross
520108641b cgiserver: init at 1.0.0
(cherry picked from commit b97e0d1cbc)
2022-05-25 22:20:57 +00:00
Alyssa Ross
f922a077d8 linux_latest: 5.17.9 -> 5.18
NSFD_V3 is now always enabled, and enabling debug info now requires
selecting a DWARF version instead of just setting DEBUG_INFO=y.

(cherry picked from commit fa7ae8876f)
2022-05-25 22:19:57 +00:00
Alyssa Ross
f6b9994e2e linuxPackages.pktgen: 21.11.0 -> 22.04.1
21.11.0 didn't build with our version of DPDK.

(cherry picked from commit 9278a76d82)
2022-05-25 22:18:51 +00:00
Alyssa Ross
8aa0aa9c7d linuxPackages.netatop: fix build with Linux 5.18
With 5.18, implicit fallthrough is an error, and netatop hasn't caught
up yet.

(cherry picked from commit 197e9ba286)
2022-05-25 22:18:02 +00:00
Robert Scott
2224599890 Merge pull request #174614 from NixOS/backport-174581-to-release-22.05
[Backport release-22.05] python310Packages.pot: 0.8.1.0 -> 0.8.2
2022-05-25 22:20:00 +01:00
Robert Scott
64b479425b Merge pull request #174428 from NixOS/backport-174322-to-release-22.05
[Backport release-22.05] python310Packages.tokenizers: unstable-2021-08-13 -> 0.12.1
2022-05-25 22:15:47 +01:00
Fabian Affolter
c7f4660ac8 python310Packages.pot: 0.8.1.0 -> 0.8.2
(cherry picked from commit b7de85745c)
2022-05-25 21:03:15 +00:00
AtilaSaraiva
daf6ceeebc linuxPackages.rtw88: removing upper version limit for the broken mark
(cherry picked from commit 032a4229f4)
2022-05-25 20:26:27 +00:00
AtilaSaraiva
f57bf57c8d linuxPackages.rtw88: 2021-04-19 to 2022-05-08
added myself to the maintainers

(cherry picked from commit 71749fd81d)
2022-05-25 20:26:27 +00:00
Pascal Bach
d76be3882c Merge pull request #174311 from NixOS/backport-174280-to-release-22.05
[Backport release-22.05] element-{web,desktop}: 1.10.12 -> 1.10.13
2022-05-25 21:40:37 +02:00
Martin Weinelt
86fe1a808a Merge pull request #174589 from NixOS/backport-174535-to-release-22.05 2022-05-25 21:17:52 +02:00
Martin Weinelt
56f9e5d35e dump_syms: 1.0.0 -> 1.0.1
https://github.com/mozilla/dump_syms/releases/tag/v1.0.1
(cherry picked from commit d3564429d5)
2022-05-25 19:16:37 +00:00
06kellyjac
2dbb13690e apko: init at 0.3.3
(cherry picked from commit dcf4c8e7b9)
2022-05-25 19:11:45 +00:00
Martin Weinelt
6efc186e60 Merge pull request #174575 from NixOS/backport-174565-to-release-22.05 2022-05-25 20:45:06 +02:00
Alvar Penning
186c857daa logrotate: 3.19.0 -> 3.20.1
Fixes CVE-2022-1348.

- https://github.com/logrotate/logrotate/releases/tag/3.20.0
- https://github.com/logrotate/logrotate/releases/tag/3.20.1

(cherry picked from commit 0e006cd850)
2022-05-25 18:23:47 +00:00
Jan Tojnar
e5f47298b7 gnome.gnome-keyring: 40.0 → 42.1
https://gitlab.gnome.org/GNOME/gnome-keyring/-/compare/40.0...42.1

The systemd-activation support does not appear to me to be ready yet: https://gitlab.gnome.org/GNOME/gnome-keyring/-/merge_requests/35

(cherry picked from commit 2d6c441042)
2022-05-25 17:32:11 +00:00
Jan Tojnar
a412d05a3b seahorse: fix missing icons
Recent `wrapGAppsHook` change stopped `gcr` from being added to `XDG_DATA_DIRS`:
b1e73fa2e0
But gcr installs icons expected by Seahorse to the hicolor theme so we need to add it back.

Also drop adwaita-icon-theme since whether it will be used depends on user’s environment.

(cherry picked from commit e3e91f0c33)
2022-05-25 17:32:11 +00:00
Jan Tojnar
3090468d02 gupnp-tools: 0.10.2 → 0.10.3
https://gitlab.gnome.org/GNOME/gupnp-tools/-/compare/gupnp-tools-0.10.2...gupnp-tools-0.10.3
(cherry picked from commit 9925507b45)
2022-05-25 17:32:11 +00:00
Jan Tojnar
d3abf842f6 evince: 42.2 → 42.3
https://gitlab.gnome.org/GNOME/evince/-/compare/42.2...42.3
(cherry picked from commit e337e4ea5f)
2022-05-25 17:32:11 +00:00
Jan Tojnar
c7d2d933e3 shotwell: 0.30.15 → 0.30.16
https://gitlab.gnome.org/GNOME/shotwell/-/compare/shotwell-0.30.15...shotwell-0.30.16
(cherry picked from commit 2f87de7b08)
2022-05-25 17:32:11 +00:00
Jan Tojnar
e0aa1f1cd5 orca: 42.0 → 42.1
https://gitlab.gnome.org/GNOME/orca/-/compare/ORCA_42_0...ORCA_42_1
(cherry picked from commit 275b2f85ec)
2022-05-25 17:32:11 +00:00
Jan Tojnar
21e08a43f0 gnome.seahorse: 41.0 → 42.0
https://gitlab.gnome.org/GNOME/seahorse/-/compare/41.0...42.0
(cherry picked from commit b5d942b84f)
2022-05-25 17:32:10 +00:00
maxine [they]
0b9b835599 Merge pull request #174554 from NixOS/backport-174546-to-release-22.05 2022-05-25 19:06:33 +02:00
Maxine Aubrey
cc85ac23b9 docker: 20.10.15 -> 20.10.16
- https://docs.docker.com/engine/release-notes/#201016
- https://github.com/docker/cli/releases/tag/v20.10.16
- https://github.com/moby/moby/releases/tag/v20.10.16

(cherry picked from commit f21fb9441f)
2022-05-25 17:01:25 +00:00
R. Ryantm
44b21b7984 coredns: 1.9.1 -> 1.9.2
(cherry picked from commit ff7d60fdcf)
2022-05-25 16:47:37 +00:00
maxine [they]
50b9bcc9a4 Merge pull request #174544 from NixOS/backport-174488-to-release-22.05
[Backport release-22.05] docker-credential-gcr: 2.1.2 -> 2.1.4
2022-05-25 18:25:57 +02:00
R. Ryantm
e55bd861a9 docker-credential-gcr: 2.1.2 -> 2.1.4
(cherry picked from commit 3740bcad45)
2022-05-25 16:24:35 +00:00
maxine [they]
84026ed10c Merge pull request #174542 from NixOS/backport-174085-to-release-22.05
[Backport release-22.05] slack: 4.25.1 -> 4.26.1
2022-05-25 18:24:14 +02:00
maxine [they]
1f0988a53f Merge pull request #174543 from NixOS/backport-174392-to-release-22.05
[Backport release-22.05] _1password: 2.2.0 -> 2.3.1
2022-05-25 18:24:04 +02:00
R. Ryantm
db4d79857a _1password: 2.2.0 -> 2.3.1
(cherry picked from commit 85ff3bfe63)
2022-05-25 16:22:45 +00:00
nanashi0x74
0700863107 slack:4.25.1 -> 4.26.1
(cherry picked from commit 3d409bffca)
2022-05-25 16:22:38 +00:00
maxine [they]
30482fab2d Merge pull request #174541 from NixOS/backport-174486-to-release-22.05
[Backport release-22.05] docker-compose_2: 2.5.0 -> 2.5.1
2022-05-25 18:22:15 +02:00
R. Ryantm
f1dc426351 docker-compose_2: 2.5.0 -> 2.5.1
(cherry picked from commit dc51978b78)
2022-05-25 16:21:55 +00:00
Michael Weiss
8d1d1dff92 chromium: 101.0.4951.64 -> 102.0.5005.61
https://chromereleases.googleblog.com/2022/05/stable-channel-update-for-desktop_24.html

This update includes 32 security fixes.

CVEs:
CVE-2022-1853 CVE-2022-1854 CVE-2022-1855 CVE-2022-1856 CVE-2022-1857
CVE-2022-1858 CVE-2022-1859 CVE-2022-1860 CVE-2022-1861 CVE-2022-1862
CVE-2022-1863 CVE-2022-1864 CVE-2022-1865 CVE-2022-1866 CVE-2022-1867
CVE-2022-1868 CVE-2022-1869 CVE-2022-1870 CVE-2022-1871 CVE-2022-1872
CVE-2022-1873 CVE-2022-1874 CVE-2022-1875 CVE-2022-1876

(cherry picked from commit e48814a245)
2022-05-25 09:15:11 +00:00
Martin Weinelt
4332560513 Merge pull request #174440 from NixOS/backport-174396-to-release-22.05 2022-05-25 10:11:48 +02:00
R. Ryantm
2cd013ed83 esphome: 2022.5.0 -> 2022.5.1
(cherry picked from commit bd88e1b38b)
2022-05-25 07:58:48 +00:00
Fabian Affolter
04ce374a07 python310Packages.tokenizers: add Security for darwin
(cherry picked from commit 73aa9f07ee)
2022-05-25 06:56:35 +00:00
Fabian Affolter
692f2abe16 python310Packages.tokenizers: unstable-2021-08-13 -> 0.12.1
(cherry picked from commit b95fefe360)
2022-05-25 06:56:35 +00:00
Mario Rodas
0c3bf3a5c3 Merge pull request #174421 from NixOS/backport-174267-to-release-22.05
[Backport release-22.05] postgresqlPackages.timescaledb: 2.6.1 -> 2.7.0
2022-05-25 01:43:11 -05:00
1000101
6652336fc8 postgresqlPackages.timescaledb: 2.6.1 -> 2.7.0
(cherry picked from commit 06eee30956)
2022-05-25 06:24:59 +00:00
Bobby Rong
08cea6f6cc Merge pull request #174263 from NixOS/backport-174220-to-release-22.05
[Backport release-22.05] pantheon.gala: save/restore easing on workspace switch
2022-05-25 12:01:32 +08:00
Robert Scott
851a423898 Merge pull request #174211 from NixOS/backport-173679-to-release-22.05
[Backport release-22.05] moarvm: fix build on darwin
2022-05-25 00:16:43 +01:00
Robert Scott
4d12927134 Merge pull request #174336 from NixOS/backport-174327-to-release-22.05
[Backport release-22.05] python310Packages.pyhocon: disable failing tests
2022-05-25 00:09:06 +01:00
Vladimír Čunát
81bb75b6ef e2fsprogs: apply patch unconditionally
Commit 49d0a5afd mistakenly inverted when to apply the patch.
Maybe it's not needed anymore, as pkgsMusl.e2fsprogs succeeded for me
even without it, but it looks harmless and better not have it inversed.
This way we also don't cause a mass rebuild :-)

(cherry picked from commit f008987704)
2022-05-24 22:47:53 +00:00
Fabian Affolter
a3349543b0 python310Packages.pyhocon: disable failing tests
(cherry picked from commit 76014d394e)
2022-05-24 22:32:24 +00:00
Martin Weinelt
3455859476 Merge pull request #174335 from NixOS/backport-171679-to-release-22.05 2022-05-25 00:23:49 +02:00
Martin Weinelt
ec44a901de Merge pull request #174333 from NixOS/backport-174329-to-release-22.05
[Backport release-22.05] powerdns-admin: fix build
2022-05-25 00:23:13 +02:00
Sebastian Neubauer
5ae3ced1e5 directx-shader-compiler: 1.6.2106 -> 1.6.2112
The glibc update broke compiling dxc. Update and fix compilation.

- Use ninja because it's faster and fixes compilation (uhm, yes, no idea
  why)
- Remove the comment about using submodules only for .git, they are
  actually used for SPIR-V
- The way default CMake flags are passed changed
- Add myself as maintainer

(cherry picked from commit 7655d19fc2)
2022-05-24 22:22:54 +00:00
Robert Scott
648b182a89 Merge pull request #174254 from NixOS/backport-174144-to-release-22.05
[Backport release-22.05] python310Packages.mlflow: 1.25.1 -> 1.26.0
2022-05-24 23:22:23 +01:00
Flakebi
cd575e1d5c powerdns-admin: fix build
Pin jsonschema to 3.2.0 because bravado-core is incompatible with 4.0.
Also fix the dnspython pin.

(cherry picked from commit efec13e550)
2022-05-24 22:18:28 +00:00
Robert Scott
16ad3208e3 Merge pull request #174319 from NixOS/backport-174307-to-release-22.05
[Backport release-22.05] python310Packages.sumtypes: 0.1a5 -> 0.1a6
2022-05-24 22:35:53 +01:00
Robert Scott
8afb7a9534 Merge pull request #174317 from NixOS/backport-174296-to-release-22.05
[Backport release-22.05] python310Packages.qiskit-aer: disable failing test
2022-05-24 22:31:52 +01:00
Robert Scott
48f65c327a Merge pull request #174318 from NixOS/backport-174304-to-release-22.05
[Backport release-22.05] python39Packages.tensorly: disable failing test
2022-05-24 22:29:18 +01:00
Martin Weinelt
b823f47a93 Merge pull request #174320 from NixOS/backport-174312-to-release-22.05 2022-05-24 23:12:35 +02:00
Martin Weinelt
ef406f904d Merge pull request #174314 from NixOS/backport-174249-to-release-22.05
[Backport release-22.05] tor-browser-bundle-bin: 11.0.11 -> 11.0.13
2022-05-24 23:09:34 +02:00
Martin Weinelt
961e143b58 dump_syms: unstable-2022-05-05 -> 1.0.0
https://github.com/mozilla/dump_syms/releases/tag/v1.0.0
(cherry picked from commit 183bd9e940)
2022-05-24 21:09:18 +00:00
Fabian Affolter
4b9e6cba12 python310Packages.sumtypes: 0.1a5 -> 0.1a6
(cherry picked from commit bf30415f27)
2022-05-24 21:00:57 +00:00
Fabian Affolter
51810a0fe3 python39Packages.tensorly: disable failing test
(cherry picked from commit 0bee571d1b)
2022-05-24 21:00:45 +00:00
Fabian Affolter
eae67d0842 python310Packages.qiskit-aer: disable failing test
(cherry picked from commit 7acf1bd715)
2022-05-24 21:00:32 +00:00
FliegendeWurst
379a610966 tor-browser-bundle-bin: 11.0.11 -> 11.0.13
(cherry picked from commit 5c801dd601)
2022-05-24 20:36:17 +00:00
Sumner Evans
c695bcc79b element-{web,desktop}: 1.10.12 -> 1.10.13
(cherry picked from commit 402e5fe40d)
2022-05-24 20:24:10 +00:00
Martin Weinelt
d7cba8862e Merge pull request #174303 from NixOS/backport-174111-to-release-22.05
[Backport release-22.05] linuxPackages.nvidiabl: use a better homepage
2022-05-24 21:13:34 +02:00
Alyssa Ross
91c1c5f493 linuxPackages.nvidiabl: use a better homepage
It makes more sense to point this to the fork that we're using, rather
than the upstream.

(cherry picked from commit 062d21eead)
2022-05-24 19:05:48 +00:00
Robert Scott
339d0fc23d Merge pull request #174300 from NixOS/backport-174175-to-release-22.05
[Backport release-22.05] python3Packages.pyzbar: fix for darwin
2022-05-24 20:00:22 +01:00
Robert Scott
b87b64e349 python3Packages.pyzbar: fix for darwin
(cherry picked from commit a7de2cdcac)
2022-05-24 18:27:20 +00:00
Martin Weinelt
7f99bde23d Merge pull request #174298 from NixOS/backport-173738-to-release-22.05
[Backport release-22.05] buildMozillaMach: add support for MLS
2022-05-24 20:21:05 +02:00
Martin Weinelt
32bd8a47d8 buildMozillaMach: set geo.provider.network.url for new profiles.
Use Mozilla Location Service as geolocation provider for new profiles,
since our Google API key does not seem to work for geolocation at this
time.

Related: https://github.com/NixOS/nixpkgs/issues/173758
(cherry picked from commit 2d97db7873)
2022-05-24 18:14:22 +00:00
Martin Weinelt
a42e4414ac buildMozillaMach: Clean up Google API key configuration
Use a proper filename that and add the URL where information about
requesting API keys can be found.

(cherry picked from commit 0750e47a4d)
2022-05-24 18:14:22 +00:00
Martin Weinelt
8698dd394a buildMozillaMach: add support for MLS
We have received our very own API key for Mozilla Location Services and
have been recognized as a Public Interest Project, implying a rate limit
of 100k daily requests¹, which should be sufficient for our population.

N.B: This key belongs to the NixOS project, please don't use ours, but
instead request your own.

[1] https://location.services.mozilla.com/terms

(cherry picked from commit 1ba9dfbd97)
2022-05-24 18:14:22 +00:00
Rick van Schijndel
75560c4747 Merge pull request #174293 from NixOS/backport-174048-to-release-22.05
[Backport release-22.05] praat: fix cross-compilation
2022-05-24 20:01:15 +02:00
Rick van Schijndel
1715955fcb praat: fix cross-compilation
(cherry picked from commit 55b1550473)
2022-05-24 17:20:04 +00:00
Maximilian Bosch
6c97721a01 Merge pull request #174181 from NixOS/backport-174145-to-release-22.05
[Backport release-22.05] nixos/nextcloud: use PHP 8 avoiding broken 2FA app
2022-05-24 14:26:36 +02:00
Bobby Rong
df8cde54fa pantheon.gala: save/restore easing on workspace switch
(cherry picked from commit 7d48c204ef)
2022-05-24 10:32:10 +00:00
Fabian Affolter
046df58fe2 python310Packages.mlflow: 1.25.1 -> 1.26.0
(cherry picked from commit 00004be60e)
2022-05-24 08:38:11 +00:00
Thiago Kenji Okada
9f80fc22c1 Merge pull request #174240 from NixOS/backport-174129-to-release-22.05
[Backport release-22.05] adtool: mark broken
2022-05-24 08:07:46 +01:00
Martin Weinelt
78f9b41ee9 adtool: mark broken
Broke when updating OpenLDAP>2.5 and has not seen a change since 2017,
which is at this point 5y in the past.

I think it's safe to say that this tool deserves to being marked broken.

(cherry picked from commit d2fa18e744)
2022-05-24 06:38:57 +00:00
Wael Nasreddine
fb0003cd0b Merge pull request #174231 from NixOS/backport-174224-to-release-22.05 2022-05-23 22:09:55 -07:00
Bobby Rong
61b4e52c1e Merge pull request #174234 from NixOS/backport-174217-to-release-22.05
[Backport release-22.05] pantheon.elementary-mail: 6.4.0 -> 7.0.0
2022-05-24 13:02:55 +08:00
Bobby Rong
1a81be4d38 pantheon.elementary-mail: 6.4.0 -> 7.0.0
(cherry picked from commit 7e72954cad)
2022-05-24 04:48:39 +00:00
Wael M. Nasreddine
fc5baa5ec2 onlykey: 5.3.3 -> 5.3.4
(cherry picked from commit 0094dccde8)
2022-05-24 04:46:06 +00:00
Wael M. Nasreddine
f7390567fa onlykey-agent: 1.1.11 -> 1.1.13
(cherry picked from commit 9ba84fb7f7)
2022-05-24 04:46:06 +00:00
Wael M. Nasreddine
6901609eb9 onlykey-cli: 1.2.5 -> 1.2.9
(cherry picked from commit ca32037807)
2022-05-24 04:46:06 +00:00
Bobby Rong
b80531b35c Merge pull request #174216 from NixOS/backport-174112-to-release-22.05
[Backport release-22.05] pantheon-tweaks: 1.0.3 -> 1.0.4
2022-05-24 09:05:21 +08:00
Bobby Rong
d263bdfdbb pantheon-tweaks: 1.0.3 -> 1.0.4
(cherry picked from commit f60bb29734)
2022-05-24 00:41:28 +00:00
Robert Scott
5c018ddd2e moarvm: add patch fixing build of bundled mimalloc on darwin
same patch as introduced to our own mimalloc in
9ba8bda313

(cherry picked from commit 7d56d31d82)
2022-05-24 00:14:18 +00:00
Robert Scott
b313d272ea Merge pull request #174196 from NixOS/backport-174084-to-release-22.05
[Backport release-22.05] python3Packages.aspy-refactor-imports: fix url and darwin test failure
2022-05-23 23:11:48 +01:00
Martin Weinelt
93eac359fd Merge pull request #174188 from NixOS/backport-174182-to-release-22.05
[Backport release-22.05] wallabag: 2.4.3 -> 2.5.0
2022-05-24 00:06:32 +02:00
Florian Brandes
bd96db064f python3Packages.aspy-refactor-imports: fix url and darwin test failure
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
(cherry picked from commit 2f4da397f0)
2022-05-23 22:04:25 +00:00
Robert Scott
642205175f Merge pull request #174191 from NixOS/backport-174148-to-release-22.05
[Backport release-22.05] s3bro: remove use_2to3
2022-05-23 22:57:10 +01:00
Fabian Affolter
ab405d8791 s3bro: remove use_2to3
(cherry picked from commit aa608e458c)
2022-05-23 21:34:39 +00:00
Martin Weinelt
54bd8d1f4d wallabag: 2.4.3 -> 2.5.0
https://github.com/wallabag/wallabag/releases/tag/2.5.0
(cherry picked from commit da56374a49)
2022-05-23 21:23:37 +00:00
Antoine Martin
576b037f78 nixos/nextcloud: use PHP 8 avoiding broken 2FA app
(cherry picked from commit f3f0b60006)
2022-05-23 20:21:26 +00:00
Janne Heß
7ae60dd706 22.05 beta release 2022-05-23 20:00:45 +02:00
16298 changed files with 293535 additions and 741502 deletions

View File

@@ -60,13 +60,6 @@ indent_size = unset
[*.md]
trim_trailing_whitespace = unset
# binaries
[*.nib]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
[eggs.nix]
trim_trailing_whitespace = unset

View File

@@ -28,14 +28,5 @@
# nixos/modules/rename: Sort alphabetically
1f71224fe86605ef4cd23ed327b3da7882dad382
# manual: fix typos
feddd5e7f8c6f8167b48a077fa2a5394dc008999
# nixos: fix module paths in rename.nix
d08ede042b74b8199dc748323768227b88efcf7c
# fix indentation in mk-python-derivation.nix
d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3
# fix indentation in meteor default.nix
a37a6de881ec4c6708e6b88fd16256bbc7f26bbd

44
.github/CODEOWNERS vendored
View File

@@ -37,7 +37,6 @@
/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
/pkgs/stdenv/generic @Ericson2314 @matthewbauer
/pkgs/stdenv/generic/check-meta.nix @Ericson2314 @matthewbauer @piegamesde
/pkgs/stdenv/cross @Ericson2314 @matthewbauer
/pkgs/build-support/cc-wrapper @Ericson2314
/pkgs/build-support/bintools-wrapper @Ericson2314
@@ -51,14 +50,8 @@
# Nixpkgs documentation
/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
/maintainers/scripts/doc @jtojnar @ryantm
/doc/* @fricklerhandwerk
/doc/build-aux/pandoc-filters @jtojnar
/doc/builders/trivial-builders.chapter.md @fricklerhandwerk
/doc/contributing/ @fricklerhandwerk
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @fricklerhandwerk
/doc/stdenv @fricklerhandwerk
/doc/using @fricklerhandwerk
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar
# NixOS Internals
/nixos/default.nix @nbp @infinisil
@@ -105,18 +98,18 @@
/pkgs/development/interpreters/python/hooks @FRidh @jonringer
# Haskell
/doc/languages-frameworks/haskell.section.md @cdepillabout @sternenseemann @maralorn
/maintainers/scripts/haskell @cdepillabout @sternenseemann @maralorn
/pkgs/development/compilers/ghc @cdepillabout @sternenseemann @maralorn
/pkgs/development/haskell-modules @cdepillabout @sternenseemann @maralorn
/pkgs/test/haskell @cdepillabout @sternenseemann @maralorn
/pkgs/top-level/release-haskell.nix @cdepillabout @sternenseemann @maralorn
/pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn
/doc/languages-frameworks/haskell.section.md @cdepillabout @sternenseemann @maralorn @expipiplus1
/maintainers/scripts/haskell @cdepillabout @sternenseemann @maralorn @expipiplus1
/pkgs/development/compilers/ghc @cdepillabout @sternenseemann @maralorn @expipiplus1
/pkgs/development/haskell-modules @cdepillabout @sternenseemann @maralorn @expipiplus1
/pkgs/test/haskell @cdepillabout @sternenseemann @maralorn @expipiplus1
/pkgs/top-level/release-haskell.nix @cdepillabout @sternenseemann @maralorn @expipiplus1
/pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn @expipiplus1
# Perl
/pkgs/development/interpreters/perl @stigtsp @zakame @dasJ
/pkgs/top-level/perl-packages.nix @stigtsp @zakame @dasJ
/pkgs/development/perl-modules @stigtsp @zakame @dasJ
/pkgs/development/interpreters/perl @stigtsp @zakame
/pkgs/top-level/perl-packages.nix @stigtsp @zakame
/pkgs/development/perl-modules @stigtsp @zakame
# R
/pkgs/applications/science/math/R @jbedo
@@ -128,6 +121,8 @@
# Rust
/pkgs/development/compilers/rust @Mic92 @LnL7 @zowoq
/pkgs/build-support/rust @zowoq
/doc/languages-frameworks/rust.section.md @zowoq
# C compilers
/pkgs/development/compilers/gcc @matthewbauer
@@ -192,7 +187,6 @@
/nixos/modules/services/networking/babeld.nix @mweinelt
/nixos/modules/services/networking/kea.nix @mweinelt
/nixos/modules/services/networking/knot.nix @mweinelt
/nixos/modules/services/monitoring/prometheus/exporters/kea.nix @mweinelt
/nixos/tests/babeld.nix @mweinelt
/nixos/tests/kea.nix @mweinelt
/nixos/tests/knot.nix @mweinelt
@@ -257,12 +251,13 @@
# Go
/doc/languages-frameworks/go.section.md @kalbasit @Mic92 @zowoq
/pkgs/build-support/go @kalbasit @Mic92 @zowoq
/pkgs/development/compilers/go @kalbasit @Mic92 @zowoq
/pkgs/development/go-modules @kalbasit @Mic92 @zowoq
/pkgs/development/go-packages @kalbasit @Mic92 @zowoq
# GNOME
/pkgs/desktops/gnome @jtojnar
/pkgs/desktops/gnome/extensions @piegamesde @jtojnar
/pkgs/desktops/gnome @jtojnar @hedning
/pkgs/desktops/gnome/extensions @piegamesde @jtojnar @hedning
# Cinnamon
/pkgs/desktops/cinnamon @mkg20001
@@ -294,8 +289,3 @@
# Dotnet
/pkgs/build-support/dotnet @IvarWithoutBones
/pkgs/development/compilers/dotnet @IvarWithoutBones
# Node.js
/pkgs/build-support/node/build-npm-package @winterqt
/pkgs/build-support/node/fetch-npm-deps @winterqt
/doc/languages-frameworks/javascript.section.md @winterqt

View File

@@ -1,32 +0,0 @@
---
name: Missing or incorrect documentation
about: Help us improve the Nixpkgs and NixOS reference manuals
title: ''
labels: '9.needs: documentation'
assignees: ''
---
## Problem
<!-- describe your problem -->
## Checklist
<!-- make sure this issue is not redundant or obsolete -->
- [ ] checked [latest Nixpkgs manual] \([source][nixpkgs-source]) and [latest NixOS manual] \([source][nixos-source])
- [ ] checked [open documentation issues] for possible duplicates
- [ ] checked [open documentation pull requests] for possible solutions
[latest Nixpkgs manual]: https://nixos.org/manual/nixpkgs/unstable/
[latest NixOS manual]: https://nixos.org/manual/nixos/unstable/
[nixpkgs-source]: https://github.com/NixOS/nixpkgs/tree/master/doc
[nixos-source]: https://github.com/NixOS/nixpkgs/tree/master/nixos/doc/manual
[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
## Proposal
<!-- propose a solution -->

View File

@@ -1,31 +0,0 @@
---
name: Unreproducible package
about: A package that does not produce a bit-by-bit reproducible result each time it is built
title: ''
labels: '0.kind: enhancement', '6.topic: reproducible builds'
assignees: ''
---
Building this package twice does not produce the bit-by-bit identical result each time, making it harder to detect CI breaches. You can read more about this at https://reproducible-builds.org/ .
Fixing bit-by-bit reproducibility also has additional advantages, such as avoiding hard-to-reproduce bugs, making content-addressed storage more effective and reducing rebuilds in such systems.
### Steps To Reproduce
```
nix-build '<nixpkgs>' -A ... --check --keep-failed
```
You can use `diffoscope` to analyze the differences in the output of the two builds.
To view the build log of the build that produced the artifact in the binary cache:
```
nix-store --read-log $(nix-instantiate '<nixpkgs>' -A ...)
```
### Additional context
(please share the relevant fragment of the diffoscope output here,
and any additional analysis you may have done)

View File

@@ -22,7 +22,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/`)
- [22.11 Release Notes (or backporting 22.05 Release notes)](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#generating-2211-release-notes)
- [22.11 Release Notes (or backporting 21.11 Release notes)](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#generating-2211-release-notes)
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module

View File

@@ -1,7 +1,6 @@
# Stale bot information
- Thanks for your contribution!
- Our stale bot will never close an issue or PR.
- To remove the stale label, just leave a new comment.
- _How to find the right people to ping?_ &rarr; [`git blame`](https://git-scm.com/docs/git-blame) to the rescue! (or GitHub's history and blame buttons.)
- You can always ask for help on [our Discourse Forum](https://discourse.nixos.org/), [our Matrix room](https://matrix.to/#/#nix:nixos.org), or on the [#nixos IRC channel](https://web.libera.chat/#nixos).

View File

@@ -1,6 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

8
.github/labeler.yml vendored
View File

@@ -7,8 +7,6 @@
"6.topic: cinnamon":
- pkgs/desktops/cinnamon/**/*
- nixos/modules/services/x11/desktop-managers/cinnamon.nix
- nixos/tests/cinnamon.nix
"6.topic: emacs":
- nixos/modules/services/editors/emacs.nix
@@ -42,8 +40,9 @@
"6.topic: golang":
- doc/languages-frameworks/go.section.md
- pkgs/build-support/go/**/*
- pkgs/development/compilers/go/**/*
- pkgs/development/go-modules/**/*
- pkgs/development/go-packages/**/*
"6.topic: haskell":
- doc/languages-frameworks/haskell.section.md
@@ -143,9 +142,6 @@
- nixos/modules/programs/neovim.nix
- pkgs/applications/editors/neovim/**/*
"6.topic: vscode":
- pkgs/applications/editors/vscode/**/*
"6.topic: xfce":
- nixos/doc/manual/configuration/xfce.xml
- nixos/modules/services/x11/desktop-managers/xfce.nix

3
.github/stale.yml vendored
View File

@@ -5,5 +5,6 @@ exemptLabels:
- "1.severity: security"
- "2.status: never-stale"
staleLabel: "2.status: stale"
markComment: false
markComment: |
I marked this as stale due to inactivity. &rarr; [More info](https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md)
closeComment: false

View File

@@ -8,14 +8,8 @@ on:
# the GitHub repository. This means that it should not evaluate user input in a
# way that allows code injection.
permissions:
contents: read
jobs:
backport:
permissions:
contents: write # for zeebe-io/backport-action to create branch
pull-requests: write # for zeebe-io/backport-action to create PR to backport
name: Backport Pull Request
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
@@ -26,11 +20,14 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
uses: zeebe-io/backport-action@v0.0.8
# should be kept in sync with `version`
uses: zeebe-io/backport-action@v0.0.5
with:
# Config README: https://github.com/zeebe-io/backport-action#backport-action
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}
# should be kept in sync with `uses`
version: v0.0.5
pull_description: |-
Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}.

View File

@@ -10,17 +10,14 @@ on:
# branches:
# - master
# - release-**
permissions:
contents: read
jobs:
tests:
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@v3
- uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v12
- uses: cachix/install-nix-action@v17
- uses: cachix/cachix-action@v10
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p html-tidy
set -euo pipefail
shopt -s inherit_errexit
normalize() {
tidy \
--anchor-as-name no \
--coerce-endtags no \
--escape-scripts no \
--fix-backslash no \
--fix-style-tags no \
--fix-uri no \
--indent yes \
--wrap 0 \
< "$1" \
2> /dev/null
}
diff -U3 <(normalize "$1") <(normalize "$2")

View File

@@ -4,13 +4,8 @@ on:
branches:
- master
- release-**
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for peter-evans/commit-comment to comment on commit
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
env:
@@ -21,7 +16,7 @@ jobs:
id: ismerge
run: |
ISMERGE=$(curl -H 'Accept: application/vnd.github.groot-preview+json' -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ env.GITHUB_REPOSITORY }}/commits/${{ env.GITHUB_SHA }}/pulls | jq -r '.[] | select(.merge_commit_sha == "${{ env.GITHUB_SHA }}") | any')
echo "ismerge=$ISMERGE" >> $GITHUB_OUTPUT
echo "::set-output name=ismerge::$ISMERGE"
# github events are eventually consistent, so wait until changes propagate to thier DB
- run: sleep 60
if: steps.ismerge.outputs.ismerge != 'true'

View File

@@ -28,7 +28,7 @@ jobs:
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@v18
- uses: cachix/install-nix-action@v17
with:
# nixpkgs commit is pinned so that it doesn't break
# editorconfig-checker 2.4.0

View File

@@ -18,22 +18,14 @@ jobs:
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@v18
- uses: cachix/install-nix-action@v17
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v10
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 NixOS manual with DocBook options
- name: Building NixOS manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true nixos/release.nix -A manual.x86_64-linux
- name: Building NixOS manual with Markdown options
run: |
export NIX_PATH=nixpkgs=$(pwd)
nix-build \
--option restrict-eval true \
--arg configuration '{ documentation.nixos.options.allowDocBook = false; }' \
nixos/release.nix \
-A manual.x86_64-linux

View File

@@ -18,11 +18,11 @@ jobs:
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@v18
- uses: cachix/install-nix-action@v17
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v10
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci

View File

@@ -1,64 +0,0 @@
name: "Check NixOS Manual DocBook rendering against MD rendering"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Check every 24 hours
- cron: '0 0 * * *'
permissions:
contents: read
jobs:
check-rendering-equivalence:
permissions:
pull-requests: write # for peter-evans/create-or-update-comment to create or update comment
if: github.repository_owner == 'NixOS'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- 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: Build DocBook and MD manuals
run: |
export NIX_PATH=nixpkgs=$(pwd)
nix-build \
--option restrict-eval true \
-o docbook nixos/release.nix \
-A manual.x86_64-linux
nix-build \
--option restrict-eval true \
--arg configuration '{ documentation.nixos.options.allowDocBook = false; }' \
-o md nixos/release.nix \
-A manual.x86_64-linux
- name: Compare DocBook and MD manuals
id: check
run: |
export NIX_PATH=nixpkgs=$(pwd)
.github/workflows/compare-manuals.sh \
docbook/share/doc/nixos/options.html \
md/share/doc/nixos/options.html
# if the manual can't be built we don't want to notify anyone.
# while this may temporarily hide rendering failures it will be a lot
# less noisy until all nixpkgs pull requests have stopped using
# docbook for option docs.
- name: Comment on failure
uses: peter-evans/create-or-update-comment@v2
if: ${{ failure() && steps.check.conclusion == 'failure' }}
with:
issue-number: 189318
body: |
Markdown and DocBook manuals do not agree.
Check https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }} for details.

View File

@@ -19,16 +19,8 @@ jobs:
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@v18
- uses: cachix/install-nix-action@v17
- name: Check DocBook files generated from Markdown are consistent
run: |
nixos/doc/manual/md-to-db.sh
git diff --exit-code || {
echo
echo 'Generated manual files are out of date.'
echo 'Please run'
echo
echo ' nixos/doc/manual/md-to-db.sh'
echo
exit 1
}
git diff --exit-code

View File

@@ -6,13 +6,8 @@ on:
- 'nixos-**'
- 'nixpkgs-**'
permissions:
contents: read
jobs:
fail:
permissions:
contents: none
name: "This PR is is targeting a channel branch"
runs-on: ubuntu-latest
steps:

View File

@@ -1,33 +0,0 @@
name: "Set pending OfBorg status"
on:
pull_request_target:
# Sets the ofborg-eval status to "pending" to signal that we are waiting for
# OfBorg even if it is running late. The status will be overwritten by OfBorg
# once it starts evaluation.
# WARNING:
# When extending this action, be aware that $GITHUB_TOKEN allows (restricted) write access to
# the GitHub repository. This means that it should not evaluate user input in a
# way that allows code injection.
permissions:
contents: read
jobs:
action:
if: github.repository_owner == 'NixOS'
permissions:
statuses: write
runs-on: ubuntu-latest
steps:
- name: "Set pending OfBorg status"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-d '{"context": "ofborg-eval", "state": "pending", "description": "Waiting for OfBorg..."}' \
"https://api.github.com/repos/NixOS/nixpkgs/commits/${{ github.event.pull_request.head.sha }}/statuses"

21
.github/workflows/pending-clear.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: "clear pending status"
on:
check_suite:
types: [ completed ]
jobs:
action:
runs-on: ubuntu-latest
steps:
- name: clear pending status
if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-d '{"state": "success", "target_url": " ", "description": " ", "context": "Wait for ofborg"}' \
"https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.check_suite.head_sha }}"

25
.github/workflows/pending-set.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: "set pending status"
on:
pull_request_target:
# WARNING:
# When extending this action, be aware that $GITHUB_TOKEN allows write access to
# the GitHub repository. This means that it should not evaluate user input in a
# way that allows code injection.
jobs:
action:
runs-on: ubuntu-latest
steps:
- name: set pending status
if: github.repository_owner == 'NixOS'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-d '{"state": "pending", "target_url": " ", "description": "This pending status will be cleared when ofborg starts eval.", "context": "Wait for ofborg"}' \
"https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.pull_request.head.sha }}"

View File

@@ -14,14 +14,8 @@ on:
# Merge every 24 hours
- cron: '0 0 * * *'
permissions:
contents: read
jobs:
periodic-merge:
permissions:
contents: write # for devmasx/merge-branch to merge branches
pull-requests: write # for peter-evans/create-or-update-comment to create or update comment
if: github.repository_owner == 'NixOS'
runs-on: ubuntu-latest
strategy:
@@ -34,10 +28,10 @@ jobs:
pairs:
- from: master
into: haskell-updates
- from: release-22.11
into: staging-next-22.11
- from: staging-next-22.11
into: staging-22.11
- from: release-21.11
into: staging-next-21.11
- from: staging-next-21.11
into: staging-21.11
- from: release-22.05
into: staging-next-22.05
- from: staging-next-22.05

View File

@@ -14,14 +14,8 @@ on:
# Merge every 6 hours
- cron: '0 */6 * * *'
permissions:
contents: read
jobs:
periodic-merge:
permissions:
contents: write # for devmasx/merge-branch to merge branches
pull-requests: write # for peter-evans/create-or-update-comment to create or update comment
if: github.repository_owner == 'NixOS'
runs-on: ubuntu-latest
strategy:

View File

@@ -2,54 +2,47 @@ name: "Update terraform-providers"
on:
schedule:
- cron: "0 3 * * *"
- cron: "14 3 * * 1"
workflow_dispatch:
permissions:
contents: read
jobs:
tf-providers:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR, for peter-evans/create-or-update-comment to create or update comment
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@v3
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- uses: cachix/install-nix-action@v17
- name: setup
id: setup
run: |
echo "title=terraform-providers: update $(date -u +"%Y-%m-%d")" >> $GITHUB_OUTPUT
echo ::set-output name=title::"terraform-providers: update $(date -u +"%Y-%m-%d")"
- name: update terraform-providers
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
echo | nix-shell \
maintainers/scripts/update.nix \
--argstr commit true \
--argstr keep-going true \
--argstr max-workers 2 \
--argstr path terraform-providers
- name: clean repo
run: |
git clean -f
pushd pkgs/applications/networking/cluster/terraform-providers
./update-all-providers --no-build
git commit -m "${{ steps.setup.outputs.title }}" providers.json
popd
- name: create PR
uses: peter-evans/create-pull-request@v4
with:
body: |
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}
Check that all providers build with:
```
@ofborg build terraform.full
@ofborg build terraform-full
```
branch: terraform-providers-update
delete-branch: false
labels: "2.status: work-in-progress"
title: ${{ steps.setup.outputs.title }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: comment on failure
uses: peter-evans/create-or-update-comment@v2
if: ${{ failure() }}
with:
issue-number: 153416
body: |
Automatic update of terraform providers [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).

6
.gitignore vendored
View File

@@ -5,15 +5,13 @@
.idea/
.vscode/
outputs/
result-*
result
!pkgs/development/python-modules/result
result-*
source/
/doc/NEWS.html
/doc/NEWS.txt
/doc/manual.html
/doc/manual.pdf
/result
/source/
.version-suffix
.DS_Store

View File

@@ -1,3 +0,0 @@
Daniel Løvbrøtte Olsen <me@dandellion.xyz> <daniel.olsen99@gmail.com>
R. RyanTM <ryantm-bot@ryantm.com>
Sandro <sandro.jaeckel@gmail.com>

View File

@@ -1 +1 @@
22.11
22.05

View File

@@ -51,7 +51,7 @@ See the nixpkgs manual for more details on [standard meta-attributes](https://ni
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.
Package version upgrades usually allow for simpler commit messages, including attribute name, old and new version, as well as a reference to the relevant release notes/changelog. Every once in a while a package upgrade requires more extensive changes, and that subsequently warrants a more verbose message.
For package version upgrades and such a one-line commit message is usually sufficient.
## Rebasing between branches (i.e. from master to staging)
@@ -62,26 +62,25 @@ many CODEOWNERS will be inadvertently requested for review. To achieve this,
rebasing should not be performed directly on the target branch, but on the merge
base between the current and target branch.
In the following example, we assume that the current branch, called `feature`,
is based on `master`, and we rebase it onto the merge base between
`master` and `staging` so that the PR can eventually be retargeted to
`staging` without causing a mess. The example uses `upstream` as the remote for `NixOS/nixpkgs.git`
while `origin` is the remote you are pushing to.
In the following example, we see a rebase from `master` onto the merge base
between `master` and `staging`, so that a change can eventually be retargeted to
`staging`. The example uses `upstream` as the remote for `NixOS/nixpkgs.git`
while the `origin` remote is used for the remote you are pushing to.
```console
# Rebase your commits onto the common merge base
git rebase --onto upstream/staging... upstream/master
# Find the common base between two branches
common=$(git merge-base upstream/master upstream/staging)
# Find the common base between your feature branch and master
commits=$(git merge-base $(git branch --show-current) upstream/master)
# Rebase all commits onto the common base
git rebase --onto=$common $commits
# Force push your changes
git push origin feature --force-with-lease
git push origin $(git branch --show-current) --force-with-lease
```
The syntax `upstream/staging...` is equivalent to `upstream/staging...HEAD` and
stands for the merge base between `upstream/staging` and `HEAD` (hence between
`upstream/staging` and `upstream/master`).
Then change the base branch in the GitHub PR using the *Edit* button in the upper
right corner, and switch from `master` to `staging`. *After* the PR has been
right corner, and switch from `master` to `staging`. After the PR has been
retargeted it might be necessary to do a final rebase onto the target branch, to
resolve any outstanding merge conflicts.
@@ -91,7 +90,7 @@ git rebase upstream/staging
# Review and fixup possible conflicts
git status
# Force push your changes
git push origin feature --force-with-lease
git push origin $(git branch --show-current) --force-with-lease
```
## Backporting changes
@@ -105,10 +104,10 @@ This also works for PR's that have already been merged, and might take a couple
You can also create the backport manually:
1. Take note of the commits in which the change was introduced into `master` branch.
2. Check out the target _release branch_, e.g. `release-22.05`. Do not use a _channel branch_ like `nixos-22.05` or `nixpkgs-22.05-darwin`.
2. Check out the target _release branch_, e.g. `release-21.11`. Do not use a _channel branch_ like `nixos-21.11` or `nixpkgs-21.11-darwin`.
3. Create a branch for your change, e.g. `git checkout -b backport`.
4. When the reason to backport is not obvious from the original commit message, use `git cherry-pick -xe <original commit>` and add a reason. Otherwise use `git cherry-pick -x <original commit>`. That's fine for minor version updates that only include security and bug fixes, commits that fixes an otherwise broken package or similar. Please also 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.
5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-22.05`) as the target branch of the pull request, and link to the pull request in which the original change was comitted to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[22.05]`.
5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-21.11`) as the target branch of the pull request, and link to the pull request in which the original change was comitted to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[21.11]`.
6. When the backport pull request is merged and you have the necessary privileges you can also replace the label `9.needs: port to stable` with `8.has: port to stable` on the original pull request. This way maintainers can keep track of missing backports easier.
## Criteria for Backporting changes

View File

@@ -51,9 +51,9 @@ Nixpkgs and NixOS are built and tested by our continuous integration
system, [Hydra](https://hydra.nixos.org/).
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for the NixOS 22.05 release](https://hydra.nixos.org/jobset/nixos/release-22.05)
* [Continuous package builds for the NixOS 21.11 release](https://hydra.nixos.org/jobset/nixos/release-21.11)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for the NixOS 22.05 release](https://hydra.nixos.org/job/nixos/release-22.05/tested#tabs-constituents)
* [Tests for the NixOS 21.11 release](https://hydra.nixos.org/job/nixos/release-21.11/tested#tabs-constituents)
Artifacts successfully built with Hydra are published to cache at
https://cache.nixos.org/. When successful build and test criteria are

View File

@@ -1,11 +0,0 @@
--[[
Converts some HTML elements commonly used in Markdown to corresponding DocBook elements.
]]
function RawInline(elem)
if elem.format == 'html' and elem.text == '<kbd>' then
return pandoc.RawInline('docbook', '<keycap>')
elseif elem.format == 'html' and elem.text == '</kbd>' then
return pandoc.RawInline('docbook', '</keycap>')
end
end

View File

@@ -27,14 +27,6 @@ function Code(elem)
content = '<refentrytitle>' .. title .. '</refentrytitle>' .. (volnum ~= nil and ('<manvolnum>' .. volnum .. '</manvolnum>') or '')
elseif elem.attributes['role'] == 'file' then
tag = 'filename'
elseif elem.attributes['role'] == 'command' then
tag = 'command'
elseif elem.attributes['role'] == 'option' then
tag = 'option'
elseif elem.attributes['role'] == 'var' then
tag = 'varname'
elseif elem.attributes['role'] == 'env' then
tag = 'envar'
end
if tag ~= nil then

View File

@@ -1,51 +1,12 @@
# Fetchers {#chap-pkgs-fetchers}
Building software with Nix often requires downloading source code and other files from the internet.
`nixpkgs` provides *fetchers* for different protocols and services. Fetchers are functions that simplify downloading files.
When using Nix, you will frequently need to download source code and other files from the internet. For this purpose, Nix provides the [_fixed output derivation_](https://nixos.org/manual/nix/stable/#fixed-output-drvs) feature and Nixpkgs provides various functions that implement the actual fetching from various protocols and services.
## Caveats
Fetchers create [fixed output derivations](https://nixos.org/manual/nix/stable/#fixed-output-drvs) from downloaded files.
Nix can reuse the downloaded files via the hash of the resulting derivation.
Because fixed output derivations are _identified_ by their hash, a common mistake is to update a fetcher's URL or a version parameter, without updating the hash. **This will cause the old contents to be used.** So remember to always invalidate the hash argument.
The fact that the hash belongs to the Nix derivation output and not the file itself can lead to confusion.
For example, consider the following fetcher:
```nix
fetchurl {
url = "http://www.example.org/hello-1.0.tar.gz";
sha256 = "0v6r3wwnsk5pdjr188nip3pjgn1jrn5pc5ajpcfy6had6b3v4dwm";
};
```
A common mistake is to update a fetchers URL, or a version parameter, without updating the hash.
```nix
fetchurl {
url = "http://www.example.org/hello-1.1.tar.gz";
sha256 = "0v6r3wwnsk5pdjr188nip3pjgn1jrn5pc5ajpcfy6had6b3v4dwm";
};
```
**This will reuse the old contents**.
Remember to invalidate the hash argument, in this case by setting the `sha256` attribute to an empty string.
```nix
fetchurl {
url = "http://www.example.org/hello-1.1.tar.gz";
sha256 = "";
};
```
Use the resulting error message to determine the correct hash.
```
error: hash mismatch in fixed-output derivation '/path/to/my.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-RApQUm78dswhBLC/rfU9y0u6pSAzHceIJqgmetRD24E=
```
A similar problem arises while testing changes to a fetcher's implementation. If the output of the derivation already exists in the Nix store, test failures can go undetected. The [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function helps prevent reusing cached derivations.
For those who develop and maintain fetchers, a similar problem arises with changes to the implementation of a fetcher. These may cause a fixed output derivation to fail, but won't normally be caught by tests because the supposed output is already in the store or cache. For the purpose of testing, you can use a trick that is embodied by the [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function. It uses the derivation `name` to create a unique output path per fetcher implementation, defeating the caching precisely where it would be harmful.
## `fetchurl` and `fetchzip` {#fetchurl}
@@ -65,20 +26,8 @@ stdenv.mkDerivation {
The main difference between `fetchurl` and `fetchzip` is in how they store the contents. `fetchurl` will store the unaltered contents of the URL within the Nix store. `fetchzip` on the other hand, will decompress the archive for you, making files and directories directly accessible in the future. `fetchzip` can only be used with archives. Despite the name, `fetchzip` is not limited to .zip files and can also be used with any tarball.
## `fetchpatch` {#fetchpatch}
`fetchpatch` works very similarly to `fetchurl` with the same arguments expected. It expects patch files as a source and performs normalization on them before computing the checksum. For example, it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
- `relative`: Similar to using `git-diff`'s `--relative` flag, only keep changes inside the specified directory, making paths relative to it.
- `stripLen`: Remove the first `stripLen` components of pathnames in the patch.
- `extraPrefix`: Prefix pathnames by this string.
- `excludes`: Exclude files matching these patterns (applies after the above arguments).
- `includes`: Include only files matching these patterns (applies after the above arguments).
- `revert`: Revert the patch.
Note that because the checksum is computed after applying these effects, using or modifying these arguments will have no effect unless the `sha256` argument is changed as well.
Most other fetchers return a directory rather than a single file.
## `fetchsvn` {#fetchsvn}
@@ -91,7 +40,7 @@ Used with Git. Expects `url` to a Git repo, `rev`, and `sha256`. `rev` in this c
Additionally, the following optional arguments can be given: `fetchSubmodules = true` makes `fetchgit` also fetch the submodules of a repository. If `deepClone` is set to true, the entire repository is cloned as opposing to just creating a shallow clone. `deepClone = true` also implies `leaveDotGit = true` which means that the `.git` directory of the clone won't be removed after checkout.
If only parts of the repository are needed, `sparseCheckout` can be used. This will prevent git from fetching unnecessary blobs from server, see [git sparse-checkout](https://git-scm.com/docs/git-sparse-checkout) for more information:
If only parts of the repository are needed, `sparseCheckout` can be used. This will prevent git from fetching unnecessary blobs from server, see [git sparse-checkout](https://git-scm.com/docs/git-sparse-checkout) and [git clone --filter](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---filterltfilter-specgt) for more information:
```nix
{ stdenv, fetchgit }:
@@ -100,10 +49,10 @@ stdenv.mkDerivation {
name = "hello";
src = fetchgit {
url = "https://...";
sparseCheckout = [
"directory/to/be/included"
"another/directory"
];
sparseCheckout = ''
path/to/be/included
another/path
'';
sha256 = "0000000000000000000000000000000000000000000000000000";
};
}

View File

@@ -9,5 +9,4 @@
<xi:include href="images/dockertools.section.xml" />
<xi:include href="images/ocitools.section.xml" />
<xi:include href="images/snaptools.section.xml" />
<xi:include href="images/portableservice.section.xml" />
</chapter>

View File

@@ -20,12 +20,7 @@ buildImage {
fromImageName = null;
fromImageTag = "latest";
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ pkgs.redis ];
pathsToLink = [ "/bin" ];
};
contents = pkgs.redis;
runAsRoot = ''
#!${pkgs.runtimeShell}
mkdir -p /data
@@ -36,9 +31,6 @@ buildImage {
WorkingDir = "/data";
Volumes = { "/data" = { }; };
};
diskSize = 1024;
buildVMMemorySize = 512;
}
```
@@ -54,7 +46,7 @@ The above example will build a Docker image `redis/latest` from the given base i
- `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`.
- `contents` 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`.
@@ -62,10 +54,6 @@ The above example will build a Docker image `redis/latest` from the given base i
- `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).
- `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.
@@ -93,11 +81,7 @@ pkgs.dockerTools.buildImage {
name = "hello";
tag = "latest";
created = "now";
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ pkgs.hello ];
pathsToLink = [ "/bin" ];
};
contents = pkgs.hello;
config.Cmd = [ "/bin/hello" ];
}
@@ -308,44 +292,7 @@ The parameters relative to the base image have the same synopsis as described in
The `name` argument is the name of the derivation output, which defaults to `fromImage.name`.
## Environment Helpers {#ssec-pkgs-dockerTools-helpers}
Some packages expect certain files to be available globally.
When building an image from scratch (i.e. without `fromImage`), these files are missing.
`pkgs.dockerTools` provides some helpers to set up an environment with the necessary files.
You can include them in `copyToRoot` like this:
```nix
buildImage {
name = "environment-example";
copyToRoot = with pkgs.dockerTools; [
usrBinEnv
binSh
caCertificates
fakeNss
];
}
```
### usrBinEnv {#sssec-pkgs-dockerTools-helpers-usrBinEnv}
This provides the `env` utility at `/usr/bin/env`.
### binSh {#sssec-pkgs-dockerTools-helpers-binSh}
This provides `bashInteractive` at `/bin/sh`.
### caCertificates {#sssec-pkgs-dockerTools-helpers-caCertificates}
This sets up `/etc/ssl/certs/ca-certificates.crt`.
### fakeNss {#sssec-pkgs-dockerTools-helpers-fakeNss}
Provides `/etc/passwd` and `/etc/group` that contain root and nobody.
Useful when packaging binaries that insist on using nss to look up
username/groups (like nginx).
### shadowSetup {#ssec-pkgs-dockerTools-shadowSetup}
## shadowSetup {#ssec-pkgs-dockerTools-shadowSetup}
This constant string is a helper for setting up the base files for managing users and groups, only if such files don't exist already. It is suitable for being used in a [`buildImage` `runAsRoot`](#ex-dockerTools-buildImage-runAsRoot) script for cases like in the example below:
@@ -355,7 +302,7 @@ buildImage {
runAsRoot = ''
#!${pkgs.runtimeShell}
${pkgs.dockerTools.shadowSetup}
${shadowSetup}
groupadd -r redis
useradd -r -g redis redis
mkdir /data
@@ -365,32 +312,3 @@ buildImage {
```
Creating base files like `/etc/passwd` or `/etc/login.defs` is necessary for shadow-utils to manipulate users and groups.
## fakeNss {#ssec-pkgs-dockerTools-fakeNss}
If your primary goal is providing a basic skeleton for user lookups to work,
and/or a lesser privileged user, adding `pkgs.fakeNss` to
the container image root might be the better choice than a custom script
running `useradd` and friends.
It provides a `/etc/passwd` and `/etc/group`, containing `root` and `nobody`
users and groups.
It also provides a `/etc/nsswitch.conf`, configuring NSS host resolution to
first check `/etc/hosts`, before checking DNS, as the default in the absence of
a config file (`dns [!UNAVAIL=return] files`) is quite unexpected.
You can pair it with `binSh`, which provides `bin/sh` as a symlink
to `bashInteractive` (as `/bin/sh` is configured as a shell).
```nix
buildImage {
name = "shadow-basic";
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ binSh pkgs.fakeNss ];
pathsToLink = [ "/bin" "/etc" "/var" ];
};
}
```

View File

@@ -1,81 +0,0 @@
# pkgs.portableService {#sec-pkgs-portableService}
`pkgs.portableService` is a function to create _portable service images_,
as read-only, immutable, `squashfs` archives.
systemd supports a concept of [Portable Services](https://systemd.io/PORTABLE_SERVICES/).
Portable Services are a delivery method for system services that uses two specific features of container management:
* Applications are bundled. I.e. multiple services, their binaries and
all their dependencies are packaged in an image, and are run directly from it.
* Stricter default security policies, i.e. sandboxing of applications.
This allows using Nix to build images which can be run on many recent Linux distributions.
The primary tool for interacting with Portable Services is `portablectl`,
and they are managed by the `systemd-portabled` system service.
::: {.note}
Portable services are supported starting with systemd 239 (released on 2018-06-22).
:::
A very simple example of using `portableService` is described below:
[]{#ex-pkgs-portableService}
```nix
pkgs.portableService {
pname = "demo";
version = "1.0";
units = [ demo-service demo-socket ];
}
```
The above example will build an squashfs archive image in `result/$pname_$version.raw`. The image will contain the
file system structure as required by the portable service specification, and a subset of the Nix store with all the
dependencies of the two derivations in the `units` list.
`units` must be a list of derivations, and their names must be prefixed with the service name (`"demo"` in this case).
Otherwise `systemd-portabled` will ignore them.
::: {.note}
The `.raw` file extension of the image is required by the portable services specification.
:::
Some other options available are:
- `description`, `homepage`
Are added to the `/etc/os-release` in the image and are shown by the portable services tooling.
Default to empty values, not added to os-release.
- `symlinks`
A list of attribute sets {object, symlink}. Symlinks will be created in the root filesystem of the image to
objects in the Nix store. Defaults to an empty list.
- `contents`
A list of additional derivations to be included in the image Nix store, as-is. Defaults to an empty list.
- `squashfsTools`
Defaults to `pkgs.squashfsTools`, allows you to override the package that provides `mksquashfs`.
- `squash-compression`, `squash-block-size`
Options to `mksquashfs`. Default to `"xz -Xdict-size 100%"` and `"1M"` respectively.
A typical usage of `symlinks` would be:
```nix
symlinks = [
{ object = "${pkgs.cacert}/etc/ssl"; symlink = "/etc/ssl"; }
{ object = "${pkgs.bash}/bin/bash"; symlink = "/bin/sh"; }
{ object = "${pkgs.php}/bin/php"; symlink = "/usr/bin/php"; }
];
```
to create these symlinks for legacy applications that assume them existing globally.
Once the image is created, and deployed on a host in `/var/lib/portables/`, you can attach the image and run the service. As root run:
```console
portablectl attach demo_1.0.raw
systemctl enable --now demo.socket
systemctl enable --now demo.service
```
::: {.note}
See the [man page](https://www.freedesktop.org/software/systemd/man/portablectl.html) of `portablectl` for more info on its usage.
:::

View File

@@ -26,14 +26,10 @@ The `wrapFirefox` function allows to pass policies, preferences and extensions t
Pocket = false;
Snippets = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
SecurityDevices = {
# Use a proxy module rather than `nixpkgs.config.firefox.smartcardSupport = true`
"PKCS#11 Proxy Module" = "${pkgs.p11-kit}/lib/p11-kit-proxy.so";
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
};
extraPrefs = ''

View File

@@ -0,0 +1,13 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="unfree-software">
<title>Unfree software</title>
<para>
All users of Nixpkgs are free software users, and many users (and developers) of Nixpkgs want to limit and tightly control their exposure to unfree software. At the same time, many users need (or want) to run some specific pieces of proprietary software. Nixpkgs includes some expressions for unfree software packages. By default unfree software cannot be installed and doesnt show up in searches. To allow installing unfree software in a single Nix invocation one can export <literal>NIXPKGS_ALLOW_UNFREE=1</literal>. For a persistent solution, users can set <literal>allowUnfree</literal> in the Nixpkgs configuration.
</para>
<para>
Fine-grained control is possible by defining <literal>allowUnfreePredicate</literal> function in config; it takes the <literal>mkDerivation</literal> parameter attrset and returns <literal>true</literal> for unfree packages that should be allowed.
</para>
</section>

View File

@@ -14,89 +14,19 @@ for example when using an 'old' hash in a fixed-output derivation.
Examples:
```nix
passthru.tests.version = testers.testVersion { package = hello; };
passthru.tests.version = testVersion { package = hello; };
passthru.tests.version = testers.testVersion {
passthru.tests.version = testVersion {
package = seaweedfs;
command = "weed version";
};
passthru.tests.version = testers.testVersion {
passthru.tests.version = 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.
This returns a derivation with an override on the builder, with the following effects:
- Fail the build when the original builder succeeds
- Move `$out` to `$out/result`, if it exists (assuming `out` is the default output)
- Save the build log to `$out/testBuildFailure.log` (same)
Example:
```nix
runCommand "example" {
failed = testers.testBuildFailure (runCommand "fail" {} ''
echo ok-ish >$out
echo failing though
exit 3
'');
} ''
grep -F 'ok-ish' $failed/result
grep -F 'failing though' $failed/testBuildFailure.log
[[ 3 = $(cat $failed/testBuildFailure.exit) ]]
touch $out
'';
```
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:
```nix
testers.testEqualContents {
assertion = "sed -e performs replacement";
expected = writeText "expected" ''
foo baz baz
'';
actual = runCommand "actual" {
# not really necessary for a package that's in stdenv
nativeBuildInputs = [ gnused ];
base = writeText "base" ''
foo bar baz
'';
} ''
sed -e 's/bar/baz/g' $base >$out
'';
}
```
## `testEqualDerivation` {#tester-testEqualDerivation}
@@ -112,7 +42,7 @@ Otherwise, the build log explains the difference via `nix-diff`.
Example:
```nix
testers.testEqualDerivation
testEqualDerivation
"The hello package must stay the same when enabling checks."
hello
(hello.overrideAttrs(o: { doCheck = true; }))
@@ -143,7 +73,7 @@ fixed output derivation.
Example:
```nix
tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
tests.fetchgit = invalidateFetcherByDrvHash fetchgit {
name = "nix-source";
url = "https://github.com/NixOS/nix";
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";

View File

@@ -338,10 +338,6 @@ A (typically large) program with a distinct user interface, primarily used inter
- `applications/terminal-emulators` (e.g. `alacritty` or `rxvt` or `termite`)
- **If its a _file manager_:**
- `applications/file-managers` (e.g. `mc` or `ranger` or `pcmanfm`)
- **If its for _video playback / editing_:**
- `applications/video` (e.g. `vlc`)
@@ -453,10 +449,7 @@ In the file `pkgs/top-level/all-packages.nix` you can find fetch helpers, these
}
```
When fetching from GitHub, commits must always be referenced by their full commit hash. This is because GitHub shares commit hashes among all forks and returns `404 Not Found` when a short commit hash is ambiguous. It already happens for some short, 6-character commit hashes in `nixpkgs`.
It is a practical vector for a denial-of-service attack by pushing large amounts of auto generated commits into forks and was already [demonstrated against GitHub Actions Beta](https://blog.teddykatz.com/2019/11/12/github-actions-dos.html).
Find the value to put as `sha256` by running `nix-shell -p nix-prefetch-github --run "nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix"`.
Find the value to put as `sha256` by running `nix run -f '<nixpkgs>' nix-prefetch-github -c nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix` or `nix-prefetch-url --unpack https://github.com/NixOS/nix/archive/1f795f9f44607cc5bec70d1300150bfefcef2aae.tar.gz`.
## Obtaining source hash {#sec-source-hashes}
@@ -480,23 +473,15 @@ Preferred source hash type is sha256. There are several ways to get it.
4. Extracting hash from local source tarball can be done with `sha256sum`. Use `nix-prefetch-url file:///path/to/tarball` if you want base32 hash.
5. Fake hash: set the hash to one of
5. Fake hash: set fake hash in package expression, perform build and extract correct hash from error Nix prints.
- `""`
- `lib.fakeHash`
- `lib.fakeSha256`
- `lib.fakeSha512`
in the package expression, attempt build and extract correct hash from error messages.
::: {.warning}
You must use one of these four fake hashes and not some arbitrarily-chosen hash.
See [](#sec-source-hashes-security).
:::
For package updates it is enough to change one symbol to make hash fake. For new packages, you can use `lib.fakeSha256`, `lib.fakeSha512` or any other fake hash.
This is last resort method when reconstructing source URL is non-trivial and `nix-prefetch-url -A` isnt applicable (for example, [one of `kodi` dependencies](https://github.com/NixOS/nixpkgs/blob/d2ab091dd308b99e4912b805a5eb088dd536adb9/pkgs/applications/video/kodi/default.nix#L73)). The easiest way then would be replace hash with a fake one and rebuild. Nix build will fail and error message will contain desired hash.
::: {.warning}
This method has security problems. Check below for details.
:::
### Obtaining hashes securely {#sec-source-hashes-security}
@@ -508,7 +493,7 @@ Let's say Man-in-the-Middle (MITM) sits close to your network. Then instead of f
- `https://` URLs are secure in methods 1, 2, 3;
- `https://` URLs are secure in method 5 *only if* you use one of the listed fake hashes. If you use any other hash, `fetchurl` will pass `--insecure` to `curl` and may then degrade to HTTP in case of TLS certificate expiration.
- `https://` URLs are not secure in method 5. When obtaining hashes with fake hash method, TLS checks are disabled. So refetch source hash from several different networks to exclude MITM scenario. Alternatively, use fake hash method to make Nix error, but instead of extracting hash from error, extract `https://` URL and prefetch it with method 1.
## Patches {#sec-patches}
@@ -526,8 +511,6 @@ patches = [
Otherwise, you can add a `.patch` file to the `nixpkgs` repository. In the interest of keeping our maintenance burden to a minimum, only patches that are unique to `nixpkgs` should be added in this way.
If a patch is available online but does not cleanly apply, it can be modified in some fixed ways by using additional optional arguments for `fetchpatch`. Check [](#fetchpatch) for details.
```nix
patches = [ ./0001-changes.patch ];
```
@@ -555,6 +538,17 @@ If you do need to do create this sort of patch file, one way to do so is with gi
$ git diff -a > nixpkgs/pkgs/the/package/0001-changes.patch
```
If a patch is available online but does not cleanly apply, it can be modified in some fixed ways by using additional optional arguments for `fetchpatch`:
- `relative`: Similar to using `git-diff`'s `--relative` flag, only keep changes inside the specified directory, making paths relative to it.
- `stripLen`: Remove the first `stripLen` components of pathnames in the patch.
- `extraPrefix`: Prefix pathnames by this string.
- `excludes`: Exclude files matching these patterns (applies after the above arguments).
- `includes`: Include only files matching these patterns (applies after the above arguments).
- `revert`: Revert the patch.
Note that because the checksum is computed after applying these effects, using or modifying these arguments will have no effect unless the `sha256` argument is changed as well.
## Package tests {#sec-package-tests}
Tests are important to ensure quality and make reviews and automatic updates easy.

View File

@@ -27,7 +27,7 @@ If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.
As per [RFC 0072](https://github.com/NixOS/rfcs/pull/72), all new documentation content should be written in [CommonMark](https://commonmark.org/) Markdown dialect.
Additional syntax extensions are available, though not all extensions can be used in NixOS option documentation. The following extensions are currently used:
Additionally, the following syntax extensions are currently used:
- []{#ssec-contributing-markup-anchors}
Explicitly defined **anchors** on headings, to allow linking to sections. These should be always used, to ensure the anchors can be linked even when the heading text changes, and to prevent conflicts between [automatically assigned identifiers](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/auto_identifiers.md).
@@ -53,24 +53,12 @@ Additional syntax extensions are available, though not all extensions can be use
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing).
- []{#ssec-contributing-markup-inline-roles}
If you want to link to a man page, you can use `` {manpage}`nix.conf(5)` ``, which will turn into {manpage}`nix.conf(5)`. The references will turn into links when a mapping exists in {file}`doc/build-aux/pandoc-filters/link-unix-man-references.lua`.
If you want to link to a man page, you can use `` {manpage}`nix.conf(5)` ``, which will turn into {manpage}`nix.conf(5)`.
A few markups for other kinds of literals are also available:
- `` {command}`rm -rfi` `` turns into {command}`rm -rfi`
- `` {env}`XDG_DATA_DIRS` `` turns into {env}`XDG_DATA_DIRS`
- `` {file}`/etc/passwd` `` turns into {file}`/etc/passwd`
- `` {option}`networking.useDHCP` `` turns into {option}`networking.useDHCP`
- `` {var}`/etc/passwd` `` turns into {var}`/etc/passwd`
These literal kinds are used mostly in NixOS option documentation.
The references will turn into links when a mapping exists in {file}`doc/build-aux/pandoc-filters/link-unix-man-references.lua`.
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point). Though, the feature originates from [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage) with slightly different syntax.
::: {.note}
Inline roles are available for option documentation.
:::
- []{#ssec-contributing-markup-admonitions}
**Admonitions**, set off from the text to bring attention to something.
@@ -96,10 +84,6 @@ Additional syntax extensions are available, though not all extensions can be use
- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
::: {.note}
Admonitions are available for option documentation.
:::
- []{#ssec-contributing-markup-definition-lists}
[**Definition lists**](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md), for defining a group of terms:

View File

@@ -185,111 +185,6 @@ Sample template for a new module review is provided below.
##### Comments
```
## Individual maintainer list {#reviewing-contributions-indvidual-maintainer-list}
When adding users to `maintainers/maintainer-list.nix`, the following
checks should be performed:
- If the user has specified a GPG key, verify that the commit is
signed by their key.
First, validate that the commit adding the maintainer is signed by
the key the maintainer listed. Check out the pull request and
compare its signing key with the listed key in the commit.
If the commit is not signed or it is signed by a different user, ask
them to either recommit using that key or to remove their key
information.
Given a maintainter entry like this:
``` nix
{
example = {
email = "user@example.com";
name = "Example User";
keys = [{
fingerprint = "0000 0000 2A70 6423 0AED 3C11 F04F 7A19 AAA6 3AFE";
}];
}
};
```
First receive their key from a keyserver:
$ gpg --recv-keys 0xF04F7A19AAA63AFE
gpg: key 0xF04F7A19AAA63AFE: public key "Example <user@example.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
Then check the commit is signed by that key:
$ git log --show-signature
commit b87862a4f7d32319b1de428adb6cdbdd3a960153
gpg: Signature made Wed Mar 12 13:32:24 2003 +0000
gpg: using RSA key 000000002A7064230AED3C11F04F7A19AAA63AFE
gpg: Good signature from "Example User <user@example.com>
Author: Example User <user@example.com>
Date: Wed Mar 12 13:32:24 2003 +0000
maintainers: adding example
and validate that there is a `Good signature` and the printed key
matches the user's submitted key.
Note: GitHub's "Verified" label does not display the user's full key
fingerprint, and should not be used for validating the key matches.
- If the user has specified a `github` account name, ensure they have
also specified a `githubId` and verify the two match.
Maintainer entries that include a `github` field must also include
their `githubId`. People can and do change their GitHub name
frequently, and the ID is used as the official and stable identity
of the maintainer.
Given a maintainer entry like this:
``` nix
{
example = {
email = "user@example.com";
name = "Example User";
github = "ghost";
githubId = 10137;
}
};
```
First, make sure that the listed GitHub handle matches the author of
the commit.
Then, visit the URL `https://api.github.com/users/ghost` and
validate that the `id` field matches the provided `githubId`.
## Maintainer teams {#reviewing-contributions-maintainer-teams}
Feel free to create a new maintainer team in `maintainers/team-list.nix`
when a group is collectively responsible for a collection of packages.
Use taste and personal judgement when deciding if a team is warranted.
Teams are allowed to define their own rules about membership.
For example, some teams will represent a business or other group which
wants to carefully track its members. Other teams may be very open about
who can join, and allow anybody to participate.
When reviewing changes to a team, read the team's scope and the context
around the member list for indications about the team's membership
policy.
In any case, request reviews from the existing team members. If the team
lists no specific membership policy, feel free to merge changes to the
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.
## Other submissions {#reviewing-contributions-other-submissions}
Other type of submissions requires different reviewing steps.
@@ -302,12 +197,6 @@ Container system, boot system and library changes are some examples of the pull
It is possible for community members that have enough knowledge and experience on a special topic to contribute by merging pull requests.
In case the PR is stuck waiting for the original author to apply a trivial
change (a typo, capitalisation change, etc.) and the author allowed the members
to modify the PR, consider applying it yourself. (or commit the existing review
suggestion) You should pay extra attention to make sure the addition doesn't go
against the idea of the original PR and would not be opposed by the author.
<!--
The following paragraphs about how to deal with unactive contributors is just a proposition and should be modified to what the community agrees to be the right policy.

View File

@@ -167,30 +167,24 @@ Packages with automated tests are much more likely to be merged in a timely fash
### Tested compilation of all pkgs that depend on this change using `nixpkgs-review` {#submitting-changes-tested-compilation}
If you are updating a packages version, you can use `nixpkgs-review` to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommitted changes with the `wip` option or specifying a GitHub pull request number.
If you are updating a packages version, you can use nixpkgs-review to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommited changes with the `wip` option or specifying a github pull request number.
Review changes from pull request number 12345:
review changes from pull request number 12345:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review pr 12345"
nix run nixpkgs.nixpkgs-review -c nixpkgs-review pr 12345
```
Alternatively, with flakes (and analogously for the other commands below):
review uncommitted changes:
```ShellSession
nix run nixpkgs#nixpkgs-review -- pr 12345
nix run nixpkgs.nixpkgs-review -c nixpkgs-review wip
```
Review uncommitted changes:
review changes from last commit:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
```
Review changes from last commit:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
nix run nixpkgs.nixpkgs-review -c nixpkgs-review rev HEAD
```
### Tested execution of all binary files (usually in `./result/bin/`) {#submitting-changes-tested-execution}
@@ -233,7 +227,7 @@ digraph {
}
```
[This GitHub Action](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/periodic-merge-6h.yml) brings changes from `master` to `staging-next` and from `staging-next` to `staging` every 6 hours; these are the blue arrows in the diagram above. The purple arrows in the diagram above are done manually and much less frequently. You can get an idea of how often these merges occur by looking at the git history.
[This GitHub Action](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/periodic-merge-6h.yml) brings changes from `master` to `staging-next` and from `staging-next` to `staging` every 6 hours.
### Master branch {#submitting-changes-master-branch}
@@ -244,16 +238,12 @@ The `master` branch is the main development branch. It should only see non-break
The `staging` branch is a development branch where mass-rebuilds go. Mass rebuilds are commits that cause rebuilds for many packages, like more than 500 (or perhaps, if it's 'light' packages, 1000). It should only see non-breaking mass-rebuild commits. That means it is not to be used for testing, and changes must have been well tested already. If the branch is already in a broken state, please refrain from adding extra new breakages.
During the process of a releasing a new NixOS version, this branch or the release-critical packages can be restricted to non-breaking changes.
### Staging-next branch {#submitting-changes-staging-next-branch}
The `staging-next` branch is for stabilizing mass-rebuilds submitted to the `staging` branch prior to merging them into `master`. Mass-rebuilds must go via the `staging` branch. It must only see non-breaking commits that are fixing issues blocking it from being merged into the `master` branch.
The `staging-next` branch is for stabilizing mass-rebuilds submitted to the `staging` branch prior to merging them into `master`. Mass-rebuilds must go via the `staging` branch. It must only see non-breaking commits that are fixing issues blocking it from being merged into the `master ` branch.
If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days and then merge into master.
During the process of a releasing a new NixOS version, this branch or the release-critical packages can be restricted to non-breaking changes.
### Stable release branches {#submitting-changes-stable-release-branches}
The same staging workflow applies to stable release branches, but the main branch is called `release-*` instead of `master`.

View File

@@ -1,8 +1,5 @@
{ pkgs ? (import ../.. {}), nixpkgs ? { }}:
let
inherit (pkgs) lib;
inherit (lib) hasPrefix removePrefix;
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs; };
functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs; };
version = pkgs.lib.version;
@@ -32,18 +29,6 @@ let
optionsDoc = pkgs.nixosOptionsDoc {
inherit (pkgs.lib.evalModules { modules = [ ../../pkgs/top-level/config.nix ]; }) options;
documentType = "none";
transformOptions = opt:
opt // {
declarations =
map
(decl:
if hasPrefix (toString ../..) (toString decl)
then
let subpath = removePrefix "/" (removePrefix (toString ../..) (toString decl));
in { url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}"; name = subpath; }
else decl)
opt.declarations;
};
};
in pkgs.runCommand "doc-support" {}

View File

@@ -22,7 +22,6 @@ with pkgs; stdenv.mkDerivation {
docgen lists 'List manipulation functions'
docgen debug 'Debugging functions'
docgen options 'NixOS / nixpkgs option handling'
docgen filesystem 'Filesystem functions'
docgen sources 'Source filtering functions'
'';
}

View File

@@ -11,5 +11,4 @@
<xsl:param name="toc.section.depth" select="0" />
<xsl:param name="admon.style" select="''" />
<xsl:param name="callout.graphics.extension" select="'.svg'" />
<xsl:param name="generate.consistent.ids" select="1" />
</xsl:stylesheet>

View File

@@ -26,7 +26,5 @@
<xi:include href="./library/generated/options.xml" />
<xi:include href="./library/generated/filesystem.xml" />
<xi:include href="./library/generated/sources.xml" />
</section>

View File

@@ -1,4 +0,0 @@
### Autoconf {#setup-hook-autoconf}
The `autoreconfHook` derivation adds `autoreconfPhase`, which runs autoreconf, libtoolize and automake, essentially preparing the configure script in autotools-based builds. Most autotools-based packages come with the configure script pre-generated, but this hook is necessary for a few packages and when you need to patch the packages configure scripts.

View File

@@ -1,4 +0,0 @@
### Automake {#setup-hook-automake}
Adds the `share/aclocal` subdirectory of each build input to the `ACLOCAL_PATH` environment variable.

View File

@@ -1,12 +0,0 @@
### autoPatchelfHook {#setup-hook-autopatchelfhook}
This is a special setup hook which helps in packaging proprietary software in that it automatically tries to find missing shared library dependencies of ELF files based on the given `buildInputs` and `nativeBuildInputs`.
You can also specify a `runtimeDependencies` variable which lists dependencies to be unconditionally added to rpath of all executables. This is useful for programs that use dlopen 3 to load libraries at runtime.
In certain situations you may want to run the main command (`autoPatchelf`) of the setup hook on a file or a set of directories instead of unconditionally patching all outputs. This can be done by setting the `dontAutoPatchelf` environment variable to a non-empty value.
By default `autoPatchelf` will fail as soon as any ELF file requires a dependency which cannot be resolved via the given build inputs. In some situations you might prefer to just leave missing dependencies unpatched and continue to patch the rest. This can be achieved by setting the `autoPatchelfIgnoreMissingDeps` environment variable to a non-empty value. `autoPatchelfIgnoreMissingDeps` can be set to a list like `autoPatchelfIgnoreMissingDeps = [ "libcuda.so.1" "libcudart.so.1" ];` or to simply `[ "*" ]` to ignore all missing dependencies.
The `autoPatchelf` command also recognizes a `--no-recurse` command line flag, which prevents it from recursing into subdirectories.

View File

@@ -1,18 +0,0 @@
### breakpointHook {#breakpointhook}
This hook will make a build pause instead of stopping when a failure happens. It prevents nix from cleaning up the build environment immediately and allows the user to attach to a build environment using the `cntr` command. Upon build error it will print instructions on how to use `cntr`, which can be used to enter the environment for debugging. Installing cntr and running the command will provide shell access to the build sandbox of failed build. At `/var/lib/cntr` the sandboxed filesystem is mounted. All commands and files of the system are still accessible within the shell. To execute commands from the sandbox use the cntr exec subcommand. `cntr` is only supported on Linux-based platforms. To use it first add `cntr` to your `environment.systemPackages` on NixOS or alternatively to the root user on non-NixOS systems. Then in the package that is supposed to be inspected, add `breakpointHook` to `nativeBuildInputs`.
```nix
nativeBuildInputs = [ breakpointHook ];
```
When a build failure happens there will be an instruction printed that shows how to attach with `cntr` to the build sandbox.
::: {.note}
::: {.title}
Caution with remote builds
:::
This wont work with remote builds as the build environment is on a different machine and cant be accessed by `cntr`. Remote builds can be turned off by setting `--option builders ''` for `nix-build` or `--builders ''` for `nix build`.
:::

View File

@@ -1,4 +0,0 @@
### cmake {#cmake}
Overrides the default configure phase to run the CMake command. By default, we use the Make generator of CMake. In addition, dependencies are added automatically to `CMAKE_PREFIX_PATH` so that packages are correctly detected by CMake. Some additional flags are passed in to give similar behavior to configure-based packages. You can disable this hooks behavior by setting `configurePhase` to a custom value, or by setting `dontUseCmakeConfigure`. `cmakeFlags` controls flags passed only to CMake. By default, parallel building is enabled as CMake supports parallel building almost everywhere. When Ninja is also in use, CMake will detect that and use the ninja generator.

View File

@@ -1,4 +0,0 @@
### gdk-pixbuf {#setup-hook-gdk-pixbuf}
Exports `GDK_PIXBUF_MODULE_FILE` environment variable to the builder. Add librsvg package to `buildInputs` to get svg support. See also the [setup hook description in GNOME platform docs](#ssec-gnome-hooks-gdk-pixbuf).

View File

@@ -1,4 +0,0 @@
### GHC {#ghc}
Creates a temporary package database and registers every Haskell build input in it (TODO: how?).

View File

@@ -1,4 +0,0 @@
### GNOME platform {#gnome-platform}
Hooks related to GNOME platform and related libraries like GLib, GTK and GStreamer are described in [](#sec-language-gnome).

View File

@@ -6,32 +6,5 @@
<para>
Nixpkgs has several hook packages that augment the stdenv phases.
</para>
<para>
The stdenv built-in hooks are documented in <xref linkend="ssec-setup-hooks"/>.
</para>
<xi:include href="./autoconf.section.xml" />
<xi:include href="./automake.section.xml" />
<xi:include href="./autopatchelf.section.xml" />
<xi:include href="./breakpoint.section.xml" />
<xi:include href="./cmake.section.xml" />
<xi:include href="./gdk-pixbuf.section.xml" />
<xi:include href="./ghc.section.xml" />
<xi:include href="./gnome.section.xml" />
<xi:include href="./installShellFiles.section.xml" />
<xi:include href="./libiconv.section.xml" />
<xi:include href="./libxml2.section.xml" />
<xi:include href="./meson.section.xml" />
<xi:include href="./ninja.section.xml" />
<xi:include href="./patch-rc-path-hooks.section.xml" />
<xi:include href="./perl.section.xml" />
<xi:include href="./pkg-config.section.xml" />
<xi:include href="./postgresql-test-hook.section.xml" />
<xi:include href="./python.section.xml" />
<xi:include href="./qt-4.section.xml" />
<xi:include href="./scons.section.xml" />
<xi:include href="./tetex-tex-live.section.xml" />
<xi:include href="./unzip.section.xml" />
<xi:include href="./validatePkgConfig.section.xml" />
<xi:include href="./waf.section.xml" />
<xi:include href="./xcbuild.section.xml" />
</chapter>

View File

@@ -1,26 +0,0 @@
### `installShellFiles` {#installshellfiles}
This hook helps with installing manpages and shell completion files. It exposes 2 shell functions `installManPage` and `installShellCompletion` that can be used from your `postInstall` hook.
The `installManPage` function takes one or more paths to manpages to install. The manpages must have a section suffix, and may optionally be compressed (with `.gz` suffix). This function will place them into the correct directory.
The `installShellCompletion` function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of `--bash`, `--fish`, or `--zsh`. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag `--name NAME` before the path. If this flag is not provided, zsh completions will be renamed automatically such that `foobar.zsh` becomes `_foobar`. A root name may be provided for all paths using the flag `--cmd NAME`; this synthesizes the appropriate name depending on the shell (e.g. `--cmd foo` will synthesize the name `foo.bash` for bash and `_foo` for zsh). The path may also be a fifo or named fd (such as produced by `<(cmd)`), in which case the shell and name must be provided.
```nix
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installManPage doc/foobar.1 doc/barfoo.3
# explicit behavior
installShellCompletion --bash --name foobar.bash share/completions.bash
installShellCompletion --fish --name foobar.fish share/completions.fish
installShellCompletion --zsh --name _foobar share/completions.zsh
# implicit behavior
installShellCompletion share/completions/foobar.{bash,fish,zsh}
# using named fd
installShellCompletion --cmd foobar \
--bash <($out/bin/foobar --bash-completion) \
--fish <($out/bin/foobar --fish-completion) \
--zsh <($out/bin/foobar --zsh-completion)
'';
```

View File

@@ -1,4 +0,0 @@
### libiconv, libintl {#libiconv-libintl}
A few libraries automatically add to `NIX_LDFLAGS` their library, making their symbols automatically available to the linker. This includes libiconv and libintl (gettext). This is done to provide compatibility between GNU Linux, where libiconv and libintl are bundled in, and other systems where that might not be the case. Sometimes, this behavior is not desired. To disable this behavior, set `dontAddExtraLibs`.

View File

@@ -1,4 +0,0 @@
### libxml2 {#setup-hook-libxml2}
Adds every file named `catalog.xml` found under the `xml/dtd` and `xml/xsl` subdirectories of each build input to the `XML_CATALOG_FILES` environment variable.

View File

@@ -1,26 +0,0 @@
### Meson {#meson}
Overrides the configure phase to run meson to generate Ninja files. To run these files, you should accompany Meson with ninja. By default, `enableParallelBuilding` is enabled as Meson supports parallel building almost everywhere.
#### Variables controlling Meson {#variables-controlling-meson}
##### `mesonFlags` {#mesonflags}
Controls the flags passed to meson.
##### `mesonBuildType` {#mesonbuildtype}
Which [`--buildtype`](https://mesonbuild.com/Builtin-options.html#core-options) to pass to Meson. We default to `plain`.
##### `mesonAutoFeatures` {#mesonautofeatures}
What value to set [`-Dauto_features=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `enabled`.
##### `mesonWrapMode` {#mesonwrapmode}
What value to set [`-Dwrap_mode=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `nodownload` as we disallow network access.
##### `dontUseMesonConfigure` {#dontusemesonconfigure}
Disables using Mesons `configurePhase`.

View File

@@ -1,4 +0,0 @@
### ninja {#ninja}
Overrides the build, install, and check phase to run ninja instead of make. You can disable this behavior with the `dontUseNinjaBuild`, `dontUseNinjaInstall`, and `dontUseNinjaCheck`, respectively. Parallel building is enabled by default in Ninja.

View File

@@ -1,50 +0,0 @@
# `patchRcPath` hooks {#sec-patchRcPathHooks}
These hooks provide shell-specific utilities (with the same name as the hook) to patch shell scripts meant to be sourced by software users.
The typical usage is to patch initialisation or [rc](https://unix.stackexchange.com/questions/3467/what-does-rc-in-bashrc-stand-for) scripts inside `$out/bin` or `$out/etc`.
Such scripts, when being sourced, would insert the binary locations of certain commands into `PATH`, modify other environment variables or run a series of start-up commands.
When shipped from the upstream, they sometimes use commands that might not be available in the environment they are getting sourced in.
The compatible shells for each hook are:
- `patchRcPathBash`: [Bash](https://www.gnu.org/software/bash/), [ksh](http://www.kornshell.org/), [zsh](https://www.zsh.org/) and other shells supporting the Bash-like parameter expansions.
- `patchRcPathCsh`: Csh scripts, such as those targeting [tcsh](https://www.tcsh.org/).
- `patchRcPathFish`: [Fish](https://fishshell.com/) scripts.
- `patchRcPathPosix`: POSIX-conformant shells supporting the limited parameter expansions specified by the POSIX standard. Current implementation uses the parameter expansion `${foo-}` only.
For each supported shell, it modifies the script with a `PATH` prefix that is later removed when the script ends.
It allows nested patching, which guarantees that a patched script may source another patched script.
Syntax to apply the utility to a script:
```sh
patchRcPath<shell> <file> <PATH-prefix>
```
Example usage:
Given a package `foo` containing an init script `this-foo.fish` that depends on `coreutils`, `man` and `which`,
patch the init script for users to source without having the above dependencies in their `PATH`:
```nix
{ lib, stdenv, patchRcPathFish}:
stdenv.mkDerivation {
# ...
nativeBuildInputs = [
patchRcPathFish
];
postFixup = ''
patchRcPathFish $out/bin/this-foo.fish ${lib.makeBinPath [ coreutils man which ]}
'';
}
```
::: {.note}
`patchRcPathCsh` and `patchRcPathPosix` implementation depends on `sed` to do the string processing.
The others are in vanilla shell and have no third-party dependencies.
:::

View File

@@ -1,4 +0,0 @@
### Perl {#setup-hook-perl}
Adds the `lib/site_perl` subdirectory of each build input to the `PERL5LIB` environment variable. For instance, if `buildInputs` contains Perl, then the `lib/site_perl` subdirectory of each input is added to the `PERL5LIB` environment variable.

View File

@@ -1,4 +0,0 @@
### pkg-config {#setup-hook-pkg-config}
Adds the `lib/pkgconfig` and `share/pkgconfig` subdirectories of each build input to the `PKG_CONFIG_PATH` environment variable.

View File

@@ -40,7 +40,7 @@ Exported variables:
Bash-only variables:
- `postgresqlTestUserOptions`: SQL options to use when creating the `$PGUSER` role, default: `"LOGIN"`. Example: `"LOGIN SUPERUSER"`
- `postgresqlTestUserOptions`: SQL options to use when creating the `$PGUSER` role, default: `LOGIN`.
- `postgresqlTestSetupSQL`: SQL commands to run as database administrator after startup, default: statements that create `$PGUSER` and `$PGDATABASE`.
- `postgresqlTestSetupCommands`: bash commands to run after database start, defaults to running `$postgresqlTestSetupSQL` as database administrator.
- `postgresqlEnableTCP`: set to `1` to enable TCP listening. Flaky; not recommended.

View File

@@ -1,4 +0,0 @@
### Python {#setup-hook-python}
Adds the `lib/${python.libPrefix}/site-packages` subdirectory of each build input to the `PYTHONPATH` environment variable.

View File

@@ -1,4 +0,0 @@
### Qt 4 {#qt-4}
Sets the `QTDIR` environment variable to Qts path.

View File

@@ -1,4 +0,0 @@
### scons {#scons}
Overrides the build, install, and check phases. This uses the scons build system as a replacement for make. scons does not provide a configure phase, so everything is managed at build and install time.

View File

@@ -1,4 +0,0 @@
### teTeX / TeX Live {#tetex-tex-live}
Adds the `share/texmf-nix` subdirectory of each build input to the `TEXINPUTS` environment variable.

View File

@@ -1,4 +0,0 @@
### unzip {#unzip}
This setup hook will allow you to unzip .zip files specified in `$src`. There are many similar packages like `unrar`, `undmg`, etc.

View File

@@ -1,4 +0,0 @@
### validatePkgConfig {#validatepkgconfig}
The `validatePkgConfig` hook validates all pkg-config (`.pc`) files in a package. This helps catching some common errors in pkg-config files, such as undefined variables.

View File

@@ -1,4 +0,0 @@
### wafHook {#wafhook}
Overrides the configure, build, and install phases. This will run the “waf” script used by many projects. If `wafPath` (default `./waf`) doesnt exist, it will copy the version of waf available in Nixpkgs. `wafFlags` can be used to pass flags to the waf script.

View File

@@ -1,4 +0,0 @@
### xcbuildHook {#xcbuildhook}
Overrides the build and install phases to run the "xcbuild" command. This hook is needed when a project only comes with build files for the XCode build system. You can disable this behavior by setting buildPhase and configurePhase to a custom value. xcbuildFlags controls flags passed only to xcbuild.

View File

@@ -5,11 +5,9 @@
The Coq derivation is overridable through the `coq.override overrides`, where overrides is an attribute set which contains the arguments to override. We recommend overriding either of the following
* `version` (optional, defaults to the latest version of Coq selected for nixpkgs, see `pkgs/top-level/coq-packages` to witness this choice), which follows the conventions explained in the `coqPackages` section below,
* `customOCamlPackages` (optional, defaults to `null`, which lets Coq choose a version automatically), which can be set to any of the ocaml packages attribute of `ocaml-ng` (such as `ocaml-ng.ocamlPackages_4_10` which is the default for Coq 8.11 for example).
* `customOCamlPackage` (optional, defaults to `null`, which lets Coq choose a version automatically), which can be set to any of the ocaml packages attribute of `ocaml-ng` (such as `ocaml-ng.ocamlPackages_4_10` which is the default for Coq 8.11 for example).
* `coq-version` (optional, defaults to the short version e.g. "8.10"), is a version number of the form "x.y" that indicates which Coq's version build behavior to mimic when using a source which is not a release. E.g. `coq.override { version = "d370a9d1328a4e1cdb9d02ee032f605a9d94ec7a"; coq-version = "8.10"; }`.
The associated package set can be optained using `mkCoqPackages coq`, where `coq` is the derivation to use.
## Coq packages attribute sets: `coqPackages` {#coq-packages-attribute-sets-coqpackages}
The recommended way of defining a derivation for a Coq library, is to use the `coqPackages.mkCoqDerivation` function, which is essentially a specialization of `mkDerivation` taking into account most of the specifics of Coq libraries. The following attributes are supported:
@@ -31,16 +29,11 @@ The recommended way of defining a derivation for a Coq library, is to use the `c
* `releaseRev` (optional, defaults to `(v: v)`), provides a default mapping from release names to revision hashes/branch names/tags,
* `displayVersion` (optional), provides a way to alter the computation of `name` from `pname`, by explaining how to display version numbers,
* `namePrefix` (optional, defaults to `[ "coq" ]`), provides a way to alter the computation of `name` from `pname`, by explaining which dependencies must occur in `name`,
* `nativeBuildInputs` (optional), is a list of executables that are required to build the current derivation, in addition to the default ones (namely `which`, `dune` and `ocaml` depending on whether `useDune`, `useDuneifVersion` and `mlPlugin` are set).
* `extraNativeBuildInputs` (optional, deprecated), an additional list of derivation to add to `nativeBuildInputs`,
* `overrideNativeBuildInputs` (optional) replaces the default list of derivation to which `nativeBuildInputs` and `extraNativeBuildInputs` adds extra elements,
* `buildInputs` (optional), is a list of libraries and dependencies that are required to build and run the current derivation, in addition to the default one `[ coq ]`,
* `extraBuildInputs` (optional, deprecated), an additional list of derivation to add to `buildInputs`,
* `overrideBuildInputs` (optional) replaces the default list of derivation to which `buildInputs` and `extraBuildInputs` adds extras elements,
* `propagatedBuildInputs` (optional) is passed as is to `mkDerivation`, we recommend to use this for Coq libraries and Coq plugin dependencies, as this makes sure the paths of the compiled libraries and plugins will always be added to the build environements of subsequent derivation, which is necessary for Coq packages to work correctly,
* `mlPlugin` (optional, defaults to `false`). Some extensions (plugins) might require OCaml and sometimes other OCaml packages. Standard dependencies can be added by setting the current option to `true`. For a finer grain control, the `coq.ocamlPackages` attribute can be used in `nativeBuildInputs`, `buildInputs`, and `propagatedBuildInputs` to depend on the same package set Coq was built against.
* `useDuneifVersion` (optional, default to `(x: false)` uses Dune to build the package if the provided predicate evaluates to true on the version, e.g. `useDuneifVersion = versions.isGe "1.1"` will use dune if the version of the package is greater or equal to `"1.1"`,
* `useDune` (optional, defaults to `false`) uses Dune to build the package if set to true, the presence of this attribute overrides the behavior of the previous one.
* `extraNativeBuildInputs` (optional), by default `nativeBuildInputs` just contains `coq`, this allows to add more native build inputs, `nativeBuildInputs` are executables and `buildInputs` are libraries and dependencies,
* `extraBuildInputs` (optional), this allows to add more build inputs,
* `mlPlugin` (optional, defaults to `false`). Some extensions (plugins) might require OCaml and sometimes other OCaml packages. Standard dependencies can be added by setting the current option to `true`. For a finer grain control, the `coq.ocamlPackages` attribute can be used in `extraBuildInputs` to depend on the same package set Coq was built against.
* `useDune2ifVersion` (optional, default to `(x: false)` uses Dune2 to build the package if the provided predicate evaluates to true on the version, e.g. `useDune2if = versions.isGe "1.1"` will use dune if the version of the package is greater or equal to `"1.1"`,
* `useDune2` (optional, defaults to `false`) uses Dune2 to build the package if set to true, the presence of this attribute overrides the behavior of the previous one.
* `opam-name` (optional, defaults to concatenating with a dash separator the components of `namePrefix` and `pname`), name of the Dune package to build.
* `enableParallelBuilding` (optional, defaults to `true`), since it is activated by default, we provide a way to disable it.
* `extraInstallFlags` (optional), allows to extend `installFlags` which initializes the variable `COQMF_COQLIB` so as to install in the proper subdirectory. Indeed Coq libraries should be installed in `$(out)/lib/coq/${coq.coq-version}/user-contrib/`. Such directories are automatically added to the `$COQPATH` environment variable by the hook defined in the Coq derivation.
@@ -88,58 +81,3 @@ with lib; mkCoqDerivation {
};
}
```
## Three ways of overriding Coq packages {#coq-overriding-packages}
There are three distinct ways of changing a Coq package by overriding one of its values: `.override`, `overrideCoqDerivation`, and `.overrideAttrs`. This section explains what sort of values can be overridden with each of these methods.
### `.override` {#coq-override}
`.override` lets you change arguments to a Coq derivation. In the case of the `multinomials` package above, `.override` would let you override arguments like `mkCoqDerivation`, `version`, `coq`, `mathcomp`, `mathcom-finmap`, etc.
For example, assuming you have a special `mathcomp` dependency you want to use, here is how you could override the `mathcomp` dependency:
```nix
multinomials.override {
mathcomp = my-special-mathcomp;
}
```
In Nixpkgs, all Coq derivations take a `version` argument. This can be overridden in order to easily use a different version:
```nix
coqPackages.multinomials.override {
version = "1.5.1";
}
```
Refer to [](#coq-packages-attribute-sets-coqpackages) for all the different formats that you can potentially pass to `version`, as well as the restrictions.
### `overrideCoqDerivation` {#coq-overrideCoqDerivation}
The `overrideCoqDerivation` function lets you easily change arguments to `mkCoqDerivation`. These arguments are described in [](#coq-packages-attribute-sets-coqpackages).
For example, here is how you could locally add a new release of the `multinomials` library, and set the `defaultVersion` to use this release:
```nix
coqPackages.lib.overrideCoqDerivation
{
defaultVersion = "2.0";
release."2.0".sha256 = "1lq8x86vd3vqqh2yq6hvyagpnhfq5wmk5pg2z0xq7b7dbbbhyfkk";
}
coqPackages.multinomials
```
### `.overrideAttrs` {#coq-overrideAttrs}
`.overrideAttrs` lets you override arguments to the underlying `stdenv.mkDerivation` call. Internally, `mkCoqDerivation` uses `stdenv.mkDerivation` to create derivations for Coq libraries. You can override arguments to `stdenv.mkDerivation` with `.overrideAttrs`.
For instance, here is how you could add some code to be performed in the derivation after installation is complete:
```nix
coqPackages.multinomials.overrideAttrs (oldAttrs: {
postInstall = oldAttrs.postInstall or "" + ''
echo "you can do anything you want here"
'';
})
```

View File

@@ -71,8 +71,8 @@ The `dotnetCorePackages.sdk` contains both a runtime and the full sdk of a given
To package Dotnet applications, you can use `buildDotnetModule`. This has similar arguments to `stdenv.mkDerivation`, with the following additions:
* `projectFile` is used for specifying the dotnet project file, relative to the source root. These usually have `.sln` or `.csproj` file extensions. This can be a list of multiple projects as well. Most of the time dotnet can figure this location out by itself, so this should only be set if necessary.
* `nugetDeps` takes either a path to a `deps.nix` file, or a derivation. The `deps.nix` file can be generated using the script attached to `passthru.fetch-deps`. This file can also be generated manually using `nuget-to-nix` tool, which is available in nixpkgs. If the argument is a derivation, it will be used directly and assume it has the same output as `mkNugetDeps`.
* `projectFile` has to be used for specifying the dotnet project file relative to the source root. These usually have `.sln` or `.csproj` file extensions. This can be an array of multiple projects as well.
* `nugetDeps` has to be used to specify the NuGet dependency file. Unfortunately, these cannot be deterministically fetched without a lockfile. A script to fetch these is available as `passthru.fetch-deps`. This file can also be generated manually using `nuget-to-nix` tool, which is available in nixpkgs.
* `packNupkg` is used to pack project as a `nupkg`, and installs it to `$out/share`. If set to `true`, the derivation can be used as a dependency for another dotnet project by adding it to `projectReferences`.
* `projectReferences` can be used to resolve `ProjectReference` project items. Referenced projects can be packed with `buildDotnetModule` by setting the `packNupkg = true` attribute and passing a list of derivations to `projectReferences`. Since we are sharing referenced projects as NuGets they must be added to csproj/fsproj files as `PackageReference` as well.
For example, your project has a local dependency:
@@ -87,7 +87,6 @@ To package Dotnet applications, you can use `buildDotnetModule`. This has simila
* `executables` is used to specify which executables get wrapped to `$out/bin`, relative to `$out/lib/$pname`. If this is unset, all executables generated will get installed. If you do not want to install any, set this to `[]`. This gets done in the `preFixup` phase.
* `runtimeDeps` is used to wrap libraries into `LD_LIBRARY_PATH`. This is how dotnet usually handles runtime dependencies.
* `buildType` is used to change the type of build. Possible values are `Release`, `Debug`, etc. By default, this is set to `Release`.
* `selfContainedBuild` allows to enable the [self-contained](https://docs.microsoft.com/en-us/dotnet/core/deploying/#publish-self-contained) build flag. By default, it is set to false and generated applications have a dependency on the selected dotnet runtime. If enabled, the dotnet runtime is bundled into the executable and the built app has no dependency on Dotnet.
* `dotnet-sdk` is useful in cases where you need to change what dotnet SDK is being used.
* `dotnet-runtime` is useful in cases where you need to change what dotnet runtime is being used. This can be either a regular dotnet runtime, or an aspnetcore.
* `dotnet-test-sdk` is useful in cases where unit tests expect a different dotnet SDK. By default, this is set to the `dotnet-sdk` attribute.
@@ -100,7 +99,7 @@ To package Dotnet applications, you can use `buildDotnetModule`. This has simila
* `dotnetPackFlags` can be used to pass flags to `dotnet pack`. Used only if `packNupkg` is set to `true`.
* `dotnetFlags` can be used to pass flags to all of the above phases.
When packaging a new application, you need to fetch its dependencies. You can run `nix-build -A package.fetch-deps` to generate a script that will build a lockfile for you. After running the script you should have the location of the generated lockfile printed to the console, which can be copied to a stable directory. Then set `nugetDeps = ./deps.nix` and you're ready to build the derivation.
When packaging a new application, you need to fetch it's dependencies. You can set `nugetDeps` to an empty string to make the derivation temporarily evaluate, and then run `nix-build -A package.passthru.fetch-deps` to generate it's dependency fetching script. After running the script, you should have the location of the generated lockfile printed to the console. This can be copied to a stable directory. Note that if either `projectFile` or `nugetDeps` are unset, this script cannot be generated!
Here is an example `default.nix`, using some of the previously discussed arguments:
```nix

View File

@@ -11,8 +11,8 @@ The function `buildGoModule` builds Go programs managed with Go modules. It buil
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 take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorHash = null;`
- `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 dependant `vendorHash` checksums.
- `vendorSha256`: is the hash of the output of the intermediate fetcher derivation. `vendorSha256` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorSha256 = null;`
- `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 dependant `vendorSha256` checksums.
```nix
pet = buildGoModule rec {
@@ -26,7 +26,7 @@ pet = buildGoModule rec {
sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
};
vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA=";
vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j";
meta = with lib; {
description = "Simple command-line snippet manager, written in Go";

View File

@@ -157,61 +157,6 @@ git config --global url."https://github.com/".insteadOf git://github.com/
## Tool specific instructions {#javascript-tool-specific}
### buildNpmPackage {#javascript-buildNpmPackage}
`buildNpmPackage` allows you to package npm-based projects in Nixpkgs without the use of an auto-generated dependencies file (as used in [node2nix](#javascript-node2nix)). It works by utilizing npm's cache functionality -- creating a reproducible cache that contains the dependencies of a project, and pointing npm to it.
```nix
{ lib, buildNpmPackage, fetchFromGitHub }:
buildNpmPackage rec {
pname = "flood";
version = "4.7.0";
src = fetchFromGitHub {
owner = "jesec";
repo = pname;
rev = "v${version}";
hash = "sha256-BR+ZGkBBfd0dSQqAvujsbgsEPFYw/ThrylxUbOksYxM=";
};
patches = [ ./remove-prepack-script.patch ];
npmDepsHash = "sha256-s8SpZY/1tKZVd3vt7sA9vsqHvEaNORQBMrSyhWpj048=";
NODE_OPTIONS = "--openssl-legacy-provider";
meta = with lib; {
description = "A modern web UI for various torrent clients with a Node.js backend and React frontend";
homepage = "https://flood.js.org";
license = licenses.gpl3Only;
maintainers = with maintainers; [ winter ];
};
}
```
#### Arguments {#javascript-buildNpmPackage-arguments}
* `npmDepsHash`: The output hash of the dependencies for this project. Can be calculated in advance with [`prefetch-npm-deps`](#javascript-buildNpmPackage-prefetch-npm-deps).
* `makeCacheWritable`: Whether to make the cache writable prior to installing dependencies. Don't set this unless npm tries to write to the cache directory, as it can slow down the build.
* `npmBuildScript`: The script to run to build the project. Defaults to `"build"`.
* `npmFlags`: Flags to pass to all npm commands.
* `npmInstallFlags`: Flags to pass to `npm ci` and `npm prune`.
* `npmBuildFlags`: Flags to pass to `npm run ${npmBuildScript}`.
* `npmPackFlags`: Flags to pass to `npm pack`.
#### prefetch-npm-deps {#javascript-buildNpmPackage-prefetch-npm-deps}
`prefetch-npm-deps` can calculate the hash of the dependencies of an npm project ahead of time.
```console
$ ls
package.json package-lock.json index.js
$ prefetch-npm-deps package-lock.json
...
sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
```
### node2nix {#javascript-node2nix}
#### Preparation {#javascript-node2nix-preparation}
@@ -235,27 +180,18 @@ See `node2nix` [docs](https://github.com/svanderburg/node2nix) for more info.
#### Preparation {#javascript-yarn2nix-preparation}
You will need at least a `yarn.lock` file. If upstream does not have one you need to generate it and reference it in your package definition.
You will need at least a yarn.lock and yarn.nix file.
If the downloaded files contain the `package.json` and `yarn.lock` files they can be used like this:
```nix
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
sha256 = "....";
};
```
- Generate a yarn.lock in upstream if it is not already there.
- `yarn2nix > yarn.nix` will generate the dependencies in a Nix format.
#### mkYarnPackage {#javascript-yarn2nix-mkYarnPackage}
`mkYarnPackage` will by default try to generate a binary. For package only generating static assets (Svelte, Vue, React, WebPack, ...), you will need to explicitly override the build step with your instructions.
It's important to use the `--offline` flag. For example if you script is `"build": "something"` in `package.json` use:
This will by default try to generate a binary. For package only generating static assets (Svelte, Vue, React...), you will need to explicitly override the build step with your instructions. It's important to use the `--offline` flag. For example if you script is `"build": "something"` in package.json use:
```nix
buildPhase = ''
export HOME=$(mktemp -d)
yarn --offline build
yarn build --offline
'';
```
@@ -265,27 +201,15 @@ The dist phase is also trying to build a binary, the only way to override it is
distPhase = "true";
```
The configure phase can sometimes fail because it makes many assumptions which may not always apply. One common override is:
The configure phase can sometimes fail because it tries to be too clever. One common override is:
```nix
configurePhase = ''
ln -s $node_modules node_modules
'';
```
or if you need a writeable node_modules directory:
```nix
configurePhase = ''
cp -r $node_modules node_modules
chmod +w node_modules
'';
configurePhase = "ln -s $node_modules node_modules";
```
#### mkYarnModules {#javascript-yarn2nix-mkYarnModules}
This will generate a derivation including the `node_modules` directory.
If you have to build a derivation for an integrated web framework (rails, phoenix..), this is probably the easiest way.
This will generate a derivation including the node_modules. If you have to build a derivation for an integrated web framework (rails, phoenix..), this is probably the easiest way. [Plausible](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/web-apps/plausible/default.nix#L39) offers a good example of how to do this.
#### Overriding dependency behavior

View File

@@ -200,7 +200,7 @@ luaposix = buildLuarocksPackage {
The `buildLuarocksPackage` delegates most tasks to luarocks:
* it adds `luarocks` as an unpacker for `src.rock` files (zip files really).
* `configurePhase` writes a temporary luarocks configuration file which location
* configurePhase` writes a temporary luarocks configuration file which location
is exported via the environment variable `LUAROCKS_CONFIG`.
* the `buildPhase` does nothing.
* `installPhase` calls `luarocks make --deps-mode=none --tree $out` to build and

View File

@@ -233,8 +233,7 @@ in stdenv.mkDerivation rec {
src = builtins.fetchTarball
"https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ maven ];
buildInputs = [ maven makeWrapper ];
buildPhase = ''
echo "Using repository ${repository}"
@@ -311,8 +310,7 @@ in stdenv.mkDerivation rec {
src = builtins.fetchTarball
"https://github.com/fzakaria/nixos-maven-example/archive/main.tar.gz";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ maven ];
buildInputs = [ maven makeWrapper ];
buildPhase = ''
echo "Using repository ${repository}"

View File

@@ -1,6 +1,6 @@
# Perl {#sec-language-perl}
## Running Perl programs on the shell {#ssec-perl-running}
## Running perl programs on the shell {#ssec-perl-running}
When executing a Perl script, it is possible you get an error such as `./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory`. This happens when the script expects Perl to be installed at `/usr/bin/perl`, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
@@ -35,16 +35,15 @@ Perl packages from CPAN are defined in [pkgs/top-level/perl-packages.nix](https:
```nix
ClassC3 = buildPerlPackage rec {
pname = "Class-C3";
version = "0.21";
name = "Class-C3-0.21";
src = fetchurl {
url = "mirror://cpan/authors/id/F/FL/FLORA/${pname}-${version}.tar.gz";
url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
};
};
```
Note the use of `mirror://cpan/`, and the `pname` and `version` in the URL definition to ensure that the `pname` attribute is consistent with the source that were actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write
Note the use of `mirror://cpan/`, and the `${name}` in the URL definition to ensure that the name attribute is consistent with the source that were actually downloading. Perl packages are made available in `all-packages.nix` through the variable `perlPackages`. For instance, if you have a package that needs `ClassC3`, you would typically write
```nix
foo = import ../path/to/foo.nix {
@@ -73,11 +72,10 @@ So what does `buildPerlPackage` do? It does the following:
{ buildPerlPackage, fetchurl, db }:
buildPerlPackage rec {
pname = "BerkeleyDB";
version = "0.36";
name = "BerkeleyDB-0.36";
src = fetchurl {
url = "mirror://cpan/authors/id/P/PM/PMQS/${pname}-${version}.tar.gz";
url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
};
@@ -92,10 +90,9 @@ Dependencies on other Perl packages can be specified in the `buildInputs` and `p
```nix
ClassC3Componentised = buildPerlPackage rec {
pname = "Class-C3-Componentised";
version = "1.0004";
name = "Class-C3-Componentised-1.0004";
src = fetchurl {
url = "mirror://cpan/authors/id/A/AS/ASH/${pname}-${version}.tar.gz";
url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
};
propagatedBuildInputs = [
@@ -114,7 +111,7 @@ ImageExifTool = buildPerlPackage {
version = "11.50";
src = fetchurl {
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/${pname}-${version}.tar.gz";
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
};
@@ -142,10 +139,9 @@ This program takes a Perl module name, looks it up on CPAN, fetches and unpacks
```ShellSession
$ nix-generate-from-cpan XML::Simple
XMLSimple = buildPerlPackage rec {
pname = "XML-Simple";
version = "2.22";
name = "XML-Simple-2.22";
src = fetchurl {
url = "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-2.22.tar.gz";
url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
};
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];

View File

@@ -9,7 +9,7 @@ wide variety of extensions and libraries available.
The different versions of PHP that nixpkgs provides are located under
attributes named based on major and minor version number; e.g.,
`php81` is PHP 8.1.
`php74` is PHP 7.4.
Only versions of PHP that are supported by upstream for the entirety
of a given NixOS release will be included in that release of
@@ -23,7 +23,7 @@ NixOS - not necessarily the latest major release from upstream.
All available PHP attributes are wrappers around their respective
binary PHP package and provide commonly used extensions this way. The
real PHP 7.4 package, i.e. the unwrapped one, is available as
`php81.unwrapped`; see the next section for more details.
`php74.unwrapped`; see the next section for more details.
Interactive tools built on PHP are put in `php.packages`; composer is
for example available at `php.packages.composer`.

View File

@@ -8,9 +8,9 @@
Several versions of the Python interpreter are available on Nix, as well as a
high amount of packages. The attribute `python3` refers to the default
interpreter, which is currently CPython 3.10. The attribute `python` refers to
interpreter, which is currently CPython 3.9. The attribute `python` refers to
CPython 2.7 for backwards-compatibility. It is also possible to refer to
specific versions, e.g. `python39` refers to CPython 3.9, and `pypy` refers to
specific versions, e.g. `python38` refers to CPython 3.8, and `pypy` refers to
the default PyPy interpreter.
Python is used a lot, and in different ways. This affects also how it is
@@ -26,10 +26,10 @@ however, are in separate sets, with one set per interpreter version.
The interpreters have several common attributes. One of these attributes is
`pkgs`, which is a package set of Python libraries for this specific
interpreter. E.g., the `toolz` package corresponding to the default interpreter
is `python.pkgs.toolz`, and the CPython 3.9 version is `python39.pkgs.toolz`.
is `python.pkgs.toolz`, and the CPython 3.8 version is `python38.pkgs.toolz`.
The main package set contains aliases to these package sets, e.g.
`pythonPackages` refers to `python.pkgs` and `python39Packages` to
`python39.pkgs`.
`pythonPackages` refers to `python.pkgs` and `python38Packages` to
`python38.pkgs`.
#### Installing Python and packages {#installing-python-and-packages}
@@ -54,7 +54,7 @@ with `python.buildEnv` or `python.withPackages` where the interpreter and other
executables are wrapped to be able to find each other and all of the modules.
In the following examples we will start by creating a simple, ad-hoc environment
with a nix-shell that has `numpy` and `toolz` in Python 3.9; then we will create
with a nix-shell that has `numpy` and `toolz` in Python 3.8; then we will create
a re-usable environment in a single-file Python script; then we will create a
full Python environment for development with this same environment.
@@ -70,10 +70,10 @@ temporary shell session with a Python and a *precise* list of packages (plus
their runtime dependencies), with no other Python packages in the Python
interpreter's scope.
To create a Python 3.9 session with `numpy` and `toolz` available, run:
To create a Python 3.8 session with `numpy` and `toolz` available, run:
```sh
$ nix-shell -p 'python39.withPackages(ps: with ps; [ numpy toolz ])'
$ nix-shell -p 'python38.withPackages(ps: with ps; [ numpy toolz ])'
```
By default `nix-shell` will start a `bash` session with this interpreter in our
@@ -81,8 +81,8 @@ By default `nix-shell` will start a `bash` session with this interpreter in our
```Python console
[nix-shell:~/src/nixpkgs]$ python3
Python 3.9.12 (main, Mar 23 2022, 21:36:19)
[GCC 11.3.0] on linux
Python 3.8.1 (default, Dec 18 2019, 19:06:26)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy; import toolz
```
@@ -102,16 +102,13 @@ will still get 1 wrapped Python interpreter. We can start the interpreter
directly like so:
```sh
$ nix-shell -p "python39.withPackages (ps: with ps; [ numpy toolz requests ])" --run python3
this derivation will be built:
/nix/store/mpn7k6bkjl41fm51342rafaqfsl10qs4-python3-3.9.12-env.drv
this path will be fetched (0.09 MiB download, 0.41 MiB unpacked):
/nix/store/5gaiacnzi096b6prc6aa1pwrhncmhc8b-python3.9-toolz-0.11.2
copying path '/nix/store/5gaiacnzi096b6prc6aa1pwrhncmhc8b-python3.9-toolz-0.11.2' from 'https://cache.nixos.org'...
building '/nix/store/mpn7k6bkjl41fm51342rafaqfsl10qs4-python3-3.9.12-env.drv'...
created 279 symlinks in user environment
Python 3.9.12 (main, Mar 23 2022, 21:36:19)
[GCC 11.3.0] on linux
$ nix-shell -p 'python38.withPackages(ps: with ps; [ numpy toolz requests ])' --run python3
these derivations will be built:
/nix/store/xbdsrqrsfa1yva5s7pzsra8k08gxlbz1-python3-3.8.1-env.drv
building '/nix/store/xbdsrqrsfa1yva5s7pzsra8k08gxlbz1-python3-3.8.1-env.drv'...
created 277 symlinks in user environment
Python 3.8.1 (default, Dec 18 2019, 19:06:26)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>
@@ -150,7 +147,7 @@ Executing this script requires a `python3` that has `numpy`. Using what we learn
in the previous section, we could startup a shell and just run it like so:
```ShellSession
$ nix-shell -p 'python39.withPackages(ps: with ps; [ numpy ])' --run 'python3 foo.py'
$ nix-shell -p 'python38.withPackages(ps: with ps; [ numpy ])' --run 'python3 foo.py'
The dot product of [1 2] and [3 4] is: 11
```
@@ -213,12 +210,12 @@ create a single script with Python dependencies, but in the course of normal
development we're usually working in an entire package repository.
As explained in the Nix manual, `nix-shell` can also load an expression from a
`.nix` file. Say we want to have Python 3.9, `numpy` and `toolz`, like before,
`.nix` file. Say we want to have Python 3.8, `numpy` and `toolz`, like before,
in an environment. We can add a `shell.nix` file describing our dependencies:
```nix
with import <nixpkgs> {};
(python39.withPackages (ps: [ps.numpy ps.toolz])).env
(python38.withPackages (ps: [ps.numpy ps.toolz])).env
```
And then at the command line, just typing `nix-shell` produces the same
@@ -232,7 +229,7 @@ What's happening here?
imports the `<nixpkgs>` function, `{}` calls it and the `with` statement
brings all attributes of `nixpkgs` in the local scope. These attributes form
the main package set.
2. Then we create a Python 3.9 environment with the `withPackages` function, as before.
2. Then we create a Python 3.8 environment with the `withPackages` function, as before.
3. The `withPackages` function expects us to provide a function as an argument
that takes the set of all Python packages and returns a list of packages to
include in the environment. Here, we select the packages `numpy` and `toolz`
@@ -243,7 +240,7 @@ To combine this with `mkShell` you can:
```nix
with import <nixpkgs> {};
let
pythonEnv = python39.withPackages (ps: [
pythonEnv = python38.withPackages (ps: [
ps.numpy
ps.toolz
]);
@@ -381,8 +378,8 @@ information. The output of the function is a derivation.
An expression for `toolz` can be found in the Nixpkgs repository. As explained
in the introduction of this Python section, a derivation of `toolz` is available
for each interpreter version, e.g. `python39.pkgs.toolz` refers to the `toolz`
derivation corresponding to the CPython 3.9 interpreter.
for each interpreter version, e.g. `python38.pkgs.toolz` refers to the `toolz`
derivation corresponding to the CPython 3.8 interpreter.
The above example works when you're directly working on
`pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though,
@@ -395,11 +392,11 @@ and adds it along with a `numpy` package to a Python environment.
with import <nixpkgs> {};
( let
my_toolz = python39.pkgs.buildPythonPackage rec {
my_toolz = python38.pkgs.buildPythonPackage rec {
pname = "toolz";
version = "0.10.0";
src = python39.pkgs.fetchPypi {
src = python38.pkgs.fetchPypi {
inherit pname version;
sha256 = "08fdd5ef7c96480ad11c12d472de21acd32359996f69a5259299b540feba4560";
};
@@ -417,7 +414,7 @@ with import <nixpkgs> {};
```
Executing `nix-shell` will result in an environment in which you can use
Python 3.9 and the `toolz` package. As you can see we had to explicitly mention
Python 3.8 and the `toolz` package. As you can see we had to explicitly mention
for which Python version we want to build a package.
So, what did we do here? Well, we took the Nix expression that we used earlier
@@ -602,10 +599,10 @@ been removed, in this case, it's recommended to use `pytestCheckHook`.
#### Using pytestCheckHook {#using-pytestcheckhook}
`pytestCheckHook` is a convenient hook which will substitute the setuptools
`test` command for a `checkPhase` which runs `pytest`. This is also beneficial
`test` command for a checkPhase which runs `pytest`. This is also beneficial
when a package may need many items disabled to run the test suite.
Using the example above, the analagous `pytestCheckHook` usage would be:
Using the example above, the analagous pytestCheckHook usage would be:
```
checkInputs = [ pytestCheckHook ];
@@ -624,7 +621,7 @@ Using the example above, the analagous `pytestCheckHook` usage would be:
];
```
This is expecially useful when tests need to be conditionally disabled,
This is expecially useful when tests need to be conditionallydisabled,
for example:
```
@@ -640,156 +637,31 @@ for example:
"socket"
];
```
Trying to concatenate the related strings to disable tests in a regular
`checkPhase` would be much harder to read. This also enables us to comment on
why specific tests are disabled.
Trying to concatenate the related strings to disable tests in a regular checkPhase
would be much harder to read. This also enables us to comment on why specific tests
are disabled.
#### Using pythonImportsCheck {#using-pythonimportscheck}
Although unit tests are highly preferred to validate correctness of a package, not
all packages have test suites that can be run easily, and some have none at all.
Although unit tests are highly prefered to validate correctness of a package, not
all packages have test suites that can be ran easily, and some have none at all.
To help ensure the package still works, `pythonImportsCheck` can attempt to import
the listed modules.
```
pythonImportsCheck = [ "requests" "urllib" ];
```
roughly translates to:
```
postCheck = ''
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
python -c "import requests; import urllib"
'';
```
However, this is done in its own phase, and not dependent on whether `doCheck = true;`.
However, this is done in it's own phase, and not dependent on whether `doCheck = true;`
This can also be useful in verifying that the package doesn't assume commonly
present packages (e.g. `setuptools`).
#### Using pythonRelaxDepsHook {#using-pythonrelaxdepshook}
It is common for upstream to specify a range of versions for its package
dependencies. This makes sense, since it ensures that the package will be built
with a subset of packages that is well tested. However, this commonly causes
issues when packaging in Nixpkgs, because the dependencies that this package
may need are too new or old for the package to build correctly. We also cannot
package multiple versions of the same package since this may cause conflicts
in `PYTHONPATH`.
One way to side step this issue is to relax the dependencies. This can be done
by either removing the package version range or by removing the package
declaration entirely. This can be done using the `pythonRelaxDepsHook` hook. For
example, given the following `requirements.txt` file:
```
pkg1<1.0
pkg2
pkg3>=1.0,<=2.0
```
we can do:
```
nativeBuildInputs = [ pythonRelaxDepsHook ];
pythonRelaxDeps = [ "pkg1" "pkg3" ];
pythonRemoveDeps = [ "pkg2" ];
```
which would result in the following `requirements.txt` file:
```
pkg1
pkg3
```
Another option is to pass `true`, that will relax/remove all dependencies, for
example:
```
nativeBuildInputs = [ pythonRelaxDepsHook ];
pythonRelaxDeps = true;
```
which would result in the following `requirements.txt` file:
```
pkg1
pkg2
pkg3
```
In general you should always use `pythonRelaxDeps`, because `pythonRemoveDeps`
will convert build errors into runtime errors. However `pythonRemoveDeps` may
still be useful in exceptional cases, and also to remove dependencies wrongly
declared by upstream (for example, declaring `black` as a runtime dependency
instead of a dev dependency).
Keep in mind that while the examples above are done with `requirements.txt`,
`pythonRelaxDepsHook` works by modifying the resulting wheel file, so it should
work in any of the formats supported by `buildPythonPackage` currently,
with the exception of `other` (see `format` in
[`buildPythonPackage` parameters](#buildpythonpackage-parameters) for more details).
### Using unittestCheckHook {#using-unittestcheckhook}
`unittestCheckHook` is a hook which will substitute the setuptools `test` command for a `checkPhase` which runs `python -m unittest discover`:
```
checkInputs = [ unittestCheckHook ];
unittestFlags = [ "-s" "tests" "-v" ];
```
##### Using sphinxHook {#using-sphinxhook}
The `sphinxHook` is a helpful tool to build documentation and manpages
using the popular Sphinx documentation generator.
It is setup to automatically find common documentation source paths and
render them using the default `html` style.
```
outputs = [
"out"
"doc"
];
nativeBuildInputs = [
sphinxHook
];
```
The hook will automatically build and install the artifact into the
`doc` output, if it exists. It also provides an automatic diversion
for the artifacts of the `man` builder into the `man` target.
```
outputs = [
"out"
"doc"
"man"
];
# Use multiple builders
sphinxBuilders = [
"singlehtml"
"man"
];
```
Overwrite `sphinxRoot` when the hook is unable to find your
documentation source root.
```
# Configure sphinxRoot for uncommon paths
sphinxRoot = "weird/docs/path";
```
The hook is also available to packages outside the python ecosystem by
referencing it using `sphinxHook` from top-level.
present packages (e.g. `setuptools`)
### Develop local package {#develop-local-package}
@@ -799,14 +671,14 @@ creates a special link to the project code. That way, you can run updated code
without having to reinstall after each and every change you make. Development
mode is also available. Let's see how you can use it.
In the previous Nix expression the source was fetched from a url. We can also
In the previous Nix expression the source was fetched from an url. We can also
refer to a local source instead using `src = ./path/to/source/tree;`
If we create a `shell.nix` file which calls `buildPythonPackage`, and if `src`
is a local source, and if the local source has a `setup.py`, then development
mode is activated.
In the following example, we create a simple environment that has a Python 3.9
In the following example we create a simple environment that has a Python 3.8
version of our package in it, as well as its dependencies and other packages we
like to have in the environment, all specified with `propagatedBuildInputs`.
Indeed, we can just add any package we like to have in our environment to
@@ -814,7 +686,7 @@ Indeed, we can just add any package we like to have in our environment to
```nix
with import <nixpkgs> {};
with python39Packages;
with python38Packages;
buildPythonPackage rec {
name = "mypackage";
@@ -892,9 +764,9 @@ and in this case the `python38` interpreter is automatically used.
### Interpreters {#interpreters}
Versions 2.7, 3.7, 3.8, 3.9 and 3.10 of the CPython interpreter are available
as respectively `python27`, `python37`, `python38`, `python39` and `python310`.
The aliases `python2` and `python3` correspond to respectively `python27` and
Versions 2.7, 3.7, 3.8 and 3.9 of the CPython interpreter are available as
respectively `python27`, `python37`, `python38` and `python39`. The
aliases `python2` and `python3` correspond to respectively `python27` and
`python39`. The attribute `python` maps to `python2`. The PyPy interpreters
compatible with Python 2.7 and 3 are available as `pypy27` and `pypy3`, with
aliases `pypy2` mapping to `pypy27` and `pypy` mapping to `pypy2`. The Nix
@@ -923,7 +795,7 @@ Each interpreter has the following attributes:
### Optimizations {#optimizations}
The Python interpreters are by default not built with optimizations enabled, because
The Python interpreters are by default not build with optimizations enabled, because
the builds are in that case not reproducible. To enable optimizations, override the
interpreter of interest, e.g using
@@ -974,7 +846,7 @@ and the aliases
#### `buildPythonPackage` function {#buildpythonpackage-function}
The `buildPythonPackage` function is implemented in
`pkgs/development/interpreters/python/mk-python-derivation.nix`
`pkgs/development/interpreters/python/mk-python-derivation`
using setup hooks.
The following is an example:
@@ -1015,7 +887,7 @@ The `buildPythonPackage` mainly does four things:
* In the `postFixup` phase, the `wrapPythonPrograms` bash function is called to
wrap all programs in the `$out/bin/*` directory to include `$PATH`
environment variable and add dependent libraries to script's `sys.path`.
* In the `installCheck` phase, `${python.interpreter} setup.py test` is run.
* In the `installCheck` phase, `${python.interpreter} setup.py test` is ran.
By default tests are run because `doCheck = true`. Test dependencies, like
e.g. the test runner, should be added to `checkInputs`.
@@ -1030,7 +902,7 @@ following are specific to `buildPythonPackage`:
* `catchConflicts ? true`: If `true`, abort package build if a package name
appears more than once in dependency tree. Default is `true`.
* `disabled ? false`: If `true`, package is not built for the particular Python
* `disabled` ? false: If `true`, package is not built for the particular Python
interpreter version.
* `dontWrapPythonPrograms ? false`: Skip wrapping of Python programs.
* `permitUserSite ? false`: Skip setting the `PYTHONNOUSERSITE` environment
@@ -1317,18 +1189,14 @@ are used in `buildPythonPackage`.
- `pytestCheckHook` to run tests with `pytest`. See [example usage](#using-pytestcheckhook).
- `pythonCatchConflictsHook` to check whether a Python package is not already existing.
- `pythonImportsCheckHook` to check whether importing the listed modules works.
- `pythonRelaxDepsHook` will relax Python dependencies restrictions for the package.
See [example usage](#using-pythonrelaxdepshook).
- `pythonRemoveBinBytecode` to remove bytecode from the `/bin` folder.
- `setuptoolsBuildHook` to build a wheel using `setuptools`.
- `setuptoolsCheckHook` to run tests with `python setup.py test`.
- `sphinxHook` to build documentation and manpages using Sphinx.
- `venvShellHook` to source a Python 3 `venv` at the `venvDir` location. A
`venv` is created if it does not yet exist. `postVenvCreation` can be used to
to run commands only after venv is first created.
- `wheelUnpackHook` to move a wheel to the correct folder so it can be installed
with the `pipInstallHook`.
- `unittestCheckHook` will run tests with `python -m unittest discover`. See [example usage](#using-unittestcheckhook).
### Development mode {#development-mode}
@@ -1484,8 +1352,7 @@ in newpkgs.inkscape
### `python setup.py bdist_wheel` cannot create .whl {#python-setup.py-bdist_wheel-cannot-create-.whl}
Executing `python setup.py bdist_wheel` in a `nix-shell`fails with
Executing `python setup.py bdist_wheel` in a `nix-shell `fails with
```
ValueError: ZIP does not support timestamps before 1980
```
@@ -1577,7 +1444,7 @@ in pkgs.mkShell rec {
# the environment.
pythonPackages.python
# This executes some shell code to initialize a venv in $venvDir before
# This execute some shell code to initialize a venv in $venvDir before
# dropping into the shell
pythonPackages.venvShellHook
@@ -1670,9 +1537,9 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
```nix
nixpkgs.config.packageOverrides = super: {
python3 = super.python3.override {
python = super.python.override {
packageOverrides = python-self: python-super: {
twisted = python-super.twisted.overridePythonAttrs (oldAttrs: {
twisted = python-super.twisted.overrideAttrs (oldAttrs: {
src = super.fetchPypi {
pname = "twisted";
version = "19.10.0";
@@ -1723,26 +1590,6 @@ self: super: {
}
```
### How to override a Python package for all Python versions using extensions? {#how-to-override-a-python-package-for-all-python-versions-using-extensions}
The following overlay overrides the call to `buildPythonPackage` for the
`foo` package for all interpreters by appending a Python extension to the
`pythonPackagesExtensions` list of extensions.
```nix
final: prev: {
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(
python-final: python-prev: {
foo = python-prev.foo.overridePythonAttrs (oldAttrs: {
...
});
}
)
];
}
```
### How to use Intels MKL with numpy and scipy? {#how-to-use-intels-mkl-with-numpy-and-scipy}
MKL can be configured using an overlay. See the section "[Using overlays to
@@ -1780,10 +1627,6 @@ The following rules are desired to be respected:
that characters should be converted to lowercase and `.` and `_` should be
replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz).
If necessary, `pname` has to be given a different value within `fetchPypi`.
* Packages from sources such as GitHub and GitLab that do not exist on PyPI
should not use a name that is already used on PyPI. When possible, they should
use the package repository name prefixed with the owner (e.g. organization) name
and using a `-` as delimiter.
* Attribute names in `python-packages.nix` should be sorted alphanumerically to
avoid merge conflicts and ease locating attributes.

View File

@@ -274,7 +274,7 @@ bundlerApp {
gemdir = ./.;
exes = [ "r10k" ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/r10k --prefix PATH : ${lib.makeBinPath [ git gnutar gzip ]}

View File

@@ -15,7 +15,7 @@ For other versions such as daily builds (beta and nightly),
use either `rustup` from nixpkgs (which will manage the rust installation in your home directory),
or use a community maintained [Rust overlay](#using-community-rust-overlays).
## `buildRustPackage`: Compiling Rust applications with Cargo {#compiling-rust-applications-with-cargo}
## Compiling Rust applications with Cargo {#compiling-rust-applications-with-cargo}
Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
@@ -319,18 +319,6 @@ The above are just guidelines, and exceptions may be granted on a case-by-case b
However, please check if it's possible to disable a problematic subset of the
test suite and leave a comment explaining your reasoning.
This can be achived with `--skip` in `checkFlags`:
```nix
rustPlatform.buildRustPackage {
/* ... */
checkFlags = [
# reason for disabling test
"--skip=example::tests:example_test"
];
}
```
#### Setting `test-threads` {#setting-test-threads}
`buildRustPackage` will use parallel test threads by default,
@@ -470,7 +458,7 @@ you of the correct hash.
`maturinBuildFlags`.
* `cargoCheckHook`: run tests using Cargo. The build type for checks
can be set using `cargoCheckType`. Features can be specified with
`cargoCheckNoDefaultFeatures` and `cargoCheckFeatures`. Additional
`cargoCheckNoDefaultFeaatures` and `cargoCheckFeatures`. Additional
flags can be passed to the tests using `checkFlags` and
`checkFlagsArray`. By default, tests are run in parallel. This can
be disabled by setting `dontUseCargoParallelTests`.
@@ -608,7 +596,7 @@ buildPythonPackage rec {
}
```
## `buildRustCrate`: Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo}
## Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo}
### Simple operation {#simple-operation}

View File

@@ -5,10 +5,12 @@ and additional libraries.
Loading can be deferred; see examples.
At the moment we support two different methods for managing plugins:
At the moment we support three different methods for managing plugins:
- Vim packages (*recommended*)
- vim-plug (vim only)
- Vim packages (*recommend*)
- VAM (=vim-addon-manager)
- Pathogen
- vim-plug
## Custom configuration {#custom-configuration}
@@ -43,7 +45,7 @@ neovim.override {
```
If you want to use `neovim-qt` as a graphical editor, you can configure it by overriding Neovim in an overlay
or passing it an overridden Neovim:
or passing it an overridden Neovimn:
```nix
neovim-qt.override {
@@ -59,7 +61,7 @@ neovim-qt.override {
## Managing plugins with Vim packages {#managing-plugins-with-vim-packages}
To store your plugins in Vim packages (the native Vim plugin manager, see `:help packages`) the following example can be used:
To store you plugins in Vim packages (the native Vim plugin manager, see `:help packages`) the following example can be used:
```nix
vim_configurable.customize {
@@ -108,7 +110,7 @@ The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.n
};
myNeovim = neovim.override {
configure = {
# add code from the example section here
# add here code from the example section
};
};
};
@@ -125,7 +127,7 @@ If one of your favourite plugins isn't packaged, you can package it yourself:
{ config, pkgs, ... }:
let
easygrep = pkgs.vimUtils.buildVimPluginFrom2Nix {
easygrep = pkgs.vimUtils.buildVimPlugin {
name = "vim-easygrep";
src = pkgs.fetchFromGitHub {
owner = "dkprice";
@@ -155,13 +157,11 @@ in
}
```
If your package requires building specific parts, use instead `pkgs.vimUtils.buildVimPlugin`.
### Specificities for some plugins
#### Treesitter
#### Tree sitter
By default `nvim-treesitter` encourages you to download, compile and install
the required Treesitter grammars at run time with `:TSInstall`. This works
the required tree-sitter grammars at run time with `:TSInstall`. This works
poorly on NixOS. Instead, to install the `nvim-treesitter` plugins with a set
of precompiled grammars, you can use `nvim-treesitter.withPlugins` function:
@@ -172,8 +172,8 @@ of precompiled grammars, you can use `nvim-treesitter.withPlugins` function:
start = [
(nvim-treesitter.withPlugins (
plugins: with plugins; [
nix
python
tree-sitter-nix
tree-sitter-python
]
))
];
@@ -182,7 +182,7 @@ of precompiled grammars, you can use `nvim-treesitter.withPlugins` function:
})
```
To enable all grammars packaged in nixpkgs, use `pkgs.vimPlugins.nvim-treesitter.withAllGrammars`.
To enable all grammars packaged in nixpkgs, use `(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars))`.
## Managing plugins with vim-plug {#managing-plugins-with-vim-plug}
@@ -198,15 +198,122 @@ vim_configurable.customize {
}
```
Note: this is not possible anymore for Neovim.
For Neovim the syntax is:
```nix
neovim.override {
configure = {
customRC = ''
# here your custom configuration goes!
'';
plug.plugins = with pkgs.vimPlugins; [
vim-go
];
};
}
```
## Managing plugins with VAM {#managing-plugins-with-vam}
### Handling dependencies of Vim plugins {#handling-dependencies-of-vim-plugins}
VAM introduced .json files supporting dependencies without versioning
assuming that "using latest version" is ok most of the time.
### Example {#example}
First create a vim-scripts file having one plugin name per line. Example:
```vim
"tlib"
{'name': 'vim-addon-sql'}
{'filetype_regex': '\%(vim)$', 'names': ['reload', 'vim-dev-plugin']}
```
Such vim-scripts file can be read by VAM as well like this:
```vim
call vam#Scripts(expand('~/.vim-scripts'), {})
```
Create a default.nix file:
```nix
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
nixpkgs.vim_configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; }
```
Create a generate.vim file:
```vim
ActivateAddons vim-addon-vim2nix
let vim_scripts = "vim-scripts"
call nix#ExportPluginsForNix({
\ 'path_to_nixpkgs': eval('{"'.substitute(substitute(substitute($NIX_PATH, ':', ',', 'g'), '=',':', 'g'), '\([:,]\)', '"\1"',"g").'"}')["nixpkgs"],
\ 'cache_file': '/tmp/vim2nix-cache',
\ 'try_catch': 0,
\ 'plugin_dictionaries': ["vim-addon-manager"]+map(readfile(vim_scripts), 'eval(v:val)')
\ })
```
Then run
```bash
nix-shell -p vimUtils.vim_with_vim2nix --command "vim -c 'source generate.vim'"
```
You should get a Vim buffer with the nix derivations (output1) and vam.pluginDictionaries (output2).
You can add your Vim to your system's configuration file like this and start it by "vim-my":
```nix
my-vim =
let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
copy paste output1 here
}; in vim_configurable.customize {
name = "vim-my";
vimrcConfig.vam.knownPlugins = plugins; # optional
vimrcConfig.vam.pluginDictionaries = [
copy paste output2 here
];
# Pathogen would be
# vimrcConfig.pathogen.knownPlugins = plugins; # plugins
# vimrcConfig.pathogen.pluginNames = ["tlib"];
};
```
Sample output1:
```nix
"reload" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "reload";
src = fetchgit {
url = "https://github.com/xolox/vim-reload";
rev = "0a601a668727f5b675cb1ddc19f6861f3f7ab9e1";
sha256 = "0vb832l9yxj919f5hfg6qj6bn9ni57gnjd3bj7zpq7d4iv2s4wdh";
};
dependencies = ["nim-misc"];
};
[...]
```
Sample output2:
```nix
[
''vim-addon-manager''
''tlib''
{ "name" = ''vim-addon-sql''; }
{ "filetype_regex" = ''\%(vim)$$''; "names" = [ ''reload'' ''vim-dev-plugin'' ]; }
]
```
## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs}
Nix expressions for Vim plugins are stored in [pkgs/applications/editors/vim/plugins](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/editors/vim/plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py). This creates a [generated.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]@[gitref]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
After running `./update.py`, if nvim-treesitter received an update, also run [`nvim-treesitter/update.py`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/update.py) to update the tree sitter grammars for `nvim-treesitter`.
Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/vim/plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added:
```nix
@@ -219,7 +326,7 @@ Sometimes plugins require an override that must be changed when the plugin is up
To add a new plugin, run `./update.py --add "[owner]/[name]"`. **NOTE**: This script automatically commits to your git repository. Be sure to check out a fresh branch before running.
Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `update.py` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of the Language Server Protocol integration with Vim/Neovim.
Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `update.py` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of Language Server Protocol integration with vim/neovim.
## Updating plugins in nixpkgs {#updating-plugins-in-nixpkgs}
@@ -235,27 +342,10 @@ Alternatively, set the number of processes to a lower count to avoid rate-limiti
./pkgs/applications/editors/vim/plugins/update.py --proc 1
```
## How to maintain an out-of-tree overlay of vim plugins ?
## Important repositories {#important-repositories}
You can use the updater script to generate basic packages out of a custom vim
plugin list:
```
pkgs/applications/editors/vim/plugins/update.py -i vim-plugin-names -o generated.nix --no-commit
```
with the contents of `vim-plugin-names` being for example:
```
repo,branch,alias
pwntester/octo.nvim,,
```
You can then reference the generated vim plugins via:
```nix
myVimPlugins = pkgs.vimPlugins.extend (
(pkgs.callPackage generated.nix {})
);
```
- [vim-pi](https://bitbucket.org/vimcommunity/vim-pi) is a plugin repository
from VAM plugin manager meant to be used by others as well used by
- [vim2nix](https://github.com/MarcWeber/vim-addon-vim2nix) which generates the
.nix code

650
doc/release-notes.xml Normal file
View File

@@ -0,0 +1,650 @@
<?xml version="1.0" encoding="UTF-8"?>
<article xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Nixpkgs Release Notes</title>
<section xml:id="release-notes-0.14">
<title>Release 0.14 (June 4, 2012)</title>
<para>
In preparation for the switch from Subversion to Git, this release is mainly the prevent the Nixpkgs version number from going backwards. (This would happen because prerelease version numbers produced for the Git repository are lower than those for the Subversion repository.)
</para>
<para>
Since the last release, there have been thousands of changes and new packages by numerous contributors. For details, see the commit logs.
</para>
</section>
<section xml:id="release-notes-0.13">
<title>Release 0.13 (February 5, 2010)</title>
<para>
As always, there are many changes. Some of the most important updates are:
<itemizedlist>
<listitem>
<para>
Glibc 2.9.
</para>
</listitem>
<listitem>
<para>
GCC 4.3.3.
</para>
</listitem>
<listitem>
<para>
Linux 2.6.32.
</para>
</listitem>
<listitem>
<para>
X.org 7.5.
</para>
</listitem>
<listitem>
<para>
KDE 4.3.4.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="release-notes-0.12">
<title>Release 0.12 (April 24, 2009)</title>
<para>
There are way too many additions to Nixpkgs since the last release to list here: for example, the number of packages on Linux has increased from 1002 to 2159. However, some specific improvements are worth listing:
<itemizedlist>
<listitem>
<para>
Nixpkgs now has a manual. In particular, it describes the standard build environment in detail.
</para>
</listitem>
<listitem>
<para>
Major new packages:
<itemizedlist>
<listitem>
<para>
KDE 4.
</para>
</listitem>
<listitem>
<para>
TeXLive.
</para>
</listitem>
<listitem>
<para>
VirtualBox.
</para>
</listitem>
</itemizedlist>
… and many others.
</para>
</listitem>
<listitem>
<para>
Important updates:
<itemizedlist>
<listitem>
<para>
Glibc 2.7.
</para>
</listitem>
<listitem>
<para>
GCC 4.2.4.
</para>
</listitem>
<listitem>
<para>
Linux 2.6.25 — 2.6.28.
</para>
</listitem>
<listitem>
<para>
Firefox 3.
</para>
</listitem>
<listitem>
<para>
X.org 7.3.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Support for building derivations in a virtual machine, including RPM and Debian builds in automatically generated VM images. See <filename>pkgs/build-support/vm/default.nix</filename> for details.
</para>
</listitem>
<listitem>
<para>
Improved support for building Haskell packages.
</para>
</listitem>
</itemizedlist>
</para>
<para>
The following people contributed to this release: Andres Löh, Arie Middelkoop, Armijn Hemel, Eelco Dolstra, Lluís Batlle, Ludovic Courtès, Marc Weber, Mart Kolthof, Martin Bravenboer, Michael Raskin, Nicolas Pierron, Peter Simons, Pjotr Prins, Rob Vermaas, Sander van der Burg, Tobias Hammerschmidt, Valentin David, Wouter den Breejen and Yury G. Kudryashov. In addition, several people contributed patches on the <literal>nix-dev</literal> mailing list.
</para>
</section>
<section xml:id="release-notes-0.11">
<title>Release 0.11 (September 11, 2007)</title>
<para>
This release has the following improvements:
<itemizedlist>
<listitem>
<para>
The standard build environment (<literal>stdenv</literal>) is now pure on the <literal>x86_64-linux</literal> and <literal>powerpc-linux</literal> platforms, just as on <literal>i686-linux</literal>. (Purity means that building and using the standard environment has no dependencies outside of the Nix store. For instance, it doesnt require an external C compiler such as <filename>/usr/bin/gcc</filename>.) Also, the statically linked binaries used in the bootstrap process are now automatically reproducible, making it easy to update the bootstrap tools and to add support for other Linux platforms. See <filename>pkgs/stdenv/linux/make-bootstrap-tools.nix</filename> for details.
</para>
</listitem>
<listitem>
<para>
Hook variables in the generic builder are now executed using the <function>eval</function> shell command. This has a major advantage: you can write hooks directly in Nix expressions. For instance, rather than writing a builder like this:
<programlisting>
source $stdenv/setup
postInstall=postInstall
postInstall() {
ln -sf gzip $out/bin/gunzip
ln -sf gzip $out/bin/zcat
}
genericBuild</programlisting>
(the <literal>gzip</literal> builder), you can just add this attribute to the derivation:
<programlisting>
postInstall = "ln -sf gzip $out/bin/gunzip; ln -sf gzip $out/bin/zcat";</programlisting>
and so a separate build script becomes unnecessary. This should allow us to get rid of most builders in Nixpkgs.
</para>
</listitem>
<listitem>
<para>
It is now possible to have the generic builder pass arguments to <command>configure</command> and <command>make</command> that contain whitespace. Previously, for example, you could say in a builder,
<programlisting>
configureFlags="CFLAGS=-O0"</programlisting>
but not
<programlisting>
configureFlags="CFLAGS=-O0 -g"</programlisting>
since the <literal>-g</literal> would be interpreted as a separate argument to <command>configure</command>. Now you can say
<programlisting>
configureFlagsArray=("CFLAGS=-O0 -g")</programlisting>
or similarly
<programlisting>
configureFlagsArray=("CFLAGS=-O0 -g" "LDFLAGS=-L/foo -L/bar")</programlisting>
which does the right thing. Idem for <literal>makeFlags</literal>, <literal>installFlags</literal>, <literal>checkFlags</literal> and <literal>distFlags</literal>.
</para>
<para>
Unfortunately you can't pass arrays to Bash through the environment, so you can't put the array above in a Nix expression, e.g.,
<programlisting>
configureFlagsArray = ["CFLAGS=-O0 -g"];</programlisting>
since it would just be flattened to a since string. However, you <emphasis>can</emphasis> use the inline hooks described above:
<programlisting>
preConfigure = "configureFlagsArray=(\"CFLAGS=-O0 -g\")";</programlisting>
</para>
</listitem>
<listitem>
<para>
The function <function>fetchurl</function> now has support for two different kinds of mirroring of files. First, it has support for <emphasis>content-addressable mirrors</emphasis>. For example, given the <function>fetchurl</function> call
<programlisting>
fetchurl {
url = "http://releases.mozilla.org/<replaceable>...</replaceable>/firefox-2.0.0.6-source.tar.bz2";
sha1 = "eb72f55e4a8bf08e8c6ef227c0ade3d068ba1082";
}</programlisting>
<function>fetchurl</function> will first try to download this file from <link
xlink:href="http://tarballs.nixos.org/sha1/eb72f55e4a8bf08e8c6ef227c0ade3d068ba1082"/>. If that file doesnt exist, it will try the original URL. In general, the “content-addressed” location is <replaceable>mirror</replaceable><literal>/</literal><replaceable>hash-type</replaceable><literal>/</literal><replaceable>hash</replaceable>. There is currently only one content-addressable mirror (<link
xlink:href="http://tarballs.nixos.org"/>), but more can be specified in the <varname>hashedMirrors</varname> attribute in <filename>pkgs/build-support/fetchurl/mirrors.nix</filename>, or by setting the <envar>NIX_HASHED_MIRRORS</envar> environment variable to a whitespace-separated list of URLs.
</para>
<para>
Second, <function>fetchurl</function> has support for widely-mirrored distribution sites such as SourceForge or the Linux kernel archives. Given a URL of the form <literal>mirror://<replaceable>site</replaceable>/<replaceable>path</replaceable></literal>, it will try to download <replaceable>path</replaceable> from a configurable list of mirrors for <replaceable>site</replaceable>. (This idea was borrowed from Gentoo Linux.) Example:
<programlisting>
fetchurl {
url = mirror://gnu/gcc/gcc-4.2.0/gcc-core-4.2.0.tar.bz2;
sha256 = "0ykhzxhr8857dr97z0j9wyybfz1kjr71xk457cfapfw5fjas4ny1";
}</programlisting>
Currently <replaceable>site</replaceable> can be <literal>sourceforge</literal>, <literal>gnu</literal> and <literal>kernel</literal>. The list of mirrors is defined in <filename>pkgs/build-support/fetchurl/mirrors.nix</filename>. You can override the list of mirrors for a particular site by setting the environment variable <envar>NIX_MIRRORS_<replaceable>site</replaceable></envar>, e.g.
<programlisting>
export NIX_MIRRORS_sourceforge=http://osdn.dl.sourceforge.net/sourceforge/</programlisting>
</para>
</listitem>
<listitem>
<para>
Important updates:
<itemizedlist>
<listitem>
<para>
Glibc 2.5.
</para>
</listitem>
<listitem>
<para>
GCC 4.1.2.
</para>
</listitem>
<listitem>
<para>
Gnome 2.16.3.
</para>
</listitem>
<listitem>
<para>
X11R7.2.
</para>
</listitem>
<listitem>
<para>
Linux 2.6.21.7 and 2.6.22.6.
</para>
</listitem>
<listitem>
<para>
Emacs 22.1.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Major new packages:
<itemizedlist>
<listitem>
<para>
KDE 3.5.6 Base.
</para>
</listitem>
<listitem>
<para>
Wine 0.9.43.
</para>
</listitem>
<listitem>
<para>
OpenOffice 2.2.1.
</para>
</listitem>
<listitem>
<para>
Many Linux system packages to support NixOS.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</para>
<para>
The following people contributed to this release: Andres Löh, Arie Middelkoop, Armijn Hemel, Eelco Dolstra, Marc Weber, Mart Kolthof, Martin Bravenboer, Michael Raskin, Wouter den Breejen and Yury G. Kudryashov.
</para>
</section>
<section xml:id="release-notes-0.10">
<title>Release 0.10 (October 12, 2006)</title>
<note>
<para>
This release of Nixpkgs requires <link
xlink:href='https://nixos.org/releases/nix/nix-0.10/'>Nix 0.10</link> or higher.
</para>
</note>
<para>
This release has the following improvements:
</para>
<itemizedlist>
<listitem>
<para>
<filename>pkgs/system/all-packages-generic.nix</filename> is gone, we now just have <filename>pkgs/top-level/all-packages.nix</filename> that contains all available packages. This should cause much less confusion with users. <filename>all-packages.nix</filename> is a function that by default returns packages for the current platform, but you can override this by specifying a different <varname>system</varname> argument.
</para>
</listitem>
<listitem>
<para>
Certain packages in Nixpkgs are now user-configurable through a configuration file, i.e., without having to edit the Nix expressions in Nixpkgs. For instance, the Firefox provided in the Nixpkgs channel is built without the RealPlayer plugin (for legal reasons). Previously, you could easily enable RealPlayer support by editing the call to the Firefox function in <filename>all-packages.nix</filename>, but such changes are not respected when Firefox is subsequently updated through the Nixpkgs channel.
</para>
<para>
The Nixpkgs configuration file (found in <filename>~/.nixpkgs/config.nix</filename> or through the <envar>NIXPKGS_CONFIG</envar> environment variable) is an attribute set that contains configuration options that <filename>all-packages.nix</filename> reads and uses for certain packages. For instance, the following configuration file:
<programlisting>
{
firefox = {
enableRealPlayer = true;
};
}</programlisting>
persistently enables RealPlayer support in the Firefox build.
</para>
<para>
(Actually, <literal>firefox.enableRealPlayer</literal> is the <emphasis>only</emphasis> configuration option currently available, but more are sure to be added.)
</para>
</listitem>
<listitem>
<para>
Support for new platforms:
<itemizedlist>
<listitem>
<para>
<literal>i686-cygwin</literal>, i.e., Windows (using <link xlink:href="http://www.cygwin.com/">Cygwin</link>). The standard environment on <literal>i686-cygwin</literal> by default builds binaries for the Cygwin environment (i.e., it uses Cygwin tools and produces executables that use the Cygwin library). However, there is also a standard environment that produces binaries that use <link
xlink:href="http://www.mingw.org/">MinGW</link>. You can use it by calling <filename>all-package.nix</filename> with the <varname>stdenvType</varname> argument set to <literal>"i686-mingw"</literal>.
</para>
</listitem>
<listitem>
<para>
<literal>i686-darwin</literal>, i.e., Mac OS X on Intel CPUs.
</para>
</listitem>
<listitem>
<para>
<literal>powerpc-linux</literal>.
</para>
</listitem>
<listitem>
<para>
<literal>x86_64-linux</literal>, i.e., Linux on 64-bit AMD/Intel CPUs. Unlike <literal>i686-linux</literal>, this platform doesnt have a pure <literal>stdenv</literal> yet.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
The default compiler is now GCC 4.1.1.
</para>
</listitem>
<listitem>
<para>
X11 updated to X.orgs X11R7.1.
</para>
</listitem>
<listitem>
<para>
Notable new packages:
<itemizedlist>
<listitem>
<para>
Opera.
</para>
</listitem>
<listitem>
<para>
Microsoft Visual C++ 2005 Express Edition and the Windows SDK.
</para>
</listitem>
</itemizedlist>
In total there are now around 809 packages in Nixpkgs.
</para>
</listitem>
<listitem>
<para>
It is now <emphasis>much</emphasis> easier to override the default C compiler and other tools in <literal>stdenv</literal> for specific packages. <filename>all-packages.nix</filename> provides two utility functions for this purpose: <function>overrideGCC</function> and <function>overrideInStdenv</function>. Both take a <literal>stdenv</literal> and return an augmented <literal>stdenv</literal>; the formed changes the C compiler, and the latter adds additional packages to the front of <literal>stdenv</literal>s initial <envar>PATH</envar>, allowing tools to be overridden.
</para>
<para>
For instance, the package <varname>strategoxt</varname> doesnt build with the GNU Make in <literal>stdenv</literal> (version 3.81), so we call it with an augmented <literal>stdenv</literal> that uses GNU Make 3.80:
<programlisting>
strategoxt = (import ../development/compilers/strategoxt) {
inherit fetchurl pkgconfig sdf aterm;
stdenv = overrideInStdenv stdenv [gnumake380];
};
gnumake380 = <replaceable>...</replaceable>;</programlisting>
Likewise, there are many packages that dont compile with the default GCC (4.1.1), but thats easily fixed:
<programlisting>
exult = import ../games/exult {
inherit fetchurl SDL SDL_mixer zlib libpng unzip;
stdenv = overrideGCC stdenv gcc34;
};</programlisting>
</para>
</listitem>
<listitem>
<para>
It has also become much easier to experiment with changes to the <literal>stdenv</literal> setup script (which notably contains the generic builder). Since edits to <filename>pkgs/stdenv/generic/setup.sh</filename> trigger a rebuild of <emphasis>everything</emphasis>, this was formerly quite painful. But now <literal>stdenv</literal> contains a function to “regenerate” <literal>stdenv</literal> with a different setup script, allowing the use of a different setup script for specific packages:
<programlisting>
pkg = import <replaceable>...</replaceable> {
stdenv = stdenv.regenerate ./my-setup.sh;
<replaceable>...</replaceable>
}</programlisting>
</para>
</listitem>
<listitem>
<para>
Packages can now have a human-readable <emphasis>description</emphasis> field. Package descriptions are shown by <literal>nix-env -qa --description</literal>. In addition, theyre shown on the Nixpkgs release page. A description can be added to a package as follows:
<programlisting>
stdenv.mkDerivation {
name = "exult-1.2";
<replaceable>...</replaceable>
meta = {
description = "A reimplementation of the Ultima VII game engine";
};
}</programlisting>
The <varname>meta</varname> attribute is not passed to the builder, so changes to the description do not trigger a rebuild. Additional <varname>meta</varname> attributes may be defined in the future (such as the URL of the packages homepage, the license, etc.).
</para>
</listitem>
</itemizedlist>
<para>
The following people contributed to this release: Andres Löh, Armijn Hemel, Christof Douma, Eelco Dolstra, Eelco Visser, Mart Kolthof, Martin Bravenboer, Merijn de Jonge, Rob Vermaas and Roy van den Broek.
</para>
</section>
<section xml:id="release-notes-0.9">
<title>Release 0.9 (January 31, 2006)</title>
<para>
There have been zillions of changes since the last release of Nixpkgs. Many packages have been added or updated. The following are some of the more notable changes:
</para>
<itemizedlist>
<listitem>
<para>
Distribution files have been moved to <link
xlink:href="https://nixos.org/" />.
</para>
</listitem>
<listitem>
<para>
The C library on Linux, Glibc, has been updated to version 2.3.6.
</para>
</listitem>
<listitem>
<para>
The default compiler is now GCC 3.4.5. GCC 4.0.2 is also available.
</para>
</listitem>
<listitem>
<para>
The old, unofficial Xlibs has been replaced by the official modularised X11 distribution from X.org, i.e., X11R7.0. X11R7.0 consists of 287 (!) packages, all of which are in Nixpkgs though not all have been tested. It is now possible to build a working X server (previously we only had X client libraries). We use a fully Nixified X server on NixOS.
</para>
</listitem>
<listitem>
<para>
The Sun JDK 5 has been purified, i.e., it doesnt require any non-Nix components such as <filename>/lib/ld-linux.so.2</filename>. This means that Java applications such as Eclipse and Azureus can run on NixOS.
</para>
</listitem>
<listitem>
<para>
Hardware-accelerated OpenGL support, used by games like Quake 3 (which is now built from source).
</para>
</listitem>
<listitem>
<para>
Improved support for FreeBSD on x86.
</para>
</listitem>
<listitem>
<para>
Improved Haskell support; e.g., the GHC build is now pure.
</para>
</listitem>
<listitem>
<para>
Some support for cross-compilation: cross-compiling builds of GCC and Binutils, and cross-compiled builds of the C library uClibc.
</para>
</listitem>
<listitem>
<para>
Notable new packages:
<itemizedlist>
<listitem>
<para>
teTeX, including support for building LaTeX documents using Nix (with automatic dependency determination).
</para>
</listitem>
<listitem>
<para>
Ruby.
</para>
</listitem>
<listitem>
<para>
System-level packages to support NixOS, e.g. Grub, GNU <literal>parted</literal> and so on.
</para>
</listitem>
<listitem>
<para>
<literal>ecj</literal>, the Eclipse Compiler for Java, so we finally have a freely distributable compiler that supports Java 5.0.
</para>
</listitem>
<listitem>
<para>
<literal>php</literal>.
</para>
</listitem>
<listitem>
<para>
The GIMP.
</para>
</listitem>
<listitem>
<para>
Inkscape.
</para>
</listitem>
<listitem>
<para>
GAIM.
</para>
</listitem>
<listitem>
<para>
<literal>kdelibs</literal>. This allows us to add KDE-based packages (such as <literal>kcachegrind</literal>).
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
<para>
The following people contributed to this release: Andres Löh, Armijn Hemel, Bogdan Dumitriu, Christof Douma, Eelco Dolstra, Eelco Visser, Mart Kolthof, Martin Bravenboer, Rob Vermaas and Roy van den Broek.
</para>
</section>
<section xml:id="release-notes-0.8">
<title>Release 0.8 (April 11, 2005)</title>
<para>
This release is mostly to remain synchronised with the changed hashing scheme in Nix 0.8.
</para>
<para>
Notable updates:
<itemizedlist>
<listitem>
<para>
Adobe Reader 7.0
</para>
</listitem>
<listitem>
<para>
Various security updates (zlib 1.2.2, etc.)
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="release-notes-0.7">
<title>Release 0.7 (March 14, 2005)</title>
<itemizedlist>
<listitem>
<para>
The bootstrap process for the standard build environment on Linux (stdenv-linux) has been improved. It is no longer dependent in its initial bootstrap stages on the system Glibc, GCC, and other tools. Rather, Nixpkgs contains a statically linked bash and curl, and uses that to download other statically linked tools. These are then used to build a Glibc and dynamically linked versions of all other tools.
</para>
<para>
This change also makes the bootstrap process faster. For instance, GCC is built only once instead of three times.
</para>
<para>
(Contributed by Armijn Hemel.)
</para>
</listitem>
<listitem>
<para>
Tarballs used by Nixpkgs are now obtained from the same server that hosts Nixpkgs (<link
xlink:href="http://catamaran.labs.cs.uu.nl/" />). This reduces the risk of packages being unbuildable due to moved or deleted files on various servers.
</para>
</listitem>
<listitem>
<para>
There now is a generic mechanism for building Perl modules. See the various Perl modules defined in pkgs/system/all-packages-generic.nix.
</para>
</listitem>
<listitem>
<para>
Notable new packages:
<itemizedlist>
<listitem>
<para>
Qt 3
</para>
</listitem>
<listitem>
<para>
MySQL
</para>
</listitem>
<listitem>
<para>
MythTV
</para>
</listitem>
<listitem>
<para>
Mono
</para>
</listitem>
<listitem>
<para>
MonoDevelop (alpha)
</para>
</listitem>
<listitem>
<para>
Xine
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Notable updates:
<itemizedlist>
<listitem>
<para>
GCC 3.4.3
</para>
</listitem>
<listitem>
<para>
Glibc 2.3.4
</para>
</listitem>
<listitem>
<para>
GTK 2.6
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</section>
</article>

View File

@@ -153,24 +153,6 @@ Add the following to your `mkDerivation` invocation.
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
```
#### Package using Meson needs to run binaries for the host platform during build. {#cross-meson-runs-host-code}
Add `mesonEmulatorHook` to `nativeBuildInputs` conditionally on if the target binaries can be executed.
e.g.
```
nativeBuildInputs = [
meson
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
];
```
Example of an error which this fixes.
`[Errno 8] Exec format error: './gdk3-scan'`
## Cross-building packages {#sec-cross-usage}
Nixpkgs can be instantiated with `localSystem` alone, in which case there is no cross-compiling and everything is built by and for that system, or also with `crossSystem`, in which case packages run on the latter, but all building happens on the former. Both parameters take the same schema as the 3 (build, host, and target) platforms defined in the previous section. As mentioned above, `lib.systems.examples` has some platforms which are used as arguments for these parameters in practice. You can use them programmatically, or on the command line:
@@ -250,5 +232,5 @@ Thirdly, it is because everything target-mentioning only exists to accommodate c
:::
::: {.note}
If one explores Nixpkgs, they will see derivations with names like `gccCross`. Such `*Cross` derivations is a holdover from before we properly distinguished between the host and target platforms—the derivation with “Cross” in the name covered the `build = host != target` case, while the other covered the `host = target`, with build platform the same or not based on whether one was using its `.__spliced.buildHost` or `.__spliced.hostTarget`.
If one explores Nixpkgs, they will see derivations with names like `gccCross`. Such `*Cross` derivations is a holdover from before we properly distinguished between the host and target platforms—the derivation with “Cross” in the name covered the `build = host != target` case, while the other covered the `host = target`, with build platform the same or not based on whether one was using its `.nativeDrv` or `.crossDrv`. This ugliness will disappear soon.
:::

View File

@@ -44,8 +44,8 @@ $ nix-env -qa hello --json
"mips32-linux",
"x86_64-darwin",
"i686-cygwin",
"i686-freebsd13",
"x86_64-freebsd13",
"i686-freebsd",
"x86_64-freebsd",
"i686-openbsd",
"x86_64-openbsd"
],
@@ -80,7 +80,7 @@ Right: `"A library for decoding PNG images"`
### `longDescription` {#var-meta-longDescription}
An arbitrarily long description of the package in [CommonMark](https://commonmark.org) Markdown.
An arbitrarily long description of the package.
### `branch` {#var-meta-branch}
@@ -213,10 +213,6 @@ runCommand "my-package-test" {
A timeout (in seconds) for building the derivation. If the derivation takes longer than this time to build, it can fail due to breaking the timeout. However, all computers do not have the same computing power, hence some builders may decide to apply a multiplicative factor to this value. When filling this value in, try to keep it approximately consistent with other values already present in `nixpkgs`.
`meta` attributes are not stored in the instantiated derivation.
Therefore, this setting may be lost when the package is used as a dependency.
To be effective, it must be presented directly to an evaluation process that handles the `meta.timeout` attribute.
### `hydraPlatforms` {#var-meta-hydraPlatforms}
The list of Nix platform types for which the Hydra instance at `hydra.nixos.org` will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of `meta.platforms`. Thus, the only reason to set `meta.hydraPlatforms` is if you want `hydra.nixos.org` to build the package on a subset of `meta.platforms`, or not at all, e.g.
@@ -253,31 +249,3 @@ Unfree package that cannot be redistributed. You can build it yourself, but you
### `lib.licenses.unfreeRedistributableFirmware`, `"unfree-redistributable-firmware"` {#lib.licenses.unfreeredistributablefirmware-unfree-redistributable-firmware}
This package supplies unfree, redistributable firmware. This is a separate value from `unfree-redistributable` because not everybody cares whether firmware is free.
## Source provenance {#sec-meta-sourceProvenance}
The value of a package's `meta.sourceProvenance` attribute specifies the provenance of the package's derivation outputs.
If a package contains elements that are not built from the original source by a nixpkgs derivation, the `meta.sourceProvenance` attribute should be a list containing one or more value from `lib.sourceTypes` defined in [`nixpkgs/lib/source-types.nix`](https://github.com/NixOS/nixpkgs/blob/master/lib/source-types.nix).
Adding this information helps users who have needs related to build transparency and supply-chain security to gain some visibility into their installed software or set policy to allow or disallow installation based on source provenance.
The presence of a particular `sourceType` in a package's `meta.sourceProvenance` list indicates that the package contains some components falling into that category, though the *absence* of that `sourceType` does not *guarantee* the absence of that category of `sourceType` in the package's contents. A package with no `meta.sourceProvenance` set implies it has no *known* `sourceType`s other than `fromSource`.
The meaning of the `meta.sourceProvenance` attribute does not depend on the value of the `meta.license` attribute.
### `lib.sourceTypes.fromSource` {#lib.sourceTypes.fromSource}
Package elements which are produced by a nixpkgs derivation which builds them from source code.
### `lib.sourceTypes.binaryNativeCode` {#lib.sourceTypes.binaryNativeCode}
Native code to be executed on the target system's CPU, built by a third party. This includes packages which wrap a downloaded AppImage or Debian package.
### `lib.sourceTypes.binaryFirmware` {#lib.sourceTypes.binaryFirmware}
Code to be executed on a peripheral device or embedded controller, built by a third party.
### `lib.sourceTypes.binaryBytecode` {#lib.sourceTypes.binaryBytecode}
Code to run on a VM interpreter or JIT compiled into bytecode by a third party. This includes packages which download Java `.jar` files from another source.

View File

@@ -77,7 +77,7 @@ There is a special handling of the `debug` output, described at [](#stdenv-separ
A commonly adopted convention in `nixpkgs` is that executables provided by the package are contained within its first output. This convention allows the dependent packages to reference the executables provided by packages in a uniform manner. For instance, provided with the knowledge that the `perl` package contains a `perl` executable it can be referenced as `${pkgs.perl}/bin/perl` within a Nix derivation that needs to execute a Perl script.
The `glibc` package is a deliberate single exception to the “binaries first” convention. The `glibc` has `libs` as its first output allowing the libraries provided by `glibc` to be referenced directly (e.g. `${glibc}/lib/ld-linux-x86-64.so.2`). The executables provided by `glibc` can be accessed via its `bin` attribute (e.g. `${lib.getBin stdenv.cc.libc}/bin/ldd`).
The `glibc` package is a deliberate single exception to the “binaries first” convention. The `glibc` has `libs` as its first output allowing the libraries provided by `glibc` to be referenced directly (e.g. `${stdenv.glibc}/lib/ld-linux-x86-64.so.2`). The executables provided by `glibc` can be accessed via its `bin` attribute (e.g. `${stdenv.glibc.bin}/bin/ldd`).
The reason for why `glibc` deviates from the convention is because referencing a library provided by `glibc` is a very common operation among Nix packages. For instance, third-party executables packaged by Nix are typically patched and relinked with the relevant version of `glibc` libraries from Nix packages (please see the documentation on [patchelf](https://github.com/NixOS/patchelf) for more details).

View File

@@ -60,8 +60,3 @@ Some common issues when packaging software for Darwin:
```
The package `xcbuild` can be used to build projects that really depend on Xcode. However, this replacement is not 100% compatible with Xcode and can occasionally cause issues.
- x86_64-darwin uses the 10.12 SDK by default, but some software is not compatible with that version of the SDK. In that case,
the 11.0 SDK used by aarch64-darwin is available for use on x86_64-darwin. To use it, reference `apple_sdk_11_0` instead of
`apple_sdk` in your derivation and use `pkgs.darwin.apple_sdk_11_0.callPackage` instead of `pkgs.callPackage`. On Linux, this will
have the same effect as `pkgs.callPackage`, so you can use `pkgs.darwin.apple_sdk_11_0.callPackage` regardless of platform.

View File

@@ -77,7 +77,7 @@ where the builder can do anything it wants, but typically starts with
source $stdenv/setup
```
to let `stdenv` set up the environment (e.g. by resetting `PATH` and populating it from build inputs). If you want, you can still use `stdenv`s generic builder:
to let `stdenv` set up the environment (e.g., process the `buildInputs`). If you want, you can still use `stdenv`s generic builder:
```bash
source $stdenv/setup
@@ -309,7 +309,7 @@ The attribute can also contain a list, a script followed by arguments to be pass
passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ];
```
The script will be run with the `UPDATE_NIX_NAME`, `UPDATE_NIX_PNAME`, `UPDATE_NIX_OLD_VERSION` and `UPDATE_NIX_ATTR_PATH` environment variables set respectively to the name, pname, old version and attribute path of the package it is supposed to update.
The script will be run with `UPDATE_NIX_ATTR_PATH` environment variable set to the attribute path it is supposed to update.
::: {.note}
The script will be usually run from the root of the Nixpkgs repository but you should not rely on that. Also note that the update scripts will be run in parallel by default; you should avoid running `git commit` or any other commands that cannot handle that.
@@ -317,7 +317,7 @@ The script will be usually run from the root of the Nixpkgs repository but you s
For information about how to run the updates, execute `nix-shell maintainers/scripts/update.nix`.
### Recursive attributes in `mkDerivation` {#mkderivation-recursive-attributes}
### Recursive attributes in `mkDerivation`
If you pass a function to `mkDerivation`, it will receive as its argument the final arguments, including the overrides when reinvoked via `overrideAttrs`. For example:
@@ -452,8 +452,6 @@ The list of source files or directories to be unpacked or copied. One of these m
After running `unpackPhase`, the generic builder changes the current directory to the directory created by unpacking the sources. If there are multiple source directories, you should set `sourceRoot` to the name of the intended directory. Set `sourceRoot = ".";` if you use `srcs` and control the unpack phase yourself.
By default the `sourceRoot` is set to `"source"`. If you want to point to a sub-directory inside your project, you therefore need to set `sourceRoot = "source/my-sub-directory"`.
##### `setSourceRoot` {#var-stdenv-setSourceRoot}
Alternatively to setting `sourceRoot`, you can set `setSourceRoot` to a shell command to be evaluated by the unpack phase after the sources have been unpacked. This command must set `sourceRoot`.
@@ -700,12 +698,12 @@ Hook executed at the end of the install phase.
### The fixup phase {#ssec-fixup-phase}
The fixup phase performs (Nix-specific) post-processing actions on the files installed under `$out` by the install phase. The default `fixupPhase` does the following:
The fixup phase performs some (Nix-specific) post-processing actions on the files installed under `$out` by the install phase. The default `fixupPhase` does the following:
- It moves the `man/`, `doc/` and `info/` subdirectories of `$out` to `share/`.
- It strips libraries and executables of debug information.
- On Linux, it applies the `patchelf` command to ELF executables and libraries to remove unused directories from the `RPATH` in order to prevent unnecessary runtime dependencies.
- It rewrites the interpreter paths of shell scripts to paths found in `PATH`. E.g., `/usr/bin/perl` will be rewritten to `/nix/store/some-perl/bin/perl` found in `PATH`. See [](#patch-shebangs.sh) for details.
- It rewrites the interpreter paths of shell scripts to paths found in `PATH`. E.g., `/usr/bin/perl` will be rewritten to `/nix/store/some-perl/bin/perl` found in `PATH`.
#### Variables controlling the fixup phase {#variables-controlling-the-fixup-phase}
@@ -733,10 +731,6 @@ If set, files in `$out/sbin` are not moved to `$out/bin`. By default, they are.
List of directories to search for libraries and executables from which *all* symbols should be stripped. By default, its empty. Stripping all symbols is risky, since it may remove not just debug symbols but also ELF information necessary for normal execution.
##### `stripAllListTarget` {#var-stdenv-stripAllListTarget}
Like `stripAllList`, but only applies to packages target platform. By default, its empty. Useful when supporting cross compilation.
##### `stripAllFlags` {#var-stdenv-stripAllFlags}
Flags passed to the `strip` command applied to the files in the directories listed in `stripAllList`. Defaults to `-s` (i.e. `--strip-all`).
@@ -745,10 +739,6 @@ Flags passed to the `strip` command applied to the files in the directories list
List of directories to search for libraries and executables from which only debugging-related symbols should be stripped. It defaults to `lib lib32 lib64 libexec bin sbin`.
##### `stripDebugListTarget` {#var-stdenv-stripDebugListTarget}
Like `stripDebugList`, but only applies to packages target platform. By default, its empty. Useful when supporting cross compilation.
##### `stripDebugFlags` {#var-stdenv-stripDebugFlags}
Flags passed to the `strip` command applied to the files in the directories listed in `stripDebugList`. Defaults to `-S` (i.e. `--strip-debug`).
@@ -759,7 +749,7 @@ If set, the `patchelf` command is not used to remove unnecessary `RPATH` entries
##### `dontPatchShebangs` {#var-stdenv-dontPatchShebangs}
If set, scripts starting with `#!` do not have their interpreter paths rewritten to paths in the Nix store. See [](#patch-shebangs.sh) on how patching shebangs works.
If set, scripts starting with `#!` do not have their interpreter paths rewritten to paths in the Nix store.
##### `dontPruneLibtoolFiles` {#var-stdenv-dontPruneLibtoolFiles}
@@ -873,27 +863,12 @@ Constructs a wrapper for a program with various possible arguments. It is define
# adds `FOOBAR=baz` to `$out/bin/foo`s environment
makeWrapper $out/bin/foo $wrapperfile --set FOOBAR baz
# Prefixes the binary paths of `hello` and `git`
# and suffixes the binary path of `xdg-utils`.
# prefixes the binary paths of `hello` and `git`
# Be advised that paths often should be patched in directly
# (via string replacements or in `configurePhase`).
makeWrapper $out/bin/foo $wrapperfile \
--prefix PATH : ${lib.makeBinPath [ hello git ]} \
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
makeWrapper $out/bin/foo $wrapperfile --prefix PATH : ${lib.makeBinPath [ hello git ]}
```
Packages may expect or require other utilities to be available at runtime.
`makeWrapper` can be used to add packages to a `PATH` environment variable local to a wrapper.
Use `--prefix` to explicitly set dependencies in `PATH`.
::: {.note}
`--prefix` essentially hard-codes dependencies into the wrapper.
They cannot be overridden without rebuilding the package.
:::
If dependencies should be resolved at runtime, use `--suffix` to append fallback values to `PATH`.
Theres many more kinds of arguments, they are documented in `nixpkgs/pkgs/build-support/setup-hooks/make-wrapper.sh` for the `makeWrapper` implementation and in `nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper/make-binary-wrapper.sh` for the `makeBinaryWrapper` implementation.
`wrapProgram` is a convenience function you probably want to use most of the time, implemented by both `makeWrapper` and `makeBinaryWrapper`.
@@ -938,9 +913,9 @@ substitute ./foo.in ./foo.out \
--subst-var someVar
```
### `substituteInPlace` \<multiple files\> \<subs\> {#fun-substituteInPlace}
### `substituteInPlace` \<file\> \<subs\> {#fun-substituteInPlace}
Like `substitute`, but performs the substitutions in place on the files passed.
Like `substitute`, but performs the substitutions in place on the file \<file\>.
### `substituteAll` \<infile\> \<outfile\> {#fun-substituteAll}
@@ -1008,7 +983,7 @@ addEnvHooks "$hostOffset" myBashFunction
The *existence* of setups hooks has long been documented and packages inside Nixpkgs are free to use this mechanism. Other packages, however, should not rely on these mechanisms not changing between Nixpkgs versions. Because of the existing issues with this system, theres little benefit from mandating it be stable for any period of time.
First, lets cover some setup hooks that are part of Nixpkgs default `stdenv`. This means that they are run for every package built using `stdenv.mkDerivation` or when using a custom builder that has `source $stdenv/setup`. Some of these are platform specific, so they may run on Linux but not Darwin or vice-versa.
First, lets cover some setup hooks that are part of Nixpkgs default stdenv. This means that they are run for every package built using `stdenv.mkDerivation`. Some of these are platform specific, so they may run on Linux but not Darwin or vice-versa.
### `move-docs.sh` {#move-docs.sh}
@@ -1024,70 +999,7 @@ This runs the strip command on installed binaries and libraries. This removes un
### `patch-shebangs.sh` {#patch-shebangs.sh}
This setup hook patches installed scripts to add Nix store paths to their shebang interpreter as found in the build environment. The [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line tells a Unix-like operating system which interpreter to use to execute the script's contents.
::: note
The [generic builder][generic-builder] populates `PATH` from inputs of the derivation.
:::
[generic-builder]: https://github.com/NixOS/nixpkgs/blob/19d4f7dc485f74109bd66ef74231285ff797a823/pkgs/stdenv/generic/builder.sh
#### Invocation {#patch-shebangs.sh-invocation}
Multiple paths can be specified.
```
patchShebangs [--build | --host] PATH...
```
##### Flags
`--build`
: Look up commands available at build time
`--host`
: Look up commands available at run time
##### Examples
```sh
patchShebangs --host /nix/store/<hash>-hello-1.0/bin
```
```sh
patchShebangs --build configure
```
`#!/bin/sh` will be rewritten to `#!/nix/store/<hash>-some-bash/bin/sh`.
`#!/usr/bin/env` gets special treatment: `#!/usr/bin/env python` is rewritten to `/nix/store/<hash>/bin/python`.
Interpreter paths that point to a valid Nix store location are not changed.
::: note
A script file must be marked as executable, otherwise it will not be
considered.
:::
This mechanism ensures that the interpreter for a given script is always found and is exactly the one specified by the build.
It can be disabled by setting [`dontPatchShebangs`](#var-stdenv-dontPatchShebangs):
```nix
stdenv.mkDerivation {
# ...
dontPatchShebangs = true;
# ...
}
```
The file [`patch-shebangs.sh`][patch-shebangs.sh] defines the [`patchShebangs`][patchShebangs] function. It is used to implement [`patchShebangsAuto`][patchShebangsAuto], the [setup hook](#ssec-setup-hooks) that is registered to run during the [fixup phase](#ssec-fixup-phase) by default.
If you need to run `patchShebangs` at build time, it must be called explicitly within [one of the build phases](#sec-stdenv-phases).
[patch-shebangs.sh]: https://github.com/NixOS/nixpkgs/blob/19d4f7dc485f74109bd66ef74231285ff797a823/pkgs/build-support/setup-hooks/patch-shebangs.sh
[patchShebangs]: https://github.com/NixOS/nixpkgs/blob/19d4f7dc485f74109bd66ef74231285ff797a823/pkgs/build-support/setup-hooks/patch-shebangs.sh#L24-L105
[patchShebangsAuto]: https://github.com/NixOS/nixpkgs/blob/19d4f7dc485f74109bd66ef74231285ff797a823/pkgs/build-support/setup-hooks/patch-shebangs.sh#L107-L119
This setup hook patches installed scripts to use the full path to the shebang interpreter. A shebang interpreter is the first commented line of a script telling the operating system which program will run the script (e.g `#!/bin/bash`). In Nix, we want an exact path to that interpreter to be used. This often replaces `/bin/sh` with a path in the Nix store.
### `audit-tmpdir.sh` {#audit-tmpdir.sh}
@@ -1109,15 +1021,13 @@ This setup hook moves any libraries installed in the `lib64/` subdirectory into
This setup hook moves any systemd user units installed in the `lib/` subdirectory into `share/`. In addition, a link is provided from `share/` to `lib/` for compatibility. This is needed for systemd to find user services when installed into the user profile.
This hook only runs when compiling for Linux.
### `set-source-date-epoch-to-latest.sh` {#set-source-date-epoch-to-latest.sh}
This sets `SOURCE_DATE_EPOCH` to the modification time of the most recent file.
### Bintools Wrapper and hook {#bintools-wrapper}
### Bintools Wrapper {#bintools-wrapper}
The Bintools Wrapper wraps the binary utilities for a bunch of miscellaneous purposes. These are GNU Binutils when targeting Linux, and a mix of cctools and GNU binutils for Darwin. \[The “Bintools” name is supposed to be a compromise between “Binutils” and “cctools” not denoting any specific implementation.\] Specifically, the underlying bintools package, and a C standard library (glibc or Darwins libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by the Bintools Wrapper. Packages typically depend on CC Wrapper, which in turn (at run time) depends on the Bintools Wrapper.
The Bintools Wrapper wraps the binary utilities for a bunch of miscellaneous purposes. These are GNU Binutils when targetting Linux, and a mix of cctools and GNU binutils for Darwin. \[The “Bintools” name is supposed to be a compromise between “Binutils” and “cctools” not denoting any specific implementation.\] Specifically, the underlying bintools package, and a C standard library (glibc or Darwins libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by the Bintools Wrapper. Packages typically depend on CC Wrapper, which in turn (at run time) depends on the Bintools Wrapper.
The Bintools Wrapper was only just recently split off from CC Wrapper, so the division of labor is still being worked out. For example, it shouldnt care about the C standard library, but just take a derivation with the dynamic loader (which happens to be the glibc on linux). Dependency finding however is a task both wrappers will continue to need to share, and probably the most important to understand. It is currently accomplished by collecting directories of host-platform dependencies (i.e. `buildInputs` and `nativeBuildInputs`) in environment variables. The Bintools Wrappers setup hook causes any `lib` and `lib64` subdirectories to be added to `NIX_LDFLAGS`. Since the CC Wrapper and the Bintools Wrapper use the same strategy, most of the Bintools Wrapper code is sparsely commented and refers to the CC Wrapper. But the CC Wrappers code, by contrast, has quite lengthy comments. The Bintools Wrapper merely cites those, rather than repeating them, to avoid falling out of sync.
@@ -1125,27 +1035,173 @@ A final task of the setup hook is defining a number of standard environment vari
A problem with this final task is that the Bintools Wrapper is honest and defines `LD` as `ld`. Most packages, however, firstly use the C compiler for linking, secondly use `LD` anyways, defining it as the C compiler, and thirdly, only so define `LD` when it is undefined as a fallback. This triple-threat means Bintools Wrapper will break those packages, as LD is already defined as the actual linker which the package wont override yet doesnt want to use. The workaround is to define, just for the problematic package, `LD` as the C compiler. A good way to do this would be `preConfigure = "LD=$CC"`.
### CC Wrapper and hook {#cc-wrapper}
### CC Wrapper {#cc-wrapper}
The CC Wrapper wraps a C toolchain for a bunch of miscellaneous purposes. Specifically, a C compiler (GCC or Clang), wrapped binary tools, and a C standard library (glibc or Darwins libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by the CC Wrapper. Packages typically depend on the CC Wrapper, which in turn (at run-time) depends on the Bintools Wrapper.
Dependency finding is undoubtedly the main task of the CC Wrapper. This works just like the Bintools Wrapper, except that any `include` subdirectory of any relevant dependency is added to `NIX_CFLAGS_COMPILE`. The setup hook itself contains elaborate comments describing the exact mechanism by which this is accomplished.
Dependency finding is undoubtedly the main task of the CC Wrapper. This works just like the Bintools Wrapper, except that any `include` subdirectory of any relevant dependency is added to `NIX_CFLAGS_COMPILE`. The setup hook itself contains some lengthy comments describing the exact convoluted mechanism by which this is accomplished.
Similarly, the CC Wrapper follows the Bintools Wrapper in defining standard environment variables with the names of the tools it wraps, for the same reasons described above. Importantly, while it includes a `cc` symlink to the c compiler for portability, the `CC` will be defined using the compilers “real name” (i.e. `gcc` or `clang`). This helps lousy build systems that inspect on the name of the compiler rather than run it.
Here are some more packages that provide a setup hook. Since the list of hooks is extensible, this is not an exhaustive list. The mechanism is only to be used as a last resort, so it might cover most uses.
### Other hooks
### Perl {#setup-hook-perl}
Many other packages provide hooks, that are not part of `stdenv`. You can find
these in the [Hooks Reference](#chap-hooks).
Adds the `lib/site_perl` subdirectory of each build input to the `PERL5LIB` environment variable. For instance, if `buildInputs` contains Perl, then the `lib/site_perl` subdirectory of each input is added to the `PERL5LIB` environment variable.
### Compiler and Linker wrapper hooks {#compiler-linker-wrapper-hooks}
### Python {#setup-hook-python}
If the file `${cc}/nix-support/cc-wrapper-hook` exists, it will be run at the end of the [compiler wrapper](#cc-wrapper).
If the file `${binutils}/nix-support/post-link-hook` exists, it will be run at the end of the linker wrapper.
These hooks allow a user to inject code into the wrappers.
As an example, these hooks can be used to extract `extraBefore`, `params` and `extraAfter` which store all the command line arguments passed to the compiler and linker respectively.
Adds the `lib/${python.libPrefix}/site-packages` subdirectory of each build input to the `PYTHONPATH` environment variable.
### pkg-config {#setup-hook-pkg-config}
Adds the `lib/pkgconfig` and `share/pkgconfig` subdirectories of each build input to the `PKG_CONFIG_PATH` environment variable.
### Automake {#setup-hook-automake}
Adds the `share/aclocal` subdirectory of each build input to the `ACLOCAL_PATH` environment variable.
### Autoconf {#setup-hook-autoconf}
The `autoreconfHook` derivation adds `autoreconfPhase`, which runs autoreconf, libtoolize and automake, essentially preparing the configure script in autotools-based builds. Most autotools-based packages come with the configure script pre-generated, but this hook is necessary for a few packages and when you need to patch the packages configure scripts.
### libxml2 {#setup-hook-libxml2}
Adds every file named `catalog.xml` found under the `xml/dtd` and `xml/xsl` subdirectories of each build input to the `XML_CATALOG_FILES` environment variable.
### teTeX / TeX Live {#tetex-tex-live}
Adds the `share/texmf-nix` subdirectory of each build input to the `TEXINPUTS` environment variable.
### Qt 4 {#qt-4}
Sets the `QTDIR` environment variable to Qts path.
### gdk-pixbuf {#setup-hook-gdk-pixbuf}
Exports `GDK_PIXBUF_MODULE_FILE` environment variable to the builder. Add librsvg package to `buildInputs` to get svg support. See also the [setup hook description in GNOME platform docs](#ssec-gnome-hooks-gdk-pixbuf).
### GHC {#ghc}
Creates a temporary package database and registers every Haskell build input in it (TODO: how?).
### GNOME platform {#gnome-platform}
Hooks related to GNOME platform and related libraries like GLib, GTK and GStreamer are described in [](#sec-language-gnome).
### autoPatchelfHook {#setup-hook-autopatchelfhook}
This is a special setup hook which helps in packaging proprietary software in that it automatically tries to find missing shared library dependencies of ELF files based on the given `buildInputs` and `nativeBuildInputs`.
You can also specify a `runtimeDependencies` variable which lists dependencies to be unconditionally added to rpath of all executables. This is useful for programs that use dlopen 3 to load libraries at runtime.
In certain situations you may want to run the main command (`autoPatchelf`) of the setup hook on a file or a set of directories instead of unconditionally patching all outputs. This can be done by setting the `dontAutoPatchelf` environment variable to a non-empty value.
By default `autoPatchelf` will fail as soon as any ELF file requires a dependency which cannot be resolved via the given build inputs. In some situations you might prefer to just leave missing dependencies unpatched and continue to patch the rest. This can be achieved by setting the `autoPatchelfIgnoreMissingDeps` environment variable to a non-empty value. `autoPatchelfIgnoreMissingDeps` can be set to a list like `autoPatchelfIgnoreMissingDeps = [ "libcuda.so.1" "libcudart.so.1" ];` or to simply `[ "*" ]` to ignore all missing dependencies.
The `autoPatchelf` command also recognizes a `--no-recurse` command line flag, which prevents it from recursing into subdirectories.
### breakpointHook {#breakpointhook}
This hook will make a build pause instead of stopping when a failure happens. It prevents nix from cleaning up the build environment immediately and allows the user to attach to a build environment using the `cntr` command. Upon build error it will print instructions on how to use `cntr`, which can be used to enter the environment for debugging. Installing cntr and running the command will provide shell access to the build sandbox of failed build. At `/var/lib/cntr` the sandboxed filesystem is mounted. All commands and files of the system are still accessible within the shell. To execute commands from the sandbox use the cntr exec subcommand. `cntr` is only supported on Linux-based platforms. To use it first add `cntr` to your `environment.systemPackages` on NixOS or alternatively to the root user on non-NixOS systems. Then in the package that is supposed to be inspected, add `breakpointHook` to `nativeBuildInputs`.
```nix
nativeBuildInputs = [ breakpointHook ];
```
When a build failure happens there will be an instruction printed that shows how to attach with `cntr` to the build sandbox.
::: {.note}
::: {.title}
Caution with remote builds
:::
This wont work with remote builds as the build environment is on a different machine and cant be accessed by `cntr`. Remote builds can be turned off by setting `--option builders ''` for `nix-build` or `--builders ''` for `nix build`.
:::
### installShellFiles {#installshellfiles}
This hook helps with installing manpages and shell completion files. It exposes 2 shell functions `installManPage` and `installShellCompletion` that can be used from your `postInstall` hook.
The `installManPage` function takes one or more paths to manpages to install. The manpages must have a section suffix, and may optionally be compressed (with `.gz` suffix). This function will place them into the correct directory.
The `installShellCompletion` function takes one or more paths to shell completion files. By default it will autodetect the shell type from the completion file extension, but you may also specify it by passing one of `--bash`, `--fish`, or `--zsh`. These flags apply to all paths listed after them (up until another shell flag is given). Each path may also have a custom installation name provided by providing a flag `--name NAME` before the path. If this flag is not provided, zsh completions will be renamed automatically such that `foobar.zsh` becomes `_foobar`. A root name may be provided for all paths using the flag `--cmd NAME`; this synthesizes the appropriate name depending on the shell (e.g. `--cmd foo` will synthesize the name `foo.bash` for bash and `_foo` for zsh). The path may also be a fifo or named fd (such as produced by `<(cmd)`), in which case the shell and name must be provided.
```nix
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installManPage doc/foobar.1 doc/barfoo.3
# explicit behavior
installShellCompletion --bash --name foobar.bash share/completions.bash
installShellCompletion --fish --name foobar.fish share/completions.fish
installShellCompletion --zsh --name _foobar share/completions.zsh
# implicit behavior
installShellCompletion share/completions/foobar.{bash,fish,zsh}
# using named fd
installShellCompletion --cmd foobar \
--bash <($out/bin/foobar --bash-completion) \
--fish <($out/bin/foobar --fish-completion) \
--zsh <($out/bin/foobar --zsh-completion)
'';
```
### libiconv, libintl {#libiconv-libintl}
A few libraries automatically add to `NIX_LDFLAGS` their library, making their symbols automatically available to the linker. This includes libiconv and libintl (gettext). This is done to provide compatibility between GNU Linux, where libiconv and libintl are bundled in, and other systems where that might not be the case. Sometimes, this behavior is not desired. To disable this behavior, set `dontAddExtraLibs`.
### validatePkgConfig {#validatepkgconfig}
The `validatePkgConfig` hook validates all pkg-config (`.pc`) files in a package. This helps catching some common errors in pkg-config files, such as undefined variables.
### cmake {#cmake}
Overrides the default configure phase to run the CMake command. By default, we use the Make generator of CMake. In addition, dependencies are added automatically to CMAKE_PREFIX_PATH so that packages are correctly detected by CMake. Some additional flags are passed in to give similar behavior to configure-based packages. You can disable this hooks behavior by setting configurePhase to a custom value, or by setting dontUseCmakeConfigure. cmakeFlags controls flags passed only to CMake. By default, parallel building is enabled as CMake supports parallel building almost everywhere. When Ninja is also in use, CMake will detect that and use the ninja generator.
### xcbuildHook {#xcbuildhook}
Overrides the build and install phases to run the "xcbuild" command. This hook is needed when a project only comes with build files for the XCode build system. You can disable this behavior by setting buildPhase and configurePhase to a custom value. xcbuildFlags controls flags passed only to xcbuild.
### Meson {#meson}
Overrides the configure phase to run meson to generate Ninja files. To run these files, you should accompany Meson with ninja. By default, `enableParallelBuilding` is enabled as Meson supports parallel building almost everywhere.
#### Variables controlling Meson {#variables-controlling-meson}
##### `mesonFlags` {#mesonflags}
Controls the flags passed to meson.
##### `mesonBuildType` {#mesonbuildtype}
Which [`--buildtype`](https://mesonbuild.com/Builtin-options.html#core-options) to pass to Meson. We default to `plain`.
##### `mesonAutoFeatures` {#mesonautofeatures}
What value to set [`-Dauto_features=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `enabled`.
##### `mesonWrapMode` {#mesonwrapmode}
What value to set [`-Dwrap_mode=`](https://mesonbuild.com/Builtin-options.html#core-options) to. We default to `nodownload` as we disallow network access.
##### `dontUseMesonConfigure` {#dontusemesonconfigure}
Disables using Mesons `configurePhase`.
### ninja {#ninja}
Overrides the build, install, and check phase to run ninja instead of make. You can disable this behavior with the `dontUseNinjaBuild`, `dontUseNinjaInstall`, and `dontUseNinjaCheck`, respectively. Parallel building is enabled by default in Ninja.
### unzip {#unzip}
This setup hook will allow you to unzip .zip files specified in `$src`. There are many similar packages like `unrar`, `undmg`, etc.
### wafHook {#wafhook}
Overrides the configure, build, and install phases. This will run the “waf” script used by many projects. If `wafPath` (default `./waf`) doesnt exist, it will copy the version of waf available in Nixpkgs. `wafFlags` can be used to pass flags to the waf script.
### scons {#scons}
Overrides the build, install, and check phases. This uses the scons build system as a replacement for make. scons does not provide a configure phase, so everything is managed at build and install time.
## Purity in Nixpkgs {#sec-purity-in-nixpkgs}
@@ -1260,7 +1316,7 @@ If the libraries lack `-fPIE`, you will get the error `recompile with -fPIE`.
[^footnote-stdenv-ignored-build-platform]: The build platform is ignored because it is a mere implementation detail of the package satisfying the dependency: As a general programming principle, dependencies are always *specified* as interfaces, not concrete implementation.
[^footnote-stdenv-native-dependencies-in-path]: Currently, this means for native builds all dependencies are put on the `PATH`. But in the future that may not be the case for sake of matching cross: the platforms would be assumed to be unique for native and cross builds alike, so only the `depsBuild*` and `nativeBuildInputs` would be added to the `PATH`.
[^footnote-stdenv-propagated-dependencies]: Nix itself already takes a packages transitive dependencies into account, but this propagation ensures nixpkgs-specific infrastructure like [setup hooks](#ssec-setup-hooks) also are run as if it were a propagated dependency.
[^footnote-stdenv-propagated-dependencies]: Nix itself already takes a packages transitive dependencies into account, but this propagation ensures nixpkgs-specific infrastructure like setup hooks (mentioned above) also are run as if the propagated dependency.
[^footnote-stdenv-find-inputs-location]: The `findInputs` function, currently residing in `pkgs/stdenv/generic/setup.sh`, implements the propagation logic.
[^footnote-stdenv-sys-lib-search-path]: It clears the `sys_lib_*search_path` variables in the Libtool script to prevent Libtool from using libraries in `/usr/lib` and such.
[^footnote-stdenv-build-time-guessing-impurity]: Eventually these will be passed building natively as well, to improve determinism: build-time guessing, as is done today, is a risk of impurity.

View File

@@ -77,11 +77,6 @@ The difference between a package being unsupported on some system and being brok
## Installing unfree packages {#sec-allow-unfree}
All users of Nixpkgs are free software users, and many users (and developers) of Nixpkgs want to limit and tightly control their exposure to unfree software.
At the same time, many users need (or want) to run some specific pieces of proprietary software.
Nixpkgs includes some expressions for unfree software packages.
By default unfree software cannot be installed and doesnt show up in searches.
There are several ways to tweak how Nix handles a package which has been marked as unfree.
- To temporarily allow all unfree packages, you can use an environment variable for a single invocation of the nix tools:
@@ -169,6 +164,14 @@ There are several ways to tweak how Nix handles a package which has been marked
Note that `permittedInsecurePackages` is only checked if `allowInsecurePredicate` is not specified.
### `config` Options Reference
The following attributes can be passed in [`config`](#chap-packageconfig).
```{=docbook}
<include xmlns="http://www.w3.org/2001/XInclude" href="../doc-support/result/config-options.docbook.xml"/>
```
## Modify packages via `packageOverrides` {#sec-modify-via-packageOverrides}
You can define a function called `packageOverrides` in your local `~/.config/nixpkgs/config.nix` to override Nix packages. It must be a function that takes pkgs as an argument and returns a modified set of packages.
@@ -181,15 +184,6 @@ You can define a function called `packageOverrides` in your local `~/.config/nix
}
```
## `config` Options Reference {#sec-config-options-reference}
The following attributes can be passed in [`config`](#chap-packageconfig).
```{=docbook}
<include xmlns="http://www.w3.org/2001/XInclude" href="../doc-support/result/config-options.docbook.xml"/>
```
## Declarative Package Management {#sec-declarative-package-management}
### Build an environment {#sec-building-environment}

View File

@@ -11,7 +11,8 @@
lib = import ./lib;
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
forAllSystems = f: lib.genAttrs lib.systems.flakeExposed (system: f system);
in
{
lib = lib.extend (final: prev: {
@@ -19,20 +20,13 @@
nixos = import ./nixos/lib { lib = final; };
nixosSystem = args:
import ./nixos/lib/eval-config.nix (
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;
}
);
import ./nixos/lib/eval-config.nix (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;
} ];
});
});
checks.x86_64-linux.tarball = jobs.tarball;
@@ -44,19 +38,10 @@
}).nixos.manual.x86_64-linux;
};
# The "legacy" in `legacyPackages` doesn't imply that the packages exposed
# through this attribute are "legacy" packages. Instead, `legacyPackages`
# is used here as a substitute attribute name for `packages`. The problem
# with `packages` is that it makes operations like `nix flake show
# nixpkgs` unusably slow due to the sheer number of packages the Nix CLI
# needs to evaluate. But when the Nix CLI sees a `legacyPackages`
# 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; });
nixosModules = {
notDetected = ./nixos/modules/installer/scan/not-detected.nix;
notDetected = import ./nixos/modules/installer/scan/not-detected.nix;
};
};
}

View File

@@ -1,96 +0,0 @@
{ " " = 32;
"!" = 33;
"\"" = 34;
"#" = 35;
"$" = 36;
"%" = 37;
"&" = 38;
"'" = 39;
"(" = 40;
")" = 41;
"*" = 42;
"+" = 43;
"," = 44;
"-" = 45;
"." = 46;
"/" = 47;
"0" = 48;
"1" = 49;
"2" = 50;
"3" = 51;
"4" = 52;
"5" = 53;
"6" = 54;
"7" = 55;
"8" = 56;
"9" = 57;
":" = 58;
";" = 59;
"<" = 60;
"=" = 61;
">" = 62;
"?" = 63;
"@" = 64;
"A" = 65;
"B" = 66;
"C" = 67;
"D" = 68;
"E" = 69;
"F" = 70;
"G" = 71;
"H" = 72;
"I" = 73;
"J" = 74;
"K" = 75;
"L" = 76;
"M" = 77;
"N" = 78;
"O" = 79;
"P" = 80;
"Q" = 81;
"R" = 82;
"S" = 83;
"T" = 84;
"U" = 85;
"V" = 86;
"W" = 87;
"X" = 88;
"Y" = 89;
"Z" = 90;
"[" = 91;
"\\" = 92;
"]" = 93;
"^" = 94;
"_" = 95;
"`" = 96;
"a" = 97;
"b" = 98;
"c" = 99;
"d" = 100;
"e" = 101;
"f" = 102;
"g" = 103;
"h" = 104;
"i" = 105;
"j" = 106;
"k" = 107;
"l" = 108;
"m" = 109;
"n" = 110;
"o" = 111;
"p" = 112;
"q" = 113;
"r" = 114;
"s" = 115;
"t" = 116;
"u" = 117;
"v" = 118;
"w" = 119;
"x" = 120;
"y" = 121;
"z" = 122;
"{" = 123;
"|" = 124;
"}" = 125;
"~" = 126;
}

View File

@@ -3,7 +3,7 @@
let
inherit (builtins) head tail length;
inherit (lib.trivial) flip id mergeAttrs pipe;
inherit (lib.trivial) id;
inherit (lib.strings) concatStringsSep concatMapStringsSep escapeNixIdentifier sanitizeDerivationName;
inherit (lib.lists) foldr foldl' concatMap concatLists elemAt all partition groupBy take foldl;
in
@@ -77,25 +77,6 @@ rec {
let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";
in attrByPath attrPath (abort errorMsg);
/* Map each attribute in the given set and merge them into a new attribute set.
Type:
concatMapAttrs ::
(String -> a -> AttrSet)
-> AttrSet
-> AttrSet
Example:
concatMapAttrs
(name: value: {
${name} = value;
${name + value} = value;
})
{ x = "a"; y = "b"; }
=> { x = "a"; xa = "a"; y = "b"; yb = "b"; }
*/
concatMapAttrs = f: flip pipe [ (mapAttrs f) attrValues (foldl' mergeAttrs { }) ];
/* Update or set specific paths of an attribute set.
@@ -267,7 +248,7 @@ rec {
/* Apply fold functions to values grouped by key.
Example:
foldAttrs (item: acc: [item] ++ acc) [] [{ a = 2; } { a = 3; }]
foldAttrs (n: a: [n] ++ a) [] [{ a = 2; } { a = 3; }]
=> { a = [ 2 3 ]; }
*/
foldAttrs = op: nul:
@@ -625,7 +606,7 @@ rec {
getMan = getOutput "man";
/* Pick the outputs of packages to place in buildInputs */
chooseDevOutputs = builtins.map getDev;
chooseDevOutputs = drvs: builtins.map getDev drvs;
/* Make various Nix tools consider the contents of the resulting
attribute set when looking for what to build, find, etc.
@@ -641,20 +622,6 @@ rec {
dontRecurseIntoAttrs =
attrs: attrs // { recurseForDerivations = false; };
/* `unionOfDisjoint x y` is equal to `x // y // z` where the
attrnames in `z` are the intersection of the attrnames in `x` and
`y`, and all values `assert` with an error message. This
operator is commutative, unlike (//). */
unionOfDisjoint = x: y:
let
intersection = builtins.intersectAttrs x y;
collisions = lib.concatStringsSep " " (builtins.attrNames intersection);
mask = builtins.mapAttrs (name: value: builtins.throw
"unionOfDisjoint: collision on ${name}; complete list: ${collisions}")
intersection;
in
(x // y) // mask;
/*** deprecated stuff ***/
zipWithNames = zipAttrsWithNames;

View File

@@ -38,15 +38,12 @@ rec {
//
(drv.passthru or {})
//
# TODO(@Artturin): remove before release 23.05 and only have __spliced.
(lib.optionalAttrs (drv ? crossDrv && drv ? nativeDrv) {
crossDrv = overrideDerivation drv.crossDrv f;
nativeDrv = overrideDerivation drv.nativeDrv f;
})
//
lib.optionalAttrs (drv ? __spliced) {
__spliced = {} // (lib.mapAttrs (_: sDrv: overrideDerivation sDrv f) drv.__spliced);
});
(if (drv ? crossDrv && drv ? nativeDrv)
then {
crossDrv = overrideDerivation drv.crossDrv f;
nativeDrv = overrideDerivation drv.nativeDrv f;
}
else { }));
/* `makeOverridable` takes a function from attribute set to attribute set and

View File

@@ -23,7 +23,6 @@ let
# packaging
customisation = callLibs ./customisation.nix;
derivations = callLibs ./derivations.nix;
maintainers = import ../maintainers/maintainer-list.nix;
teams = callLibs ../maintainers/team-list.nix;
meta = callLibs ./meta.nix;
@@ -37,7 +36,6 @@ let
# constants
licenses = callLibs ./licenses.nix;
sourceTypes = callLibs ./source-types.nix;
systems = callLibs ./systems;
# serialization
@@ -72,13 +70,13 @@ let
info showWarnings nixpkgsVersion version isInOldestRelease
mod compare splitByAndCompare
functionArgs setFunctionArgs isFunction toFunction
toHexString toBaseDigits inPureEvalMode;
toHexString toBaseDigits;
inherit (self.fixedPoints) fix fix' converge extends composeExtensions
composeManyExtensions makeExtensible makeExtensibleWithCustomName;
inherit (self.attrsets) attrByPath hasAttrByPath setAttrByPath
getAttrFromPath attrVals attrValues getAttrs catAttrs filterAttrs
filterAttrsRecursive foldAttrs collect nameValuePair mapAttrs
mapAttrs' mapAttrsToList concatMapAttrs mapAttrsRecursive mapAttrsRecursiveCond
mapAttrs' mapAttrsToList mapAttrsRecursive mapAttrsRecursiveCond
genAttrs isDerivation toDerivation optionalAttrs
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil
recursiveUpdate matchAttrs overrideExisting showAttrPath getOutput getBin
@@ -103,13 +101,12 @@ let
getName getVersion
nameFromURL enableFeature enableFeatureAs withFeature
withFeatureAs fixedWidthString fixedWidthNumber isStorePath
toInt toIntBase10 readPathsFromFile fileContents;
toInt readPathsFromFile fileContents;
inherit (self.stringsWithDeps) textClosureList textClosureMap
noDepEntry fullDepEntry packEntry stringAfter;
inherit (self.customisation) overrideDerivation makeOverridable
callPackageWith callPackagesWith extendDerivation hydraJob
makeScope makeScopeWithSplicing;
inherit (self.derivations) lazyDerivation;
inherit (self.meta) addMetaAttrs dontDistribute setName updateName
appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio
hiPrioSet getLicenseFromSpdxId getExe;
@@ -133,9 +130,7 @@ let
getValues getFiles
optionAttrSetToDocList optionAttrSetToDocList'
scrubOptionValue literalExpression literalExample literalDocBook
showOption showOptionWithDefLocs showFiles
unknownModule mkOption mkPackageOption
mdDoc literalMD;
showOption showFiles unknownModule mkOption mkPackageOption;
inherit (self.types) isType setType defaultTypeMerge defaultFunctor
isOptionType mkOptionType;
inherit (self.asserts)

View File

@@ -157,36 +157,7 @@ rec {
}
);
closePropagationSlow = list: (uniqList {inputList = (innerClosePropagation [] list);});
# This is an optimisation of lib.closePropagation which avoids the O(n^2) behavior
# Using a list of derivations, it generates the full closure of the propagatedXXXBuildInputs
# The ordering / sorting / comparison is done based on the `outPath`
# attribute of each derivation.
# On some benchmarks, it performs up to 15 times faster than lib.closePropagation.
# See https://github.com/NixOS/nixpkgs/pull/194391 for details.
closePropagationFast = list:
builtins.map (x: x.val) (builtins.genericClosure {
startSet = builtins.map (x: {
key = x.outPath;
val = x;
}) (builtins.filter (x: x != null) list);
operator = item:
if !builtins.isAttrs item.val then
[ ]
else
builtins.concatMap (x:
if x != null then [{
key = x.outPath;
val = x;
}] else
[ ]) ((item.val.propagatedBuildInputs or [ ])
++ (item.val.propagatedNativeBuildInputs or [ ]));
});
closePropagation = if builtins ? genericClosure
then closePropagationFast
else closePropagationSlow;
closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);});
# calls a function (f attr value ) for each record item. returns a list
mapAttrsFlatten = f: r: map (attr: f attr r.${attr}) (attrNames r);

View File

@@ -1,101 +0,0 @@
{ lib }:
let
inherit (lib) throwIfNot;
in
{
/*
Restrict a derivation to a predictable set of attribute names, so
that the returned attrset is not strict in the actual derivation,
saving a lot of computation when the derivation is non-trivial.
This is useful in situations where a derivation might only be used for its
passthru attributes, improving evaluation performance.
The returned attribute set is lazy in `derivation`. Specifically, this
means that the derivation will not be evaluated in at least the
situations below.
For illustration and/or testing, we define derivation such that its
evaluation is very noticable.
let derivation = throw "This won't be evaluated.";
In the following expressions, `derivation` will _not_ be evaluated:
(lazyDerivation { inherit derivation; }).type
attrNames (lazyDerivation { inherit derivation; })
(lazyDerivation { inherit derivation; } // { foo = true; }).foo
(lazyDerivation { inherit derivation; meta.foo = true; }).meta
In these expressions, it `derivation` _will_ be evaluated:
"${lazyDerivation { inherit derivation }}"
(lazyDerivation { inherit derivation }).outPath
(lazyDerivation { inherit derivation }).meta
And the following expressions are not valid, because the refer to
implementation details and/or attributes that may not be present on
some derivations:
(lazyDerivation { inherit derivation }).buildInputs
(lazyDerivation { inherit derivation }).passthru
(lazyDerivation { inherit derivation }).pythonPath
*/
lazyDerivation =
args@{
# The derivation to be wrapped.
derivation
, # Optional meta attribute.
#
# While this function is primarily about derivations, it can improve
# the `meta` package attribute, which is usually specified through
# `mkDerivation`.
meta ? null
, # Optional extra values to add to the returned attrset.
#
# This can be used for adding package attributes, such as `tests`.
passthru ? { }
}:
let
# These checks are strict in `drv` and some `drv` attributes, but the
# attrset spine returned by lazyDerivation does not depend on it.
# Instead, the individual derivation attributes do depend on it.
checked =
throwIfNot (derivation.type or null == "derivation")
"lazySimpleDerivation: input must be a derivation."
throwIfNot
(derivation.outputs == [ "out" ])
# Supporting multiple outputs should be a matter of inheriting more attrs.
"The derivation ${derivation.name or "<unknown>"} has multiple outputs. This is not supported by lazySimpleDerivation yet. Support could be added, and be useful as long as the set of outputs is known in advance, without evaluating the actual derivation."
derivation;
in
{
# Hardcoded `type`
#
# `lazyDerivation` requires its `derivation` argument to be a derivation,
# so if it is not, that is a programming error by the caller and not
# something that `lazyDerivation` consumers should be able to correct
# for after the fact.
# So, to improve laziness, we assume correctness here and check it only
# when actual derivation values are accessed later.
type = "derivation";
# A fixed set of derivation values, so that `lazyDerivation` can return
# its attrset before evaluating `derivation`.
# This must only list attributes that are available on _all_ derivations.
inherit (checked) outputs out outPath outputName drvPath name system;
# The meta attribute can either be taken from the derivation, or if the
# `lazyDerivation` caller knew a shortcut, be taken from there.
meta = args.meta or checked.meta;
} // passthru;
}

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