Compare commits

..

846 Commits
xrdp ... 19.03

Author SHA1 Message Date
Linus Heckemann
f52505fac8 README: update for 19.03 2019-04-08 22:08:49 +02:00
Simon Lackerbauer
0363abe66b atlassian-jira: 8.0.1 -> 8.1.0
(cherry picked from commit e683811972)
2019-04-08 20:58:29 +02:00
Simon Lackerbauer
cde9f13617 atlassian-confluence: 6.14.2 -> 6.15.2
(cherry picked from commit b31ab2050a)
2019-04-08 20:58:29 +02:00
Simon Lackerbauer
8c0f37546f atlassian-crowd: 3.3.4 -> 3.4.3
(cherry picked from commit 774a29944e)
2019-04-08 20:58:29 +02:00
worldofpeace
80f91b4dda doc/python: cleanup examples, references
(cherry picked from commit 63f244193b)
(cherry picked from commit 94a409450a)
(cherry picked from commit 0ccfebf9f2)
2019-04-08 13:01:40 -04:00
R. RyanTM
99af80a476 teamviewer: 14.1.3399 -> 14.2.2558
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/teamviewer/versions

(cherry picked from commit 39f262dba3)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-04-08 13:20:40 +02:00
Florian Franzen
e548fd15c8 virtmanager: Fix gobject-introspection (#57385)
(cherry picked from commit 871c1d5bb1)
2019-04-08 12:49:01 +02:00
R. RyanTM
c8564b72a2 flatpak: 1.2.3 -> 1.2.4 (#58671)
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/flatpak/versions

(cherry picked from commit 4538f9ee3f)
Backported because it contains CVE fixes:
https://github.com/flatpak/flatpak/releases/tag/1.2.4
2019-04-08 12:40:10 +02:00
Michael Weiss
5e3c3d8efd Merge pull request #59166 from primeos/backports
[19.03] fuse3: use /etc/fuse.conf for configuration (backport of #59043)
2019-04-08 12:03:06 +02:00
Matthew Bauer
a738e68c96 fuse3: use /etc/fuse.conf for configuration (#59043)
We don’t want the config file to be read only and in the Nix store.

(cherry picked from commit 5541559635)
Reason: Backport a trivial fix for #59021.
2019-04-08 11:30:33 +02:00
Will Dietz
09823b58d1 nextcloud: use same php package throughout!
`phpPackage` is 7.3 by default, but `pkgs.php` is 7.2,
so this saves the need for an extra copy of php
for the purpose of running nextcloud's cron;
more importantly this fixes problems with extensions
not loading since they are built against a different php.

(cherry picked from commit 27d78f4c6c)
2019-04-08 08:52:56 +02:00
Will Dietz
d122dcd372 nextcloud: 15.0.5 -> 15.0.6
(tagged, not on nextcloud.com/changelog ?)
(admin panel bugged about the update, so should be good :))

(cherry picked from commit ee22cea1cc)
2019-04-08 08:52:48 +02:00
Will Dietz
fcc7097951 nextcloud-client: 2.5.1 -> 2.5.2
* patches applied already, per comment \o/
* use libcloudproviders, since we have it

(cherry picked from commit e2dbb35cb1)
2019-04-08 08:52:39 +02:00
Will Dietz
926606abbe libssh2: 1.8.0 -> 1.8.1 (SECURITY)
Release announcement:
https://www.libssh2.org/mail/libssh2-devel-archive-2019-03/0009.shtml
Security info:
https://www.libssh2.org/mail/libssh2-devel-archive-2019-03/0010.shtml

(cherry picked from commit efee45b05a)
PR #57884
2019-04-08 08:27:25 +02:00
Will Dietz
89cecf30d7 qtpass: 1.2.1 -> 1.2.3
Patch no longer needed (seems to be already applied, and notes mention).

(cherry picked from commit f7d2c23328)
2019-04-07 20:11:09 -04:00
tobias pflug
763e65fe78 Remove nodejs-6_x which is about to enter EOL
- Remove nodejs-6_x
- Set nodejs / nodejs-slim to nodejs-8_x / nodejs-slim-8_x
- Re-generate node2nix generated files using nodejs-8_x instead

(cherry picked from commit 0e296d5fcd)
2019-04-07 19:57:30 -04:00
Maximilian Bosch
6380740695 codimd: build with nodejs-8_x
This diff regenerates the package sets for `codimd` and `codemirror`
using NodeJS 8 to get rid of the deprecated[1] `nodejs-6_x`.

Additionally the following issues had to be fixed during the update:

* The package `js-sequence-diagram` has been removed from the NPM
  registry and was replaced by a security holding package[2]. The
  package was published by a third-party (upstream only supports bower
  builds), so it's unclear whether the package will re-appear[3].

  As the tarballs still exist (and the hash didn't change), the package
  will be loaded manually into the build env.

* For the babel-related packages, `dontNpmInstall` will be set for
  `node2nix` installs as some of those packages bundle a
  `package-lock.json` that triggers `ENOTCACHED` errors for optional
  dependencies[4].

For now it should be sufficient to use NodeJS 8 (`codimd` v1.2.x doesn't
support NodeJS 10), in the long term we probably want to use `yarn2nix`
here with NodeJS 10. This is much rather a fix to get rid of another
NodeJS 6 dependency.

[1] `nodejs-6_x` is about to be deprecated, see #58976
[2] https://www.npmjs.com/package/js-sequence-diagrams,
    https://github.com/npm/security-holder
[3] https://github.com/bramp/js-sequence-diagrams/issues/212
[4] https://github.com/svanderburg/node2nix/issues/134

(cherry picked from commit 5feec424de,
PR #59118)
2019-04-08 00:01:04 +02:00
Linus Heckemann
e4fa99fe9e rl-1903: spelling, grammar, markup improvements 2019-04-07 23:03:28 +02:00
Linus Heckemann
1935b8da90 rl-1903: list new modules 2019-04-07 23:03:28 +02:00
Linus Heckemann
030b916ce9 rl-1903: Document sway update and aarch64 UEFI image 2019-04-07 23:03:28 +02:00
Linus Heckemann
d6fc310e6c Merge pull request #58988 from worldofpeace/deepin-backport
[19.03] deepin updates (#58634)
2019-04-07 22:59:32 +02:00
Vladimír Čunát
34e0c75d7f Merge #59126: xfce panel plugins: Remove me as maintainer
(cherry picked from commit f5ab71ba28)
2019-04-07 20:16:28 +02:00
Pascal Wittmann
75d113469c haskellPackages.yesod-markdown: jailbreak 2019-04-07 19:46:53 +02:00
Alexandre Peyroux
971e5167e2 pythonPackages.jsbeautifier: 1.8.9 -> 1.9.1
(cherry picked from commit 72c24b18e9)
2019-04-07 17:40:05 +02:00
Alexandre Peyroux
dda301df36 pythonPackages.jsbeautifier: fix build (#58608)
(cherry picked from commit 946807c888)
2019-04-07 17:40:05 +02:00
Vladimír Čunát
ecf8872d93 Merge #58456: pythonPackages.grpcio: fix build on Darwin
(cherry picked from commit 780c2de274)
2019-04-07 17:16:46 +02:00
Vladimír Čunát
e2c99ce354 Merge #58589: openblas: fix aarch64 build
(cherry picked from commit e1f55599cc)
2019-04-07 17:02:52 +02:00
Vladimír Čunát
bc0167d8f8 Merge #57951: qemu: apply CVE-2019-3812 patch
(cherry picked from commit a6dd84a126)
2019-04-07 14:10:06 +02:00
Wael Nasreddine
f2d7f2b9a1 Merge #57711: go: 1.11.5 -> 1.11.6 and 1.12 -> 1.12.1
(cherry picked from commit c465292832)
Security fixes /cc #58264 and #58265
2019-04-07 10:33:29 +02:00
Vladimír Čunát
995a883ba9 go_1_12: port from master but do *not* make it default 2019-04-07 10:31:29 +02:00
Vladimír Čunát
1230c99b47 Merge #59036: wget: 1.20.1 -> 1.20.3 (SECURITY)
(cherry picked from commit ca494bf6c3)
2019-04-07 09:58:54 +02:00
Will Dietz
a3bb58547b youtube-dl: 2019.04.01 -> 2019.04.07
(cherry picked from commit 0f620ef43a)
2019-04-07 02:29:07 -04:00
worldofpeace
90e55a8c2a pantheon.elementary-greeter: hardcode elementary theme
For some reason correcting the path to the settings daemon
causes the icons to not be the elementary one's.

Hardcoding this fixes this very simply without
the need for the complicated wrapping.

(cherry picked from commit 536c72a62b)
2019-04-06 21:18:40 -04:00
worldofpeace
6fcb33ad1e pantheon.elementary-greeter: correct substituteAll
(cherry picked from commit c2ac422d40)
2019-04-06 21:18:40 -04:00
Frank Doepper
30c67ecc05 shotcut: 18.12.23 -> 19.02.28 (#56875)
fixes build with qt 5.12, apparently

Backport of #56875
(cherry picked from commit ed76b08906)
2019-04-07 03:10:57 +02:00
Aaron Andersen
67bc63f9a7 nixos/httpd: replace ssmtp with system-sendmail
(cherry picked from commit 9c9a6f380e)
2019-04-06 21:36:45 +02:00
Tim Steinbach
fdc7b8ab70 jenkins: 2.150.1 -> 2.164.1
(cherry picked from commit e9994af108)
2019-04-06 15:28:04 -04:00
Jaka Hudoklin
0d8ecd3cb8 dockerTools: storePathToLayer use runtimeShell in script
(cherry picked from commit 5d429f6822)
2019-04-06 19:04:47 +02:00
Tim Steinbach
1cc3696672 linux: 5.0.6 -> 5.0.7
(cherry picked from commit eedb7e7ec6)
2019-04-06 12:58:36 -04:00
Tim Steinbach
12e0b242d5 linux: 4.9.167 -> 4.9.168
(cherry picked from commit 21373e9c6f)
2019-04-06 12:58:36 -04:00
Tim Steinbach
8aceb56452 linux: 4.19.33 -> 4.19.34
(cherry picked from commit c45589b0bb)
2019-04-06 12:58:36 -04:00
Tim Steinbach
00e27d482c linux: 4.14.110 -> 4.14.111
(cherry picked from commit b60ce2e638)
2019-04-06 12:58:35 -04:00
Franz Pletz
cd39bc9d12 proxmark3: init at 3.1.0
(cherry picked from commit 4a985a67c5)
2019-04-06 15:00:43 +02:00
Franz Pletz
215e9717d4 qlcplus: fix location of libraries for fixup
(cherry picked from commit 1520bed20b)
2019-04-06 15:00:42 +02:00
Vladimír Čunát
dc58b3a756 Revert "Merge #57010: Luarocks update"
This reverts commit 4fff94f4b3.
I assumed this would fix more things than break, but apparently not.
Fixes #59057.
2019-04-06 13:33:39 +02:00
Robert Schütz
6faf326326 python.pkgs.ldappool: fix build
(cherry picked from commit 836621f33b)
2019-04-05 19:21:37 +02:00
Peter Hoeg
ce16af3c0a mosquitto: 1.5.5 -> 1.5.8 and add systemd support
(cherry picked from commit 5638a1c717)
2019-04-05 15:41:22 +00:00
Austin Seipp
bc7de5b5b1 souffle: 1.2.0 -> 1.5.1, co-maintain
Souffle has seen some significant upgrades in the past few years and now
has trimmed and replaced several of its more expensive dependencies,
such as boost, openjdk, etc.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 4f74e3abcf)

Backporting this as it was broken in 19.03.
2019-04-05 15:21:22 +00:00
Nathan van Doorn
03098dcc74 gramps: fix build
(cherry picked from commit 298f3d6c27)
2019-04-05 17:17:45 +02:00
Timo Kaufmann
833d593c0f nauty: disable cpu feature detection
(cherry picked from commit 7f22a42976)
2019-04-05 15:05:35 +00:00
worldofpeace
8c8856c546 vscode: 1.32.3 -> 1.33.0
https://code.visualstudio.com/updates/v1_33
(cherry picked from commit 36225974b3)
2019-04-05 16:58:01 +02:00
Edmund Wu
185b5e387d vscode: 1.32.2 -> 1.32.3 (#57720)
(cherry picked from commit 2c6876d81b)
2019-04-05 16:58:01 +02:00
Herwig Hochleitner
cd7adda550 chromium: 73.0.3683.86 -> 73.0.3683.103
(cherry picked from commit a5960f765a)
2019-04-05 16:55:26 +02:00
WilliButz
5a16b0a9f9 grafana: 6.1.0 -> 6.1.1
(cherry picked from commit 26d41fb0b8)
2019-04-05 16:23:54 +02:00
WilliButz
776b304d3e grafana: 6.0.2 -> 6.1.0 (#58917)
(cherry picked from commit cfe5698727)
2019-04-05 16:23:32 +02:00
Herwig Hochleitner
bbda35a20f cdemu: update to 3.2 release
closes https://github.com/NixOS/nixpkgs/pull/58911

(cherry picked from commit 79d653be55)
2019-04-05 15:51:00 +02:00
R. RyanTM
d1bb0587d2 linuxPackages.vhba: 20170610 -> 20190302
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/vhba/versions

(cherry picked from commit 794e864a07)
2019-04-05 15:51:00 +02:00
Herwig Hochleitner
ed57cf5463 i2p: 0.9.38 -> 0.9.39
(cherry picked from commit 098fd3280e)
2019-04-05 15:51:00 +02:00
Herwig Hochleitner
32b76e81ae firmware-linux-nonfree: 2019-02-13 -> 2019-03-12
(cherry picked from commit 72a6438f37)
2019-04-05 15:51:00 +02:00
José Romildo Malaquias
0fb3563814 deepin.deepin-menu: fix more hard coded paths
(cherry picked from commit 13ccde5a96)
2019-04-04 20:24:45 -04:00
José Romildo Malaquias
aad0d74311 deepin.dde-calendar: fix use of patchShebangs
(cherry picked from commit a1bf396127)
2019-04-04 20:24:45 -04:00
José Romildo Malaquias
8d280a4d77 deepin.go-dbus-generator: use ${placeholder ''out''} instead of $(out)
(cherry picked from commit b08aff1999)
2019-04-04 20:24:44 -04:00
José Romildo Malaquias
f84c69d850 deepin.deepin-sound-theme: use ${placeholder ''out''} instead of $(out)
(cherry picked from commit eb529d9e27)
2019-04-04 20:24:44 -04:00
José Romildo Malaquias
5e3aa2dfc6 deepin.deepin-gtk-theme: use ${placeholder ''out''} instead of $(out)
(cherry picked from commit 3611a3e890)
2019-04-04 20:24:44 -04:00
José Romildo Malaquias
2965e31e5f deepin.deepin-gettext-tools: use ${placeholder ''out''} instead of $(out)
(cherry picked from commit 484e6043f1)
2019-04-04 20:24:44 -04:00
José Romildo Malaquias
24ba9e1735 deepin.dbus-factory: use ${placeholder ''out''} instead of $(out)
(cherry picked from commit 7f396b799d)
2019-04-04 20:24:43 -04:00
José Romildo Malaquias
1c4e91b51d deepin.dde-qt-dbus-factory: 1.0.5 -> 1.1.1
(cherry picked from commit 9485d5ee56)
2019-04-04 20:24:43 -04:00
José Romildo Malaquias
370c51f409 deepin.dtkwidget: 2.0.9.15 -> 2.0.10
(cherry picked from commit 52b8a8591b)
2019-04-04 20:24:43 -04:00
José Romildo Malaquias
524cf2e1a8 deepin.go-gir-generator: 1.1.0 -> 2.0.0
(cherry picked from commit 0d065db91b)
2019-04-04 20:24:42 -04:00
José Romildo Malaquias
77b4a1cab9 deepin.deepin-metacity: 3.22.22 -> 3.22.24
(cherry picked from commit 091b13a8ca)
2019-04-04 20:24:42 -04:00
José Romildo Malaquias
eaa183f20d deepin.deepin-wallpapers: 1.7.5 -> 1.7.7
(cherry picked from commit c40f6d1b36)
2019-04-04 20:24:42 -04:00
José Romildo Malaquias
41b44a33b4 deepin.deepin-desktop-base: 2018.10.29 -> 2019.03.29
(cherry picked from commit 8b09ef4390)
2019-04-04 20:24:41 -04:00
José Romildo Malaquias
932a90fd4c deepin.deepin-wm: 1.9.34 -> 1.9.37
(cherry picked from commit 4846803904)
2019-04-04 20:24:41 -04:00
José Romildo Malaquias
e87f02a5a8 deepin.deepin-mutter: 3.20.35 -> 3.20.38
(cherry picked from commit 8c80fca3e7)
2019-04-04 20:24:41 -04:00
José Romildo Malaquias
30ee47c363 deepin.qt5integration: 0.3.6 -> 0.3.8
(cherry picked from commit 8e4a7e3c53)
2019-04-04 20:24:40 -04:00
José Romildo Malaquias
33dc7c7f39 deepin.qt5dxcb-plugin: 1.1.13 -> 1.1.25
(cherry picked from commit 4ac85ab261)
2019-04-04 20:24:40 -04:00
José Romildo Malaquias
6530d4f7aa deepin.go-lib: 1.3.0 -> 1.10.0
(cherry picked from commit 62b5734a1a)
2019-04-04 20:24:40 -04:00
José Romildo Malaquias
7c6f48f603 deepin.go-dbus-factory: 0.0.7.1 -> 0.4.0
(cherry picked from commit 9de5aa7091)
2019-04-04 20:24:40 -04:00
José Romildo Malaquias
9dfc5ede72 deepin.dtkcore: 2.0.9.8 -> 2.0.10
(cherry picked from commit 251254084c)
2019-04-04 20:24:39 -04:00
José Romildo Malaquias
90b0d51107 deepin.deepin-terminal: 3.0.10.2 -> 3.2.1.2
(cherry picked from commit 7853a9a6ac)
2019-04-04 20:24:39 -04:00
José Romildo Malaquias
02997940e2 deepin.deepin-movie-reborn: 3.2.14 -> 3.2.21
(cherry picked from commit 87c4c584ef)
2019-04-04 20:24:39 -04:00
José Romildo Malaquias
e41f449f71 deepin.deepin-image-viewer: 1.3.1 -> 1.3.10
(cherry picked from commit eb25703f7b)
2019-04-04 20:24:38 -04:00
José Romildo Malaquias
e476e0c83a deepin.deepin-icon-theme: 15.12.64 -> 15.12.68
(cherry picked from commit ad75a1f1f7)
2019-04-04 20:24:38 -04:00
José Romildo Malaquias
7e05b40cda deepin.deepin-desktop-schemas: 3.4.0 -> 3.13.0
(cherry picked from commit 0215ee0525)
2019-04-04 20:24:38 -04:00
José Romildo Malaquias
3f95e5ecc6 deepin.dde-daemon: 3.6.0 -> 3.24.1
(cherry picked from commit 8532ff49e1)
2019-04-04 20:24:33 -04:00
José Romildo Malaquias
df2e1f4308 deepin.dde-api: 3.5.0 -> 3.18.1
(cherry picked from commit 5c38dbd225)
2019-04-04 20:23:22 -04:00
José Romildo Malaquias
b1fa165515 deepin.dde-session-ui: 4.6.2 -> 4.9.0
(cherry picked from commit 4a00f98f27)
2019-04-04 20:23:22 -04:00
José Romildo Malaquias
3033f19f7e deepin: add setup hook with helper functions
(cherry picked from commit 0a971b5a04)
2019-04-04 19:52:56 -04:00
José Romildo Malaquias
a2b904f291 blur-effect: init at 1.1.3
(cherry picked from commit 56488c9257)
2019-04-04 19:52:09 -04:00
José Romildo Malaquias
956069fcf0 xcur2png: init at 0.7.1
(cherry picked from commit 4d5a4a64bf)
2019-04-04 19:51:54 -04:00
Carles Pagès
d97776b105 calligra: mark broken
Fails to start, kde home not found.

(cherry picked from commit 44346895b1)
2019-04-04 22:13:23 +02:00
Carles Pagès
435c3ce23e calligra: fix build
(cherry picked from commit 396dcdf89b)
2019-04-04 22:13:06 +02:00
Janne Heß
8569d30991 nixos/icingaweb2: Replace most options with toINI
(cherry picked from commit b0daedd371)

If people start relying on the many options added in
https://github.com/NixOS/nixpkgs/pull/55957 for 19.03, we wouldn't have any
chance to ever remove them.
2019-04-04 21:21:45 +02:00
Dmitry Kalinkin
a6ee6a53a2 applgrid: fix build for gcc
(cherry picked from commit cdab07b603)
2019-04-03 21:43:58 -04:00
Dmitry Kalinkin
3ba0f35a07 root5: fix build
(cherry picked from commit c36f841ec7)
2019-04-03 21:43:54 -04:00
worldofpeace
4fe8a27cfe gnome3.mutter328: use wrapGAppsHook
(cherry picked from commit 7fe664cab2)
2019-04-03 19:59:13 -04:00
worldofpeace
c089e05ea7 gnome3.mutter328: hardcode path to zenity
(cherry picked from commit c4df83279e)
2019-04-03 19:59:09 -04:00
worldofpeace
d28aedd77e gnome3.mutter328: use gnome-3-28 branch
Probably should get these patches in while
I'm stuck with this. Alternative would be to
fetch the patches individually.

pipewire was accidentally in buildInputs when it has
been disabled

Changes: https://gitlab.gnome.org/GNOME/mutter/compare/3.28.3...gnome-3-28
(cherry picked from commit 874856a228)
2019-04-03 19:59:06 -04:00
worldofpeace
52c2e78aed pantheon.wingpanel-indicator-datetime: launch elementary-calendar when in PATH
One less downstream patch :)

(cherry picked from commit b3e8b01bc9)
2019-04-03 19:53:54 -04:00
Tim Steinbach
db4bdf1fe4 linux: 5.0.5 -> 5.0.6
(cherry picked from commit 0bb32d2776)
2019-04-03 19:39:20 -04:00
Tim Steinbach
f3e91dbabe linux: 4.19.32 -> 4.19.33
(cherry picked from commit 4a91a6e05f)
2019-04-03 19:39:19 -04:00
Tim Steinbach
d1c89923e7 linux: 4.14.109 -> 4.14.110
(cherry picked from commit c0d537c780)
2019-04-03 19:39:19 -04:00
Tim Steinbach
eec4ec6efd linux: 4.9.166 -> 4.9.167
(cherry picked from commit e731feae7f)
2019-04-03 19:39:19 -04:00
Tim Steinbach
608461e398 linux: 4.4.177 -> 4.4.178
(cherry picked from commit 84fc0fb8d1)
2019-04-03 19:39:18 -04:00
worldofpeace
91fa6990b2 Merge pull request #58642 from worldofpeace/geary/fix-attach
[19.03] gnome3.geary: make geary-attach executable
2019-04-03 17:45:38 -04:00
Robert Schütz
e18a58228b python.pkgs.cufflinks: 0.14.6 -> 0.15
(cherry picked from commit ed57afc79d)
2019-04-03 16:17:48 +02:00
Robert Schütz
f5d2da54d3 conan: pin pluginbase to 0.7
Upstream requires
    pluginbase>=0.5, < 1.0

(cherry picked from commit 244fcfc85c)
2019-04-03 16:17:00 +02:00
Robert Schütz
c46fdacb93 python.pkgs.devpi-common: update checkInputs
(cherry picked from commit e27ed0f6a2)
2019-04-03 15:01:48 +02:00
Christopher Chin
de216e66fc pytest-rerunfailures: 6.0 -> 7.0 (#58710)
(cherry picked from commit 6fa01d5be0)
2019-04-02 23:41:44 +02:00
Pavol Rusnak
3400e322e3 trezord: 2.0.25 -> 2.0.26 (#57698) (#58755)
(cherry picked from commit 79bc844161)
2019-04-02 23:11:04 +02:00
Tristan Helmich
65334cd7e3 graylog: 3.0.0 -> 3.0.1 (#58811)
(cherry picked from commit 41b60eb2ad)
2019-04-02 23:09:31 +02:00
Michael Raskin
4fff94f4b3 Merge #57010: Luarocks update
(cherry picked from commit bd616c0cd3)
This fixes the build of luarocks-nix.

I checked that torchPackages.torch was broken even before
this batch of luarocks changes.
2019-04-02 19:06:36 +02:00
Michael Raskin
689b4269c3 luarocks: fix meta after refactoring, thanks to peti
(cherry picked from commit 3aae18f7dd)
2019-04-02 19:02:31 +02:00
Michael Raskin
3a15817e4d luarocks: switch to a less intrusive update-walker metadata style
(cherry picked from commit 73a82dcc44)
2019-04-02 19:00:44 +02:00
Vincent Demeester
549b6061ef minishift: 1.32.0 -> 1.33.0
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 63154c89e3)
2019-04-02 13:02:16 +02:00
Vincent Demeester
5d4e82b495 minishift: 1.31.0 -> 1.32.0
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 92d32e21d2)
2019-04-02 13:02:16 +02:00
Vincent Demeester
bf2293be5f minikube: 0.35.0 -> 1.0.0 (#58475)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit fd3fdc31b4)
2019-04-02 13:02:15 +02:00
Vincent Demeester
4151cc034e minikube: 0.30.0 -> 0.35.0 (#56879)
* minikube: 0.30.0 -> 0.34.1

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

* minikube: 0.34.1 -> 0.35.0

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 1f037a90f1)
2019-04-02 13:02:15 +02:00
R. RyanTM
89269d4d76 airsonic: 10.1.2 -> 10.2.1 (#57702)
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/airsonic/versions

(cherry picked from commit b6c40f16da)
2019-04-02 13:02:14 +02:00
Jaakko Luttinen
2878299ab8 josm: fix support for kendzi3d plugin
(cherry picked from commit 005fb92d32)
2019-04-02 13:02:14 +02:00
R. RyanTM
16956c6c95 clamav: 0.101.1 -> 0.101.2 (#58653)
(cherry picked from commit 5285e70749)
2019-04-02 13:02:14 +02:00
WilliButz
1c8541bbcf grafana: 6.0.1 -> 6.0.2
(cherry picked from commit 963ee49032)
2019-04-02 13:02:13 +02:00
Maximilian Bosch
2f980e4598 nixos/wireguard: add test
After working on the last wireguard bump (#57534), we figured that it's
probably a good idea to have a basic test which confirms that a simple
VPN with wireguard still works.

This test starts two peers with a `wg0` network interface and adds a v4
and a v6 route that goes through `wg0`.

(cherry picked from commit 0c4e9e397e)
2019-04-02 13:02:13 +02:00
Franz Pletz
4a2a8650ee batman-adv: 2019.0 -> 2019.1
(cherry picked from commit 6fe8153609)
2019-04-02 13:02:13 +02:00
Franz Pletz
7efe540e6a nuspell: 2.1.0 -> 2.2.0
(cherry picked from commit 7c0e94c5d0)
2019-04-02 13:02:12 +02:00
Franz Pletz
f091239d60 sslscan: 1.11.12 -> 1.11.13
(cherry picked from commit 2792a26553)
2019-04-02 13:02:12 +02:00
Franz Pletz
10b394132e nginxMainline: 1.15.9 -> 1.15.10
(cherry picked from commit 4c0d1ae7be)
2019-04-02 13:02:11 +02:00
Franz Pletz
10888e3738 minetest: 5.0.0 -> 5.0.1
(cherry picked from commit 9fc62e5571)
2019-04-02 13:02:11 +02:00
Franz Pletz
a2d72af526 flashrom: 1.0 -> 1.0.1
(cherry picked from commit a28dc2cd7c)
2019-04-02 13:02:11 +02:00
Franz Pletz
0b4c987db7 openttd: 1.8.0 -> 1.9.0
(cherry picked from commit 0eb9f812bd)
2019-04-02 13:02:10 +02:00
Michael Weiss
247ba3e8a2 Merge pull request #58767 from primeos/security-backports-for-19.03
[19.03] Security backports for html-proofer and gollum
2019-04-02 12:52:17 +02:00
Michael Weiss
74f1257af7 gollum: Update the dependencies (security)
See #58709.

(cherry picked from commit a92c7bb0cc)
2019-04-02 12:12:50 +02:00
Michael Weiss
6d9508e991 html-proofer: 3.8.0 -> 3.10.2 (security)
See #58709.

(cherry picked from commit 20b9e18891)
2019-04-02 12:12:50 +02:00
Philipp Volguine
bd427137cb pythonPackages.pyramid_beaker: fix building
- checkInputs rather than buildInputs
- it was complaining that py.test was not a valid command

(cherry picked from commit 7819cc0cb9)
2019-04-02 10:36:07 +02:00
Philipp Volguine
4c991a74ce pythonPackages.beaker: 1.8.0 -> 1.10.1
- The aim was to get this building on hydra
- Midway I discovered a PR by Mic92 that bumps the version to 1.10.0,
  I have included some of his fixes to run tests correctly:
    - remove testing memcached (it tries to connect on import)
    - don't run external tests or a failing test on darwin
            (see https://github.com/bbangert/beaker/issues/166)
    - run nosetests rather than setup.py test because we need to specify
    exclude options.

(cherry picked from commit d94b113859)
2019-04-02 10:35:59 +02:00
Robert Schütz
44e3ee1015 dovecot_pigeonhole: 0.5.4 -> 0.5.5 (#58511)
This is the appropriate version for dovecot 2.3.5 according to
https://dovecot.org/pipermail/dovecot-news/2019-March/000400.html

(cherry picked from commit 640416bf71)
2019-04-02 10:26:44 +02:00
Peter Simons
112e91ca37 apache-httpd: 2.4.38 -> 2.4.39 (CVE-2019-0211)
In Apache HTTP Server 2.4 releases 2.4.17 to 2.4.38, with MPM event, worker or
prefork, code executing in less-privileged child processes or
threads (including scripts executed by an in-process scripting interpreter)
could execute arbitrary code with the privileges of the parent process (usually
root) by manipulating the scoreboard.

(cherry picked from commit 2017158b53)
2019-04-02 09:48:47 +02:00
Vladimír Čunát
ef28995795 Merge branch 'staging-19.03' into release-19.03 2019-04-02 09:22:38 +02:00
Franz Pletz
d4c1d6bb93 riot-web: 1.0.5 -> 1.0.6
(cherry picked from commit d44138b140)
2019-04-01 23:20:51 +02:00
Paul TREHIOU
1f226148eb riot-web: 1.0.3 -> 1.0.5 (#58040)
(cherry picked from commit 62fd641e83)
2019-04-01 23:20:47 +02:00
Paul TREHIOU
3fddd9d6f2 riot-web: 1.0.1 -> 1.0.3 (#57586)
(cherry picked from commit 2d6c19efd6)
2019-04-01 23:20:42 +02:00
pacien
cce652cf82 matrix-synapse: 0.99.1.1 -> 0.99.2
(cherry picked from commit 9620a0cf9d)
2019-04-01 23:19:43 +02:00
Franz Pletz
06521178d6 xmrig-proxy: 2.11.0 -> 2.14.0
(cherry picked from commit 40be34b3f9)
2019-04-01 23:19:42 +02:00
Franz Pletz
5352b958ff xmrig: 2.13.1 -> 2.14.1
(cherry picked from commit 6f6cb6a925)
2019-04-01 23:19:42 +02:00
Robert Schütz
3d41e81c99 postfix: 3.4.4 -> 3.4.5 (#58679)
http://www.postfix.org/announcements/postfix-3.4.5.html
(cherry picked from commit 7dd24531e4)
2019-04-01 22:53:22 +02:00
Will Dietz
d5c7b7d3f4 youtube-dl: 2019.03.18 -> 2019.04.01
(cherry picked from commit 5ed1d8ea03)
2019-04-01 22:14:17 +02:00
Silvan Mosberger
7e889fe8c8 nixos/browserpass: update for v3
See https://github.com/browserpass/browserpass-native/issues/31

Additionally browserpass was removed from systemPackages, because it
doesn't need to be installed, browsers will get the path to the binary
from the native messaging host JSON.

(cherry picked from commit e98ee8d70c)
2019-04-01 17:34:19 +02:00
Silvan Mosberger
fcb8738dc0 browserpass: 2.0.22 -> 3.0.1
See https://github.com/browserpass/browserpass-native/issues/31

This is fully backwards compatible.

(cherry picked from commit 6104fba188)
2019-04-01 17:33:52 +02:00
Silvan Mosberger
a6b854162c pythonPackages.thinc: Fix build
(cherry picked from commit e7f3da287f)
2019-04-01 05:45:54 +02:00
worldofpeace
a38201f3e2 gnome3.geary: make geary-attach executable 2019-03-31 20:13:11 -04:00
Florian Franzen
de621d4939 grub: Support 32bit EFI on 64bit x86 platforms
(cherry picked from commit e51a840259)
2019-03-31 20:09:00 -04:00
Will Dietz
940bb927e3 gnome3.geary: 0.13.1 -> 0.13.2
(cherry picked from commit deb8936aba)
2019-03-31 20:06:09 -04:00
Vladimír Čunát
f10bc3c630 notary: disable tests (for now)
I don't really know anything about the package;
I just noticed the regression on hydra.nixos.org.

(cherry picked from commit ba18b47c2a)
2019-03-31 18:06:02 +02:00
Silvan Mosberger
a05b0cf8b4 pythonPackages.jupyterhub: Fix running locally
(cherry picked from commit 0b31827e5e)
2019-03-31 17:36:00 +02:00
worldofpeace
986561f31c typora: 0.9.64 -> 0.9.68
Make the wrapping happen in postFixup
or else the wrapper is incomplete.
That was noted in #56533

Closes https://github.com/NixOS/nixpkgs/pull/56533

(cherry picked from commit f54b4963cf)
Fixes crash on in certain places due to an incomplete wrapper.
2019-03-30 22:40:10 -04:00
Samuel Dionne-Riel
7e39a961fd Merge pull request #58599 from worldofpeace/nixos-stateversion-drop-19.03
[19.03] nixos/rename: drop system.nixos.{stateVersion, defaultChannel}
2019-03-30 20:31:48 -04:00
worldofpeace
8764be9654 nixos/rename: drop system.nixos.{stateVersion, defaultChannel}
Comment said to remove these before 18.09 was released :(
2019-03-30 20:14:24 -04:00
Samuel Dionne-Riel
d6994e4b97 Merge pull request #58591 from samueldr/zhf/file-slurp
ZHF 19.03: backports FileSlurp update
2019-03-30 17:36:20 -04:00
Victor SENE
2831fd071c mautrix-whatsapp: 2019-02-20 -> 2019-02-24
(cherry picked from commit 43c1fced23)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-03-30 20:21:43 +01:00
Victor SENE
d685800732 mautrix-whatsapp: 2019-02-11 -> 2019-02-20
(cherry picked from commit dc6ed78a42)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-03-30 20:21:42 +01:00
Samuel Dionne-Riel
5894c3c784 perlPackages.FileSlurp: remove obsolete patch
FileSlurp no longer uses syswrite

cc @srhb as initial author:

 * ce019a511b
2019-03-30 15:10:45 -04:00
volth
0afebda8f5 [cpan2nix] perlPackages.FileSlurp: 9999.25 -> 9999.26
(cherry picked from commit bba2eb9993)
2019-03-30 15:10:45 -04:00
Robert Schütz
3b61951b67 postfix: 3.4.3 -> 3.4.4
http://www.postfix.org/announcements/postfix-3.4.4.html
(cherry picked from commit 2cfe129d65)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-03-30 19:59:35 +01:00
Maximilian Bosch
f32f452cdb pythonPackages.face_recognition: 1.2.2 -> 1.2.3
There's no git tag for 1.2.3, hence we need to pin to the corresponding
revision because we build from a git source.

After recent breakage on Hydra[1], the tests were disabled. Although
some build machines don't support AVX, we shouldn't use a DLib without
AVX as the builder's result is also used on modern machines with AVX
support. Before merging changes, maintainers should run the check phase
locally in a `nix-shell`.

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

(cherry picked from commit 6fec5aac83)
2019-03-30 19:22:34 +01:00
Maximilian Bosch
6f55b0461f dlib: add flag to disable AVX support
Especially older hardware doesn't support AVX instructions. DLib is
still functional there, but significantly slower[1].

By setting `avxInstructions` to false, DLib will be compiled without
this feature.

[1] http://dlib.net/compile.html

(cherry picked from commit 9732c44225)
2019-03-30 19:22:34 +01:00
worldofpeace
a4ae8ceec3 peek: build with vala_0_40
Fixes https://github.com/NixOS/nixpkgs/issues/58433

(cherry picked from commit b556663201)
2019-03-30 14:11:33 -04:00
Robert Schütz
0e906e20b3 mopidy-iris: 3.32.5 -> 3.33.0
The removed dependencies were dropped in the following commits:
0c134459ea
4d64980900
c9861bc79c

Requests was added in:
28b5f69333

(cherry picked from commit 11f0d36737)
Fixed build.

ZHF: https://github.com/NixOS/nixpkgs/issues/56826
2019-03-30 11:35:09 -04:00
Robert Schütz
1487745528 python.pkgs.pylast: no longer supports python2
(cherry picked from commit a376d3ee09)
2019-03-30 11:35:09 -04:00
Sarah Brofeldt
8c07f53108 Merge pull request #58578 from etu/backport-update-gitea
[19.03] gitea: 1.7.1 -> 1.7.5
2019-03-30 14:11:34 +01:00
Elis Hirwing
ff9c6cb100 gitea: 1.7.3 -> 1.7.5
Changelogs:
https://github.com/go-gitea/gitea/releases/tag/v1.7.5
https://github.com/go-gitea/gitea/releases/tag/v1.7.4
(cherry picked from commit c94d027510)
2019-03-30 12:02:38 +01:00
Milan Pässler
602c2b40e7 gitea: 1.7.1 -> 1.7.3
(cherry picked from commit 1246a736b1)
2019-03-30 12:02:31 +01:00
Florian Klink
2c8f31490f Merge pull request #58532 from andir/19.03/firefox
[19.03] firefox: 66.0.1 -> 66.0.2, firefox-bin: 66.0.1 -. 66.0.2
2019-03-29 23:57:38 +01:00
Ben Gamari
2f2cb4e276 nixos/gitlab: Install and fixup vendorised gitlab-shell
gitaly now ships its own vendorised version of gitlab-shell. Previously
we failed to install this, resulting in
https://gitlab.com/gitlab-org/gitlab-ce/issues/59403.

(cherry picked from commit 50a4de7326)
2019-03-29 23:41:57 +01:00
worldofpeace
1bcd04f9ad pantheon.switchboard-plug-sound: 2.1.3 -> 2.2.0
Has a major overhaul of output devices logic [0]

https://github.com/elementary/switchboard-plug-sound/releases/tag/2.2.0

[0]: ebf0ad5991

(cherry picked from commit b1cc594ca8)
2019-03-29 15:50:01 -04:00
worldofpeace
aca388db59 pantheon.switchboard-plug-pantheon-shell: 2.8.0 -> 2.8.1
Just Translatiions

https://github.com/elementary/switchboard-plug-pantheon-shell/releases/tag/2.8.1
(cherry picked from commit a03e0b0060)
2019-03-29 15:49:57 -04:00
worldofpeace
5dca27d54b pantheon.elementary-terminal: 5.3.3 -> 5.3.4
https://github.com/elementary/terminal/releases/tag/5.3.4
(cherry picked from commit 5819ea1aba)
2019-03-29 15:49:53 -04:00
worldofpeace
d1cba85e36 pantheon.elementary-files: 4.1.5 -> 4.1.6
Notably color tags for folders are actually remembered

https://github.com/elementary/files/releases/tag/4.1.6
(cherry picked from commit d1f971e655)
2019-03-29 15:49:50 -04:00
worldofpeace
68c381d553 pantheon.elementary-camera: 1.0.3 -> 1.0.4
Just Translations

https://github.com/elementary/camera/releases/tag/1.0.4
(cherry picked from commit 6534530b31)
2019-03-29 15:49:43 -04:00
Markus Kowalewski
d3634b0fac libgpuarray: fix build
move cmake into nativeBuildInputs

(cherry picked from commit ad1e7b09c0)
2019-03-29 16:37:51 +01:00
Markus Kowalewski
5141dca11d clblas: turn of gtest, fix build
clblas does not work anymore with gmock 1.8.1.
Turning off the test suite fixes the build.

(cherry picked from commit 4c74ee948e)
2019-03-29 16:37:46 +01:00
Florian Klink
d11c540027 Merge pull request #58539 from herrwiese/nc-backport-ocm-fix
nixos/nextcloud: Cherry-pick nginx recommendations to 19.03
2019-03-29 14:50:40 +01:00
Pascal Bach
df8fa2c415 nixos/nextcloud: fix escapings and ocm-provider
(cherry picked from commit 415b927653)
2019-03-29 14:49:10 +01:00
Domen Kožar
72ad1ebda9 cachix: use separate bin output to prove it's useful
Spares compilation time by not compiling the package twice.

(cherry picked from commit b06201bf6f)
Signed-off-by: Domen Kožar <domen@dev.si>
2019-03-29 19:19:57 +07:00
Domen Kožar
b19ae16be6 haskell: allow separate bin output, disable by default
(cherry picked from commit bd06834d5e)
Signed-off-by: Domen Kožar <domen@dev.si>
2019-03-29 19:19:13 +07:00
R. RyanTM
3a4ffdd38b gphoto2: 2.5.17 -> 2.5.20
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/gphoto2/versions

(cherry picked from commit c727b69ad6)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-03-29 11:26:38 +01:00
Andreas Rammhold
a2a91b5fb4 firefox-bin: 66.0.1 -> 66.0.2
(cherry picked from commit 6977980927)
2019-03-29 10:44:16 +01:00
Andreas Rammhold
efdf34898e firefox: 66.0.1 -> 66.0.2
(cherry picked from commit c8186ad7b3)
2019-03-29 10:42:13 +01:00
Robert Schütz
a0bf1c530f Merge pull request #58499 from mweinelt/virtualenv/py_version_backport
[19.03] virtualenv: Update patch for 16.2.0
2019-03-29 07:40:09 +01:00
aszlig
2b886865cf Merge pull request #57519 (systemd-confinement)
Currently if you want to properly chroot a systemd service, you could do
it using BindReadOnlyPaths=/nix/store or use a separate derivation which
gathers the runtime closure of the service you want to chroot. The
former is the easier method and there is also a method directly offered
by systemd, called ProtectSystem, which still leaves the whole store
accessible. The latter however is a bit more involved, because you need
to bind-mount each store path of the runtime closure of the service you
want to chroot.

This can be achieved using pkgs.closureInfo and a small derivation that
packs everything into a systemd unit, which later can be added to
systemd.packages.

However, this process is a bit tedious, so the changes here implement
this in a more generic way.

Now if you want to chroot a systemd service, all you need to do is:

  {
    systemd.services.myservice = {
      description = "My Shiny Service";
      wantedBy = [ "multi-user.target" ];

      confinement.enable = true;
      serviceConfig.ExecStart = "${pkgs.myservice}/bin/myservice";
    };
  }

If more than the dependencies for the ExecStart* and ExecStop* (which
btw. also includes script and {pre,post}Start) need to be in the chroot,
it can be specified using the confinement.packages option. By default
(which uses the full-apivfs confinement mode), a user namespace is set
up as well and /proc, /sys and /dev are mounted appropriately.

In addition - and by default - a /bin/sh executable is provided, which
is useful for most programs that use the system() C library call to
execute commands via shell.

Unfortunately, there are a few limitations at the moment. The first
being that DynamicUser doesn't work in conjunction with tmpfs, because
systemd seems to ignore the TemporaryFileSystem option if DynamicUser is
enabled. I started implementing a workaround to do this, but I decided
to not include it as part of this pull request, because it needs a lot
more testing to ensure it's consistent with the behaviour without
DynamicUser.

The second limitation/issue is that RootDirectoryStartOnly doesn't work
right now, because it only affects the RootDirectory option and doesn't
include/exclude the individual bind mounts or the tmpfs.

A quirk we do have right now is that systemd tries to create a /usr
directory within the chroot, which subsequently fails. Fortunately, this
is just an ugly error and not a hard failure.

The changes also come with a changelog entry for NixOS 19.03, which is
why I asked for a vote of the NixOS 19.03 stable maintainers whether to
include it (I admit it's a bit late a few days before official release,
sorry for that):

  @samueldr:

    Via pull request comment[1]:

      +1 for backporting as this only enhances the feature set of nixos,
      and does not (at a glance) change existing behaviours.

    Via IRC:

      new feature: -1, tests +1, we're at zero, self-contained, with no
      global effects without actively using it, +1, I think it's good

  @lheckemann:

    Via pull request comment[2]:

      I'm neutral on backporting. On the one hand, as @samueldr says,
      this doesn't change any existing functionality. On the other hand,
      it's a new feature and we're well past the feature freeze, which
      AFAIU is intended so that new, potentially buggy features aren't
      introduced in the "stabilisation period". It is a cool feature
      though? :)

A few other people on IRC didn't have opposition either against late
inclusion into NixOS 19.03:

  @edolstra:  "I'm not against it"
  @Infinisil: "+1 from me as well"
  @grahamc:   "IMO its up to the RMs"

So that makes +1 from @samueldr, 0 from @lheckemann, 0 from @edolstra
and +1 from @Infinisil (even though he's not a release manager) and no
opposition from anyone, which is the reason why I'm merging this right
now.

I also would like to thank @Infinisil, @edolstra and @danbst for their
reviews.

[1]: https://github.com/NixOS/nixpkgs/pull/57519#issuecomment-477322127
[2]: https://github.com/NixOS/nixpkgs/pull/57519#issuecomment-477548395

(cherry picked from commit dcf40f7c24)
2019-03-29 05:08:58 +01:00
Ben Gamari
34aeed1ca0 nixos/gitlab: Package gitlab-rails
This utility (particularly `gitlab-rails console`) is packaged by GitLab
Omnibus and is used for diagnostics and maintenance operations.

(cherry picked from commit af909b3238)
2019-03-28 23:56:18 +01:00
Florian Klink
281cb56a48 Merge pull request #58356 from andir/19.03/ghostscript-CVE-2019-6116
[19.03] ghostscript: add patch for CVE-2019-6116
2019-03-28 23:31:28 +01:00
Will Dietz
730d746021 microcodeIntel: 20180807a -> 20190312 (from intel github)
https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/blob/microcode-20190312/releasenote#L85
(cherry picked from commit ba31c45cbb)
2019-03-28 23:05:42 +01:00
Florian Klink
ed8b959e17 matomo: 3.9.0 -> 3.9.1
(cherry picked from commit 26f19430eb)
2019-03-28 22:55:39 +01:00
Florian Klink
50b6ab59b6 matomo: update url
(cherry picked from commit 4ffd3ad4fd)
2019-03-28 22:55:38 +01:00
R. RyanTM
467b2c37c4 matomo: 3.8.1 -> 3.9.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/matomo/versions

(cherry picked from commit 139243406b)
2019-03-28 22:55:38 +01:00
Tom Fitzhenry
970b97ffdf syslinux: change serial bit rate to 115200
Prior to this commit an installation over serial via syslinux would
involve:
1. setting bitrate to BIOS's bitrate (typically 115200)
2. setting bitrate to syslinux's bitrate (38400)
3. setting bitrate to stty's bitrate (115200)

By changing syslinux's bitrate to 115200, an installation over serial
is a smoother experience, and consistent with the GRUB2 installation
which is also 115200 bps.

    [root@nixos:~]# stty
    speed 115200 baud; line = 0;
    -brkint ixoff iutf8
    -iexten

In a future commit I will add default serial terminals to the syslinux
kernel lines.

(cherry picked from commit 0d67c6a52b)
2019-03-28 17:53:39 -04:00
Averell Dalton
9ebce7f023 jetbrains-jdk: 152b1248.6 -> 202b1483.37
(cherry picked from commit 6c011a0f2f)
2019-03-28 22:23:25 +01:00
Averell Dalton
49f2712e48 jetbrains.webstorm: 2018.3.4 -> 2019.1
(cherry picked from commit 9bba3e7835)
2019-03-28 22:23:25 +01:00
Averell Dalton
e93b5687b1 jetbrains.pycharm-professional: 2018.3.4 -> 2019.1
(cherry picked from commit 973117496a)
2019-03-28 22:23:25 +01:00
Averell Dalton
e8092494fd jetbrains.pycharm-community: 2018.3.4 -> 2019.1
(cherry picked from commit 70c57c24c4)
2019-03-28 22:23:25 +01:00
Averell Dalton
107af48a5b jetbrains.ruby-mine: 2018.3.3 -> 2018.3.5
(cherry picked from commit a2f6e40cc4)
2019-03-28 22:23:25 +01:00
Averell Dalton
e7ec56b2ed jetbrains.rider: 2018.3.2 -> 2018.3.4
(cherry picked from commit 68a33fce4c)
2019-03-28 22:23:24 +01:00
Averell Dalton
d1f4e6ef25 jetbrains.phpstorm: 2018.3.3 -> 2019.1
(cherry picked from commit 2a328c840f)
2019-03-28 22:23:24 +01:00
Averell Dalton
9a66b56a3e jetbrains.idea-ultimate: 2018.3.4 -> 2019.1
(cherry picked from commit 4933eae0d5)
2019-03-28 22:23:24 +01:00
Averell Dalton
4b4b59585c jetbrains.idea-community: 2018.3.4 -> 2019.1
(cherry picked from commit 7cb759636f)
2019-03-28 22:23:24 +01:00
Averell Dalton
d5b1fb99bb jetbrains.clion: 2018.3.4 -> 2019.1
(cherry picked from commit ead0e93553)
2019-03-28 22:23:24 +01:00
Averell Dalton
686016b5e4 jetbrains.goland: 2018.3.3 -> 2019.1
(cherry picked from commit 862b211788)
2019-03-28 22:23:24 +01:00
Averell Dalton
dd9a78c4ae jetbrains.datagrip: 2018.3.2 -> 2018.3.4
(cherry picked from commit 43d0137dc8)
2019-03-28 22:23:23 +01:00
Robert Schütz
ba0849a1f2 dovecot: 2.3.4.1 -> 2.3.5.1
https://dovecot.org/list/dovecot-news/2019-March/000401.html
fixes CVE-2019-7524

(cherry picked from commit d3ca36bd64)

Fixed a trivial merge conflict because some intermediate version bumps were
missing.
2019-03-28 21:27:51 +01:00
Ethan Glasser-Camp
0bf6a85d36 virtualenv: Update patch for 16.2.0 (#57533)
(Cherry-picked from 2556b7bfad)
2019-03-28 18:57:27 +01:00
Uli Baum
26c8ce0bf8 qtikz: fix build
qcollectiongenerator was merged into qhelpgenerator in qt 5.12,
see https://blog.qt.io/blog/2018/11/02/whats-new-qt-help/

(cherry picked from commit 0b8d40a754)
2019-03-28 18:40:38 +01:00
worldofpeace
ca720b3b2b Merge pull request #58468 from worldofpeace/backport/kde-apps-18.12.3
[19.03] kde-applications: 18.12.1 -> 18.12.3
2019-03-28 13:32:53 -04:00
Ben Gamari
e6cba7be3c nixos/gitaly: Run gitaly with procps in scope
Gitaly uses `ps` to track the RSS of `gitlab-ruby` and kills it when it
detects excessive memory leakage. See
https://gitlab.com/gitlab-org/gitaly/issues/1562.

(cherry picked from commit b90f5f03c2)
2019-03-28 18:23:03 +01:00
Johan Thomsen
580f1e44ba kubernetes: 1.13.4 -> 1.13.5
Backport of #58477
(cherry picked from commit e76f30e5a2)
2019-03-28 15:31:34 +01:00
Vladimír Čunát
3751739e48 Merge branch 'release-19.03' into staging-19.03 2019-03-28 15:14:35 +01:00
Florian Klink
8ae24edf5b nixos/ldap: set proper User= and Group= for nslcd service
eb90d97009 broke nslcd, as /run/nslcd was
created/chowned as root user, while nslcd wants to do parts as nslcd
user.

This commit changes the nslcd to run with the proper uid/gid from the
start (through User= and Group=), so the RuntimeDirectory has proper
permissions, too.

In some cases, secrets are baked into nslcd's config file during startup
(so we don't want to provide it from the store).

This config file is normally hard-wired to /etc/nslcd.conf, but we don't
want to use PermissionsStartOnly anymore (#56265), and activation
scripts are ugly, so redirect /etc/nslcd.conf to /run/nslcd/nslcd.conf,
which now gets provisioned inside ExecStartPre=.

This change requires the files referenced to in
users.ldap.bind.passwordFile and users.ldap.daemon.rootpwmodpwFile to be
readable by the nslcd user (in the non-nslcd case, this was already the
case for users.ldap.bind.passwordFile)

fixes #57783

(cherry picked from commit 8817bbefdb)
2019-03-28 14:35:02 +01:00
Florian Klink
9eafdb4e14 nixos/ldap: rename password file options properly
users.ldap.daemon.rootpwmodpw -> users.ldap.daemon.rootpwmodpwFile
users.ldap.bind.password -> users.ldap.bind.passwordFile

as users.ldap.daemon.rootpwmodpw never was part of a release, no
mkRenamedOptionModule is introduced.

(cherry picked from commit 0a1451afe3)
2019-03-28 14:35:02 +01:00
Uli Baum
8706f441e4 tahoe-lafs: fix build
(cherry picked from commit ea5f0983e7)
2019-03-28 13:51:07 +01:00
Uli Baum
f7ef8ac958 python2Packages.nevow: fix build
(cherry picked from commit 128e6c560e)
2019-03-28 13:51:07 +01:00
Will Dietz
2755e61247 gnutls: 3.6.6 -> 3.6.7, security!
https://lists.gnupg.org/pipermail/gnutls-help/2019-March/004497.html
Close #58437.

(cherry picked from commit 225b164cc3)
2019-03-28 12:49:34 +01:00
Pascal Wittmann
a05357f944 Merge pull request #58463 from rnhmjoj/monero-19.03
[19.03] monero: 0.13 -> 0.14
2019-03-28 08:20:36 +01:00
nyanloutre
69fa9cb938 kde-applications: 18.12.1 -> 18.12.3
(cherry picked from commit b16b1b377b)
2019-03-27 22:25:27 -04:00
nyanloutre
657f41dc8a fetch-kde-qt.sh: get hashes from metadata
(cherry picked from commit 4b7d9dc868)
2019-03-27 22:25:18 -04:00
rnhmjoj
ebe9fc23aa monero-gui: fix missing qml imports
(cherry picked from commit bbefa951e7)
2019-03-28 01:35:46 +01:00
David Meister
d568a72aa6 monero-gui: 0.13.0.4 -> 0.14.0.0
(cherry picked from commit b1d040b39b)
2019-03-28 01:35:28 +01:00
David Meister
9c2efe9202 monero: 0.13.0.4 -> 0.14.0.2
(cherry picked from commit a0a1dc0a55)
2019-03-28 01:34:49 +01:00
Graham Christensen
0000bf730b Merge pull request #58431 from alexbiehl/alex/nix-layers
dockerTools: align generated layer archives with docker's output
(cherry picked from commit 6af317616e)
2019-03-27 18:19:18 -04:00
Dmitry Kalinkin
ecca42f0a2 qt59.qtwebengine: fix on darwin
This ports a patch that is already used in 5.11. Also one of the
substituteInPlace call fails because a file doesn't exist.

(cherry picked from commit 0624deb5df)
2019-03-27 13:29:56 -04:00
Dmitry Kalinkin
abbe01b484 qt5.qtwebengine: refactor more things to use patches instead of substituteInPlace
qt59.qtwebengine doesn't need those fixes (probably since the recent
minor version bump)

(cherry picked from commit ccd1bf610d)
2019-03-27 13:29:55 -04:00
Dmitry Kalinkin
d3fecd124d qt5.qtwebengine: disable platform check using patches
The previous code using substituteInPlace was broken for both 5.9 and
5.11 (latter was broken after a minor release bump). Using patches
should make things fail loudly and prevent modules/qtwebengine.nix from
being littered with version checks.

The patch for 5.12 is only tested to apply.

(cherry picked from commit 1809832958)
2019-03-27 13:29:51 -04:00
Tim Steinbach
e62e880d6b linux: 5.0.4 -> 5.0.5
(cherry picked from commit 95f568b9bd)
2019-03-27 10:15:11 -04:00
Tim Steinbach
a756243a20 linux: 4.19.31 -> 4.19.32
(cherry picked from commit ec83ff060e)
2019-03-27 10:15:10 -04:00
Tim Steinbach
5b78c5d83e linux: 4.14.108 -> 4.14.109
(cherry picked from commit e3bee73c18)
2019-03-27 10:15:10 -04:00
Tim Steinbach
39d0e3201c linux: 4.9.165 -> 4.9.166
(cherry picked from commit ebd253309e)
2019-03-27 10:15:09 -04:00
Florian Klink
322ff2f526 Merge pull request #57929 from rnhmjoj/ifnames-fix-back
[backport] nixos/tests/predictable-interfaces: fix failure on aarch64
2019-03-27 09:46:00 +01:00
Florian Klink
0ec70bc5d8 Merge pull request #58348 from andir/19.03/tzdata
[19.03] tzdata: 2018g -> 2019a
2019-03-27 09:30:37 +01:00
Andreas Rammhold
ff18b89a91 tzdata: 2018g -> 2019a
(cherry picked from commit 32538ff51f15c2a416949a6f75ef41a505d530f8)
2019-03-27 09:11:03 +01:00
Tom F
0000a86d7c adoptopenjdk: Remove libfreetype.so from adoptopenjdk's derivation. (#58412)
This caused some reverse dependencies of adoptopenjdk to depend on
adoptopenjdk's libfreetype, rather than the NixOS
libfreetype. For example: https://github.com/NixOS/nixpkgs/issues/57733

Now the derivation does not contain libfreetype.so . The JRE links to
nixpkg's freetype:

$ ldd /nix/store/9iyxm1nkn35xhjgri041r980z4p5ls5g-adoptopenjdk-hotspot-bin-11.0.2/lib/libfontmanager.so | grep -i freetype
	libfreetype.so => /nix/store/ycbkq39cngzx19j829qzgdnw3mx3z78g-freetype-2.9.1/lib/libfreetype.so (0x0000795e30702000)

(cherry picked from commit 6bae07337e)
2019-03-26 23:03:18 -04:00
Silvan Mosberger
9f9465230f Merge pull request #58385 from booxter/release-19.03-turses-fix
turses: fix crash when starting with existing config file
2019-03-27 03:38:17 +01:00
ajs124
42fece18ce performous: fix build by using boost 166 (#58418)
(cherry picked from commit 910c1d05b7)
2019-03-26 21:59:51 -04:00
Dmitry Kalinkin
8de4148e61 pyarrow: remove tests that can break on darwin
(cherry picked from commit 2645454bc7)
2019-03-26 21:16:08 -04:00
Dmitry Kalinkin
afd5e8c097 pythonPackages.pyarrow: enable parallel build
(cherry picked from commit 55223a8a6a)
2019-03-26 21:16:07 -04:00
Dmitry Kalinkin
62b686a3ee pythonPackages.pyarrow: fix build
Setting setupPyBuildFlags makes builder add an additional target
"build_ext" to setup.py arguments in addition to "bdisst_wheel".
pyarrow's setup.py recently started to try to redo build_ext again which
broke the build.

(cherry picked from commit 49e9194b24)
2019-03-26 21:16:02 -04:00
Alex Guzman
02cd553092 nixos/security: make duo support secure failure correctly
seems that this got broken when the config option was made to use enums. "secure" got replaced with "enum", which isn't a valid option for the failure mode.

(cherry picked from commit 0c34b9fcf8)
2019-03-27 01:59:09 +01:00
Florian Klink
08abce5ee3 Merge pull request #58408 from andir/19.03/avahi
avahi: apply patches for CVE-2017-6519 & CVE-2018-1000845
2019-03-27 00:03:29 +01:00
Florian Klink
7f8da4dc63 Merge pull request #58413 from flokli/19.03-gitlab-11.9.1
[19.03] gitlab 11.7.5 -> 11.9.1, backport of more fixes and test improvements
2019-03-27 00:00:37 +01:00
worldofpeace
65028ce1c9 libmbim: 1.16.2 -> 1.18.0
(cherry picked from commit 005c3cffc1)
2019-03-26 23:41:26 +01:00
worldofpeace
4cec8a5fcb libqmi: 1.20.2 -> 1.22.2
Drop --enable-mbim-qmux because we have libmbim >= 1.14.0 [0]

[0]: https://gitlab.freedesktop.org/mobile-broadband/libqmi/blob/1.16.0/NEWS#L5

(cherry picked from commit fd5c74c25c)
2019-03-26 23:41:26 +01:00
worldofpeace
2b1ee54b87 modemmanager: 1.7.990 -> 1.10.0
* Add flags for systemd [0]

* Enable tests
  Though I actually didn't look to see how they're
  performed, only effort done was to get a success-
  ful build.

* Enable vala bindings

[0]: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/blob/1.8.0/NEWS#L21

(cherry picked from commit cb962e829c)
2019-03-26 23:41:26 +01:00
Florian Klink
4a5cac73ee gitlab: 11.9.0 -> 11.9.1
(cherry picked from commit dcac21bb15f8188f1e7ae87d57207308f86dd5f8)
2019-03-26 23:05:04 +01:00
Johan Thomsen
5831439bf1 nixos/gitlab: added gzip and bzip2 as dependencies for gitaly
(cherry picked from commit 292c1ce7ff)
2019-03-26 23:04:57 +01:00
Johan Thomsen
d237e19a7e nixos/gitlab: improved test to check download of repository archives
(cherry picked from commit 968d3c9c05)
2019-03-26 23:04:45 +01:00
Wael M. Nasreddine
3c11d7a1a0 gitlab-shell: export GOCACHE in the installPhase
TMPDIR, in `GOCACHE = "$TMPDIR";`, will not be intepreted  when it's set
outside of a phase.

(cherry picked from commit 483d823ec4)
2019-03-26 23:04:39 +01:00
Ben Gamari
779d204583 gitlab: 11.8.2 -> 11.9.0
(cherry picked from commit d8c16f11a6)
2019-03-26 23:03:43 +01:00
Ben Gamari
5269ccfc4b gitlab: 11.7.5 -> 11.8.2
(cherry picked from commit 0ba98bb64c)
2019-03-26 23:03:31 +01:00
Andreas Rammhold
36314bdf27 avahi: apply patches for CVE-2017-6519 & CVE-2018-1000845
(cherry picked from commit 87a762269f)
2019-03-26 21:44:07 +01:00
Ihar Hrachyshka
1502534443 turses: fix crash when starting with existing config file
Fixes #57460

(cherry picked from commit 6f525a52d0)
2019-03-26 10:49:21 -07:00
Ihar Hrachyshka
7aa9d09a23 Switch homepage for turses to louipc fork
The original repo is gone.

(cherry picked from commit c59d2d3419)
2019-03-26 10:49:10 -07:00
Robert Schütz
409b46d836 python.pkgs.cartopy: fix build (#58361)
fallout of https://github.com/NixOS/nixpkgs/pull/54182

(cherry picked from commit 29cec94d94)
2019-03-26 16:56:39 +01:00
Frederik Rietdijk
3e0d25ec91 python3: 3.7.2 -> 3.7.3
(cherry picked from commit 0ddae82e6a)
2019-03-26 16:31:54 +01:00
Frederik Rietdijk
46f7d784d7 python.pkgs.pylint: pytestrunner belongs in nativeBuildInputs
because it's in `setup_requires`. Noticed when building with `doCheck =
false;`.

(cherry picked from commit a1a4ff7471)
2019-03-26 15:33:32 +01:00
Michael Raskin
13ff17bf70 lispPackages.stumpwm: mimic Query-FS tricks for adding extra deps
(cherry picked from commit 83cb84ebc3)

This is a no-op by default (intended for easier overriding) with low risk, and
requested by a user for backporting.
2019-03-26 15:35:40 +01:00
Paul TREHIOU
0ef2bffe5b pythonPackages.block-io: remove pycryptodome version freeze (#56462)
(cherry picked from commit 64a63e5a08)
2019-03-26 12:43:10 +01:00
Pierre Bourdon
4de9915a4c ghostscript: add patch for CVE-2019-6116
This is tagged as version 9.26a in the ghostpdl repo, but unfortunately
there are no tarballs released with that version number so far. We'll
continue calling this version 9.26 for now for simplicity's sake (and we
can switch to 9.26a and remove the patch when it's properly released).

Fixes #58262
Fixes #58089

(cherry picked from commit 91c46d17d5)
2019-03-26 11:39:16 +01:00
Andreas Rammhold
c7281ba4fe Merge pull request #58034 from Mic92/thunderbird
[backport] thunderbird: 60.5.1 -> 60.6.0
2019-03-26 11:17:23 +01:00
danbst
3dedec4ab8 pkgsMusl, pkgsi686Linux, pkgsStatic: fix infinite recursion with overlays
Consider example:

$ nix-instantiate ./nixos -A system --arg configuration '
    {
      boot.isContainer = true;
      nixpkgs.overlays = [ (self: super: {
        nix = self.pkgsStatic.nix;
      }) ];
    }'

When resolving package through overlays, we figure out that

  nix == self.pkgsStatic.nix
  =>
  nix == (import <nixpkgs> { inherit overlays; }).nix
  =>
  nix == (import <nixpkgs> { overlays = [(self: super: { nix = self.pkgsStatic.nix; })];}).nix

and we enter infinite recursion of nixpkgs evaluations.

The proper fix should terminate recursion by assigning self fixpoint
to inner custom package set. But I get infinite recursion somehow, so
I use `super`. It is less correct modulo deep custom overrides, but behaves
correctly for simple cases and doesn't OOM evaluator.

Fixes https://github.com/NixOS/nixpkgs/issues/57984
2019-03-26 10:13:02 +02:00
Jan Malakhovski
e8dac0c9a0 pkgs/top-level/stage.nix: don't override overlays and config in nixpkgsFun
`nixpkgsFun` already sets them via `args`. Doing this also introduces unexpected
hard to debug errors, see the patch.
2019-03-26 10:10:12 +02:00
Robert Schütz
921b2ccff8 python.pkgs.pytest-faulthandler: fix build
fallout of https://github.com/NixOS/nixpkgs/pull/54182

(cherry picked from commit 2413b2ac87)
2019-03-26 09:04:53 +01:00
Robert Schütz
f02e43ecf9 Merge pull request #58139 from srhb/backport-click-curator-fix
Backport: elasticsearch-curator: add top-level package using older click
2019-03-26 08:09:03 +01:00
Pierre Bourdon
87221ac947 imgurbash2: 2.1 -> 3.1
(cherry picked from commit 19601561ed)
2019-03-25 21:14:37 -04:00
Maximilian Bosch
f4612a2bae citrix_receiver: remove old versions
The versions 13.8.0 and 13.9.{0,1} will be EOLed before the end of 19.03
and should be dropped.

To provide an easy upgrade path, all unsupported versions will throw an
evaluation error. All versions that are about the be EOLed can be added
there as well.

For now, all of those deprecated versions are still referenced in
`all-packages.nix`, but should be removed before the next release.

See also https://www.citrix.co.uk/support/product-lifecycle/milestones/receiver.html
2019-03-25 19:48:16 +01:00
Florian Klink
8916ac01a3 Merge pull request #58211 from andir/19.03/containers-ipv6
[19.03] fix containers ipv6
2019-03-25 19:24:10 +01:00
Gabriel Ebner
e0acf81725 evince: enable postscript support 2019-03-25 17:22:08 +01:00
Will Dietz
7228ac327d youtube-dl: 2019.03.01 -> 2019.03.18
(cherry picked from commit 0fa6ebe0a5)
2019-03-25 10:47:10 -04:00
Peter Simons
d99ad3d309 Merge pull request #58216 from srhb/fix-19.03-hfsevents
haskellPackages.hfsevents: Fix eval on Darwin hackage2nix config and temporarily
2019-03-25 14:03:19 +01:00
Will Dietz
d1b54b103b tor-browser-bundle-bin: 8.0.6 -> 8.0.8
(cherry picked from commit f114ab593e)
2019-03-25 10:43:50 +01:00
Silvan Mosberger
23fd1394dc Merge pull request #52096 from furrycatherder/davmail
nixos/davmail: init
2019-03-25 00:41:44 +02:00
Robert Schütz
d987d5daf3 setools: fix build (#58172)
(cherry picked from commit aeea929058)
2019-03-24 19:53:32 +01:00
timor
da3936396d pythonPackages.pysideTools: add python deps to propagatedBuildInputs
(cherry picked from commit de1634a36e)
2019-03-24 19:39:41 +01:00
timor
1bbc9832d6 pythonPackages.pysideTools: fix build
(cherry picked from commit 6b8f80053f)
2019-03-24 19:39:40 +01:00
timor
18e7ce4dff pythonPackages.pivy: fix build
(cherry picked from commit 17369ceae9)
2019-03-24 19:39:40 +01:00
Andreas Rammhold
fb28270210 nixos/release: make ipv6 tests as important as legacy IP tests
IPv6 container support broke a while ago and we didn't notice it. Making
them part of the (small) release test set should fix that. At this point
in time they should be granted the same amount of importance as the
legacy IP tests.

(cherry picked from commit 862615b86e)
2019-03-24 18:17:55 +01:00
rnhmjoj
883fa214d2 nixos/containers: create veths if only IPv6 is configured
This fixes the failing nixos.tests.containers-ipv6 test. Thanks to andir.

(cherry picked from commit 552e583ef0)
2019-03-24 18:17:47 +01:00
Tim Steinbach
1e3a0e0dd9 linux: Remove 4.20
Upstream has EOL'd 4.20

(cherry picked from commit e5fd7ba15c)
2019-03-24 12:18:44 -04:00
Tim Steinbach
7437bb078d linux: 5.0.3 -> 5.0.4
(cherry picked from commit b10ec4859d)
2019-03-24 12:17:37 -04:00
Tim Steinbach
d3a3aff7de linux: 4.19.30 -> 4.19.31
(cherry picked from commit 0e25209c33)
2019-03-24 12:17:37 -04:00
Sarah Brofeldt
91afd1c862 haskellPackages.hfsevents: Fix darwin eval until next regen 2019-03-24 12:16:22 +01:00
Peter Simons
daa6f1882b hackage2nix: drop broken entry for hfsevents
The package has its meta.platforms set up correctly already in cabal2nix's
post-processing code.

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

(cherry picked from commit ce5504bc74)
2019-03-24 12:12:53 +01:00
Will Dietz
ff9c3f0f26 slack: 3.3.7 -> 3.3.8
Backport of #58170
(cherry picked from commit dad85bd731)
2019-03-24 11:48:57 +01:00
Robert Schütz
a9c581ab02 python.pkgs.hypothesis: 3.88.3 -> 4.7.3 (#58169)
It looks like in 89f91cf06b the hash
from 4.7.3 was used and the wrong version specified.

(cherry picked from commit f1c7bb9d29)
2019-03-24 09:39:49 +01:00
Robert Schütz
9965ac017d python.pkgs.joblib: 0.12.4 -> 0.13.2 (#57906)
(cherry picked from commit 2c07a0800a)
2019-03-24 09:33:37 +01:00
Andreas Rammhold
ad02408c7b systemd: update debian patches url to snapshots.debian.org
The current approach will fail when enough time has passed. We ideally
want to be reproducible even in a few years of time. So we should pick
the sources of patches wisely as otherwise we can not do that.

(cherry picked from commit bb821c65ff)
2019-03-24 06:32:12 +00:00
Hlöðver Sigurðsson
b0200b75e8 fix: csound-manual by using newer git revision (#57663)
(cherry picked from commit 990eaa30d9)

cc #57663
2019-03-24 02:20:56 -04:00
Carles Pagès
fe9abc43c7 kodi: 18.0 -> 18.1
Also updated its bundled ffmpeg for a bugfix.

(cherry picked from commit cd0f0374f6)
2019-03-24 01:18:15 +01:00
Philipp Volguine
0ef73ffdbd paulstretch: init at version 2.2-2
This is a neat little program for extreme sound stretching and it was
not in the repo yet.

(cherry picked from commit e0c3c2ed52)

cc #57589 #58191
2019-03-23 19:31:49 -04:00
Christian Kögler
f6f21d87ec nixos dwm: start user installed dwm if available
dwm has no configuration file. The user has to install his own version.

(cherry picked from commit 9f7f16cd7b)
2019-03-23 23:56:28 +01:00
Maximilian Bosch
16516df953 python3Packages.irc: fix build
Adds missing `jaraco_collections` dependency. This also unbreaks
`errbot`.

See also https://hydra.nixos.org/build/90116401
Addresses #56826

(cherry picked from commit 8159a1fc75)
2019-03-23 18:25:47 +01:00
Maximilian Bosch
ef9238f961 pythonPackages.jaraco_logging: fix build
The package currently fails because of some flake8 violations. However
invalid coding style shouldn't break the Nix package.

See also https://hydra.nixos.org/build/90301692
Addresses #56826

(cherry picked from commit 18b0729790)
2019-03-23 18:25:47 +01:00
Maximilian Bosch
c222255a29 pythonPackages.jaraco_text: 2.0 -> 3.0
This fixes the dependency cycle between `jaraco_text` and
`jaraco_collections`. Reported upstream in https://github.com/jaraco/jaraco.text/issues/3

See also https://hydra.nixos.org/build/90307068
See also https://hydra.nixos.org/build/90310398
Addresses #56826

(cherry picked from commit 4c57b5e896)
2019-03-23 18:25:47 +01:00
Maximilian Bosch
105d99ad93 pythonPackages.jaraco_itertools: fix build
The package currently fails because of some flake8 violations. However
invalid coding style shouldn't break the Nix package.

See also https://hydra.nixos.org/build/90115508
Addresses #56826

(cherry picked from commit eede376d73)
2019-03-23 18:25:47 +01:00
Peter Simons
6bbde4c8e6 Merge pull request #57874 from erictapen/arbtt-0.10.2
[19.03] haskellPackages.arbtt: 0.10.1 -> 0.10.2
2019-03-23 17:08:56 +01:00
Tim Steinbach
0e35c8af3a linux: 4.14.107 -> 4.14.108
(cherry picked from commit eca0d0ad62)
2019-03-23 11:27:40 -04:00
Tim Steinbach
1098ac7a97 linux: 4.9.164 -> 4.9.165
(cherry picked from commit d10015ea4f)
2019-03-23 11:27:40 -04:00
Tim Steinbach
4a527a9a8d linux: 4.4.176 -> 4.4.177
(cherry picked from commit ece2d7d6a0)
2019-03-23 11:27:39 -04:00
Pascal Wittmann
37c8939b00 japser: 2.0.14 -> 2.0.16
(cherry picked from commit 96e93d6fa0)
2019-03-23 14:20:22 +01:00
Pascal Wittmann
638216c392 stuntrally: 2.6 -> 2.6.1
(cherry picked from commit ad73d46d81)
2019-03-23 14:13:12 +01:00
Andreas Rammhold
d0335875f1 powerdns: 4.1.6 -> 4.1.7
This addresses CVE-2019-3871. The details of the issue can be retrieved
from the official announcement page [0].

[0] https://docs.powerdns.com/authoritative/security-advisories/powerdns-advisory-2019-03.html

(cherry picked from commit f4e9e42725)
2019-03-23 11:38:20 +01:00
Frederik Rietdijk
5dfa44a783 python35 -> 3.5.6 -> 3.5.7
(cherry picked from commit 2cc6444113)
2019-03-23 09:18:00 +01:00
Andreas Rammhold
8408b94135 Merge pull request #58157 from andir/19.03/firefox
[19.03] firefox: 66.0 -> 66.0.1, firefox-esr-60: 60.6.0esr -> 60.6.1esr
2019-03-23 09:01:58 +01:00
Felix Biggs
149e1d36bf doc/python: remove unnecessary let statement
(cherry picked from commit 1e86c0a7df)
2019-03-22 22:27:06 -04:00
Andreas Rammhold
2bfd217a69 firefox-bin: 66.0 -> 66.0.1
(cherry picked from commit bf0715aeb8)
2019-03-23 01:50:48 +01:00
Andreas Rammhold
c5cd561760 firefox-esr-60: 60.6.0esr -> 60.6.1esr
(cherry picked from commit 3e7b029ab7)
2019-03-23 01:50:45 +01:00
Andreas Rammhold
e27500cacd firefox: 66.0 -> 66.0.1
(cherry picked from commit e716a952cd)
2019-03-23 01:50:42 +01:00
Robert Schütz
a1d14f31b3 elasticsearch-curator: add top-level package using older click
See https://github.com/NixOS/nixpkgs/pull/58023 for a discussion
of why this is necessary. The upstream issue can be found at
https://github.com/elastic/curator/pull/1280.

(cherry picked from commit c0409de98d)
2019-03-22 20:14:18 +01:00
Robert Schütz
cd751c4189 python.pkgs.click: make patch version-agnostic
(cherry picked from commit 0b87a56015)
2019-03-22 20:14:15 +01:00
Herwig Hochleitner
392e8f8edb chromium: 73.0.3683.75 -> 73.0.3683.86
(cherry picked from commit ea34ad0e43)
2019-03-22 19:34:36 +01:00
(cdep)illabout
857d066376 Fix cudatoolkit building on non-sandboxed systems
This fixes cudatoolkit building on non-sandboxed system.

The cudatoolkit tests run each of the CUDA binaries as a small smoke
test just to make sure they all can at least somewhat run.

However, the `cuda-gdb` binary doesn't run correctly on non-sandboxed
systems because it picks up versions of Python from /usr/lib.

This PR disables the smoke tests for now.  They should be re-enabled
when we figure out how to make them work for cuda-gdb on non-sandboxed
systems.

This PR is for #57939.

(cherry picked from commit 7942c79c69)
2019-03-22 19:34:36 +01:00
Andreas Rammhold
2d78754c7e subversion_1_10: 1.10.3 -> 1.10.4
bugfix release for CVE-2018-11803 [0].

[0] https://subversion.apache.org/security/CVE-2018-11803-advisory.txt

(cherry picked from commit a6bb05be45)
2019-03-22 19:26:06 +01:00
Will Dietz
b50bf3af83 sssd: 1.16.3 -> 1.16.4
https://docs.pagure.org/SSSD.sssd/users/relnotes/notes_1_16_4.html

CVE-2019-3811, see notes.

Backport of #58076
(cherry picked from commit 9595eb1b6d)
2019-03-22 19:01:32 +01:00
Antoine Eiche
8002a7f1e4 dockerTools.buildImage.runAsRoot: preserve layers ordering at image unpacking
This patch preserves the ordering of layers of a parent image when the
image is unpacked.

Fixes #55290

(cherry picked from commit fe6860800b)
2019-03-22 18:14:45 +01:00
Antoine Eiche
a25ad68a55 openstackImage: set the / fsType to reenable root FS resizing
Since 34234dcb51, the reisizefs tool is
embeded only if the `fsType` starts with `ext`. The default `fsType`
value is `auto`.

(cherry picked from commit f116d046f6)
2019-03-22 14:45:51 +01:00
Vladimír Čunát
cccb3b6d47 nixos docs: run the formatting tool (no content change)
As documented in the docs themselves :-)
2019-03-22 14:39:40 +01:00
Vladimír Čunát
511a731f76 nixos docs: improve GPU driver documentation
I'm not 100% sure about the incompatibility lines,
but I believe it's better to discourage these anyway.
If you find better information, feel free to amend...

The 32-bit thing is completely GPU-agnostic, so I can't see why we had
it separately for proprietary drivers and missing for the rest.

(cherry picked from commit 11d204a9c4)
2019-03-22 14:33:47 +01:00
Gabriel Ebner
f5e7da91cf elan: 0.7.4 -> 0.7.5
(cherry picked from commit 11318d1ba2)
2019-03-22 11:21:45 +01:00
Robert Schütz
ced961a914 python.pkgs.envs: fix build
(cherry picked from commit 76bfc09ff3)
2019-03-22 11:01:39 +01:00
Robert Schütz
176f00b1ca python.pkgs.pytest-server-fixtures: fix build
(cherry picked from commit dc884633a4)
2019-03-22 11:01:16 +01:00
Robert Schütz
64230fa6a7 python.pkgs.retry: init at 0.9.2
(cherry picked from commit d716cad907)
2019-03-22 11:01:16 +01:00
Robert Schütz
cfe9cc1f22 python.pkgs.suds-jurko: use pytest_3
(cherry picked from commit 77ab98861c)
2019-03-22 11:01:16 +01:00
Robert Schütz
de4b0ab5a8 python.pkgs.tilestache: fix build
(cherry picked from commit 48d1219a92)
2019-03-22 11:01:16 +01:00
Robert Schütz
3560766a3a python.pkgs.python-mapnik: fix build
fallout of https://github.com/NixOS/nixpkgs/pull/54182

(cherry picked from commit 8519983a31)
2019-03-22 11:01:16 +01:00
Jörg Thalheim
2b3c67de90 nix-review: 1.0.5 -> 2.0.0
(cherry picked from commit eb5afaf06b)
2019-03-22 07:06:33 +00:00
aszlig
a36b965ede Merge overlayfs fix, LTS kernel bump and test
In Linux 4.19 there has been a major rework of the overlayfs
implementation and it now opens files in lowerdir with O_NOATIME, which
in turn caused issues in our VM tests because the process owner of QEMU
doesn't match the file owner of the lowerdir.

The crux here is that 9p propagates the O_NOATIME flag to the host and
the guest kernel has no way of verifying whether that flag will lead to
any problems beforehand.

There is ongoing work to possibly fix this in the kernel, but it will
take a while until there is a working patch and consensus.

So in order to bring our default kernel back to 4.19 and of course make
it possible to run newer kernels in VM tests, I'm merging a small QEMU
patch as an interim solution, which we can drop once we have a working
fix in the next round of stable kernels.

Now we already had Linux 4.19 set as the default kernel, but that was
subsequently reverted in 048c36ccaa
because the patch we have used was the revert of the commit I bisected a
while ago.

This patch broke overlayfs in other ways, so I'm also merging in a VM
test by @bachp, which only tests whether overlayfs is working, just to
be on the safe side that something like this won't happen in the future.

Even though this change could be considered a moderate mass-rebuild at
least for GNU/Linux, I'm merging this to master, mainly to give us some
time to get it into the current 19.03 release branch (and subsequent
testing window) once we got no new breaking builds from Hydra.

Cc: @samueldr, @lheckemann

Fixes: https://github.com/NixOS/nixpkgs/issues/54509
Fixes: https://github.com/NixOS/nixpkgs/issues/48828
Merges: https://github.com/NixOS/nixpkgs/pull/57641
Merges: https://github.com/NixOS/nixpkgs/pull/54508
(cherry picked from commit 12efcc2dee)
2019-03-22 00:55:05 +01:00
Wael Nasreddine
83734065f2 buildGoModule: remove SSL env vars in favor of cacert in buildInputs (#58082)
cacert already exposes NIX_SSL_CERT_FILE in its setupHook. Fetchers and builders are already setup to use this variable and there's no need to export them manually.

(cherry picked from commit 6d7d69ff3e)
2019-03-21 14:49:41 -07:00
Simon Lackerbauer
eee28af866 atlassian-confluence: 6.14.1 -> 6.14.2
CVE-2019-3395, CVE-2019-3396

(cherry picked from commit 5ef5bbcd46aab2ba6ea65eff19ef3e9e7037e207)
2019-03-21 14:08:13 +00:00
taku0
7507b43eba thunderbird: 60.5.2 -> 60.6.0
(cherry picked from commit 3c83eb43a5)
2019-03-21 11:53:33 +00:00
taku0
f32e237b5b thunderbird: 60.5.1 -> 60.5.2
(cherry picked from commit 202f713153)
2019-03-21 11:53:25 +00:00
Dmitry Kalinkin
b81f43c9c7 pythonPackages.pyhepmc: fix build
(cherry picked from commit 283a124ee4)
2019-03-21 09:50:59 +00:00
Jörg Thalheim
1db1951088 glibcLocales: also build C.UTF-8
Previously we only build C.UTF-8 as part of the locale-archive
that comes with the glibc core package.
However for consistent use of LANG=C.UTF-8 we also want support
in our glibcLocales as well.
fixes https://github.com/NixOS/nixpkgs/issues/57974

(cherry picked from commit 467f0f9f3a)
2019-03-21 09:41:53 +00:00
Robert Schütz
746f6feead python.pkgs.hglib: use patch to specify hg path (#57926)
(cherry picked from commit 19aaebe419)
2019-03-21 09:50:46 +01:00
Robert Schütz
f530a40d0b python.pkgs.mecab-python3: correct meta
(cherry picked from commit deb20c14a2)
2019-03-21 09:45:59 +01:00
Robert Schütz
3594a2d44c python.pkgs.mecab-python3: fix build
fallout of https://github.com/NixOS/nixpkgs/pull/54182

(cherry picked from commit 06bcb5c21b)
2019-03-21 09:45:51 +01:00
Miguel Bernadin
60e937361d terraform_0_11: 0.11.11 -> 0.11.13 2019-03-21 07:50:42 +00:00
Janne Heß
c9c188475b tt-rss-theme-feedly: Package additional themes 2019-03-21 07:21:49 +00:00
Matthew Harm Bekkema
6f2fc31837 flatpak: Fix bubblewrap paths for icon-validator
Otherwise, `flatpak-validate-icon --sandbox` gives error:
  bwrap: Can't find source path /etc/ld.so.cache: No such file or directory

(cherry picked from commit f2d6e4ab04)
2019-03-21 02:32:34 -04:00
worldofpeace
41c989c141 wire-desktop: 3.6.2885 -> 3.7.2891
Wire uses Electron 4.08 and support for i686-linux
has been dropped in 4.0  [0]

Release Notes:
https://medium.com/wire-news/linux-3-7-2891-edc6f663c0b2

Changelog:
https://github.com/wireapp/wire-desktop/compare/linux/3.6.2885...linux/3.7.2891

[0]: https://electronjs.org/blog/linux-32bit-support

(cherry picked from commit 23568a1ed3)
2019-03-20 23:11:58 -04:00
Justin Humm
31a5868352 haskellPackages.arbtt: 0.10.1 -> 0.10.2
This is a backport of e98e4d21fa and
7c04e3eb75 to make arbtt build again.
2019-03-21 00:17:45 +01:00
Carles Pagès
91cb80e439 duckmarines: fix build
Actually updated to 1.0c. Prevent hydra from building it.

(cherry picked from commit d918001898)
2019-03-20 23:23:48 +01:00
Graham Christensen
13f0045ddc libguestfs: build without the appliance
(cherry picked from commit 47c3469de3)
2019-03-20 16:31:31 -04:00
Gabriel Ebner
13a2f37442 elan: 0.7.2 -> 0.7.4
This fixes a bug with the github integration, the old version no longer
works due to github changes.

(cherry picked from commit 52c3ee6c4d)
2019-03-20 13:37:00 +01:00
Sarah Brofeldt
4f6080c369 pythonPackages.elasticsearch-curator: Jailbreak click (#57912)
(cherry picked from commit f6e1221e8d)
2019-03-20 13:30:53 +01:00
Jaakko Luttinen
42af922e85 pythonPackages.can: 3.0.0 -> 3.1.0
(cherry picked from commit 0a41afaecd)
2019-03-20 12:53:34 +01:00
R. RyanTM
19ad18695e python37Packages.telethon: 1.5.5 -> 1.6.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/python3.7-telethon/versions

(cherry picked from commit 2fd5f716dc)
2019-03-20 12:25:23 +01:00
nyanloutre
199a8e7ac8 mautrix-telegram: 0.4.0.post1 -> 0.5.0
(cherry picked from commit 3fa5e2bab6)
2019-03-20 12:25:23 +01:00
nyanloutre
622bb133c2 pythonPackages.telethon-session-sqlalchemy: 0.2.9.post1 -> 0.2.14
(cherry picked from commit 0f266d1e4c)
2019-03-20 12:25:23 +01:00
Florian Klink
3574dbb976 Merge pull request #57930 from andir/19.03/firefox
[19.03] firefox 65.0.2 -> 66, 60.5.2esr -> 60.6.0esr, firefox-bin: 65.0.2 -> 66.0
2019-03-20 02:24:19 +01:00
Andreas Rammhold
543209e4a5 firefox-esr-60: 60.5.2esr -> 60.6.0.esr
(cherry picked from commit 94d9400b4d)
2019-03-20 00:01:59 +01:00
Andreas Rammhold
a692224365 firefox-bin: 65.0.2 -> 66.0
(cherry picked from commit a1cd934ba3)
2019-03-20 00:01:50 +01:00
Andreas Rammhold
16b6bc8b0d firefox: 65.0.2 -> 66.0
(cherry picked from commit dafe9c3cb0)
2019-03-20 00:01:44 +01:00
Andreas Rammhold
c57b9814b7 firefox: support building firefox 66 (and 60.6+)
(cherry picked from commit d64d42f12d)
2019-03-20 00:01:39 +01:00
Andreas Rammhold
52470e2687 rust-cbindgen: add andir (myself) as maintainer
(cherry picked from commit b6fff67587)
2019-03-20 00:01:32 +01:00
Andreas Rammhold
5a0522418a rust-cbindgen: 0.6.7 -> 0.8.0
(cherry picked from commit f10d6564ea)
2019-03-20 00:01:21 +01:00
Robert Helgesson
4cdbe8befc openshift: remove obsolete comment
(cherry picked from commit c18bb57627)
2019-03-19 23:29:28 +01:00
rnhmjoj
31d6c5cdec nixos/tests/predictable-interfaces: fix failure on aarch64
(cherry picked from commit 0279449209)
2019-03-19 23:21:08 +01:00
aszlig
8b93cc45ff ip2unix: 2.0.0 -> 2.0.1
Upstream fixes:

  - Unregister socket as soon as we know that no rule matches.

I also removed the encode_rules() function which was an artifact left in
version 2.0.0.

Built and tested on i686-linux and x86_64-linux.

Signed-off-by: aszlig <aszlig@nix.build>
(cherry picked from commit 6dc9f79c0f)
Reason: Without this fix, ip2unix is pretty much useless for more
        substantial services.
2019-03-19 22:45:11 +01:00
aszlig
e48495f132 lastwatch: Remove no longer maintained package
I no longer use nor do I maintain this package upstream and with the
current version of pylast moving to Python 3, this package is hereby
obsolete as I'm not willing to port this to Python 3.

Signed-off-by: aszlig <aszlig@nix.build>
(cherry picked from commit 7c3311d152)
2019-03-19 22:44:42 +01:00
Robert Schütz
ee7297065e python.pkgs.mt-940: 4.13.0 -> 4.13.2
(cherry picked from commit 1ca05690c6)
2019-03-19 22:30:41 +01:00
Alyssa Ross
d2e06acd73 python3Packages.priority: fix build (#57807)
(cherry picked from commit bc3e7f875e)
2019-03-19 22:29:13 +01:00
Alyssa Ross
65fd49fb27 python36Packages.hpack: fix build (#57808)
(cherry picked from commit c357b53763)
2019-03-19 22:26:58 +01:00
zimbatm
85d208ef3c pythonPackages.invoke: patch the default bash path
Use a reasonable path :)

(cherry picked from commit 921f10f4fc053ca7944a6f4e723f08b7f113d775)
2019-03-19 22:10:23 +01:00
Robert Schütz
ba7bf6b31e python.pkgs.msrest: fix build on python2
(cherry picked from commit d338fc1583)
2019-03-19 22:03:45 +01:00
Jörg Thalheim
9055e34fe1 python3.pkgs.python-engineio: 3.0.0 -> 3.4.3
fixes build of python-socketio

(cherry picked from commit f94dc01e75)
2019-03-19 17:18:02 +01:00
Robert Schütz
fe76cf8e60 python.pkgs.msrest: cleanup
I accidentally pushed fcf74c6 in a premature state.

(cherry picked from commit 0cbe2fa18c)
2019-03-19 16:47:41 +01:00
Robert Schütz
5d15bf5c4c python.pkgs.msrest: 0.6.2 -> 0.6.4
(cherry picked from commit fcf74c6dc0)
2019-03-19 16:47:40 +01:00
Robert Schütz
9cc637a90e python.pkgs.aiodns: 1.2.0 -> 2.0.0
(cherry picked from commit fc172b3590)
2019-03-19 16:46:04 +01:00
Robert Schütz
789b88a940 python.pkgs.pycares: 2.4.0 -> 3.0.0
(cherry picked from commit 99cd4a1063)
2019-03-19 16:43:41 +01:00
Robert Schütz
ab98ab46eb python.pkgs.simpleparse: fix build
(cherry picked from commit 5c52dcf1d9)
2019-03-19 16:43:41 +01:00
Ryan Mulligan
8ae5486cfe COPYING: include 2019
(cherry picked from commit a46b89df91)
2019-03-19 16:09:13 +01:00
Tim Steinbach
bf3c195582 linux: 5.0.2 -> 5.0.3
(cherry picked from commit 6a9896b411)
2019-03-19 08:56:48 -04:00
Tim Steinbach
987ea4c4d4 linux: 4.20.16 -> 4.20.17
(cherry picked from commit 4adf858377)
2019-03-19 08:56:47 -04:00
Tim Steinbach
c825895ba4 linux: 4.19.29 -> 4.19.30
(cherry picked from commit b1c72326ce)
2019-03-19 08:56:47 -04:00
Tim Steinbach
eba2015696 linux: 4.14.106 -> 4.14.107
(cherry picked from commit 08414dd72e)
2019-03-19 08:56:47 -04:00
Tim Steinbach
80bf4a76ba linux: 4.9.163 -> 4.9.164
(cherry picked from commit 9e2adb4e36)
2019-03-19 08:56:47 -04:00
Robert Hensing
f00bd2260a Merge branch 'ngrok-update-backport' into release-19.03 2019-03-19 11:17:53 +01:00
Robert Hensing
7c7e08391d ngrok-2: 2.2.8 -> 2.3.18 2019-03-19 11:17:05 +01:00
Robert Hensing
8c1f218753 ngrok-2: Use stable channel 2019-03-19 11:17:05 +01:00
Robert Hensing
e767654808 ngrok-2: Fix URLs and automate 2019-03-19 11:17:05 +01:00
Robert Schütz
4649b763ec python.pkgs.cairocffi: make withXcffib work again (#57855)
(cherry picked from commit 180c68d88a)
2019-03-19 10:20:34 +01:00
Robert Schütz
15ac1b997f python.pkgs.pyalgotrade: fix build
(cherry picked from commit 4cf0a12d34)
2019-03-19 10:03:54 +01:00
Robert Schütz
5b2f46fa1d python.pkgs.ws4py: enable for all Python versions
(cherry picked from commit ae5b83683a)
2019-03-19 10:03:54 +01:00
worldofpeace
8e21b831f6 pantheon.contractor: add wrapGAppsHook
Probably got tossed out somehow.

(cherry picked from commit d04c4ff1c2)
2019-03-18 23:33:42 -04:00
worldofpeace
dafdf38643 pantheon.wingpanel: 2.2.2 -> 2.2.3
(cherry picked from commit 201de89641)
2019-03-18 23:33:39 -04:00
worldofpeace
acb0b4b948 pantheon.switchboard-plug-security-privacy: 2.2.0 -> 2.2.1
https://github.com/elementary/switchboard-plug-security-privacy/releases/tag/2.2.1
(cherry picked from commit 735b047ead)
2019-03-18 23:33:35 -04:00
worldofpeace
953f3099f4 pantheon.elementary-code: 3.1.0 -> 3.1.1
https://github.com/elementary/code/releases/tag/3.1.1
(cherry picked from commit 5b2d2abd3c)
2019-03-18 23:33:31 -04:00
Michael Weiss
2a7c3484fd Merge pull request #57877 from primeos/backports
[19.03] python.pkgs.distro: Re-enable the package
2019-03-18 21:45:08 +01:00
Michele Guerini Rocco
7827ea7e7f arx-libertatis: 2018-08-26 -> 2019-02-16 (#57873)
(cherry picked from commit d10f3e985a)
2019-03-18 21:17:41 +01:00
Michael Weiss
c857cab708 python.pkgs.distro: Re-enable the package for now
Most tests are fine (only 20 out of 173 fail, 10 because lsb_release is
not available or returns exit code 3 and the other 10 might also fail
due to the sandboxed build environment).
Manual tests show that distro works as intended in a normal environment.

See 9382d2ea76

(cherry picked from commit 871cd756c8)
Reason: The package works as expected outside of the build sandbox and
the packages google-cloud-sdk-gce and google-compute-engine depend on it
(and soon also gns3-gui and gns3-server).
2019-03-18 21:12:35 +01:00
Stephen
74e25d2f53 commandergenius: update and move to gitlab (#57740)
update and move to gitlab (repo has moved)
update fixes build (https://hydra.nixos.org/build/90482453/nixlog/2) for #56826

(cherry picked from commit 84903aa354)
2019-03-18 19:51:38 +01:00
Léo Gaspard
d6dca3a9fc Merge branch 'pr-57865' into release-19.03
* pr-57865:
  PuTTY: 0.70 -> 0.71
2019-03-18 19:05:48 +01:00
Tor Hedin Brønner
6a0bc214a4 meld: fix checkPhase
Needs some more inputs after checkInputs went native.

(cherry picked from commit 99fac0a967e76ef85303f16a051208627995703b)
(cherry picked from commit 4a75888544)
2019-03-18 18:55:47 +01:00
Andreas Rammhold
9fea0be389 Merge pull request #57570 from andir/19.03/nodejs
[19.03] nodejs_{6,8,10,11}_x: update, security fixes
2019-03-18 18:52:52 +01:00
Will Dietz
ac40691ad3 ghc*Binary: use $OBJCOPY when invoking objcopy (touchup musl fix)
(cherry picked from commit 93e3eecdb3)
2019-03-18 12:45:07 -05:00
Will Dietz
8830b12dc8 ghc{822,863}Binary: fix to work w/musl again, __strdup -> strdup
(cherry picked from commit 9a10434f4d)
2019-03-18 12:45:05 -05:00
Daniel Frank
c6733c5c3e PuTTY: 0.70 -> 0.71
(cherry picked from commit 9d95c9d78f)
2019-03-18 18:33:29 +01:00
Jörg Thalheim
e0e29a5996 Merge pull request #57805 from kalbasit/nixpkgs_backport-build-go-module
buildGoModule: backport the new Go infrastructure to release 19.03
2019-03-18 16:35:40 +00:00
Sarah Brofeldt
7ec0f48526 pythonPackages.secretstorage: 3.1.0 -> 3.1.1 (#57857)
(cherry picked from commit 379ff387f4)
2019-03-18 17:25:40 +01:00
Vladyslav M
a456b83d41 buildGoModule: Allow pname attribute (#57787)
(cherry picked from commit 832eb2559d)
2019-03-18 09:03:11 -07:00
Robert Schütz
d6d09313aa bonfire: use pytest_3
Otherwise, tests fail with
> Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.

(cherry picked from commit 8f115c02a5)
2019-03-18 16:58:16 +01:00
Sarah Brofeldt
db7dc9472f jl: Patch to work with MonadFail GHC 8.6 change
Backport of #57284
(cherry picked from commit 79e3dcb013)
2019-03-18 16:49:44 +01:00
Robert Schütz
0dd99c0fa0 python.pkgs.mysqlclient: fix build
fallout of https://github.com/NixOS/nixpkgs/pull/54182
fixes https://github.com/NixOS/nixpkgs/issues/57263

(cherry picked from commit ea7885fd7a)
2019-03-18 15:58:19 +01:00
Robert Schütz
57e067f544 csvkit: move out of pythonPackages
From https://csvkit.readthedocs.io/en/1.0.3/index.html:
> csvkit is a suite of *command-line tools* for [...]

(cherry picked from commit 5e39aa231a)
2019-03-18 15:50:27 +01:00
Robert Schütz
b5bf9f3063 python.pkgs.agate-excel: 0.2.2 -> 0.2.3
(cherry picked from commit b1454f587e)
2019-03-18 15:50:27 +01:00
Michael Peyton Jones
757bbe726f generic Haskell builder: don't copy packages from GHC
In order to build the package databases that we will use when compiling
a Haskell package, we iterate over the relevant dependencies, and if
they contain a package db, we copy its contents over.

So far so good, except when one of those dependencies is GHC. This
doesn't happen ordinarily, but it will happen when we construct the
package database for compiling `Setup.hs`.  This is compiled for the
build architecture, so we get the build deps, including both the native
and the cross GHC (if there is one).

In this case, we end up copying the packages from the GHC's package
database. This is at best unnecessary, since we will get those packages
from the GHC when we compile with it.

At worst, however, this is semantically questionable. We can end up
having multiple copies of e.g. Cabal with the same version, but
(potentially) different contents. At the moment, GHC will expose one of
these at semi-random depending on which one it looks at "first".
However, there is a MR open [in
GHC](https://gitlab.haskell.org/ghc/ghc/merge_requests/545) which as a
side effect will instead expose both, leading to ambiguous module
warnings (which is not unreasonable, since it *is* ambiguous).

So what can we do about it? The simplest solution is just to not copy
the package databases from GHC. GHC is special in this regard, so I
think it's okay to treat it specially.

This PR should have no effect on anything now, but will prevent any
breakage when/if the GHC patch lands.

Closes https://github.com/NixOS/nixpkgs/pull/57706.

(cherry picked from commit 387c513d12)
2019-03-18 12:09:20 +01:00
worldofpeace
b2b2ff7378 pythonPackages.rabbitypy: nitpicks
(cherry picked from commit d630716229)
2019-03-17 17:49:58 -04:00
Josef Kemetmüller
0e6990d225 pythonPackages.rabbitpy: Fix build
(cherry picked from commit 2016b37495)
ZHF: https://github.com/NixOS/nixpkgs/issues/56826
2019-03-17 17:49:45 -04:00
Wael M. Nasreddine
3121c905f4 buildGoModule: function for packaging Go modules
The function buildGoModule builds Go programs managed with Go modules. It builds
a Go module through a two phase build:

- An intermediate fetcher derivation. This derivation will be used to
  fetch all of the dependencies of the Go module.
- A final derivation will use the output of the intermediate derivation
  to build the binaries and produce the final output.

(cherry picked from commit 28435e47b1)
2019-03-17 08:53:40 -07:00
Wael M. Nasreddine
ec8ba3e101 buildGoPackage: move it under a different path
This change moves buildGoPackage from pkgs/development/go-modules to
pkgs/development/go-packages, so we can have buildGoModule at
pkgs/development/go-modules.

(cherry picked from commit a0d835e95d)
2019-03-17 08:52:59 -07:00
Timo Kaufmann
6a3a05560a sage: backport bugfix (#57795)
(cherry picked from commit 96002601a8d41dc301d7121f40e245a026fcb2f8)
2019-03-17 14:36:11 +00:00
Pascal Wittmann
673a768116 homebank: 5.2.2 -> 5.2.3 2019-03-17 12:29:54 +01:00
Alyssa Ross
43aa1bcc01 Merge commit 'refs/pull/57762/head' of https://github.com/NixOS/nixpkgs into master
(cherry picked from commit 46026e8247)
2019-03-17 11:05:10 +00:00
Mario Rodas
5b211253b2 ruby_2_6: add missing rvm patchset (#56461)
(cherry picked from commit de0373bbe2)
2019-03-17 11:04:57 +00:00
Timo Kaufmann
30d143b40f Merge pull request #57785 from timokau/tensorflow-fixes-19.03
[19.03] tensorflow py2 fixes
2019-03-17 10:50:28 +00:00
Timo Kaufmann
c42783a89f pythonPackages.tensorflow: fix python<3.4 build
This was already added for the source build, but missing for the binary
build.

(cherry picked from commit af7455b1c8)
2019-03-17 11:15:31 +01:00
Timo Kaufmann
57c8d4a663 pythonPackages.tensorflow-tensorboard: fix python2 build
Fix build after https://github.com/NixOS/nixpkgs/pull/56669. Update the
python2 hash and re-add the python2 `futures` dependency. Not sure if
there was a reason for it to be removed in the first place.

(cherry picked from commit 9e95109b89)
2019-03-17 11:15:26 +01:00
Will Dietz
1b9fbe0e12 libseccomp: 2.3.3 -> 2.4.0
https://github.com/seccomp/libseccomp/releases/tag/v2.4.0
(cherry picked from commit 862ea070aa)
PR #57669
2019-03-17 09:10:10 +01:00
worldofpeace
9aab141fba bamf: add wrapGAppsHook
(cherry picked from commit 0125544e2a)
2019-03-16 23:11:11 -04:00
Michael Raskin
973ba4a2c3 pythonPackages.pyside: fix build by passing mesa for GL/gl.h
(cherry picked from commit 20b066356a)
2019-03-17 02:02:16 +01:00
Sarah Brofeldt
d9286030a1 mitmproxy: Fix tests with pytest >= 4.x
(cherry picked from commit e1e5df688a)
2019-03-17 00:13:55 +01:00
Sarah Brofeldt
926e1b977e mitmproxy: Fix build with wsproto >= 0.13
(cherry picked from commit 3df55b80bb)
2019-03-17 00:13:55 +01:00
Timo Kaufmann
ac2ceb01b2 python.pkgs.pyzmq: disable flaky test (#57765)
Recently failed on staging.

(cherry picked from commit 4f2d842a98)
2019-03-16 21:23:32 +00:00
Claes Wallin (韋嘉誠)
1870e453dd racket: add libGL and libGLU to libPath
The sgl collection loads them over FFI.

Closes #52990

Backport of #55002
(cherry picked from commit e43a4fa9ce)
2019-03-16 19:28:21 +01:00
Timo Kaufmann
7fe3222421 pari: fix off-by-one error (#57759)
Done by applying upstream patch. Will be included in the next release.

Upstream: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2117
(cherry picked from commit a648b8c714)
2019-03-16 17:54:48 +00:00
Dmitry Kalinkin
617f31e531 texlive: add veprbl to maintainers
cc #56797

(cherry picked from commit 7669144a27)
2019-03-16 12:05:06 -04:00
Peter Simons
e1cbcd02f2 Merge pull request #57749 from NixOS/haskell-updates
update Haskell package set to GHC 8.6.4 and LTS Haskell 13.13
2019-03-16 16:52:42 +01:00
Peter Simons
3642a3a69c vaultenv: disable broken build 2019-03-16 16:51:07 +01:00
Justin Humm
8a6f65cc57 haskellPackages.hakyll: bump pandoc dependency to 2.7
(cherry picked from commit b82150c8c2)
2019-03-16 16:51:07 +01:00
Peter Simons
7a1432f0f1 hedgewars: disable broken build 2019-03-16 16:51:07 +01:00
Peter Simons
96c7ea5f6d haskell-pandoc: update overrides for the new 2.7.1 version 2019-03-16 16:51:07 +01:00
Peter Simons
9e7acf8b25 hackage-packages.nix: automatic Haskell package set update
This update was generated by hackage2nix v2.14.2-3-gea0f0ca from Hackage revision
03067b92a4.
2019-03-16 16:51:02 +01:00
Peter Simons
fee2f975ec LTS Haskell 13.13 2019-03-16 16:51:02 +01:00
Peter Simons
5a93a33c81 all-cabal-hashes: update to Hackage at 2019-03-16T02:33:50Z 2019-03-16 16:50:11 +01:00
Peter Simons
7fde42b8eb ghc: switch our default compiler to version 8.6.4
Also, drop obsolete 8.6.x minor releases 8.6.1, 8.6.2, and 8.6.3.
2019-03-16 16:50:11 +01:00
Peter Simons
7aee383fa8 Synchronize Haskell infrastructure with master. 2019-03-16 16:50:11 +01:00
Artem Pyanykh
63fd49ed59 sphinx: re-introduce version 1.7.x so that we can compile ghc-8.4.4
ghc-8.4.4 requires sphinx < 1.8, otherwise build fails on haddock with:

    Extension error: The 'ghc-flag' directive is already registered to domain std

(cherry picked from commit f7003e5390)
2019-03-16 16:50:10 +01:00
Florian Jacob
4e8ace1a2d nixos/matrix: add manual section
about self-hosting a matrix client and server

(cherry picked from commit ef52869ef1)
2019-03-16 14:50:12 +01:00
Robert Schütz
698ce521eb python.pkgs.PyICU: fix build
fallout of https://github.com/NixOS/nixpkgs/pull/54182

(cherry picked from commit f7156588b2)
2019-03-16 09:51:30 +01:00
Vladimír Čunát
227245041f Merge #56922: nixos/knot: init basic service + tests
(cherry picked from commit 3aecf21239)
2019-03-16 09:29:20 +01:00
R. RyanTM
40d86702f1 dbeaver: 5.3.5 -> 6.0.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/dbeaver-ce/versions

(cherry picked from commit d7288572ae)
2019-03-15 21:37:51 -04:00
R. RyanTM
f7cd530a6c dbeaver: 5.3.2 -> 5.3.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/dbeaver-ce/versions

(cherry picked from commit 9b4ce956fb)
2019-03-15 21:37:51 -04:00
Eric Bailey
0fe9a03e3f kops: 1.11.0 -> 1.11.1 (#57079)
(cherry picked from commit 78091dffcb)
2019-03-15 23:57:29 +01:00
Robert Schütz
d697aba51b python.pkgs.ordered-set: fix build
(cherry picked from commit 8c594fc8b3)
2019-03-15 22:29:10 +01:00
Robert Schütz
73ddd3e16c python.pkgs.robotframework-tools: fix build, mark as broken on Python 3
(cherry picked from commit 790b92739d)
2019-03-15 22:16:17 +01:00
Robert Schütz
be4d31e431 python.pkgs.moretools: fix build
(cherry picked from commit b5ddc8f377)
2019-03-15 22:16:17 +01:00
Robert Schütz
9925c288dd python.pkgs.zetup: fix build
(cherry picked from commit 8eee646d96)
2019-03-15 22:16:16 +01:00
Maximilian Bosch
d9da434505 mycli: patch tests
Similar to f3c66bb31e. Due to invalid
datatypes a lot of the tests broke.

The patch is based on an upstream PR[1], but had to be modified in order
to apply on v1.19.0.

See also https://hydra.nixos.org/build/90119741
Addresses #56826

[1] https://github.com/dbcli/mycli/pull/711

(cherry picked from commit 69c21be86e)
2019-03-15 22:14:00 +01:00
Stephen
cfeda58f95 labelimg: fix build (#57714)
for #56826 see https://hydra.nixos.org/build/90477186/nixlog/2

(cherry picked from commit a14a7d958f)
2019-03-15 20:50:35 +01:00
Robert Schütz
fc433ae9ff google-music-scripts: 3.0.0 -> 4.0.1
(cherry picked from commit 12d625f119)
2019-03-15 20:26:42 +01:00
Robert Schütz
3494a89540 python3.pkgs.google-music-utils: 2.0.0 -> 2.1.0
(cherry picked from commit b1ad192bf9)
2019-03-15 20:26:41 +01:00
Robert Schütz
d2aff54508 python3.pkgs.google-music: fix build
(cherry picked from commit f06bec0e65)
2019-03-15 20:26:41 +01:00
Robert Schütz
c5e98b6353 python3.pkgs.audio-metadata: fix build
(cherry picked from commit 2f3edc1736)
2019-03-15 20:26:41 +01:00
Robert Schütz
67580252d3 python.pkgs.click-default-group: use pytest_3
(cherry picked from commit 7b045cd31b)
2019-03-15 20:26:41 +01:00
Adam Finn Tulinius
c1f0b9bb33 ipxe: 20180220 -> 20190310 (#57582)
(cherry picked from commit d835df0cbf)
2019-03-15 18:28:00 +01:00
Stephen
0464cbf178 bitcoinarmory: fix build (#57674)
for #56826 see https://hydra.nixos.org/build/90482597/nixlog/2

(cherry picked from commit 7251fc2d45)
2019-03-15 18:12:24 +01:00
Robert Schütz
7bb2b0c746 python.pkgs.django_guardian: broken on Python 2.7
See https://github.com/django-guardian/django-guardian/pull/605.

(cherry picked from commit 9905de73a4)
2019-03-15 17:52:09 +01:00
Robert Schütz
283f72a14d python.pkgs.django_guardian: simplify expression
(cherry picked from commit 6e49276182)
2019-03-15 17:52:09 +01:00
Robert Schütz
419503e2f7 python.pkgs.rasterio: fix build
fallout of https://github.com/NixOS/nixpkgs/pull/54182

(cherry picked from commit f704bee09b)
2019-03-15 17:27:13 +01:00
Robert Schütz
3f864c0250 python.pkgs.restructuredtext_lint: does not support Python 3.7 yet
(cherry picked from commit 739cf7d8ed)
2019-03-15 17:09:23 +01:00
Robert Schütz
ce9d30ca23 python.pkgs.subliminal: improve expression
(cherry picked from commit fa1ada0612)
2019-03-15 17:02:28 +01:00
Robert Schütz
6e9a5bf452 python.pkgs.pysrt: use buildPythonPackage and checkInputs
(cherry picked from commit acad55399a)
2019-03-15 17:02:28 +01:00
xeji
a8ab130ffc xorg.xload: fix build (#57665)
add missing dependency gettext

(cherry picked from commit e3357a1b5a)
2019-03-15 16:45:37 +01:00
Pavel Chuprikov
926ec7dce6 linssid: fix build (#57686)
* tell qmake about QWT, so it does not create a header target
  * set QT_PLUGIN_PATH
  * set PATH so that necessary tools are available
2019-03-15 16:28:02 +01:00
Aristid Breitkreuz
28c3ecbf7b virtualbox-host module: fix warnings syntax
(cherry picked from commit 3671047632)
2019-03-15 14:27:51 +01:00
worldofpeace
9fa2a21ba4 python.pkgs.google_api_python_client: conditionally override for python2.7
(cherry picked from commit fb2af2a574)
2019-03-15 10:21:30 +01:00
worldofpeace
497b0237a5 pythonPackages.weboob: add pyqt5 as native input
Didn't notice it wasn't there. This should make it so we
don't have to set the environment variable anymore.

(cherry picked from commit 72679615a1)
2019-03-15 10:21:29 +01:00
Michael Raskin
c6e60578b6 Merge pull request #57266 from NixOS/libreoffice-update
libreoffice: 6.1.4.2 -> 6.1.5.2, 6.2.1.2
(cherry picked from commit d8d9a520b3)
2019-03-15 09:27:42 +01:00
Pascal Wittmann
8238393bec Merge pull request #57165 from NixOS/fix-xfstests
Fix build of xfstests (19.03)
2019-03-15 09:11:27 +01:00
Pascal Wittmann
009976d1b9 haskellPackages.xattr: fix build with attr-2.4.48 (see ##53716)
(cherry picked from commit 57afc591b3)
2019-03-15 09:10:07 +01:00
Pascal Wittmann
7c6eea87f2 Merge pull request #57289 from NixOS/fix-ima-evm-utils-build
ima-evm-utils: apply upstream fix for attr-2.4.48 compatibility (19.03)
2019-03-15 08:59:47 +01:00
Pascal Wittmann
779ef93e8c Merge pull request #57282 from NixOS/add-ghc-8.6.4
Add GHC 8.6.4
2019-03-15 08:47:25 +01:00
R. RyanTM
ac24779e76 offlineimap: 7.2.2 -> 7.2.3
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/offlineimap/versions

(cherry picked from commit 1b61380bf3)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-03-15 02:52:16 +01:00
worldofpeace
038533614f nixos/pantheon: more mkDefault
(cherry picked from commit 36d4dba317)
2019-03-14 20:30:06 -04:00
worldofpeace
96d4808fb5 nixos/pantheon: cleanup systemPackages
We don't need gnome-bluetooth because its executables
path is already hardcoded into the contractor file, as that's
the only place it is needed.
Don't think we need gnome-power-manager either.

Also add programs like geary to removePackagesByName.

(cherry picked from commit c41a2d28d3)
2019-03-14 20:30:03 -04:00
Jos van Bakel
8a124a33dd pythonPackages.pyrr: 0.10.1 -> 0.10.2 (#57661)
(cherry picked from commit 2c4e220e71)
2019-03-14 22:20:11 +01:00
Stephen
5875f87c75 altcoins.freicoin: fix build (#57647)
(cherry picked from commit fb81978ed3)
2019-03-14 22:12:36 +01:00
Ihar Hrachyshka
9388fc9a56 xscreensaver: Enable perl modules needed for RSS image fetch (#57629)
(cherry picked from commit 4730466366)
2019-03-14 22:13:56 +01:00
xeji
49c59d7d0f Merge pull request #57652 from etu/release-19.03-php-updates
Release 19.03 php updates
2019-03-14 21:44:48 +01:00
Stephen
62e659a372 apmplanner2: fix build
see ArduPilot/apm_planner#1166

(cherry picked from commit 08e4d7cf69)
2019-03-14 16:14:27 -04:00
Alyssa Ross
1cb35bacf4 linux_latest-libre: fix build
Fixes https://github.com/NixOS/nixpkgs/issues/56890.

(cherry picked from commit 0ca13abcb8)
2019-03-14 20:09:08 +01:00
Izorkin
8cc9242ed1 php73: 7.3.2 -> 7.3.3
(cherry picked from commit 768bb1724e)
2019-03-14 19:24:01 +01:00
Izorkin
5134555441 php72: 7.2.15 -> 7.2.16
(cherry picked from commit c6290e381f)
2019-03-14 19:23:57 +01:00
Izorkin
2fa46ddfa0 php71: 7.1.26 -> 7.1.27
(cherry picked from commit 627275399c)
2019-03-14 19:23:53 +01:00
Matthew Bauer
e67e5880cf plasma5: fix typo from pr #57037
Thanks @Yarny0

(cherry picked from commit b703c4d998)
2019-03-14 14:11:06 -04:00
Tim Steinbach
e6b124b3b5 linux: 5.0.1 -> 5.0.2
(cherry picked from commit c22922e251)
2019-03-14 09:14:46 -04:00
Tim Steinbach
ab76f1ed6f linux: 4.20.15 -> 4.20.16
(cherry picked from commit ef53c6dd07)
2019-03-14 09:14:45 -04:00
Tim Steinbach
6a85b29643 linux: 4.19.28 -> 4.19.29
(cherry picked from commit 82d6e57943)
2019-03-14 09:14:45 -04:00
Tim Steinbach
7a7c7f9e2a linux: 4.14.105 -> 4.14.106
(cherry picked from commit 85924d84fc)
2019-03-14 09:14:45 -04:00
Tim Steinbach
80c9c19434 linux: 4.9.162 -> 4.9.163
(cherry picked from commit c130cb7374)
2019-03-14 09:14:45 -04:00
Anton Kindestam
e750a2ed44 qt512: patch qtwebengine against CVE-2019-5786
(cherry picked from commit b22d92fb6d)
2019-03-14 13:59:14 +01:00
Maximilian Bosch
ed21cf9870 nixos/nixos-install: tell the user what to do if setting a root password failed
If setting a root password using the `passwd` call in the
`nixos-install` script fails, it should be explained how set it manually
to ensure that nobody gets accidentally locked out of the system.

(cherry picked from commit eaf98c7bcf)
2019-03-14 12:27:55 +01:00
nyanloutre
97042d883f electron-cash: 3.3.2 -> 3.3.6
Missing dependency and cleanup of the build process

(cherry picked from commit 32c205789e)
2019-03-14 12:20:05 +01:00
nyanloutre
3eb63d1219 pythonPackages.qdarkstyle: init at 2.6.5
(cherry picked from commit 9b9f4d9005)
2019-03-14 12:16:21 +01:00
worldofpeace
9055b33db0 lightdm: disable writing dmrc files to home
Can cause issues where lightdm prefers the last saved session in .dmrc
even if it doesn't exist anymore, preventing people from logging in to
a session.

(cherry picked from commit 44298e76d5)
This can prevent people from starting a session and we don't want that
to happen to anyone using stable.
2019-03-13 21:23:51 -04:00
Edmund Wu
7aa1dd4004 vscode: 1.32.1 -> 1.32.2
(cherry picked from commit 50fd532188072de4bca5e78de9b45fbcdfed93c0)
2019-03-13 20:43:07 -04:00
Maximilian Bosch
68c73b977f python3Packages.pyopencl: fix build
Fix the recently broken build by adding `pybind11`
to the build. Also set $HOME to a temporary directory during the build
to avoid "Permission denied" errors in the build script.

This also unbreaks `sasview` and `pybitmessage`.

See also #56826
See also https://hydra.nixos.org/build/89037506

(cherry picked from commit d2379192b5)
2019-03-14 00:12:34 +01:00
Maximilian Bosch
2d8b128fff pythonPackages.pybind11: apply patch to properly get headers directories
It seems as the `pybind11` build code returns the Python headers
directory (where the `pybind11` headers are stored as well on traditional
setups) rather than returning the dedicated prefix[1].

An exemplary fallout is the broken build of `pyopencl`[2].

[1] https://github.com/pybind/pybind11/issues/1425
[2] https://github.com/NixOS/nixpkgs/pull/56082

(cherry picked from commit 94c3ac2574)
2019-03-14 00:12:34 +01:00
Robert Schütz
cdc714fe4a python.pkgs.cairosvg1: remove
Make python2.pkgs.cairosvg refer to what previously was cairosvg1 instead.

(cherry picked from commit f721655455)
2019-03-13 23:50:17 +01:00
Robert Schütz
3274b1de0f python3.pkgs.cairosvg: 2.2.1 -> 2.3.0
(cherry picked from commit 01cb9b01b8)
2019-03-13 23:45:31 +01:00
Alexander V. Nikolaev
56818208d4 pythonPackages.cairocffi: support 1.0 and 0.9
This patch ensures that Python2 can be used if cairocffi is used.
Version 1.0 dropped Python 2 support.

(cherry picked from commit e878fd6f5f)
2019-03-13 23:45:31 +01:00
Maximilian Bosch
ab89b6b45b pythonPackages.thumbor: 6.6.0 -> 6.7.0
This patch ensures that the currently broken `thumbor`[1] package builds
and works again.

The following problems were fixed:

* Rather than placing required packages (like `gifsicle` or `exiftool`)
  into the build input list, we reference them explicitly where needed
  to ensure that the package works after the build without further
  installs.

* Skip the `test_redeye_applied` test case which is broken for a while
  now.

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

(cherry picked from commit 8dac864470)
2019-03-13 23:45:31 +01:00
Michael Weiss
4012f58e43 Merge pull request #57601 from primeos/sway-1.0-backport
[19.03] Sway 1.0
2019-03-13 23:44:41 +01:00
taku0
8ea3aae70a flashplayer: 32.0.0.142 -> 32.0.0.156 (#57571)
(cherry picked from commit e933c7875b)
2019-03-13 23:31:44 +01:00
Michael Weiss
8395a263f5 scdoc: 1.9.3 -> 1.9.4
(cherry picked from commit 217070368a)
2019-03-13 23:11:51 +01:00
Michael Weiss
e2f0af04bf scdoc: 1.9.1 -> 1.9.3
(cherry picked from commit 560c886174)
2019-03-13 23:11:50 +01:00
Michael Weiss
9328158e66 scdoc: 1.9.0 -> 1.9.1
(cherry picked from commit 410650c128)
2019-03-13 23:11:50 +01:00
Michael Weiss
723eebd0d3 wlroots: 0.4.1 -> 0.5.0
(cherry picked from commit 7f43089999)
2019-03-13 23:07:58 +01:00
Michael Weiss
b9a3dd513b wlroots: 0.4 -> 0.4.1
(cherry picked from commit c484f07d04)
2019-03-13 23:07:57 +01:00
Michael Weiss
40476e8c23 wlroots: 0.3 -> 0.4
(cherry picked from commit afe0725834)
2019-03-13 23:07:57 +01:00
Michael Weiss
466007f65c nixos/sway: Improve the module and adapt it to NixOS
This commit contains the following changes:
- nixos/sway: Remove the beta references
- sway: Drop buildDocs
- nixos/sway: Improve the documentation
- sway,nixos/sway: Adapt Sway to NixOS
  - Copy the default configuration file to /etc/sway/config (Sway will
    still load the identical file from the Nix store but this makes it
    easier to copy the default configuration file).
  - This will also remove all references to the Nix store from the
    default configuration file as they will eventually be garbage
    collected which is a problem if the user copies it.
  - I've also decided to drop the default wallpaper (alternatively we
    could copy it to a fixed location).
- nixos/sway: Drop the package option

(cherry picked from commit 578fe3f5a0)
2019-03-13 22:46:22 +01:00
Michael Weiss
3c5241718e sway: Switch to 1.0
This is the result of executing:
git mv -f pkgs/applications/window-managers/sway/beta.nix pkgs/applications/window-managers/sway/default.nix
git mv -f nixos/modules/programs/sway-beta.nix nixos/modules/programs/sway.nix

And removing sway-beta from the following files:
pkgs/top-level/all-packages.nix
nixos/modules/module-list.nix

(cherry picked from commit 45004c6f63)
2019-03-13 22:46:22 +01:00
Michael Weiss
84853fa9d4 sway-beta: Use the upstream patch to fix the build failure
(cherry picked from commit 1240834176)
2019-03-13 22:46:21 +01:00
Michael Weiss
63bbd6da95 sway-beta: 1.0-rc5 -> 1.0
(cherry picked from commit eb2a26f5c6)
2019-03-13 22:46:21 +01:00
Michael Weiss
3e6d7eb0e4 sway-beta: 1.0-rc4 -> 1.0-rc5
(cherry picked from commit 7bf4323082)
2019-03-13 22:46:21 +01:00
Michael Weiss
97f8768d92 sway-beta: 1.0-rc3 -> 1.0-rc4
(cherry picked from commit 0c89c444a2)
2019-03-13 22:46:21 +01:00
Herwig Hochleitner
b07d96dcdb webkitgtk: 2.22.7 -> 2.24.0
(cherry picked from commit a72bb46155)
2019-03-13 21:14:08 +01:00
Janne Heß
a9b5d36898 exim: Fix build with LDAP (#56058)
The lber library is now required, see also:
https://bugs.archlinux.org/task/27509

(cherry picked from commit b2a6183f75)
2019-03-13 12:18:31 -04:00
Herwig Hochleitner
5a4989f948 chromium: 72.0.3626.121 -> 73.0.3683.75
CVE-2019-5787 CVE-2019-5788 CVE-2019-5789 CVE-2019-5790 CVE-2019-5791
CVE-2019-5792 CVE-2019-5793 CVE-2019-5794 CVE-2019-5795 CVE-2019-5796
CVE-2019-5797 CVE-2019-5798 CVE-2019-5799 CVE-2019-5800 CVE-2019-5801
CVE-2019-5802 CVE-2019-5803 CVE-2019-5804

(cherry picked from commit 006a699e69)
2019-03-13 16:20:37 +01:00
Will Dietz
69fabc286f nodejs-8_x: 8.15.0 -> 8.15.1 (security)
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.15.1
(cherry picked from commit 702120ee90)
2019-03-13 11:48:32 +01:00
Will Dietz
3ada76ede1 nodejs-6_x: 6.16.0 -> 6.17.0 (security)
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V6.md#6.17.0
(cherry picked from commit 4df1c7234f)
2019-03-13 11:48:27 +01:00
Will Dietz
9781b2c8a6 nodejs-10_x: 10.15.0 -> 10.15.3 (security)
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.15.3
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.15.2
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.15.1
(cherry picked from commit 9c894f8418)
2019-03-13 11:48:20 +01:00
Will Dietz
1bb2bcff9e nodejs-11_x: 11.7.0 -> 11.11.0 (security)
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V11.md

(see notes for all versions after 11.7.0)

(cherry picked from commit 5d527793ae)
2019-03-13 11:48:16 +01:00
Dmitry Kalinkin
aa34ca05fe Merge pull request #57531 from veprbl/pr/qt5_qtwebkit_darwin_fix_19.03
[19.03] qt511.qtwebkit: fix on darwin
2019-03-12 23:32:12 -04:00
Robert Djubek
22267de69a pythonPackages.weboob: fix build
(cherry picked from commit f0bd27150a)
ZHF: https://github.com/NixOS/nixpkgs/issues/56826
2019-03-12 22:40:26 -04:00
Jos van Bakel
c4f45dfe99 pythonPackages.rbtools: fix tests (#57258)
(cherry picked from commit 382abc9207)
2019-03-12 22:31:47 +01:00
Aria Edmonds
0c37664eb9 discord: 0.0.8 -> 0.0.9
(cherry picked from commit 24c02a0f5d)
2019-03-12 17:07:03 -04:00
Dmitry Kalinkin
734fdd9916 texlive: add tug.org as a mirror for 2018-final
(cherry picked from commit 2eeb7a9e69)
2019-03-12 21:54:49 +01:00
Dmitry Kalinkin
20f5e2a9ba biber: use texlive.biber for src
(cherry picked from commit 4e103fb651)
2019-03-12 21:54:49 +01:00
Robert Schütz
70ef58d5f6 biber: 2.11 -> 2.12
Biber 2.12 is for biblatex 3.12.

(cherry picked from commit 1046761a3e)
2019-03-12 21:54:49 +01:00
Dmitry Kalinkin
ab77cf4b65 texlive: 2018 -> 2018-final
(cherry picked from commit 40f55d6870)
2019-03-12 21:54:49 +01:00
Dmitry Kalinkin
6e8c73114c texlive/combine.nix: fix bugs in languages filter
Initial language.{dat,def} configuration files provided by
`texlive.hyphen-base` may declare languages that were not part of the
combined packages. Those are filtered out by a sed script that had few
problems:

1) The sed script was generated from a list of potentially non-unique
packages. Every repetition of a select and print clause would produce a
copy of a language declaration in the output file. This became a problem
for update to the 2018-final, the fmtutil would crash from too much
German hyphenation.
2) The select clauses were ambiguous: both '^% from hyphen' and
'^% from hyphen-welsh' will match a line 'from hyphen-welsh'.

(cherry picked from commit 8f35ef724a)
2019-03-12 21:54:48 +01:00
Dmitry Kalinkin
0b2d41568b texlive/combine.nix: clarify implementation of mkUniqueOutPaths
mkUniqueOutPaths used to produce empty paths for dummy packages, this
version strips those out. This does not affect `pkgList.bin` at all, but
`pkgList.nonbin` is affected, so this is not exactly a refactoring. It
should not harm to have a cleaner `paths`.

Also, original comment said "here we deal with those dummy packages
needed for hyphenation filtering". This doesn't seem to be true, the
packages that were really filtered are actually metapackages that
represent collections. I also could not find any dummy packages even in
the originally committed version.

(cherry picked from commit 30364211e6)
2019-03-12 21:54:48 +01:00
Dmitry Kalinkin
2f5520c1dc texlive/combine.nix: s/mkUniquePkgs/mkUniqueOutPaths/
(cherry picked from commit 658d83a182)
2019-03-12 21:54:48 +01:00
Dmitry Kalinkin
cdefec43c8 texlive: move fastUnique from default.nix to combine.nix
(cherry picked from commit a1505f3c6a)
2019-03-12 21:54:48 +01:00
Dmitry Kalinkin
6f380466ce qt5.qtwebkit: don't set qmake variables for cmake build
(cherry picked from commit 518f997eb5)
2019-03-12 13:56:47 -04:00
Dmitry Kalinkin
91f2dc0a35 qt511.qtwebkit: fix on darwin
readline is used on macOS and iOS for some javascript console (JSC). It
seems to be easier to disable it than to fix it.

(cherry picked from commit 4bbd00e934)
2019-03-12 13:56:47 -04:00
Dmitry Kalinkin
fb24cb25dd qt5.qtwebkit: refactor version comparison
This introduces usingAnnulenWebkitFork variable. Using version
check for qtbase.version is misleading because annulen's fork is not
tied to a specific qt5 release.

(cherry picked from commit 67186defda)
2019-03-12 13:56:46 -04:00
Dmitry Kalinkin
a98b25897c qt5.qtwebkit: link against libicucore.dylib from darwin.ICU instead of /usr/lib
The impure library was introduced in

   775531c1e3 ('qt58: extend darwin compatibility')

cmake-based build can use a non-apple ICU if -DMACOS_USE_SYSTEM_ICU=OFF
is set.

(cherry picked from commit f212dd2e32)
2019-03-12 13:56:45 -04:00
Vladimír Čunát
9e762daa73 Merge branch 'staging-19.03' into release-19.03 2019-03-12 17:03:09 +01:00
Bjørn Forsman
7190a0b696 deadpixi-sam: remove duplicate alias
It is already listed in aliases.nix, and I managed to get this from Nix:

  error: Alias deadpixi-sam is still in all-packages.nix

Fixes: 218d81bc9d ("all-packages: move aliases to aliases.nix")
(cherry picked from commit 38ae8aed16)
2019-03-12 12:58:42 +01:00
Vladimír Čunát
a35cdfec11 Merge branch 'release-19.03' into staging-19.03
Thousands of rebuilds.
2019-03-12 11:46:01 +01:00
Sebastian Jordan
6c33f9f34f nix-prefetch-github: 2.1 -> 2.2
(cherry picked from commit b0e63adc93)
2019-03-11 23:16:00 -04:00
Matthew Bauer
72f6eabc49 plasma: handle ksycoca5 better
- Remove xdg-desktop-menu-dummy.menu kbuildsycoca5. Not sure why we
  need it but it is a pretty big failure if it exists.
  See issue #56176.

- plasma: clear ksycoca cache before building

  This is needed to pick up on software removed since the last cache
  update. Otherwise it hangs around as zombies forever (or until the
  cache is cleared).

- Add the above + the icon cache cleanup to plasmaSetup

  This will be run for the logged in user on each nixos-rebuild.
  Unfortunately this only works if you are managing software through
  nixos-rebuild (nix-env users need to run this manually, otherwise
  log out and log back in).

(cherry picked from commit 393b359f13)
2019-03-11 22:59:36 -04:00
Sarah Brofeldt
8d9dd03ebd pgcli: Patch tests (#57402)
(cherry picked from commit f3c66bb31e)
2019-03-12 01:30:42 +01:00
Mario Rodas
4fa4dbe9ab ffmpeg-full: fix darwin build (#57342)
(cherry picked from commit 92917bfb99)
2019-03-12 01:24:59 +01:00
teh
b5a0937269 vowpalwabbit: fix build. (#57455)
(cherry picked from commit 30103df024)
2019-03-12 00:49:39 +01:00
Robert Schütz
0fc413e2be postfix: 3.4.0 -> 3.4.3 (#57368)
(cherry picked from commit 1f302fa30d)
2019-03-11 23:37:12 +01:00
WilliButz
ccb006fa2f grafana: 6.0.0 -> 6.0.1
(cherry picked from commit 881ab86491)
2019-03-11 23:18:00 +01:00
Vladimír Čunát
2d2dd4050f Merge #57427: smenu: relax platform from linux to unix
(cherry picked from commit 636910e563)
2019-03-11 21:06:50 +01:00
Silvan Mosberger
fc40f61347 pythonPackages.poetry: Fix build
(cherry picked from commit bfac72b276)
2019-03-11 17:27:08 +00:00
Mario Rodas
5f3be9bc4b buildRustPackage: Allow pname attribute
(cherry picked from commit 435b326722)
2019-03-11 10:08:35 +00:00
worldofpeace
aea9130d2f audacity: 2.3.0 -> 2.3.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/audacity/versions

(cherry picked from commit 348b734806)
There were outstanding issues with 2.3.0 being built against wxWidgets 3.0
that were fixed in this release.

https://www.audacityteam.org/audacity-2-3-1-released/
2019-03-10 20:54:45 -04:00
Florian Klink
50876481a0 yubioath-desktop: prefix QML2_IMPORT_PATH
Otherwise, yubioath-desktop can't find pyothersides qml files:

QQmlApplicationEngine failed to load component
qrc:/qml/main.qml:168 Type YubiKey unavailable
qrc:/qml/YubiKey.qml:2 module "io.thp.pyotherside" is not installed

[1]    17017 segmentation fault  result/bin/yubioath-desktop

(cherry picked from commit bfc590572f)
2019-03-10 23:40:18 +01:00
Herwig Hochleitner
53cbd05eb2 Merge pull request #56018 from knedlsepp/fix-cuda-gdb
cudatoolkit: Several fixes
(cherry picked from commit b854767dac)
2019-03-10 23:23:44 +01:00
Sander van der Burg
ea23730c7a titaniumenv: fix stripping the unneeded architectures
(cherry picked from commit 907c478ceb)
2019-03-10 23:19:09 +01:00
Lancelot SIX
a673ef75c1 qgis: 2.18.28 -> 3.4.5
(cherry picked from commit 9bcdf81708)
2019-03-10 23:05:54 +01:00
Lancelot SIX
aff2be7acc pythonPackages.qscintilla-qt5: fix installation
(cherry picked from commit b47f47ab10)
2019-03-10 23:05:53 +01:00
Timo Kaufmann
72aa6e382c sage: fix docbuild (#57297)
The docbuild (or rather its tests) failed because sphinx built some
English parts of the documentation in Russian. The added debian patch
fixes that by isolating docbuilding threads in sphinx using
proper subprocesses.

(cherry picked from commit 33c23ce1e3cfdb03f97cd1cab6800ac7db86ece3)
2019-03-10 21:42:48 +00:00
Herwig Hochleitner
cf00818ba2 pythonPackage.azure-mgmt-*: fix builds
see https://github.com/NixOS/nixpkgs/issues/52547

(cherry picked from commit 88d9ef9e1f)
2019-03-10 22:20:17 +01:00
Herwig Hochleitner
d5f3c49d07 pythonPackages.msrestazure: init 0.6.0
(cherry picked from commit 292a4520f9)
2019-03-10 22:20:17 +01:00
Herwig Hochleitner
8ac84e4d66 pythonPackages.msrest: init 0.6.2
(cherry picked from commit 668d18c07a)
2019-03-10 22:20:17 +01:00
Pascal Wittmann
944f258b2b ima-evm-utils: apply upstream fix for attr-2.4.48 compatibility 2019-03-10 21:19:53 +01:00
Maximilian Bosch
a90bfc1df5 autorandr: install bash completions properly
Backport of #57261
(cherry picked from commit 0015e526c7)
2019-03-10 21:04:30 +01:00
Peter Simons
925d882017 ghc: add new 8.6.4 version 2019-03-10 20:39:40 +01:00
John Ericson
61fabdfc67 Merge pull request #57268 from obsidiansystems/override-unstable-nix-19.03
nix*: Make .override work for 19.03
2019-03-10 14:19:52 -04:00
Tim Steinbach
2aa471997f linux: 5.0 -> 5.0.1
(cherry picked from commit 0db1b7b025)
2019-03-10 14:18:51 -04:00
Tim Steinbach
dcc499b7aa linux: 4.20.14 -> 4.20.15
(cherry picked from commit 742a089322)
2019-03-10 14:18:51 -04:00
Tim Steinbach
ffba64f25e linux: 4.19.27 -> 4.19.28
(cherry picked from commit 810401284f)
2019-03-10 14:18:51 -04:00
Tim Steinbach
32d3183ea3 linux: Add 5.0
Update latest kernel to 5.0

(cherry picked from commit 09d708eee3)
2019-03-10 14:18:42 -04:00
John Ericson
44cc6fa212 Merge remote-tracking branch 'upstream/release-19.03' into override-unstable-nix-19.03 2019-03-10 13:58:47 -04:00
Timo Kaufmann
72ad05bfc0 Merge pull request #57253 from timokau/sage-python-upgrade-fixes-19.03
[19.03] Sage python upgrade fixes
2019-03-10 15:19:50 +00:00
vanzef
52e59ba4ad marisa-python: fix build (#57013)
(cherry picked from commit 6a11ba39ca)
2019-03-10 16:06:07 +01:00
Timo Kaufmann
64c1b93e75 sage: patch for pip 19
pip 19 introduced a deprecation warning for python 2.7. Since sage
internally uses pip to query for installed packages, this deprecation
warning will show up at unexpected times. That is ugly and messes with
the testsuite.

Upstream: https://trac.sagemath.org/ticket/27405
(cherry picked from commit 2de81ee78f)
2019-03-10 15:58:21 +01:00
Timo Kaufmann
de9921ebf9 python.pkgs.rpy2: fix strictDeps fallout
See https://github.com/NixOS/nixpkgs/pull/54182 and
https://github.com/NixOS/nixpkgs/pull/55757.

(cherry picked from commit c6e4e1dbdf)
2019-03-10 15:58:07 +01:00
Timo Kaufmann
d5230eb1df sage: fix strictDeps fallout
See https://github.com/NixOS/nixpkgs/pull/54182 and
https://github.com/NixOS/nixpkgs/pull/55757.

(cherry picked from commit 9e3754786b)
2019-03-10 15:57:57 +01:00
Matthew Glazar
ad9db2a3ed python35: fix build on macOS
The upstream patch for distutils does not apply cleanly to Python 3.5's
sources. Fix the patch to make python35 build on macOS.

(cherry picked from commit 0bf2d63366)
2019-03-10 13:39:07 +01:00
R. RyanTM
6511fd019b freewheeling: 0.6.4 -> 0.6.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/freewheeling/versions

(cherry picked from commit 54cca013ef)
2019-03-10 13:26:38 +01:00
R. RyanTM
85f2b5ddda focuswriter: 1.7.1 -> 1.7.2
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/focuswriter/versions

(cherry picked from commit 459aceacc3)
2019-03-10 13:26:38 +01:00
R. RyanTM
fd2b1297db flatpak-builder: 1.0.3 -> 1.0.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/flatpak-builder/versions

(cherry picked from commit 841d338f4e)
2019-03-10 13:26:38 +01:00
R. RyanTM
e2e4446f0f drumkv1: 0.9.4 -> 0.9.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/drumkv1/versions

(cherry picked from commit 20510cf24e)
2019-03-10 13:26:37 +01:00
R. RyanTM
10b0c7184f double-conversion: 3.1.1 -> 3.1.3
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/double-conversion/versions

(cherry picked from commit be593f21a5)
2019-03-10 13:26:37 +01:00
R. RyanTM
135e44534b ddcutil: 0.9.4 -> 0.9.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/ddcutil/versions

(cherry picked from commit c10e59e7bf)
2019-03-10 13:26:37 +01:00
R. RyanTM
c796b1049f coturn: 4.5.1.0 -> 4.5.1.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/coturn/versions

(cherry picked from commit 416a965692)
2019-03-10 13:26:37 +01:00
R. RyanTM
cffc88afa2 ckbcomp: 1.189 -> 1.190
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/ckbcomp/versions

(cherry picked from commit 9161b2012a)
2019-03-10 13:26:37 +01:00
R. RyanTM
fe995862fa cfr: 0.139 -> 0.140
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/cfr/versions

(cherry picked from commit d7c1eedf81)
2019-03-10 13:26:37 +01:00
R. RyanTM
1227042787 brave: 0.60.45 -> 0.61.50
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/brave/versions

(cherry picked from commit 6cbf57f65c)
2019-03-10 13:26:37 +01:00
R. RyanTM
8674d5e39d appstream: 0.12.5 -> 0.12.6
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/appstream/versions

(cherry picked from commit 404b76582c)
2019-03-10 13:26:37 +01:00
R. RyanTM
891eb9d9d9 ammonite: 1.6.3 -> 1.6.4
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/ammonite/versions

(cherry picked from commit 65ec866a56)
2019-03-10 13:26:36 +01:00
R. RyanTM
7a7fae9e60 flatpak-builder: 1.0.2 -> 1.0.3 (#55315)
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/flatpak-builder/versions

(cherry picked from commit 71d92f6408)
2019-03-10 13:26:33 +01:00
R. RyanTM
bdda94ac3b ckbcomp: 1.188 -> 1.189
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/ckbcomp/versions

(cherry picked from commit 495dd9f84b)
2019-03-10 13:25:46 +01:00
Will Dietz
ca14bcef55 Merge #56494: file: 5.35 -> 5.36 (staging-19.03)
(cherry picked from commit 63e68e5bb9)
Fixes #57141.
2019-03-10 10:00:24 +01:00
Vladimír Čunát
939df4bc86 libarchive: apply upstream CVE patches
Fixes #57150.

(cherry picked from commit 5767c18d99)
2019-03-10 09:55:42 +01:00
Vladimír Čunát
3605222d0f tikzit: really use enableParallelBuilding = false
I pushed the incomplete parent commit by mistake.
It defaults to = true, thanks to qmake IIRC.
2019-03-10 08:01:09 +01:00
Vladimír Čunát
96fecc37d4 tikzit: enableParallelBuilding = false
https://hydra.nixos.org/build/90301445
It's quite fast anyway: 1-2 minutes.
2019-03-10 07:52:15 +01:00
Timo Kaufmann
42db132655 trash-cli: fix build (#56818)
More fallout from enabling strictDeps in #55757. `buildInputs` are not
accessible from the check phase.

(cherry picked from commit 83dcf66186)
2019-03-09 23:03:16 -05:00
Pascal Wittmann
ac1d0c45a5 xfstests: fix build (see #53716) by applying upstream patches 2019-03-09 20:42:20 +01:00
Matthew Bauer
a6caed5660 ova: remove stateVersion
This is undefined in the default configuration.nix template.

(cherry picked from commit a923a5bbdc)
2019-03-09 14:27:42 -05:00
Michael Raskin
ce9b83b8fe Merge pull request #57132 from ckauhaus/vulnix-1.8.0
vulnix: 1.7.1 -> 1.8.0
(cherry picked from commit 1f8aa8bf1c)
2019-03-09 20:12:55 +01:00
worldofpeace
1b97770dcf pythonPackages.rfc3986: fix pytest dependency
(cherry picked from commit 40953c84e4)
2019-03-09 13:01:36 -05:00
Silvan Mosberger
6607b8e661 gtk3: Fix for missing symbols (again)
Was removed again in f9a62dbace, but it
was still needed after all, see https://github.com/NixOS/nixpkgs/issues/55692#issuecomment-469058386

(cherry picked from commit e0cc49c219)
2019-03-09 17:31:10 +01:00
worldofpeace
ad3e19a520 nixos/pantheon: add elementary-redacted-script to fonts
Needed by elementary-screenshot-tool to conceal text.

(cherry picked from commit 59f47088fb)
2019-03-09 11:21:57 -05:00
worldofpeace
96587cccb8 pantheon.elementary-redacted-script: init at 2016-06-03
(cherry picked from commit 86f4badc7d)
2019-03-09 11:21:57 -05:00
Pascal Wittmann
83e20a570f mhddfs: fix build (see #53716)
(cherry picked from commit bbfd2be8ed)
2019-03-09 17:15:45 +01:00
Pascal Wittmann
9368dc4cdd aide: 0.16 -> 0.16.1
(cherry picked from commit 2e1217fb48)
2019-03-09 17:07:36 +01:00
Andreas Rammhold
300697dac8 ipget: 0.2.5 -> 0.3.2
Unbreak the build by updating to a newer version.

cc #56826

(cherry picked from commit 1d86cd44f0)
2019-03-09 10:26:12 -05:00
Vladimír Čunát
52565a8818 Merge #56833: linuxPackages.bcc: fix build
(cherry picked from commit 84be644f87)
2019-03-09 13:31:57 +01:00
Pascal Wittmann
87321b656e areca: fix build
(cherry picked from commit 13e4398683)
2019-03-09 13:17:48 +01:00
Silvan Mosberger
ff568fdfd1 sad: Fix build
(cherry picked from commit 8ca1c925c6)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-03-09 12:31:41 +01:00
R. RyanTM
b3acca7f85 react-native-debugger: 0.8.2 -> 0.9.7
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/react-native-debugger/versions

(cherry picked from commit 6d9885f20b)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-03-09 12:06:41 +01:00
Jonas Juselius
d100f96363 nixos/kubernetes: add dns addonmanger reconcile mode option (#55834)
Allow coredns ConfigMap and Depolyment to be editable by the user. An use
case is augmenting the default, generated dns records with local services.
2019-03-09 13:01:58 +02:00
Vladimír Čunát
4610d6c94f Merge branch 'staging-19.03' into release-19.03 2019-03-09 08:47:58 +01:00
Silvan Mosberger
cc1fa81489 sonata: Fix build
(cherry picked from commit ba691817ca)
2019-03-09 03:08:09 +01:00
Silvan Mosberger
f0fb7c64f5 turses: Fix
(cherry picked from commit 308dfc17ac)
2019-03-08 20:27:46 -05:00
Matthew Bauer
70f1335f8d release.nix: remove firefox-unwrapped from darwin-tested
Unfortunately it is broken and I won’t have time to fix right now.
Most likely we will have to wait until the macOS 10.12 update to get
this one working again.
2019-03-08 20:06:22 -05:00
Daniël de Kok
6c34eaf9df python2Packages.moinmoin: 1.9.9 -> 1.9.10 (#56970)
Changes:

https://github.com/moinwiki/moin-1.9/blob/1.9.10/docs/CHANGES#L13

This commit also replaces a ISO-8859-1 character in setup.cfg to fix the
build.

(cherry picked from commit 449e7f9777)
2019-03-08 23:22:58 +01:00
worldofpeace
6318530bf8 pantheon.elementary-calculator: 1.5.1 -> 1.5.2
Just translations

https://github.com/elementary/calculator/releases/tag/1.5.2
(cherry picked from commit a494ce9c62)
2019-03-08 17:17:31 -05:00
Will Dietz
5919bf3b40 ntp: 4.2.8p12 -> 4.2.8p13 (#57059)
From http://www.ntp.org/index.html:
> ntp-4.2.8p13 was released on 07 March 2019.
> It addresses 1 medium-severity security issue in ntpd, and provides 17
> other non-security fixes and 1 improvements over 4.2.8p12.

(cherry picked from commit d7c23cc65f)
2019-03-08 23:07:15 +01:00
Edmund Wu
27b4e71d80 vscode: 1.32.0 -> 1.32.1 (#57089)
(cherry picked from commit 128f691b87)
2019-03-08 16:41:58 -05:00
Silvan Mosberger
440c83d339 vim-vint: Fix
(cherry picked from commit 55be7ae9d5)
2019-03-08 16:37:42 -05:00
Silvan Mosberger
3a2151f793 xpilot-ng: Fix build and cleanup (#57088)
(cherry picked from commit 72a8952e84)
2019-03-08 22:26:32 +01:00
Herwig Hochleitner
35ee677f23 nixos/virtualbox: add warning when for ineffective nixpkgs config
nixpkgs.config.virtualbox.enableExtensionPack doesn't do anything, but
used to. Add a warning for the unsuspecting.

(cherry picked from commit 8b6a38ce7e)
2019-03-08 21:07:16 +01:00
kyren
35845b0b2a stepmania: switch to clangStdenv
Stepmania appears to be miscompiled with gcc, fixes #54227

(cherry picked from commit ff6e4b44dc)
2019-03-08 18:29:27 +01:00
Johan Thomsen
5831fe1f4a nixos/kubernetes: minor module fixes
- mkDefault etcd instance name
- make sure ca-cert in mkKubeConfig can be overriden
- fix controller-manager "tls-private-key-file" flag name

(cherry picked from commit 80c4fd4f85)
2019-03-08 16:24:20 +01:00
Will Dietz
2832a89c38 pythonPackages.m2crypto: swig2 as nativeBuildInput so it can be invoked
Fixes #56993.

(cherry picked from commit 10646d5e62)
2019-03-08 12:25:30 +00:00
Vladimír Čunát
bf6b3a6038 Merge #56586: vimPlugins.meson: init, following pkgs.meson
(cherry picked from commit 6e6633bacb)
2019-03-08 12:23:35 +01:00
Alyssa Ross
5921a7043d crystal: fix build on Darwin
(cherry picked from commit 5b52e90e4a)
2019-03-08 11:19:19 +00:00
Ryan Mulligan
245cd8f53b nixos/hdaps: automatically enable the hdapsd kernel module (#56309)
patch by hpoussin via
https://discourse.nixos.org/t/hdapsd-automatically-enable-the-hdapsd-kernel-module/2183
2019-03-08 09:54:48 +02:00
Will Dietz
0711b73ae8 electron: 4.0.5 -> 4.0.6
https://electronjs.org/releases/stable#release-notes-for-v406
(cherry picked from commit 79b321b09c)
PR #56799
2019-03-08 07:04:27 +01:00
Will Dietz
55a2904252 electron_3: 3.1.3 -> 3.1.4
https://electronjs.org/releases/stable?version=3#3.1.4
(cherry picked from commit 505f2d364b)
PR #56799
2019-03-08 07:04:14 +01:00
Will Dietz
0d0bd6de4e electron: version bumps
(cherry picked from commit 423e3e59cd)
PR #56799
2019-03-08 07:04:00 +01:00
Linus Heckemann
37b1058c49 nixos/bash: fix root prompt
b4b67177b5 introduced a regression of
its own: the prompt would end with $ for all users, not with # for
root as it should.

(cherry picked from commit efbd24ffcc)
2019-03-08 03:11:04 +01:00
Edmund Wu
5847485e3e vscode: 1.31.1 -> 1.32.0
(cherry picked from commit 2a0d01f076)
2019-03-07 17:56:33 -05:00
worldofpeace
bccfcd2af5 pantheon.wingpanel: fix potentially overlapping windows
https://github.com/elementary/wingpanel/pull/198
(cherry picked from commit 3ba5f177f0)
2019-03-07 17:50:46 -05:00
worldofpeace
8d3ad26c75 pantheon.wingpanel-indicator-sound: 2.1.2 -> 2.1.3
https://github.com/elementary/wingpanel-indicator-sound/releases/tag/2.1.3
(cherry picked from commit d7764de507)
2019-03-07 17:50:46 -05:00
worldofpeace
607ddcb4cb pantheon.wingpanel-indicator-keyboard: 2.1.1 -> 2.1.2
Just translations.

https://github.com/elementary/wingpanel-indicator-keyboard/releases/tag/2.1.2
(cherry picked from commit bd86c2905f)
2019-03-07 17:50:46 -05:00
worldofpeace
135c6e1af3 pantheon.switchboard-plug-keyboard: 2.3.4 -> 2.3.5
No more silly LIBRARY_PATH

https://github.com/elementary/switchboard-plug-keyboard/releases/tag/2.3.5
(cherry picked from commit 9ca0f4794a)
2019-03-07 17:50:46 -05:00
worldofpeace
a88ca16051 pantheon.elementary-code: 3.0.2 -> 3.1.0
https://github.com/elementary/code/releases/tag/3.1.0
(cherry picked from commit 7eedc53ef1)
2019-03-07 17:50:46 -05:00
Will Dietz
8ed5c2075a unifont_upper: 11.0.03 -> 12.0.01
(cherry picked from commit 27fd948cf7)
2019-03-07 23:43:09 +01:00
Will Dietz
493bafcfb4 unifont: 11.0.03 -> 12.0.01
http://lists.gnu.org/archive/html/info-gnu/2019-03/msg00002.html
(cherry picked from commit 5531e13f65)
2019-03-07 23:43:09 +01:00
Will Dietz
e694957974 unifont_upper: 10.0.06 -> 11.0.03
Also move to GNU mirror for the file, as we do for unifont.

(cherry picked from commit e78d7c56e0)
2019-03-07 23:42:51 +01:00
Josef Kemetmüller
41dd4fbbed pythonPackages.mxnet: Fix build (#56848)
(cherry picked from commit 811293134b)
2019-03-07 23:06:40 +01:00
Josef Kemetmüller
2b1eecf32d xorg.editres: fix build (#56979)
(cherry picked from commit 680e9f1d91)
2019-03-07 23:02:31 +01:00
Josef Kemetmüller
9b562d62c2 xorg.oclock: Fix build (#56978)
(cherry picked from commit 22160302cf)
2019-03-07 22:59:31 +01:00
Josef Kemetmüller
68cb70612a udocker: Fix build (#57002)
The latest changes to support better cross-compilation compatibility
have introduced a stricter handling of dependency specifications in
python. Since b4acd97, mock and nosetest should be checkInputs, since
they are used for testing.

Fixes: #56972
(cherry picked from commit 61a8aca8e5)
2019-03-07 22:55:43 +01:00
Will Dietz
9ab0281f6b man-pages: 4.16 -> 5.00 (#57039)
(cherry picked from commit e8d116f8ee)
2019-03-07 22:52:03 +01:00
Herwig Hochleitner
ae27cd194d Merge commit '9ae406c0749bbc7373d7422edeaf6b1b6caa0dae' of github.com:NixOS/nixpkgs into fix-chromium
fixes https://github.com/NixOS/nixpkgs/pull/49797

(cherry picked from commit 4901dc4e74)
2019-03-07 21:44:21 +01:00
Danylo Hlynskyi
dc988c0bd6 module system: revert "remove types.optionSet", just deprecate (#56857)
The explicit remove helped to uncover some hidden uses of `optionSet`
in NixOps. However it makes life harder for end-users of NixOps - it will
be impossible to deploy 19.03 systems with old NixOps, but there is no
new release of NixOps with `optionSet` fixes.

Also, "deprecation" process isn't well defined. Even that `optionSet` was
declared "deprecated" for many years, it was never announced. Hence, I
leave "deprecation" announce. Then, 3 releases after announce,
we can announce removal of this feature.

This type has to be removed, not `throw`-ed in runtime, because it makes
some perfectly fine code to fail. For example:
```
$ nix-instantiate --eval -E '(import <nixpkgs/lib>).types' --strict
trace: `types.list` is deprecated; use `types.listOf` instead
error: types.optionSet is deprecated; use types.submodule instead
(use '--show-trace' to show detailed location information)
```
2019-03-07 21:29:29 +02:00
Jörg Thalheim
8ad811b3c3 Merge #57015: lua packages: fix some bugs
(cherry picked from commit 2dc7486b39)
In particular, lua*Packages.luuid now builds.
2019-03-07 20:23:13 +01:00
Dmitry Kalinkin
a9d6158277 yoda: fix sha hash of the tarball
Tarball was replaced upstream. The files are the same, changes are meta
only (appear to be timestamps).

(cherry picked from commit cf1de3c2df)
2019-03-07 14:10:27 -05:00
markuskowa
b161cd9e49 Merge pull request #56995 from aanderse/super-tux-kart
superTuxKart: fix broken build
2019-03-07 19:37:02 +01:00
Aaron Andersen
a593753404 superTuxKart: fix broken build 2019-03-07 11:44:57 -05:00
Michael Raskin
97464d087e Release notes: switch to modesetting: mention backlight problem
(cherry picked from commit 500d61560f)
2019-03-07 13:39:26 +01:00
Markus Kowalewski
e48fa237db gnuradio-limesdr: fix build (add pkgconfig)
(cherry picked from commit 53b12891dc)
2019-03-07 13:29:54 +01:00
Josef Kemetmüller
1a24f2c738 pythonPackages.wrf-python: Fix build (#56989)
The latest changes to support better cross-compilation compatibility
have introduced a stricter handling of dependency specification in
python. Since b4acd977, gfortran should be put into nativeBuildInputs,
as it's a build-time only dependency for wrf-python. Similarly, mock is
only required when testing, so it should go to checkInputs.

(cherry picked from commit 36f5c0d58d)
2019-03-07 13:24:23 +01:00
Josef Kemetmüller
82a3ab0dd2 sewer: Fix build
The sed expression actually caused an error on hydra:
```
sed: -e expression #1, char 18: Invalid collation character
```
It seems to build fine without it however.
2019-03-07 11:28:30 +01:00
Josef Kemetmüller
939abefd1d sewer: 0.6.0 -> 0.7.0 2019-03-07 11:28:30 +01:00
Matthieu Coudron
43c60ce210 python3Packages.matplotlib: 3.0.2 -> 3.0.3
(cherry picked from commit 0752393738)
2019-03-07 10:08:58 +01:00
Frederik Rietdijk
3a7ded14ea ticpp: init at unstable-2019-01-09
(cherry picked from commit 1f8b70e5e5)
2019-03-07 10:08:57 +01:00
Frederik Rietdijk
68ddeacb5b multipart-parser-c: init at unstable-2015-12-14
(cherry picked from commit 931ee3e589)
2019-03-07 10:08:57 +01:00
Frederik Rietdijk
f6fe5cd09b prometheus-cpp: init at 0.6.0
(cherry picked from commit bca5d89ccf)
2019-03-07 10:08:56 +01:00
Frederik Rietdijk
714abf3601 civetweb: init at 1.11
(cherry picked from commit 15e8eebb6d)
2019-03-07 10:08:56 +01:00
Lancelot SIX
d583d1d7aa pythonPackages.django_1_11: 1.11.18 -> 1.11.20
See release notes:
- https://docs.djangoproject.com/en/dev/releases/1.11.19/
- https://docs.djangoproject.com/en/dev/releases/1.11.20/

(cherry picked from commit 3e81b4500e)
2019-03-07 09:57:49 +01:00
Tom Hunger
b01004eb4c pytorch: Use nativeBuildInputs to specify binary build dependencies.
(cherry picked from commit 488230c253)
2019-03-07 09:42:16 +01:00
Michael Raskin
dd1f371a1e Merge pull request #56999 from knedlsepp/fix-cgui
cgui: 2.0.3 -> 2.1.0 (to fix build)
(cherry picked from commit 80d032b13b)
2019-03-07 09:18:09 +01:00
Stephen
4743d8dabc gcompris: fix build
(cherry picked from commit 86cb9d3b61)
2019-03-07 08:59:43 +01:00
Ivan Kozik
2e6b8b337b chromium: fix sha256 for 72.0.3626.121
The sha256 was previously unchanged from 72.0.3626.119

(cherry picked from commit 2129c6ec05)
2019-03-07 05:28:29 +01:00
Shea Levy
a8a6e9eac3 Merge pull request #56920 from grahamc/closure-graph-memory-19.03
Closure graph memory (19.03)
2019-03-06 22:27:49 -05:00
Danylo Hlynskyi
940f396f59 zram: revert "change default algorithm to zstd" (#56856)
19.03 default kernel is still 4.14, which doesn't support zstd. So,
zramSwap in current fasion fails on default kernel.
2019-03-07 02:07:52 +02:00
Janne Heß
c6f607a940 nixos/nginx: Support additional listen parameters (#56971)
(cherry picked from commit 57e8b48a5a47b2666489a07644ac882cbe7aa2c5)
2019-03-07 01:42:00 +02:00
Herwig Hochleitner
17a5b64424 azure-mgmt-*: re-init older versions for use with nixops
add pinned versions package-private

azure-mgmt-compute 0.20.1
azure-mgmt-network 0.20.1
azure-mgmt-nspkg 1.0.0
azure-mgmt-resource 0.20.1
azure-mgmt-storage 0.20.0

https://github.com/NixOS/nixpkgs/pull/52550
https://github.com/NixOS/nixops/issues/1065
(cherry picked from commit 0c4d750ea1)
2019-03-06 23:10:46 +01:00
William Kral
c891182f1b vagrant: re-add nowarn patch (#56863)
(cherry picked from commit 0b76b2d2af)
2019-03-06 22:55:31 +01:00
Dmitry Kalinkin
52b75d3d85 rivet: 2.7.0 -> 2.7.0
Upstream changed tarball yet again. The change is to autotools scripts,
the new ones have a more strict check for "yoda" package version.

(cherry picked from commit 01ad172921)
2019-03-06 16:49:58 -05:00
Stephen
186557e957 qtwebkit-plugins: fix build for different hunspell version (#56925)
(cherry picked from commit 38ee19986d)
2019-03-06 15:43:33 -05:00
Tim Steinbach
26a40c67c7 vivaldi-ffmpeg-codecs: 72.0.3626.121 -> 72.0.3626.122
(cherry picked from commit 07fdb3b102)
2019-03-06 10:29:57 -05:00
José Romildo Malaquias
705dfc648b vivaldi-ffmpeg-codecs: 72.0.3626.109 -> 72.0.3626.121
(cherry picked from commit 38b8f49b87)
2019-03-06 10:29:51 -05:00
Tim Steinbach
e76c639743 vivaldi: 2.3.1440.57-1 -> 2.3.1440.60-1
(cherry picked from commit 9d20f2214b)
2019-03-06 10:28:22 -05:00
José Romildo Malaquias
bc325d8247 vivaldi: 2.3.1440.48-1 -> 2.3.1440.57-1
(cherry picked from commit fa99afa809)
2019-03-06 10:28:22 -05:00
Jörg Thalheim
58eaf3264a spl: 0.7.12 -> 0.7.13
(cherry picked from commit 6b36c711a9)
2019-03-06 09:07:57 -05:00
Jörg Thalheim
a4d73e6165 zfs: 0.7.12 -> 0.7.13
(cherry picked from commit b57080d34136fd8dcc49632696ceb5ed1ff73326)
(cherry picked from commit 2bfd19fcb2)
2019-03-06 09:07:57 -05:00
Lancelot SIX
4d566c39b0 postgresql_10: 10.6 -> 10.7
See https://www.postgresql.org/about/news/1920/ for release information.

(cherry picked from commit a90cf49fa9)
2019-03-06 14:44:51 +01:00
Lancelot SIX
04e87a8a8a postgresql_9_6: 9.6.11 -> 9.6.12
See https://www.postgresql.org/about/news/1920/ for release information.

(cherry picked from commit 70a31c2e00)
2019-03-06 14:44:44 +01:00
Lancelot SIX
9e7d96f846 postgresql_9_5: 9.5.15 -> 9.5.16
See https://www.postgresql.org/about/news/1920/ for release information.

(cherry picked from commit 74c715e39c)
2019-03-06 14:44:30 +01:00
Lancelot SIX
c3a2919594 postgresql_9_4: 9.4.20 -> 9.4.21
See https://www.postgresql.org/about/news/1920/ for release information.

(cherry picked from commit d1dd3a1f1a)
2019-03-06 14:44:14 +01:00
Frederik Rietdijk
481d64fa85 buildPythonPackage: fix building with flit
(cherry picked from commit a2736d27d1)
2019-03-06 13:43:59 +01:00
Markus Kowalewski
7a32dfed90 julia: remove 0.6.4 (julia_06)
(cherry picked from commit c997f5d0f2)
2019-03-06 10:31:49 +01:00
Andrew Dunham
fab178056f xournalpp: init at 1.0.8
(cherry picked from commit 4cf0343b42)
2019-03-06 10:29:38 +01:00
worldofpeace
7bfc16cf89 pantheon.wingpanel-indicator-session: 2.2.2 -> 2.2.3
(cherry picked from commit fe190d2e83)
2019-03-05 19:13:52 -05:00
Quentin Vaucher
2fc42529b0 maintainers: add kjuvi 2019-03-05 18:40:58 -05:00
Graham Christensen
49917928dd references-by-popularity: cache computation to avoid memory bloat
On very large graphs (14k+ paths), we'd end up with a massive in
memory tree of mostly duplication.

We can safely cache trees and point back to them later, saving
memory.

(cherry picked from commit 09362bc3e8)
2019-03-05 17:35:18 -05:00
Graham Christensen
f17c143da1 references-by-popularity: create debug output
(cherry picked from commit 54826e7471)
2019-03-05 17:35:18 -05:00
Josef Kemetmüller
4933ebf819 mapnik: Fix build
(cherry picked from commit e844f08125)
2019-03-05 23:23:50 +01:00
Kjuvi
8d9f70e54c spice-up: 1.7.0 -> 1.8.0
(cherry picked from commit f271f943e0)
Fixed build.

ZHF: https://github.com/NixOS/nixpkgs/issues/56826
2019-03-05 17:17:38 -05:00
Sam Hug
dcaf6f48b8 pythonPackages.ppft: use custom checkPhase
(cherry picked from commit 529bffccd8)
Fixed build.

ZHF: https://github.com/NixOS/nixpkgs/issues/56826
2019-03-05 16:57:01 -05:00
Vladimír Čunát
019969495f Merge branch 'staging-19.03' into release-19.03 2019-03-05 21:52:09 +01:00
Tim Steinbach
0e65664c56 linux: 4.20.13 -> 4.20.14
(cherry picked from commit 1847b85f15)
2019-03-05 15:08:27 -05:00
Tim Steinbach
ba070eff1a linux: 4.19.26 -> 4.19.27
(cherry picked from commit 5e67bc19c8)
2019-03-05 15:08:27 -05:00
Tim Steinbach
f7ccbec99c linux: 4.14.104 -> 4.14.105
(cherry picked from commit 535600be55)
2019-03-05 15:08:26 -05:00
Tim Steinbach
1d42de524a linux: 4.9.161 -> 4.9.162
(cherry picked from commit cfc1110dc8)
2019-03-05 15:08:26 -05:00
Robert Schütz
ae84bf13cd python.pkgs.bpython: correct Exec in bpython.desktop
(cherry picked from commit b0a9ac798a)
2019-03-05 19:22:18 +01:00
Robert Schütz
6d90e6c7aa python.pkgs.supervise_api: use patch to specify path to supervise
(cherry picked from commit b36dc66bfe)
2019-03-05 15:29:54 +01:00
Robert Schütz
75a40bb6b9 python.pkgs.uproot: update checkInputs
(cherry picked from commit 1435d45b4e)
2019-03-05 15:28:16 +01:00
Robert Schütz
1274d29c3a python.pkgs.tvdb_api: disable tests
(cherry picked from commit a5c3c8e409)
2019-03-05 15:26:17 +01:00
Vladimír Čunát
3adbe4f737 ipe: fix the src hash (modified upstream)
https://mailman.science.uu.nl/pipermail/ipe-announce/2019-February/000080.html
(cherry picked from commit f8039e1425)
2019-03-05 15:11:08 +01:00
Robert Schütz
589d3972aa python.pkgs.awkward: fix tests
pytest.importorskip() doesn't work when we don't use pytest to run tests

(cherry picked from commit 654e6ecc68)
2019-03-05 14:49:48 +01:00
Yannis Koutras
58e31b2692 Merge pull request #56832 from tokudan/r1903-filezilla-zhf
pugixml: Fix pkg-config file installation and use fetchFromGitHub [19.03]
2019-03-05 13:34:20 +01:00
Robert Schütz
7dea73944a python.pkgs.willow: correct src
(cherry picked from commit f66d4bcb6b)
2019-03-05 12:51:23 +01:00
Ioannis Koutras
9e70e00920 curaengine: add protobuf in buildInputs
(cherry picked from commit c14eed2ac0)
2019-03-05 09:49:09 +01:00
Ioannis Koutras
64cf235926 pythonPackages.libarcus: use pkgs.protobuf as input
This commit makes pkgs.protobuf the input for libarcus, since the latter
searches for the native protobuf library and not for the Python module.

(cherry picked from commit 6a523a180a)
2019-03-05 09:48:12 +01:00
Frederik Rietdijk
ef37abe0ab Merge release-19.03 into staging-19.03 2019-03-05 08:31:57 +01:00
Frederik Rietdijk
4c98ed7728 python: 2.7.15 -> 2.7.16
(cherry picked from commit 347680df96)
2019-03-05 08:30:49 +01:00
Domen Kožar
de6efe46cd cachix: 0.1.3 -> 0.2.0
(cherry picked from commit d45ba336b2)
Signed-off-by: Domen Kožar <domen@dev.si>
2019-03-05 11:00:31 +07:00
worldofpeace
f33e380e30 pythonPackages.resampy: enable tests
(cherry picked from commit d830bfba9a)
ZHF: https://github.com/NixOS/nixpkgs/issues/56826
2019-03-04 20:03:20 -05:00
Josef Kemetmüller
98a9e8fb2e pythonPackages.resampy: Fix build
(cherry picked from commit 8e1afe7f14)
ZHF: https://github.com/NixOS/nixpkgs/issues/56826
2019-03-04 20:02:57 -05:00
Franz Pletz
f20fad9894 minetest: git-5.0.0-dev-2019-01-08 -> 5.0.0
(cherry picked from commit bc85062aa1)
2019-03-05 00:59:19 +01:00
Carles Pagès
48e828aa56 trigger-rally: 0.6.5 -> 0.6.6
Fixes build.

(cherry picked from commit eda985dc24)
2019-03-05 00:12:08 +01:00
Michael Raskin
c4c92ec726 Merge pull request #56843 from knedlsepp/fix-smbnetfs
Fix smbnetfs

(cherry picked from commit 9bc5c624e5)
2019-03-04 22:22:30 +01:00
Vladimír Čunát
f06d8e0bf4 Revert "luaPackages.cqueues: move to generated"
This reverts commit c01fe375ca.
See the reverted commit on GitHub for discussion.  /cc PR #55305.

(cherry picked from commit 3e442fd0f9)
2019-03-04 20:43:11 +01:00
Will Dietz
a36be6dc97 lua-modules/generated-packages.nix: fix 'lua' to propagate
Otherwise 'lua' is from the argument populated by callPackage
which means it's whatever the default is.

(instead of the lua we're generating packages for!)

(cherry picked from commit 2a1c7b1f32)
The error had e.g. an effect on `disabled` attributes being incorrect.
2019-03-04 20:43:10 +01:00
Frederik Rietdijk
f45e8b3432 pants: mark as broken
(cherry picked from commit 9dc262c659)
Not much point in even fixing the build since it doesn't work [0]

ZHF: https://github.com/NixOS/nixpkgs/issues/56826
[0]: https://github.com/NixOS/nixpkgs/pull/53206#issuecomment-451017476
2019-03-04 14:33:47 -05:00
worldofpeace
f1751e608e pythonPackages.pex: mark as broken
(cherry picked from commit 77c8b423ed)
ZHF: https://github.com/NixOS/nixpkgs/issues/56826
2019-03-04 14:25:25 -05:00
worldofpeace
4f09c84c4e pantheon.elementary-calendar: 4.2.3 -> 5.0
(cherry picked from commit b6fae7b993)
2019-03-04 13:33:09 -05:00
worldofpeace
2845bb4313 pantheon.elementary-files: rely on desktop-file-utils hook
(cherry picked from commit 898870824d)
2019-03-04 13:33:05 -05:00
worldofpeace
cbdd348568 pantheon.elementary-code: use C.UTF-8
(cherry picked from commit a84fa92008)
2019-03-04 13:33:03 -05:00
Will Dietz
af6ba93fc2 pantheon.elementary-gtk-theme: 5.2.1 -> 5.2.2
(cherry picked from commit 74031d99ef)
2019-03-04 13:32:50 -05:00
Matthew Bauer
6ba15cda1f ghc863: dont add extra libs
Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.

Merged in pull request #56795 from @matthewbauer.
2019-03-04 13:25:21 -05:00
Ioannis Koutras
54cc54e3bb pugixml: fix pkg-config file installation
(cherry picked from commit 236c7db82c)
2019-03-04 18:49:29 +01:00
Ioannis Koutras
f06205db98 pugixml: use fetchFromGitHub
(cherry picked from commit 8571a669a7)
2019-03-04 18:49:28 +01:00
Jan Tojnar
80d288f6c1 nginx: build with openssl 1.1
This will allow us to enable TLSv1.3

(cherry picked from commit 051e85296a)
PR #56233
2019-03-04 16:44:24 +01:00
Robert Schütz
e506ce5050 python.pkgs.pymediainfo: fix build
(cherry picked from commit 4c0f0a014b)
2019-03-04 15:52:53 +01:00
Robert Schütz
9375b0d230 python.pkgs.rawkit: add patch for python37 compatibility
(cherry picked from commit 35848d284b)
2019-03-04 15:52:04 +01:00
Andreas Wiese
c738ebca21 gogs: 0.11.66 -> 0.11.86 (#56819)
This release especially addresses CVE-2018-20303.

(cherry picked from commit 1673a3c939)
2019-03-04 15:19:39 +01:00
Will Dietz
e866ed8d32 xdm: 1.1.11 -> 1.1.12 (#56755)
https://lists.x.org/archives/xorg-announce/2019-March/002959.html
(cherry picked from commit 9809a541b2)

Fixes CVE-2013-2179
2019-03-04 13:11:39 +01:00
Robert Schütz
fa1cf8098a udiskie: fix build
It was broken by b4acd97729.
Fixes #56771.

(cherry picked from commit 887c31f14c)
2019-03-04 12:22:14 +01:00
Jan Tojnar
bdbf631167 nixos/nginx: Enable TLS 1.3 support
(cherry picked from commit f93ff28c62)
PR #56233
2019-03-04 11:53:10 +01:00
Jan Tojnar
5b38b4572a python2Packages.pyqt4: partial clean up
(cherry picked from commit 6471655f76)
2019-03-03 21:23:11 +01:00
Jan Tojnar
1861f58d9f python2Packages.pyqt4: Fix build
(cherry picked from commit f14a48f716)
2019-03-03 21:23:01 +01:00
Frederik Rietdijk
da66a6359f wxPython: fix build
(cherry picked from commit 1285d739d8)
2019-03-03 08:37:31 +01:00
Robert Schütz
75ee83deeb python.pkgs.wptserve: relax h2 version constraint
(cherry picked from commit 3c4c8b6500)
2019-03-03 08:11:33 +01:00
Pierre Bourdon
f92763c6d1 pythonPackages.protobuf: propagate native pkgs.protobuf input
Python packages depending on the protobuf library often use the "protoc"
tool from pkgs.protobuf to codegen at build time.

This fixes a few regressions from 5c7531872f

(cherry picked from commit f20a66084f)
2019-03-03 08:08:50 +01:00
Matthew Bauer
2df16bf647 nixos-rebuild: get Nix from channel
If our old Nix can’t evaluate the Nixpkgs channel, try the fallback
from the new channel /first/. That way we can upgrade Nix to a newer
version and support breaking changes to Nix (like seen in the upgrade
o Nix 2.0).

This change should be backported to older NixOS versions!

(cherry picked from commit 475c8aa018)
2019-03-02 18:52:12 -05:00
Tristan Helmich (omniIT)
f58c39a4e6 graylog: 2.5.1 -> 3.0.0
(cherry picked from commit 9efddfa2c1)
2019-03-02 23:22:54 +01:00
Tristan Helmich (omniIT)
9c65b516af graylogPlugins: update
graylog-plugin-aggregates: 2.3.0 -> 2.4.0
graylog-plugin-auth-sso: 2.4.2 -> 3.0.0
(cherry picked from commit 76b3c57ff0)
2019-03-02 23:22:53 +01:00
Franz Pletz
6d1dbdcee0 smcroute: 2.4.3 -> 2.4.4
(cherry picked from commit 81b6dd7b09)
2019-03-02 23:19:00 +01:00
Franz Pletz
3351ceb75a xmrig: 2.11.0 -> 2.13.1
(cherry picked from commit 63bd0d513a)
2019-03-02 23:18:59 +01:00
Franz Pletz
aed9b9d004 youtubeDL: 2019.02.18 -> 2019.03.01
(cherry picked from commit 86199e047c)
2019-03-02 23:18:59 +01:00
Franz Pletz
36e4406484 xmr-stak: 2.8.2 -> 2.8.3
(cherry picked from commit df77847f1c)
2019-03-02 23:18:58 +01:00
R. RyanTM
886028a319 brave: 0.59.35 -> 0.60.45
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/brave/versions

(cherry picked from commit edccde3e74)
2019-03-02 23:17:11 +01:00
Thiago Kenji Okada
8850144c2b xsecurelock: Added missing X11 buildInputs
According to xsecurelock's configure.ac file, each of the add
dependencies are used to:

- libXrandr: XRandR provides information about monitor layouts and is
strongly recommended on systems which can use more than one monitor
(which includes most laptops).
- libXext: The X Synchronization extension is used to get per-device idle
times. Used by until_nonidle only.
- libXScrnSaver: The X11 Screen Saver extension is used to turn off the
screen saver when X11 handles screen blanking (e.g. via timeout) anyway.
Saves CPU power.

Adding libXrandr fixes an issue where locking a screen in a multi
monitor setup results in the prompt information to not be in the middle
of the screen. The other dependencies are not tested if they fixed
something, however since upstream recommends than I think it is fair to
include them also.

(cherry picked from commit d2d7fed8ce)
2019-03-02 23:16:43 +01:00
Michael Raskin
98215e4553 Merge pull request #56557 from aanderse/redmine-pkg-update
redmine: 3.4.8 -> 3.4.9 & 4.0.1 -> 4.0.2
(cherry picked from commit 7093aa51b8)
2019-03-02 21:05:51 +01:00
Frederik Rietdijk
cf81d36fc9 Merge release-19.03 into staging-19.03 2019-03-02 19:16:48 +01:00
R. RyanTM
740f0585bd ibus-engines.typing-booster-unwrapped: 2.5.0 -> 2.5.3
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/ibus-typing-booster/versions

(cherry picked from commit 6766409824)
Signed-off-by: Maximilian Bosch <maximilian@mbosch.me>
2019-03-02 18:05:50 +01:00
Robert Schütz
ff940e202e python.pkgs.binaryornot: fix build
(cherry picked from commit 736025e234)
2019-03-02 15:27:29 +01:00
Robert Schütz
b6b58a5559 python.pkgs.pyres: skip failing test
(cherry picked from commit 2e16d3d2c8)
2019-03-02 14:51:24 +01:00
Robert Schütz
8f3660523e python.pkgs.parsel: use checkInputs
(cherry picked from commit 09d475aab9)
2019-03-02 14:51:24 +01:00
Robert Schütz
16608fcafd python.pkgs.fudge: fix tests
(cherry picked from commit 11ac34bf93)
2019-03-02 14:51:24 +01:00
Robert Schütz
be5582329a python.pkgs.spglib: fix tests
(cherry picked from commit b1467cf56b)
2019-03-02 14:51:23 +01:00
Robert Schütz
52075c240b python.pkgs.pyrsistent: remove obsolete patch
(cherry picked from commit 35fa04bec4)
2019-03-02 14:51:23 +01:00
Robert Schütz
593918b05c python.pkgs.odfpy: fix build
(cherry picked from commit 434c2a045b)
2019-03-02 14:51:02 +01:00
Robert Schütz
ce4b58f301 python.pkgs.tifffile: 2019.2.10 -> 2019.2.22 and fix build
(cherry picked from commit f9ab0f25f8)
2019-03-02 14:19:07 +01:00
Pascal Wittmann
dcb55ff5aa llpp: install llpp.inotify into bin/ 2019-03-02 12:32:49 +01:00
Pascal Wittmann
f50e057842 llpp: remove unused lib directory 2019-03-02 12:32:41 +01:00
Piotr Bogdan
697213d88b nixos/manual: fix build
(cherry picked from commit b01302b85e)
2019-03-02 12:05:43 +01:00
taku0
b7f92ef372 firefox-esr: 60.5.1esr -> 60.5.2esr
(cherry picked from commit 692a763f60)
2019-03-02 12:01:19 +01:00
taku0
b2234b4fad firefox: 65.0.1 -> 65.0.2
(cherry picked from commit d59a40c3b0)
2019-03-02 12:01:19 +01:00
taku0
e04f8ec62f firefox-bin: 65.0 -> 65.0.2
(cherry picked from commit 03bbab8540)
2019-03-02 12:01:17 +01:00
Robert Schütz
555fff9718 python.pkgs.argon2_cffi: add enum34 dependency
(cherry picked from commit d9b1bfa5bf)
2019-03-02 11:25:27 +01:00
Terje Larsen
f004d6e9c4 pythonPackages.pykeepass: fix build
Add missing dependency future

(cherry picked from commit 80b6892362)
2019-03-02 11:25:14 +01:00
Robert Schütz
74adad3caf python.pkgs.detox: mark as broken
According to https://github.com/tox-dev/detox/blob/0.19/README.md,
"detox is unmaintained and incompatible with tox > 3.6."
We currently have tox 3.7.

(cherry picked from commit f70f3b3005)
2019-03-02 11:20:35 +01:00
leo60228
7b083c00d4 multimc: unstable-2018-06-04 -> 0.6.4
Closes #55699.

(cherry picked from commit 21e2427050)
2019-03-02 10:19:54 +01:00
Daiderd Jordan
a7ffe9c4b1 nixos-rebuild: add changelog/docs for edit subcommand
(cherry picked from commit ad0b82d067)
2019-03-02 10:12:25 +01:00
Claes Wallin (韋嘉誠)
7d6764b2b3 racket{,-minimal}: add cacert to nativeBuildInputs, silence warnings
We don't actually perform any network access, but since Racket 7.0,
when certain modules are loaded, they emit an annoying warning.
While compiling the bundled packages, this happens over and over and
pollutes the logs.

Having a correct SSL configuration prevents the warnings.

(cherry picked from commit f0fbed5690)
2019-03-02 10:10:42 +01:00
Michiel Leenaars
209b5c0d31 qstopmotion: 2.4.0 -> 2.4.1
(cherry picked from commit 4d64916b96)
2019-03-02 10:09:00 +01:00
Averell Dalton
ef20994fd8 python: tensorflow: remove python3.7 restriction
(cherry picked from commit 9dd81f9389)
2019-03-02 09:06:55 +01:00
Jean-Philippe Bernardy
f5bb642008 pythonPackages.tensorflow: 1.11 -> 1.13.1
(cherry picked from commit 1c350dc99e)
2019-03-02 09:06:54 +01:00
Jean-Philippe Bernardy
ca9f5b7720 pythonPackages.tensorflow-tensorboard: 1.11.0 -> 1.13.0
(cherry picked from commit d1b7ada0ba)
2019-03-02 09:06:54 +01:00
Jean-Philippe Bernardy
62898f0641 pythonPackages.tensorflow-estimator: init 1.13.0
(cherry picked from commit 1997ca354e)
2019-03-02 09:06:54 +01:00
Will Dietz
648f31b478 pythonPackages.exchangelib: 1.12.0 -> 1.12.2 (#56531)
(cherry picked from commit e821ba565d)
2019-03-02 09:02:00 +01:00
Frederik Rietdijk
51f048c65d Revert "python: botocore: 1.12.96 -> 1.12.101"
This reverts commit f328c30cfd.

Forgot to remove this from my list of updates.

(cherry picked from commit e81595e889)
2019-03-02 08:52:58 +01:00
Frederik Rietdijk
8c9e42eafc Revert "python: boto3: 1.9.96 -> 1.9.101"
This reverts commit 35f4087d6b.

Forgot to remove this from my list of upgrades.

(cherry picked from commit cf1d44ae0d)
2019-03-02 08:52:49 +01:00
Herwig Hochleitner
004d142292 leiningen: 2.9.0 -> 2.9.1
(cherry picked from commit 025c2abd08)
2019-03-02 06:39:34 +01:00
Herwig Hochleitner
960d7de869 webkitgtk: 2.22.6 -> 2.22.7
(cherry picked from commit 26d8a8c0eb)
2019-03-02 05:28:32 +01:00
Herwig Hochleitner
4d356f872a chromium: 72.0.3626.119 -> 72.0.3626.121
CVE-2019-5786

(cherry picked from commit 9a6e64691c)
2019-03-02 05:28:31 +01:00
Franz Pletz
ca56563be4 nextcloud: 15.0.4 -> 15.0.5
(cherry picked from commit 3eda950518)
2019-03-02 02:29:41 +01:00
Pascal Bach
20de174e65 nixos/nextcloud: don't make phpPackages configurable
It needs to match the version in phpfm which is hard coded.
So there is no point in being able to change it.

(cherry picked from commit 390b6108a2)
2019-03-02 02:29:41 +01:00
Pascal Bach
772347218c nixos/nextcloud: move phpPackage and phpOptions into pool
This allows to have a php configuration for nextcloud that is independent
of the global configuration.

(cherry picked from commit f0c0b8d949)
2019-03-02 02:29:40 +01:00
Pascal Bach
2d12118a87 nixos/nextcloud: use PHP 7.3 instead of 7.1 by default
(cherry picked from commit 8f1b163b00)
2019-03-02 02:29:40 +01:00
Pascal Bach
e0538e5f65 nixos/nextcloud: update recommended nginx settings
This updates the configuration to the recommendations in
https://docs.nextcloud.com/server/15/admin_manual/installation/nginx.html

(cherry picked from commit 7f8620900a)
2019-03-02 02:29:40 +01:00
Julien Moutinho
5e8b8b44e6 rmilter: fix inetSocket
IPv6 address has to be between [] and the port after.

(cherry picked from commit 2a61c058c6)
2019-03-02 02:29:39 +01:00
Tim Steinbach
44e80e344a linux: 4.20.12 -> 4.20.13
(cherry picked from commit cab4a718de)
2019-03-01 20:23:07 -05:00
Tim Steinbach
3c891ad708 linux: 4.19.25 -> 4.19.26
(cherry picked from commit 9a65fde170)
2019-03-01 20:23:06 -05:00
Tim Steinbach
ce4ef3e840 linux: 4.14.103 -> 4.14.104
(cherry picked from commit 4580d6ca9e)
2019-03-01 20:23:06 -05:00
Tim Steinbach
9a25049974 linux: 4.9.160 -> 4.9.161
(cherry picked from commit 4eff65e514)
2019-03-01 20:23:06 -05:00
Pascal Bach
ca0231f28b gitlab-runner: 11.7.0 -> 11.8.0 (#56388)
(cherry picked from commit 23846b949c)
2019-03-02 01:59:14 +01:00
Jörg Thalheim
649a2d9768 i3pystatus: 2018-04-11 -> 2019-02-10
(cherry picked from commit 3709050828)
2019-03-02 01:59:13 +01:00
R. RyanTM
51b84c305f plantuml: 1.2019.0 -> 1.2019.1
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/plantuml/versions

(cherry picked from commit bc8eab4621)
2019-03-02 01:59:12 +01:00
Will Dietz
16bc15dd20 ffmpeg: 4.1 -> 4.1.1
https://git.ffmpeg.org/gitweb/ffmpeg.git/shortlog/n4.1.1
(cherry picked from commit b3171efe3b)
2019-03-02 01:59:12 +01:00
Alyssa Ross
ec3dfa04ed nginxMainline: 1.15.8 -> 1.15.9 (#56416)
(cherry picked from commit 2576d09716)
2019-03-02 01:59:11 +01:00
Robert Schütz
810ac8b0f7 qutebrowser: 1.5.2 -> 1.6.0 (#56349)
(cherry picked from commit c60d946fa3)
2019-03-02 01:59:11 +01:00
hyperfekt
0ed6e57aaf linux_testing_bcachefs: 4.20.2019.02.09 -> 4.20.2019.02.20
(cherry picked from commit 91c252b206)
2019-03-02 01:59:10 +01:00
Robert Schütz
2352ea4fea postfix: 3.3.2 -> 3.4.0 (#56537)
http://www.postfix.org/announcements/postfix-3.4.0.html
(cherry picked from commit 08052787f4)
2019-03-02 01:59:10 +01:00
Will Dietz
dd01509e4b minio: 2019-01-31 -> 2019-02-26 (#56475)
https://github.com/minio/minio/releases/tag/RELEASE.2019-02-26T19-51-46Z
https://github.com/minio/minio/releases/tag/RELEASE.2019-02-20T22-44-29Z (security)
https://github.com/minio/minio/releases/tag/RELEASE.2019-02-14T00-21-45Z
https://github.com/minio/minio/releases/tag/RELEASE.2019-02-12T21-58-47Z (critical)
https://github.com/minio/minio/releases/tag/RELEASE.2019-02-06T21-16-36Z
(cherry picked from commit 569c594e8e)
2019-03-02 01:59:09 +01:00
Pavol Rusnak
acc8749b9f python3Packages.trezor: 0.11.1 -> 0.11.2 (#56517)
(cherry picked from commit 391436134e)
2019-03-02 01:59:09 +01:00
Will Dietz
dd07dbde31 ddrescue: 1.23 -> 1.24 (#56484)
http://lists.gnu.org/archive/html/info-gnu/2019-02/msg00012.html
(cherry picked from commit 63ca967f5c)
2019-03-02 01:59:08 +01:00
Tim Steinbach
bbd87a4d22 linux: 5.0-rc7 -> 5.0-rc8
(cherry picked from commit 408e4457f1)
2019-03-02 01:59:07 +01:00
Simon Lackerbauer
88c0b50e09 atlassian-crowd: 3.3.3 -> 3.3.4
(cherry picked from commit 373d97527a)
2019-03-02 01:59:04 +01:00
Simon Lackerbauer
f885b8ae30 atlassian-confluence: 6.14.0 -> 6.14.1
(cherry picked from commit 3516d6464d)
2019-03-02 01:58:55 +01:00
Franz Pletz
f2ba18e6cc maintainers.fpletz: add .keys
(cherry picked from commit bc7d45ea57)
2019-03-02 01:27:58 +01:00
Will Dietz
3f4d22f41a radvd: 2.17 -> 2.18
First release in over a year, not sure of changelog.

Release announcement:
http://lists.litech.org/pipermail/radvd-announce-l/2019-February/000045.html

(cherry picked from commit e8f4e5af8d)
2019-03-02 01:27:51 +01:00
Maximilian Bosch
e6d9eddf21 nixos/nextcloud: add overwriteProtocol option
The overwriteprotocol option can be used to force Nextcloud to generate
URLs with the given protocol. This is useful for instances behind
reverse proxies that serve Nextcloud with HTTPS.

In this case Nextcloud can't determine the proper protocol and it needs
to be configured manually.

(cherry picked from commit b42c24f7f2)
2019-03-02 01:23:59 +01:00
Matthieu Coudron
d5ea7d1fb5 services.nextcloud: add logLevel (#56400)
a vlaue between 0 and 4 to help debug problems

(cherry picked from commit 20bbfc39e4)
2019-03-02 01:23:58 +01:00
Andreas Rammhold
b2d02f97ec tinc_pre: fix error after openssl upgrade
With the openssl upgrade to 1.0.2r / 1.1.1b the tinc pre-release version
stopped working due to a bug in tinc where an encryption function was
used during decryption. I submitted a patch upstream [1] but that wasn't
released yet.

[1] http://git.tinc-vpn.org/git/browse?p=tinc;a=commit;h=2b0aeec02d64bb4724da9ff1dbc19b7d35d7c904

(cherry picked from commit 447c21089b)
2019-03-02 01:23:49 +01:00
WilliButz
732a84dfb4 grafana: 5.4.3 -> 6.0.0 (#56412)
(cherry picked from commit 52ea2f59f5)
2019-03-02 01:22:52 +01:00
worldofpeace
bb6b91d3f7 nixos/plasma5: add xdg-user-dirs to create user directories
(cherry picked from commit 2e5f64bb83)
2019-03-01 13:27:43 -05:00
Robert Schütz
ad7494ad12 python.pkgs.pyscard: move swig to nativeBuildInputs
(cherry picked from commit 505b810a7f)
2019-03-01 14:45:45 +01:00
Vladimír Čunát
e9b11fa20e Merge #56201: add nix-env.qaCountBroken metric
... into release-19.03.  (Cherry-picked from 35cf2c82c1.)
The branch is affected by the stdenv change differentiating the numbers,
and I believe consistency with master will be good here.
2019-03-01 14:06:15 +01:00
Will Dietz
71a59af061 Merge #56429: xorgserver: 1.20.3 -> 1.20.4
(cherry picked from commit 6ad4e3e315)
It's basically just bugfixes, and 19.03 hasn't even been released yet.
2019-03-01 11:34:21 +01:00
Frederik Rietdijk
dbef9c1ba2 Merge staging-next into staging-19.03
Staging-next should been merged into staging-19.03 before branch-off but wasn't.
The staging-next branch seems good enough, and nothing really has been added since branch-off
so we can merge it into staging-19.03 as well.

Note that due to merge conflicts feedreader may be broken.
2019-03-01 09:09:53 +01:00
Johan Thomsen
2a53812970 kubernetes: 1.13.3 -> 1.13.4 (#56524)
(cherry picked from commit b8285fc782)
2019-02-28 22:37:54 +01:00
Andreas Rammhold
b25a8324ca Merge pull request #56483 from andir/19.03/riak-cve-2017-3163
[19.03] Mark Riak and Riak-cs as insecure
2019-02-28 18:15:33 +01:00
Robert Schütz
e54ec58ca2 thunderbird-bin: fix updateScript evaluation
(cherry picked from commit ca8fd54463)
2019-02-28 08:21:59 +01:00
Robert Schütz
736b85fd35 thunderbird: fix updateScript evaluation
(cherry picked from commit 1a7c2b3f54)
2019-02-28 08:21:52 +01:00
Robert Schütz
8410b3950a firefox-bin: fix updateScript evaluation
(cherry picked from commit fce6329f50)
2019-02-28 08:21:46 +01:00
Robert Schütz
bd4f38e923 nodejs: fix updateScript evaluation
(cherry picked from commit 23b2a60620)
2019-02-28 08:21:27 +01:00
Michael Raskin
dddd1b6118 Revert "Merge pull request #54980 from danbst/etc-relative"
This reverts commit 0b91fa43e4, reversing
changes made to 183919a0c0.
2019-02-28 08:27:39 +01:00
Silvan Mosberger
db90ae9c1e Merge pull request #56466 from averelld/nv-docker-19.03
nvidia-docker 19.03
2019-02-28 02:12:21 +01:00
Andreas Rammhold
a13d7a26bb riak: mark as insecure
(cherry picked from commit 48f1455c65)
2019-02-27 21:28:15 +01:00
Andreas Rammhold
abac37bc7a riak-cs: mark as insecure
(cherry picked from commit 515be3b94b)
2019-02-27 21:28:15 +01:00
Averell Dalton
b7dd36298c nixos/docker: add enableNvidia option 2019-02-27 16:43:46 +01:00
Averell Dalton
8d402c61d6 nvidia-docker: init at 2.0.3
nvidia_x11 and persistenced were modified to provide binaries which can be
mounted inside a docker-container to be executed there.

most ldconfig-based discovery of bundled nvidia libraries is patched out

ldconfig itself is patched to be able to deal with patchelf'ed libraries
See https://sourceware.org/bugzilla/show_bug.cgi?id=23964
2019-02-27 16:43:45 +01:00
Robert Schütz
5c1a47c9b1 linuxPackages.tp_smapi: fix evaluation
has been broken by dadc7eb329

(cherry picked from commit 1d1c909bf8)
2019-02-27 14:35:03 +00:00
Peter Simons
2fbd339171 Merge #56414: openssl: 1.0.2q -> 1.0.2r, 1.1.1a -> 1.1.1b
(cherry picked from commit 8c4b12b8d0)
The 1.0.2 bump is a security fix.
2019-02-27 09:57:42 +01:00
Robert Schütz
1348641d50 Revert "nixos/fish: generate autocompletions from man pages" (#56439)
System rebuilds currently fail due to collisions.
See also https://github.com/NixOS/nixpkgs/issues/56432.

(cherry picked from commit 029adf9619)
2019-02-27 08:21:43 +01:00
Graham Christensen
4e7135af0e libguestfs: build on hydra
It used to be huge, but current measurements reveal a 48mb NAR

(cherry picked from commit 0ea3b395372cc1e400340c8b04d17c1277bf3f03)
2019-02-26 20:52:35 -05:00
worldofpeace
9e21816c7b pantheon.elementary-music: 5.0.2 -> 5.0.3
(cherry picked from commit d53aefd534)
2019-02-26 20:37:36 -05:00
worldofpeace
6b65079f17 pantheon.gala: 2018-12-16 -> 2019-02-09
Changes: 7f1e392e03...1a96644c6a
(cherry picked from commit f995b919fc)
2019-02-26 20:36:58 -05:00
John Ericson
89f928582b Merge pull request #56443 from Ericson2314/runtimeShell
treewide: use runtimeShell instead of stdenv.shell whenever possible for 19.03
2019-02-26 18:44:18 -05:00
John Ericson
fb14ed75fc Merge commit 'f07097902cf7355ec02341c0e6576f8d5bc0ccc6' into release-19.03 2019-02-26 18:10:58 -05:00
Vladimír Čunát
07e2b59812 Merge #56143: luajit, lmdb, knot-resolver: cross-fixes
Master commit: e52396ce2c.  It's bugfixes, basically.
2019-02-26 15:31:33 +01:00
Linus Heckemann
7f35ed9df4 Set channel and version to 19.03 2019-02-25 22:50:22 +01:00
42825 changed files with 1031355 additions and 3674313 deletions

View File

@@ -1,5 +1,5 @@
# EditorConfig configuration for nixpkgs
# https://EditorConfig.org
# http://EditorConfig.org
# Top-most EditorConfig file
root = true
@@ -11,100 +11,18 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
# Ignore diffs/patches
[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
# see https://nixos.org/nixpkgs/manual/#chap-conventions
# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces
[*.{json,lock,md,nix,pl,pm,py,rb,sh,xml}]
# Match nix/ruby/docbook files, set indent to spaces with width of two
[*.{nix,rb,xml}]
indent_style = space
# Match docbook files, set indent width of one
[*.xml]
indent_size = 1
# Match json/lockfiles/markdown/nix/ruby files, set indent width of two
[*.{json,lock,md,nix,rb}]
indent_size = 2
# Match perl/python/shell scripts, set indent width of four
[*.{pl,pm,py,sh}]
# Match shell/python/perl scripts, set indent to spaces with width of four
[*.{sh,py,pl}]
indent_style = space
indent_size = 4
# Match gemfiles, set indent to spaces with width of two
[Gemfile]
indent_size = 2
indent_style = space
# Disable file types or individual files
# some of these files may be auto-generated and/or require significant changes
[*.{c,h}]
insert_final_newline = unset
trim_trailing_whitespace = unset
[*.{asc,key,ovpn}]
insert_final_newline = unset
end_of_line = unset
trim_trailing_whitespace = unset
[*.lock]
indent_size = unset
# Although Markdown/CommonMark allows using two trailing spaces to denote
# a hard line break, we do not use that feature in nixpkgs since
# it forces the surrounding paragraph to become a <literallayout> which
# does not wrap reasonably.
# Instead of a hard line break, start a new paragraph by inserting a blank line.
[*.md]
trim_trailing_whitespace = true
# binaries
[*.nib]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
[eggs.nix]
trim_trailing_whitespace = unset
[nixos/modules/services/networking/ircd-hybrid/*.{conf,in}]
trim_trailing_whitespace = unset
[pkgs/build-support/dotnetenv/Wrapper/**]
end_of_line = unset
indent_style = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
[pkgs/development/compilers/elm/registry.dat]
end_of_line = unset
insert_final_newline = unset
[pkgs/development/haskell-modules/hackage-packages.nix]
indent_style = unset
trim_trailing_whitespace = unset
[pkgs/misc/documentation-highlighter/**]
insert_final_newline = unset
[pkgs/servers/dict/wordnet_structures.py]
trim_trailing_whitespace = unset
[pkgs/tools/misc/timidity/timidity.cfg]
trim_trailing_whitespace = unset
[pkgs/tools/virtualization/ovftool/*.ova]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset
[lib/tests/*.plist]
indent_style = tab
insert_final_newline = unset
# Match diffs, avoid to trim trailing whitespace
[*.{diff,patch}]
trim_trailing_whitespace = false

View File

@@ -1,98 +0,0 @@
# This file contains a list of commits that are not likely what you
# are looking for in a blame, such as mass reformatting or renaming.
# You can set this file as a default ignore file for blame by running
# the following command.
#
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# To temporarily not use this file add
# --ignore-revs-file=""
# to your blame command.
#
# The ignoreRevsFile can't be set globally due to blame failing if the file isn't present.
# To not have to set the option in every repository it is needed in,
# save the following script in your path with the name "git-bblame"
# now you can run
# $ git bblame $FILE
# to use the .git-blame-ignore-revs file if it is present.
#
# #!/usr/bin/env bash
# repo_root=$(git rev-parse --show-toplevel)
# if [[ -e $repo_root/.git-blame-ignore-revs ]]; then
# git blame --ignore-revs-file="$repo_root/.git-blame-ignore-revs" $@
# else
# git blame $@
# fi
# nixos/modules/rename: Sort alphabetically
1f71224fe86605ef4cd23ed327b3da7882dad382
# manual: fix typos
feddd5e7f8c6f8167b48a077fa2a5394dc008999
# nixos: fix module paths in rename.nix
d08ede042b74b8199dc748323768227b88efcf7c
# fix indentation in mk-python-derivation.nix
d1c1a0c656ccd8bd3b25d3c4287f2d075faf3cf3
# fix indentation in meteor default.nix
a37a6de881ec4c6708e6b88fd16256bbc7f26bbd
# treewide: automatically md-convert option descriptions
2e751c0772b9d48ff6923569adfa661b030ab6a2
# nixos/*: automatically convert option docs
087472b1e5230ffc8ba642b1e4f9218adf4634a2
# nixos/*: automatically convert option descriptions
ef176dcf7e76c3639571d7c6051246c8fbadf12a
# nixos/*: automatically convert option docs to MD
61e93df1891972bae3e0c97a477bd44e8a477aa0
# nixos/*: convert options with admonitions to MD
722b99bc0eb57711c0498a86a3f55e6c69cdb05f
# nixos/*: automatically convert option docs
6039648c50c7c0858b5e506c6298773a98e0f066
# nixos/*: md-convert options with unordered lists
c915b915b5e466a0b0b2af2906cd4d2380b8a1de
# nixos/*: convert options with listings
f2ea09ecbe1fa1da32eaa6e036d64ac324a2986f
# nixos/*: convert straggler options to MD
1d41cff3dc4c8f37bb5841f51fcbff705e169178
# nixos/*: normalize manpage references to single-line form
423545fe4865d126e86721ba30da116e29c65004
# nixos/documentation: split options doc build
fc614c37c653637e5475a0b0a987489b4d1f351d
# nixos/*: convert options with admonitions to MD
722b99bc0eb57711c0498a86a3f55e6c69cdb05f
# nixos/*: convert internal option descriptions to MD
9547123258f69efd92b54763051d6dc7f3bfcaca
# nixos/*: replace </para><para> with double linebreaks
694d5b19d30bf66687b42fb77f43ea7cd1002a62
# treewide: add defaultText for options with simple interpolation defaults
fb0e5be84331188a69b3edd31679ca6576edb75a
# nixos/*: mark pre-existing markdown descriptions as mdDoc
7e7d68a250f75678451cd44f8c3d585bf750461e
# nixos/*: normalize link format
3aebb4a2be8821a6d8a695f0908d8567dc00de31
# nixos/*: replace <code> in option docs with <literal>
16102dce2fbad670bd47dd75c860a8daa5fe47ad
# nixos/*: add trivial defaultText for options with simple defaults
25124556397ba17bfd70297000270de1e6523b0a

2
.gitattributes vendored
View File

@@ -1,6 +1,4 @@
**/deps.nix linguist-generated
**/deps.json linguist-generated
**/deps.toml linguist-generated
**/node-packages.nix linguist-generated
pkgs/applications/editors/emacs-modes/*-generated.nix linguist-generated

353
.github/CODEOWNERS vendored
View File

@@ -6,163 +6,109 @@
#
# For documentation on this file, see https://help.github.com/articles/about-codeowners/
# Mentioned users will get code review requests.
#
# IMPORTANT NOTE: in order to actually get pinged, commit access is required.
# This also holds true for GitHub teams. Since almost none of our teams have write
# permissions, you need to list all members of the team with commit access individually.
# GitHub actions
/.github/workflows @NixOS/Security @Mic92 @zowoq
/.github/workflows/merge-staging @FRidh
# EditorConfig
/.editorconfig @Mic92 @zowoq
# This file
/.github/CODEOWNERS @edolstra
# Libraries
/lib @infinisil
/lib/systems @alyssais @ericson2314 @amjoseph-nixpkgs
/lib/generators.nix @infinisil @Profpatsch
/lib/cli.nix @infinisil @Profpatsch
/lib/debug.nix @infinisil @Profpatsch
/lib/asserts.nix @infinisil @Profpatsch
/lib/path.* @infinisil @fricklerhandwerk
/lib/fileset @infinisil
/lib @edolstra @nbp
/lib/systems @nbp @ericson2314 @matthewbauer
/lib/generators.nix @edolstra @nbp @Profpatsch
/lib/debug.nix @edolstra @nbp @Profpatsch
# Nixpkgs Internals
/default.nix @Ericson2314
/pkgs/top-level/default.nix @Ericson2314
/pkgs/top-level/impure.nix @Ericson2314
/pkgs/top-level/stage.nix @Ericson2314
/pkgs/top-level/splice.nix @Ericson2314
/pkgs/top-level/release-cross.nix @Ericson2314
/pkgs/stdenv/generic @Ericson2314 @amjoseph-nixpkgs
/pkgs/stdenv/generic/check-meta.nix @Ericson2314 @piegamesde
/pkgs/stdenv/cross @Ericson2314 @amjoseph-nixpkgs
/pkgs/build-support/cc-wrapper @Ericson2314 @amjoseph-nixpkgs
/pkgs/build-support/bintools-wrapper @Ericson2314
/pkgs/build-support/setup-hooks @Ericson2314
/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
/pkgs/build-support/setup-hooks/auto-patchelf.py @layus
/pkgs/pkgs-lib @infinisil
## Format generators/serializers
/pkgs/pkgs-lib/formats/libconfig @ckiee
# pkgs/by-name
/pkgs/test/nixpkgs-check-by-name @infinisil
/pkgs/by-name/README.md @infinisil
/pkgs/top-level/by-name-overlay.nix @infinisil
/.github/workflows/check-by-name.yml @infinisil
# Nixpkgs build-support
/pkgs/build-support/writers @lassulus @Profpatsch
# Nixpkgs make-disk-image
/doc/build-helpers/images/makediskimage.section.md @raitobezarius
/nixos/lib/make-disk-image.nix @raitobezarius
# Nixpkgs documentation
/maintainers/scripts/db-to-md.sh @ryantm
/maintainers/scripts/doc @ryantm
# Contributor documentation
/CONTRIBUTING.md @infinisil
/.github/PULL_REQUEST_TEMPLATE.md @infinisil
/doc/contributing/ @fricklerhandwerk @infinisil
/doc/contributing/contributing-to-documentation.chapter.md @fricklerhandwerk @infinisil
/lib/README.md @infinisil
/doc/README.md @infinisil
/nixos/README.md @infinisil
/pkgs/README.md @infinisil
/maintainers/README.md @infinisil
# User-facing development documentation
/doc/development.md @infinisil
/doc/development @infinisil
/default.nix @nbp
/pkgs/top-level/default.nix @nbp @Ericson2314
/pkgs/top-level/impure.nix @nbp @Ericson2314
/pkgs/top-level/stage.nix @nbp @Ericson2314 @matthewbauer
/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
/pkgs/stdenv/generic @Ericson2314 @matthewbauer
/pkgs/stdenv/cross @Ericson2314 @matthewbauer
/pkgs/build-support/cc-wrapper @Ericson2314 @orivej
/pkgs/build-support/bintools-wrapper @Ericson2314 @orivej
/pkgs/build-support/setup-hooks @Ericson2314
# NixOS Internals
/nixos/default.nix @infinisil
/nixos/lib/from-env.nix @infinisil
/nixos/lib/eval-config.nix @infinisil
/nixos/modules/system @dasJ
/nixos/modules/system/activation/bootspec.nix @grahamc @cole-h @raitobezarius
/nixos/modules/system/activation/bootspec.cue @grahamc @cole-h @raitobezarius
/nixos/default.nix @nbp
/nixos/lib/from-env.nix @nbp
/nixos/lib/eval-config.nix @nbp
/nixos/doc/manual/configuration/abstractions.xml @nbp
/nixos/doc/manual/configuration/config-file.xml @nbp
/nixos/doc/manual/configuration/config-syntax.xml @nbp
/nixos/doc/manual/configuration/modularity.xml @nbp
/nixos/doc/manual/development/assertions.xml @nbp
/nixos/doc/manual/development/meta-attributes.xml @nbp
/nixos/doc/manual/development/option-declarations.xml @nbp
/nixos/doc/manual/development/option-def.xml @nbp
/nixos/doc/manual/development/option-types.xml @nbp
/nixos/doc/manual/development/replace-modules.xml @nbp
/nixos/doc/manual/development/writing-modules.xml @nbp
/nixos/doc/manual/man-nixos-option.xml @nbp
/nixos/modules/installer/tools/nixos-option.sh @nbp
# NixOS integration test driver
/nixos/lib/test-driver @tfc
# NixOS QEMU virtualisation
/nixos/virtualisation/qemu-vm.nix @raitobezarius
# Systemd
/nixos/modules/system/boot/systemd.nix @NixOS/systemd
/nixos/modules/system/boot/systemd @NixOS/systemd
/nixos/lib/systemd-*.nix @NixOS/systemd
/pkgs/os-specific/linux/systemd @NixOS/systemd
# Images and installer media
/nixos/modules/installer/cd-dvd/ @samueldr
/nixos/modules/installer/sd-card/ @samueldr
# NixOS modules
/nixos/modules @Infinisil
# Python-related code and docs
/maintainers/scripts/update-python-libraries @FRidh
/pkgs/development/interpreters/python @FRidh
/doc/languages-frameworks/python.section.md @FRidh @mweinelt
/pkgs/development/interpreters/python/hooks @FRidh @jonringer
/maintainers/scripts/update-python-libraries @FRidh
/pkgs/top-level/python-packages.nix @FRidh
/pkgs/development/interpreters/python @FRidh
/pkgs/development/python-modules @FRidh
/doc/languages-frameworks/python.section.md @FRidh
# Haskell
/doc/languages-frameworks/haskell.section.md @cdepillabout @sternenseemann @maralorn @ncfavier
/maintainers/scripts/haskell @cdepillabout @sternenseemann @maralorn @ncfavier
/pkgs/development/compilers/ghc @cdepillabout @sternenseemann @maralorn @ncfavier
/pkgs/development/haskell-modules @cdepillabout @sternenseemann @maralorn @ncfavier
/pkgs/test/haskell @cdepillabout @sternenseemann @maralorn @ncfavier
/pkgs/top-level/release-haskell.nix @cdepillabout @sternenseemann @maralorn @ncfavier
/pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn @ncfavier
/pkgs/development/compilers/ghc @peti @ryantm @basvandijk
/pkgs/development/haskell-modules @peti @ryantm @basvandijk
/pkgs/development/haskell-modules/default.nix @peti @ryantm @basvandijk
/pkgs/development/haskell-modules/generic-builder.nix @peti @ryantm @basvandijk
/pkgs/development/haskell-modules/hoogle.nix @peti @ryantm @basvandijk
# 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 @volth
/pkgs/top-level/perl-packages.nix @volth
/pkgs/development/perl-modules @volth
# R
/pkgs/applications/science/math/R @jbedo
/pkgs/development/r-modules @jbedo
/pkgs/applications/science/math/R @peti
/pkgs/development/r-modules @peti
# Ruby
/pkgs/development/interpreters/ruby @marsam
/pkgs/development/ruby-modules @marsam
/pkgs/development/interpreters/ruby @alyssais @zimbatm
/pkgs/development/ruby-modules @alyssais @zimbatm
# Rust
/pkgs/development/compilers/rust @Mic92 @zowoq @winterqt @figsoda
/pkgs/build-support/rust @zowoq @winterqt @figsoda
/doc/languages-frameworks/rust.section.md @zowoq @winterqt @figsoda
/pkgs/development/compilers/rust @Mic92 @LnL7
# Darwin-related
/pkgs/stdenv/darwin @NixOS/darwin-maintainers
/pkgs/os-specific/darwin @NixOS/darwin-maintainers
# C compilers
/pkgs/development/compilers/gcc @amjoseph-nixpkgs
/pkgs/development/compilers/llvm @RaitoBezarius
/pkgs/development/compilers/emscripten @raitobezarius
/doc/languages-frameworks/emscripten.section.md @raitobezarius
/pkgs/development/compilers/gcc @matthewbauer
/pkgs/development/compilers/llvm @matthewbauer
# Audio
/nixos/modules/services/audio/botamusique.nix @mweinelt
/nixos/modules/services/audio/snapserver.nix @mweinelt
/nixos/tests/modules/services/audio/botamusique.nix @mweinelt
/nixos/tests/snapcast.nix @mweinelt
# Compatibility stuff
/pkgs/top-level/unix-tools.nix @matthewbauer
/pkgs/development/tools/xcbuild @matthewbauer
# Browsers
/pkgs/applications/networking/browsers/firefox @mweinelt
/pkgs/applications/networking/browsers/chromium @emilylange
/nixos/tests/chromium.nix @emilylange
# Certificate Authorities
pkgs/data/misc/cacert/ @ajs124 @lukegb @mweinelt
pkgs/development/libraries/nss/ @ajs124 @lukegb @mweinelt
pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
# Beam-related (Erlang, Elixir, LFE, etc)
/pkgs/development/beam-modules @gleber
/pkgs/development/interpreters/erlang @gleber
/pkgs/development/interpreters/lfe @gleber
/pkgs/development/interpreters/elixir @gleber
/pkgs/development/tools/build-managers/rebar @gleber
/pkgs/development/tools/build-managers/rebar3 @gleber
/pkgs/development/tools/erlang @gleber
# Jetbrains
/pkgs/applications/editors/jetbrains @edwtjo
# Licenses
/lib/licenses.nix @alyssais
# Eclipse
/pkgs/applications/editors/eclipse @rycee
# https://github.com/NixOS/nixpkgs/issues/31401
/lib/licenses.nix @ghost
# Qt / KDE
/pkgs/applications/kde @ttuegel
@@ -171,158 +117,17 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/pkgs/development/libraries/qt-5 @ttuegel
# PostgreSQL and related stuff
/pkgs/servers/sql/postgresql @thoughtpolice @marsam
/pkgs/servers/sql/postgresql @thoughtpolice
/nixos/modules/services/databases/postgresql.xml @thoughtpolice
/nixos/modules/services/databases/postgresql.nix @thoughtpolice
/nixos/tests/postgresql.nix @thoughtpolice
# Hardened profile & related modules
/nixos/modules/profiles/hardened.nix @joachifm
/nixos/modules/security/hidepid.nix @joachifm
/nixos/modules/security/lock-kernel-modules.nix @joachifm
/nixos/modules/security/misc.nix @joachifm
/nixos/tests/hardened.nix @joachifm
/pkgs/os-specific/linux/kernel/hardened-config.nix @joachifm
# Home Automation
/nixos/modules/services/misc/home-assistant.nix @mweinelt
/nixos/modules/services/misc/zigbee2mqtt.nix @mweinelt
/nixos/tests/home-assistant.nix @mweinelt
/nixos/tests/zigbee2mqtt.nix @mweinelt
/pkgs/servers/home-assistant @mweinelt
/pkgs/tools/misc/esphome @mweinelt
# Network Time Daemons
/pkgs/tools/networking/chrony @thoughtpolice
/pkgs/tools/networking/ntp @thoughtpolice
/pkgs/tools/networking/openntpd @thoughtpolice
/nixos/modules/services/networking/ntp @thoughtpolice
# Network
/pkgs/tools/networking/kea/default.nix @mweinelt
/pkgs/tools/networking/babeld/default.nix @mweinelt
/nixos/modules/services/networking/babeld.nix @mweinelt
/nixos/modules/services/networking/kea.nix @mweinelt
/nixos/modules/services/networking/knot.nix @mweinelt
/nixos/modules/services/monitoring/prometheus/exporters/kea.nix @mweinelt
/nixos/tests/babeld.nix @mweinelt
/nixos/tests/kea.nix @mweinelt
/nixos/tests/knot.nix @mweinelt
# Web servers
/doc/packages/nginx.section.md @raitobezarius
/pkgs/servers/http/nginx/ @raitobezarius
/nixos/modules/services/web-servers/nginx/ @raitobezarius
# Dhall
/pkgs/development/dhall-modules @Gabriella439 @Profpatsch @ehmry
/pkgs/development/interpreters/dhall @Gabriella439 @Profpatsch @ehmry
/pkgs/development/dhall-modules @Gabriel439 @Profpatsch
/pkgs/development/interpreters/dhall @Gabriel439 @Profpatsch
# Idris
/pkgs/development/idris-modules @Infinisil
# Bazel
/pkgs/development/tools/build-managers/bazel @Profpatsch
# NixOS modules for e-mail and dns services
/nixos/modules/services/mail/mailman.nix @peti
/nixos/modules/services/mail/postfix.nix @peti
/nixos/modules/services/networking/bind.nix @peti
/nixos/modules/services/mail/rspamd.nix @peti
# Emacs
/pkgs/applications/editors/emacs/elisp-packages @adisbladis
/pkgs/applications/editors/emacs @adisbladis
/pkgs/top-level/emacs-packages.nix @adisbladis
# Neovim
/pkgs/applications/editors/neovim @figsoda @jonringer @teto
# VimPlugins
/pkgs/applications/editors/vim/plugins @figsoda @jonringer
# VsCode Extensions
/pkgs/applications/editors/vscode/extensions @jonringer
# PHP interpreter, packages, extensions, tests and documentation
/doc/languages-frameworks/php.section.md @aanderse @drupol @globin @ma27 @talyz
/nixos/tests/php @aanderse @drupol @globin @ma27 @talyz
/pkgs/build-support/php/build-pecl.nix @aanderse @drupol @globin @ma27 @talyz
/pkgs/build-support/php @drupol
/pkgs/development/interpreters/php @aanderse @drupol @globin @ma27 @talyz
/pkgs/development/php-packages @aanderse @drupol @globin @ma27 @talyz
/pkgs/top-level/php-packages.nix @aanderse @drupol @globin @ma27 @talyz
# Podman, CRI-O modules and related
/nixos/modules/virtualisation/containers.nix @adisbladis
/nixos/modules/virtualisation/cri-o.nix @adisbladis
/nixos/modules/virtualisation/podman @adisbladis
/nixos/tests/cri-o.nix @adisbladis
/nixos/tests/podman @adisbladis
# Docker tools
/pkgs/build-support/docker @roberth
/nixos/tests/docker-tools* @roberth
/doc/build-helpers/images/dockertools.section.md @roberth
# Blockchains
/pkgs/applications/blockchains @mmahut @RaghavSood
# Go
/doc/languages-frameworks/go.section.md @kalbasit @Mic92 @zowoq
/pkgs/build-support/go @kalbasit @Mic92 @zowoq
/pkgs/development/compilers/go @kalbasit @Mic92 @zowoq
# GNOME
/pkgs/desktops/gnome/extensions @piegamesde
# Cinnamon
/pkgs/desktops/cinnamon @mkg20001
# nim
/pkgs/development/compilers/nim @ehmry
/pkgs/development/nim-packages @ehmry
/pkgs/top-level/nim-packages.nix @ehmry
# terraform providers
/pkgs/applications/networking/cluster/terraform-providers @zowoq
# Matrix
/pkgs/servers/heisenbridge @piegamesde
/pkgs/servers/matrix-conduit @piegamesde
/nixos/modules/services/misc/heisenbridge.nix @piegamesde
/nixos/modules/services/misc/matrix-conduit.nix @piegamesde
/nixos/tests/matrix-conduit.nix @piegamesde
# Forgejo
nixos/modules/services/misc/forgejo.nix @bendlas @emilylange
pkgs/applications/version-management/forgejo @bendlas @emilylange
# Dotnet
/pkgs/build-support/dotnet @IvarWithoutBones
/pkgs/development/compilers/dotnet @IvarWithoutBones
/pkgs/test/dotnet @IvarWithoutBones
/doc/languages-frameworks/dotnet.section.md @IvarWithoutBones
# Node.js
/pkgs/build-support/node/build-npm-package @lilyinstarlight @winterqt
/pkgs/build-support/node/fetch-npm-deps @lilyinstarlight @winterqt
/doc/languages-frameworks/javascript.section.md @lilyinstarlight @winterqt
# OCaml
/pkgs/build-support/ocaml @ulrikstrid
/pkgs/development/compilers/ocaml @ulrikstrid
/pkgs/development/ocaml-modules @ulrikstrid
# ZFS
pkgs/os-specific/linux/zfs/2_1.nix @raitobezarius
pkgs/os-specific/linux/zfs/generic.nix @raitobezarius
nixos/modules/tasks/filesystems/zfs.nix @raitobezarius
nixos/tests/zfs.nix @raitobezarius
# Zig
/pkgs/development/compilers/zig @AndersonTorres @figsoda
/doc/hooks/zig.section.md @AndersonTorres @figsoda
# Linux Kernel
pkgs/os-specific/linux/kernel/manual-config.nix @amjoseph-nixpkgs
/pkgs/development/tools/build-managers/bazel @mboes @Profpatsch

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

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

View File

@@ -8,4 +8,5 @@
## Technical details
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the
results.

View File

@@ -1,48 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: '0.kind: bug'
assignees: ''
---
### Describe the bug
A clear and concise description of what the bug is.
### Steps To Reproduce
Steps to reproduce the behavior:
1. ...
2. ...
3. ...
### Expected behavior
A clear and concise description of what you expected to happen.
### Screenshots
If applicable, add screenshots to help explain your problem.
### Additional context
Add any other context about the problem here.
### Notify maintainers
<!--
Please @ people who are in the `meta.maintainers` list of the offending package or module.
If in doubt, check `git blame` for whoever last touched something.
-->
### Metadata
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
```console
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here
```
### Priorities
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,46 +0,0 @@
---
name: Build failure
about: Create a report to help us improve
title: 'Build failure: PACKAGENAME'
labels: '0.kind: build failure'
assignees: ''
---
### Steps To Reproduce
Steps to reproduce the behavior:
1. build *X*
### Build log
```
log here if short otherwise a link to a gist
```
### Additional context
Add any other context about the problem here.
### Notify maintainers
<!--
Please @ people who are in the `meta.maintainers` list of the offending package or module.
If in doubt, check `git blame` for whoever last touched something.
-->
### Metadata
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
```console
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
output here
```
### Priorities
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,38 +0,0 @@
---
name: Missing or incorrect documentation
about: Help us improve the Nixpkgs and NixOS reference manuals
title: 'Documentation: '
labels: '9.needs: documentation'
assignees: ''
---
## Problem
<!-- describe your problem -->
## Proposal
<!-- propose a solution (optional) -->
## 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
### Priorities
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,35 +0,0 @@
---
name: Out-of-date package reports
about: For packages that are out-of-date
title: 'Update request: PACKAGENAME OLDVERSION → NEWVERSION'
labels: '9.needs: package (update)'
assignees: ''
---
- Package name:
- Latest released version:
<!-- Search your package here: https://search.nixos.org/packages?channel=unstable -->
- Current version on the unstable channel:
- Current version on the stable/release channel:
<!--
Type the name of your package and try to find an open pull request for the package
If you find an open pull request, you can review it!
There's a high chance that you'll have the new version right away while helping the community!
-->
- [ ] Checked the [nixpkgs pull requests](https://github.com/NixOS/nixpkgs/pulls)
**Notify maintainers**
<!-- If the search.nixos.org result shows no maintainers, tag the person that last updated the package. -->
-----
Note for maintainers: Please tag this issue in your PR.
**Priorities**
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,26 +0,0 @@
---
name: Packaging requests
about: For packages that are missing
title: 'Package request: PACKAGENAME'
labels: '0.kind: packaging request'
assignees: ''
---
**Project description**
<!-- Describe the project a little: -->
**Metadata**
* homepage URL:
* source URL:
* license: mit, bsd, gpl2+ , ...
* platforms: unix, linux, darwin, ...
**Priorities**
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,94 +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: ''
---
<!--
Hello dear reporter,
Thank you for bringing attention to this issue. Your insights are valuable to
us, and we appreciate the time you took to document the problem.
I wanted to kindly point out that in this issue template, it would be beneficial
to replace the placeholder `<package>` with the actual, canonical name of the
package you're reporting the issue for. Doing so will provide better context and
facilitate quicker troubleshooting for anyone who reads this issue in the
future.
Best regards
-->
Building this package multiple times does not yield bit-by-bit identical
results, complicating the detection of Continuous Integration (CI) breaches. For
more information on this issue, visit
[reproducible-builds.org](https://reproducible-builds.org/).
Fixing bit-by-bit reproducibility also has additional advantages, such as
avoiding hard-to-reproduce bugs, making content-addressed storage more effective
and reducing rebuilds in such systems.
### Steps To Reproduce
In the following steps, replace `<package>` with the canonical name of the
package.
#### 1. Build the package
This step will build the package. Specific arguments are passed to the command
to keep the build artifacts so we can compare them in case of differences.
Execute the following command:
```
nix-build '<nixpkgs>' -A <package> && nix-build '<nixpkgs>' -A <package> --check --keep-failed
```
Or using the new command line style:
```
nix build nixpkgs#<package> && nix build nixpkgs#<package> --rebuild --keep-failed
```
#### 2. Compare the build artifacts
If the previous command completes successfully, no differences were found and
there's nothing to do, builds are reproducible.
If it terminates with the error message `error: derivation '<X>' may not be
deterministic: output '<Y>' differs from '<Z>'`, use `diffoscope` to investigate
the discrepancies between the two build outputs. You may need to add the
`--exclude-directory-metadata recursive` option to ignore files and directories
metadata (*e.g. timestamp*) differences.
```
nix run nixpkgs#diffoscopeMinimal -- --exclude-directory-metadata recursive <Y> <Z>
```
#### 3. Examine the build log
To examine the build log, use:
```
nix-store --read-log $(nix-instantiate '<nixpkgs>' -A <package>)
```
Or with the new command line style:
```
nix log $(nix path-info --derivation nixpkgs#<package>)
```
### Additional context
(please share the relevant fragment of the diffoscope output here, and any
additional analysis you may have done)
### Priorities
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

View File

@@ -1,49 +1,21 @@
## Description of changes
###### Motivation for this change
<!--
For package updates please link to a changelog or describe changes, this helps your fellow maintainers discover breaking updates.
For new packages please briefly describe the package or provide a link to its homepage.
-->
## Things done
###### Things done
<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS)
- Built on platform(s)
- [ ] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- For non-Linux: Is sandboxing enabled in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] `sandbox = relaxed`
- [ ] `sandbox = true`
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://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/`)
- [23.11 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) (or backporting [23.05 Release notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2305.section.md))
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
- [ ] NixOS
- [ ] macOS
- [ ] other Linux distributions
- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run "nox-review wip"`
- [ ] Tested execution of all binary files (usually in `./result/bin/`)
- [ ] Determined the impact on package closure size (by running `nix path-info -S` before and after)
- [ ] Assured whether relevant documentation is up to date
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
<!--
To help with the large amounts of pull requests, we would appreciate your
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
---
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://nixos.org/manual/nixpkgs/unstable/#chap-reviewing-contributions
-->
### Priorities
Add a :+1: [reaction] to [pull requests you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[pull requests you find important]: https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc

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

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

View File

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

209
.github/labeler.yml vendored
View File

@@ -1,209 +0,0 @@
"6.topic: agda":
- doc/languages-frameworks/agda.section.md
- nixos/tests/agda.nix
- pkgs/build-support/agda/**/*
- pkgs/development/libraries/agda/**/*
- pkgs/top-level/agda-packages.nix
"6.topic: cinnamon":
- pkgs/desktops/cinnamon/**/*
- nixos/modules/services/x11/desktop-managers/cinnamon.nix
- nixos/tests/cinnamon.nix
"6.topic: emacs":
- nixos/modules/services/editors/emacs.nix
- nixos/modules/services/editors/emacs.xml
- nixos/tests/emacs-daemon.nix
- pkgs/applications/editors/emacs/elisp-packages/**/*
- pkgs/applications/editors/emacs/**/*
- pkgs/build-support/emacs/**/*
- pkgs/top-level/emacs-packages.nix
"6.topic: Enlightenment DE":
- nixos/modules/services/x11/desktop-managers/enlightenment.nix
- pkgs/desktops/enlightenment/**/*
- pkgs/development/python-modules/python-efl/*
"6.topic: erlang":
- doc/languages-frameworks/beam.section.md
- pkgs/development/beam-modules/**/*
- pkgs/development/interpreters/elixir/**/*
- pkgs/development/interpreters/erlang/**/*
- pkgs/development/tools/build-managers/rebar/**/*
- pkgs/development/tools/build-managers/rebar3/**/*
- pkgs/development/tools/erlang/**/*
- pkgs/top-level/beam-packages.nix
"6.topic: fetch":
- pkgs/build-support/fetch*/**/*
"6.topic: flakes":
- '**/flake.nix'
- lib/systems/flake-systems.nix
- nixos/modules/config/nix-flakes.nix
"6.topic: GNOME":
- doc/languages-frameworks/gnome.section.md
- nixos/modules/services/desktops/gnome/**/*
- nixos/modules/services/x11/desktop-managers/gnome.nix
- nixos/tests/gnome-xorg.nix
- nixos/tests/gnome.nix
- pkgs/desktops/gnome/**/*
"6.topic: golang":
- doc/languages-frameworks/go.section.md
- pkgs/build-support/go/**/*
- pkgs/development/compilers/go/**/*
"6.topic: haskell":
- doc/languages-frameworks/haskell.section.md
- maintainers/scripts/haskell/**/*
- pkgs/development/compilers/ghc/**/*
- pkgs/development/haskell-modules/**/*
- pkgs/development/tools/haskell/**/*
- pkgs/test/haskell/**/*
- pkgs/top-level/haskell-packages.nix
- pkgs/top-level/release-haskell.nix
"6.topic: kernel":
- pkgs/build-support/kernel/**/*
- pkgs/os-specific/linux/kernel/**/*
"6.topic: lib":
- lib/**
"6.topic: lua":
- pkgs/development/interpreters/lua-5/**/*
- pkgs/development/interpreters/luajit/**/*
- pkgs/development/lua-modules/**/*
- pkgs/top-level/lua-packages.nix
"6.topic: Lumina DE":
- nixos/modules/services/x11/desktop-managers/lumina.nix
- pkgs/desktops/lumina/**/*
"6.topic: LXQt":
- nixos/modules/services/x11/desktop-managers/lxqt.nix
- pkgs/desktops/lxqt/**/*
"6.topic: mate":
- nixos/modules/services/x11/desktop-managers/mate.nix
- nixos/tests/mate.nix
- pkgs/desktops/mate/**/*
"6.topic: module system":
- lib/modules.nix
- lib/types.nix
- lib/options.nix
- lib/tests/modules.sh
- lib/tests/modules/**
"6.topic: nixos":
- nixos/**/*
- pkgs/os-specific/linux/nixos-rebuild/**/*
"6.topic: nim":
- doc/languages-frameworks/nim.section.md
- pkgs/development/compilers/nim/*
- pkgs/development/nim-packages/**/*
- pkgs/top-level/nim-packages.nix
"6.topic: nodejs":
- doc/languages-frameworks/javascript.section.md
- pkgs/build-support/node/**/*
- pkgs/development/node-packages/**/*
- pkgs/development/tools/yarn/*
- pkgs/development/tools/yarn2nix-moretea/**/*
- pkgs/development/web/nodejs/*
"6.topic: ocaml":
- doc/languages-frameworks/ocaml.section.md
- pkgs/development/compilers/ocaml/**/*
- pkgs/development/compilers/reason/**/*
- pkgs/development/ocaml-modules/**/*
- pkgs/development/tools/ocaml/**/*
- pkgs/top-level/ocaml-packages.nix
"6.topic: pantheon":
- nixos/modules/services/desktops/pantheon/**/*
- nixos/modules/services/x11/desktop-managers/pantheon.nix
- nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
- nixos/tests/pantheon.nix
- pkgs/desktops/pantheon/**/*
"6.topic: policy discussion":
- .github/**/*
"6.topic: printing":
- nixos/modules/services/printing/cupsd.nix
- pkgs/misc/cups/**/*
"6.topic: python":
- doc/languages-frameworks/python.section.md
- pkgs/development/interpreters/python/**/*
- pkgs/development/python-modules/**/*
- pkgs/top-level/python-packages.nix
"6.topic: qt/kde":
- doc/languages-frameworks/qt.section.md
- nixos/modules/services/x11/desktop-managers/plasma5.nix
- nixos/tests/plasma5.nix
- pkgs/applications/kde/**/*
- pkgs/desktops/plasma-5/**/*
- pkgs/development/libraries/kde-frameworks/**/*
- pkgs/development/libraries/qt-5/**/*
"6.topic: ruby":
- doc/languages-frameworks/ruby.section.md
- pkgs/development/interpreters/ruby/**/*
- pkgs/development/ruby-modules/**/*
"6.topic: rust":
- doc/languages-frameworks/rust.section.md
- pkgs/build-support/rust/**/*
- pkgs/development/compilers/rust/**/*
"6.topic: stdenv":
- pkgs/stdenv/**/*
"6.topic: steam":
- pkgs/games/steam/**/*
"6.topic: systemd":
- pkgs/os-specific/linux/systemd/**/*
- nixos/modules/system/boot/systemd*/**/*
"6.topic: TeX":
- doc/languages-frameworks/texlive.section.md
- pkgs/test/texlive/**
- pkgs/tools/typesetting/tex/**/*
"6.topic: vim":
- doc/languages-frameworks/vim.section.md
- pkgs/applications/editors/vim/**/*
- pkgs/applications/editors/vim/plugins/**/*
- nixos/modules/programs/neovim.nix
- pkgs/applications/editors/neovim/**/*
"6.topic: vscode":
- pkgs/applications/editors/vscode/**/*
"6.topic: xfce":
- nixos/doc/manual/configuration/xfce.xml
- nixos/modules/services/x11/desktop-managers/xfce.nix
- nixos/tests/xfce.nix
- pkgs/desktops/xfce/**/*
"6.topic: zig":
- pkgs/development/compilers/zig/**/*
- doc/hooks/zig.section.md
"8.has: changelog":
- nixos/doc/manual/release-notes/**/*
"8.has: documentation":
- doc/**/*
- nixos/doc/**/*
"8.has: module (update)":
- nixos/modules/**/*

9
.github/stale.yml vendored
View File

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

View File

@@ -1,35 +0,0 @@
name: Backport
on:
pull_request_target:
types: [closed, labeled]
# 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.
permissions:
contents: read
jobs:
backport:
permissions:
contents: write # for korthout/backport-action to create branch
pull-requests: write # for korthout/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
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
uses: korthout/backport-action@v2.1.1
with:
# Config README: https://github.com/korthout/backport-action#backport-action
copy_labels_pattern: 'severity:\ssecurity'
pull_description: |-
Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}.
* [ ] Before merging, ensure that this backport is [acceptable for the release](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#changes-acceptable-for-releases).
* Even as a non-commiter, if you find that it is not acceptable, leave a comment.

View File

@@ -1,29 +0,0 @@
name: Basic evaluation checks
on:
workflow_dispatch
# pull_request:
# branches:
# - master
# - release-**
# push:
# 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@v4
- uses: cachix/install-nix-action@v23
- uses: cachix/cachix-action@v12
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# explicit list of supportedSystems is needed until aarch64-darwin becomes part of the trunk jobset
- run: nix-build pkgs/top-level/release.nix -A tarball.nixpkgs-basic-release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ]'

View File

@@ -1,179 +0,0 @@
# Checks pkgs/by-name (see pkgs/by-name/README.md)
# using the nixpkgs-check-by-name tool (see pkgs/test/nixpkgs-check-by-name)
name: Check pkgs/by-name
# The pre-built tool is fetched from a channel,
# making it work predictable on all PRs.
on:
# Using pull_request_target instead of pull_request avoids having to approve first time contributors
pull_request_target
# The tool doesn't need any permissions, it only outputs success or not based on the checkout
permissions: {}
jobs:
check:
# This is x86_64-linux, for which the tool is always prebuilt on the nixos-* channels,
# as specified in nixos/release-combined.nix
runs-on: ubuntu-latest
steps:
- name: Resolving the merge commit
env:
GH_TOKEN: ${{ github.token }}
run: |
# This checks for mergeability of a pull request as recommended in
# https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests
while true; do
echo "Checking whether the pull request can be merged"
prInfo=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/"$GITHUB_REPOSITORY"/pulls/${{ github.event.pull_request.number }})
mergeable=$(jq -r .mergeable <<< "$prInfo")
mergedSha=$(jq -r .merge_commit_sha <<< "$prInfo")
if [[ "$mergeable" == "null" ]]; then
# null indicates that GitHub is still computing whether it's mergeable
# Wait a couple seconds before trying again
echo "GitHub is still computing whether this PR can be merged, waiting 5 seconds before trying again"
sleep 5
else
break
fi
done
if [[ "$mergeable" == "true" ]]; then
echo "The PR can be merged, checking the merge commit $mergedSha"
else
echo "The PR cannot be merged, it has a merge conflict"
exit 1
fi
echo "mergedSha=$mergedSha" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: ${{ env.mergedSha }}
# Fetches the merge commit and its parents
fetch-depth: 2
- name: Determining PR git hashes
run: |
# For pull_request_target this is the same as $GITHUB_SHA
echo "baseSha=$(git rev-parse HEAD^1)" >> "$GITHUB_ENV"
echo "headSha=$(git rev-parse HEAD^2)" >> "$GITHUB_ENV"
- uses: cachix/install-nix-action@v23
- name: Determining channel to use for dependencies
run: |
echo "Determining the preferred channel to use for PR base branch $GITHUB_BASE_REF"
if [[ "$GITHUB_BASE_REF" =~ ^(release|staging|staging-next)-([0-9][0-9]\.[0-9][0-9])$ ]]; then
# Use the release channel for all PRs to release-XX.YY, staging-XX.YY and staging-next-XX.YY
channel=nixos-${BASH_REMATCH[2]}
echo "PR is for a release branch, preferred channel is $channel"
else
# Use the nixos-unstable channel for all other PRs
channel=nixos-unstable
echo "PR is for a non-release branch, preferred channel is $channel"
fi
# Check that the channel exists. It doesn't exist for fresh release branches
if ! curl -fSs "https://channels.nixos.org/$channel"; then
# Fall back to nixos-unstable, makes sense for fresh release branches
echo "Preferred channel $channel could not be fetched, falling back to nixos-unstable"
channel=nixos-unstable
fi
echo "channel=$channel" >> "$GITHUB_ENV"
- name: Fetching latest version of channel
run: |
echo "Fetching latest version of channel $channel"
# This is probably the easiest way to get Nix to output the path to a downloaded channel!
nixpkgs=$(nix-instantiate --find-file nixpkgs -I nixpkgs=channel:"$channel")
# This file only exists in channels
rev=$(<"$nixpkgs"/.git-revision)
echo "Channel $channel is at revision $rev"
echo "nixpkgs=$nixpkgs" >> "$GITHUB_ENV"
echo "rev=$rev" >> "$GITHUB_ENV"
- name: Fetching pre-built nixpkgs-check-by-name from the channel
run: |
echo "Fetching pre-built nixpkgs-check-by-name from channel $channel at revision $rev"
# Passing --max-jobs 0 makes sure that we won't build anything
nix-build "$nixpkgs" -A tests.nixpkgs-check-by-name --max-jobs 0
- name: Running nixpkgs-check-by-name
run: |
echo "Checking whether the check succeeds on the base branch $GITHUB_BASE_REF"
git checkout -q "$baseSha"
if baseOutput=$(result/bin/nixpkgs-check-by-name . 2>&1); then
baseSuccess=1
else
baseSuccess=
fi
printf "%s\n" "$baseOutput"
echo "Checking whether the check would succeed after merging this pull request"
git checkout -q "$mergedSha"
if mergedOutput=$(result/bin/nixpkgs-check-by-name . 2>&1); then
mergedSuccess=1
exitCode=0
else
mergedSuccess=
exitCode=1
fi
printf "%s\n" "$mergedOutput"
resultToEmoji() {
if [[ -n "$1" ]]; then
echo ":heavy_check_mark:"
else
echo ":x:"
fi
}
# Print a markdown summary in GitHub actions
{
echo "| Nixpkgs version | Check result |"
echo "| --- | --- |"
echo "| Latest base commit | $(resultToEmoji "$baseSuccess") |"
echo "| After merging this PR | $(resultToEmoji "$mergedSuccess") |"
echo ""
if [[ -n "$baseSuccess" ]]; then
if [[ -n "$mergedSuccess" ]]; then
echo "The check succeeds on both the base branch and after merging this PR"
else
echo "The check succeeds on the base branch, but would fail after merging this PR:"
echo "\`\`\`"
echo "$mergedOutput"
echo "\`\`\`"
echo ""
fi
else
if [[ -n "$mergedSuccess" ]]; then
echo "The check fails on the base branch, but this PR fixes it, nicely done!"
else
echo "The check fails on both the base branch and after merging this PR, unknown if only this PRs changes would satisfy the check, the base branch needs to be fixed first."
echo ""
echo "Failure on the base branch:"
echo "\`\`\`"
echo "$baseOutput"
echo "\`\`\`"
echo ""
echo "Failure after merging this PR:"
echo "\`\`\`"
echo "$mergedOutput"
echo "\`\`\`"
echo ""
fi
fi
echo "### Details"
echo "- nixpkgs-check-by-name tool:"
echo " - Channel: $channel"
echo " - Nixpkgs commit: [$rev](https://github.com/${GITHUB_REPOSITORY}/commit/$rev)"
echo " - Store path: \`$(realpath result)\`"
echo "- Tested Nixpkgs:"
echo " - Base branch: $GITHUB_BASE_REF"
echo " - Latest base branch commit: [$baseSha](https://github.com/${GITHUB_REPOSITORY}/commit/$baseSha)"
echo " - Latest PR commit: [$headSha](https://github.com/${GITHUB_REPOSITORY}/commit/$headSha)"
echo " - Merge commit: [$mergedSha](https://github.com/${GITHUB_REPOSITORY}/commit/$mergedSha)"
} >> "$GITHUB_STEP_SUMMARY"
exit "$exitCode"

View File

@@ -1,24 +0,0 @@
name: "Check that maintainer list is sorted"
on:
pull_request_target:
paths:
- 'maintainers/maintainer-list.nix'
permissions:
contents: read
jobs:
nixos:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@v23
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- name: Check that maintainer-list.nix is sorted
run: nix-instantiate --eval maintainers/scripts/check-maintainers-sorted.nix

View File

@@ -1,41 +0,0 @@
name: "Checking EditorConfig"
permissions: read-all
on:
# avoids approving first time contributors
pull_request_target:
branches-ignore:
- 'release-**'
jobs:
tests:
runs-on: ubuntu-latest
if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
steps:
- name: Get list of changed files from PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api \
repos/NixOS/nixpkgs/pulls/${{github.event.number}}/files --paginate \
| jq '.[] | select(.status != "removed") | .filename' \
> "$HOME/changed_files"
- name: print list of changed files
run: |
cat "$HOME/changed_files"
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@v23
with:
# nixpkgs commit is pinned so that it doesn't break
# editorconfig-checker 2.4.0
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz
- name: Checking EditorConfig
run: |
cat "$HOME/changed_files" | nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size'
- if: ${{ failure() }}
run: |
echo "::error :: Hey! It looks like your changes don't follow our editorconfig settings. Read https://editorconfig.org/#download to configure your editor so you never see this error again."

View File

@@ -1,24 +0,0 @@
name: "Label PR"
on:
pull_request_target:
types: [edited, opened, synchronize, reopened]
# WARNING:
# When extending this action, be aware that $GITHUB_TOKEN allows some write
# access to the GitHub API. This means that it should not evaluate user input in
# a way that allows code injection.
permissions:
contents: read
pull-requests: write
jobs:
labels:
runs-on: ubuntu-latest
if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
steps:
- uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: true

View File

@@ -1,31 +0,0 @@
name: "Build NixOS manual"
permissions: read-all
on:
pull_request_target:
branches:
- master
paths:
- 'nixos/**'
jobs:
nixos:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@v23
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: Building NixOS manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true nixos/release.nix -A manual.x86_64-linux

View File

@@ -1,32 +0,0 @@
name: "Build Nixpkgs manual"
permissions: read-all
on:
pull_request_target:
branches:
- master
paths:
- 'doc/**'
- 'lib/**'
jobs:
nixpkgs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: cachix/install-nix-action@v23
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: Building Nixpkgs manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true pkgs/top-level/release.nix -A manual

View File

@@ -1,26 +0,0 @@
name: "No channel PR"
on:
pull_request:
branches:
- 'nixos-**'
- 'nixpkgs-**'
permissions:
contents: read
jobs:
fail:
permissions:
contents: none
name: "This PR is is targeting a channel branch"
runs-on: ubuntu-latest
steps:
- run: |
cat <<EOF
The nixos-* and nixpkgs-* branches are pushed to by the channel
release script and should not be merged into directly.
Please target the equivalent release-* branch or master instead.
EOF
exit 1

View File

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

View File

@@ -1,59 +0,0 @@
# This action periodically merges base branches into staging branches.
# This is done to
# * prevent conflicts or rather resolve them early
# * make all potential breakage happen on the staging branch
# * and make sure that all major rebuilds happen before the staging
# branch gets merged back into its base branch.
name: "Periodic Merges (24h)"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 24 hours
- cron: '0 0 * * *'
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:
# don't fail fast, so that all pairs are tried
fail-fast: false
# certain branches need to be merged in order, like master->staging-next->staging
# and disabling parallelism ensures the order of the pairs below.
max-parallel: 1
matrix:
pairs:
- from: master
into: haskell-updates
- from: release-23.05
into: staging-next-23.05
- from: staging-next-23.05
into: staging-23.05
name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@1.4.0
with:
type: now
from_branch: ${{ matrix.pairs.from }}
target_branch: ${{ matrix.pairs.into }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on failure
uses: peter-evans/create-or-update-comment@v3
if: ${{ failure() }}
with:
issue-number: 105153
body: |
Periodic merge from `${{ matrix.pairs.from }}` into `${{ matrix.pairs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).

View File

@@ -1,57 +0,0 @@
# This action periodically merges base branches into staging branches.
# This is done to
# * prevent conflicts or rather resolve them early
# * make all potential breakage happen on the staging branch
# * and make sure that all major rebuilds happen before the staging
# branch gets merged back into its base branch.
name: "Periodic Merges (6h)"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 6 hours
- cron: '0 */6 * * *'
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:
# don't fail fast, so that all pairs are tried
fail-fast: false
# certain branches need to be merged in order, like master->staging-next->staging
# and disabling parallelism ensures the order of the pairs below.
max-parallel: 1
matrix:
pairs:
- from: master
into: staging-next
- from: staging-next
into: staging
name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@1.4.0
with:
type: now
from_branch: ${{ matrix.pairs.from }}
target_branch: ${{ matrix.pairs.into }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on failure
uses: peter-evans/create-or-update-comment@v3
if: ${{ failure() }}
with:
issue-number: 105153
body: |
Periodic merge from `${{ matrix.pairs.from }}` into `${{ matrix.pairs.into }}` has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).

View File

@@ -1,69 +0,0 @@
name: "Update terraform-providers"
on:
#schedule:
# - cron: "0 3 * * *"
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
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@v4
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: setup
id: setup
run: |
echo "title=terraform-providers: update $(date -u +"%Y-%m-%d")" >> $GITHUB_OUTPUT
- name: update terraform-providers
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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: get failed updates
run: |
echo 'FAILED<<EOF' >> $GITHUB_ENV
git ls-files --others >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# cleanup logs of failed updates so they aren't included in the PR
- name: clean repo
run: |
git clean -f
- name: create PR
uses: peter-evans/create-pull-request@v5
with:
body: |
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}
These providers failed to update:
```
${{ env.FAILED }}
```
Check that all providers build with:
```
@ofborg build terraform.full
```
If there is more than ten commits in the PR `ofborg` won't build it automatically and you will need to use the above command.
branch: terraform-providers-update
delete-branch: false
title: ${{ steps.setup.outputs.title }}
token: ${{ secrets.GITHUB_TOKEN }}

20
.gitignore vendored
View File

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

View File

@@ -1,14 +0,0 @@
ajs124 <git@ajs124.de> <ajs124@users.noreply.github.com>
Anderson Torres <torres.anderson.85@protonmail.com>
Daniel Løvbrøtte Olsen <me@dandellion.xyz> <daniel.olsen99@gmail.com>
Fabian Affolter <mail@fabian-affolter.ch> <fabian@affolter-engineering.ch>
Janne Heß <janne@hess.ooo> <dasJ@users.noreply.github.com>
Jörg Thalheim <joerg@thalheim.io> <Mic92@users.noreply.github.com>
Martin Weinelt <hexa@darmstadt.ccc.de> <mweinelt@users.noreply.github.com>
R. RyanTM <ryantm-bot@ryantm.com>
Robert Hensing <robert@roberthensing.nl> <roberth@users.noreply.github.com>
Sandro Jäckel <sandro.jaeckel@gmail.com>
Sandro Jäckel <sandro.jaeckel@gmail.com> <sandro.jaeckel@sap.com>
superherointj <5861043+superherointj@users.noreply.github.com>
Vladimír Čunát <v@cunat.cz> <vcunat@gmail.com>
Vladimír Čunát <v@cunat.cz> <vladimir.cunat@nic.cz>

View File

@@ -1 +1 @@
23.11
19.03

View File

@@ -1,743 +0,0 @@
# Contributing to Nixpkgs
This document is for people wanting to contribute to the implementation of Nixpkgs.
This involves interacting with implementation changes that are proposed using [GitHub](https://github.com/) [pull requests](https://docs.github.com/pull-requests) to the [Nixpkgs](https://github.com/nixos/nixpkgs/) repository (which you're in right now).
As such, a GitHub account is recommended, which you can sign up for [here](https://github.com/signup).
See [here](https://discourse.nixos.org/t/about-the-patches-category/477) for how to contribute without a GitHub account.
Additionally this document assumes that you already know how to use GitHub and Git.
If that's not the case, we recommend learning about it first [here](https://docs.github.com/en/get-started/quickstart/hello-world).
## Overview
[overview]: #overview
This file contains general contributing information, but individual parts also have more specific information to them in their respective `README.md` files, linked here:
- [`lib`](./lib/README.md): Sources and documentation of the [library functions](https://nixos.org/manual/nixpkgs/stable/#chap-functions)
- [`maintainers`](./maintainers/README.md): Nixpkgs maintainer and team listings, maintainer scripts
- [`pkgs`](./pkgs/README.md): Package and [builder](https://nixos.org/manual/nixpkgs/stable/#part-builders) definitions
- [`doc`](./doc/README.md): Sources and infrastructure for the [Nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/)
- [`nixos`](./nixos/README.md): Implementation of [NixOS](https://nixos.org/manual/nixos/stable/)
# How to's
## How to create pull requests
[pr-create]: #how-to-create-pull-requests
This section describes in some detail how changes can be made and proposed with pull requests.
> **Note**
> Be aware that contributing implies licensing those contributions under the terms of [COPYING](./COPYING), an MIT-like license.
0. Set up a local version of Nixpkgs to work with using GitHub and Git
1. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) the [Nixpkgs repository](https://github.com/nixos/nixpkgs/).
1. [Clone the forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository) into a local `nixpkgs` directory.
1. [Configure the upstream Nixpkgs repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository).
1. Figure out the branch that should be used for this change by going through [this section][branch].
If in doubt use `master`, that's where most changes should go.
This can be changed later by [rebasing][rebase].
2. Create and switch to a new Git branch, ideally such that:
- The name of the branch hints at the change you'd like to implement, e.g. `update-hello`.
- The base of the branch includes the most recent changes on the base branch from step 1, we'll assume `master` here.
```bash
# Make sure you have the latest changes from upstream Nixpkgs
git fetch upstream
# Create and switch to a new branch based off the master branch in Nixpkgs
git switch --create update-hello upstream/master
```
To avoid having to download and build potentially many derivations, at the expense of using a potentially outdated version, you can base the branch off a specific [Git commit](https://www.git-scm.com/docs/gitglossary#def_commit) instead:
- The commit of the latest `nixpkgs-unstable` channel, available [here](https://channels.nixos.org/nixpkgs-unstable/git-revision).
- The commit of a local Nixpkgs downloaded using [nix-channel](https://nixos.org/manual/nix/stable/command-ref/nix-channel), available using `nix-instantiate --eval --expr '(import <nixpkgs/lib>).trivial.revisionWithDefault null'`
- If you're using NixOS, the commit of your NixOS installation, available with `nixos-version --revision`.
Once you have an appropriate commit you can use it instead of `upstream/master` in the above command:
```bash
git switch --create update-hello <the desired base commit>
```
3. Make the desired changes in the local Nixpkgs repository using an editor of your choice.
Make sure to:
- Adhere to both the [general code conventions][code-conventions], and the code conventions specific to the part you're making changes to.
See the [overview section][overview] for more specific information.
- Test the changes.
See the [overview section][overview] for more specific information.
- If necessary, document the change.
See the [overview section][overview] for more specific information.
4. Commit your changes using `git commit`.
Make sure to adhere to the [commit conventions](#commit-conventions).
Repeat the steps 3-4 as many times as necessary.
Advance to the next step if all the commits (viewable with `git log`) make sense together.
5. Push your commits to your fork of Nixpkgs.
```
git push --set-upstream origin HEAD
```
The above command will output a link that allows you to directly quickly do the next step:
```
remote: Create a pull request for 'update-hello' on GitHub by visiting:
remote: https://github.com/myUser/nixpkgs/pull/new/update-hello
```
6. [Create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request#creating-the-pull-request) from the new branch in your Nixpkgs fork to the upstream Nixpkgs repository.
Use the branch from step 2 as the pull requests base branch.
Go through the [pull request template](#pull-request-template) in the pre-filled default description.
7. Respond to review comments, potential CI failures and potential merge conflicts by updating the pull request.
Always keep the pull request in a mergeable state.
The custom [OfBorg](https://github.com/NixOS/ofborg) CI system will perform various checks to help ensure code quality, whose results you can see at the bottom of the pull request.
See [the OfBorg Readme](https://github.com/NixOS/ofborg#readme) for more details.
- To add new commits, repeat steps 3-4 and push the result using
```
git push
```
- To change existing commits you will have to [rewrite Git history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
Useful Git commands that can help a lot with this are `git commit --patch --amend` and `git rebase --interactive`.
With a rewritten history you need to force-push the commits using
```
git push --force-with-lease
```
- In case of merge conflicts you will also have to [rebase the branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) on top of current `master`.
Sometimes this can be done [on GitHub directly](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch#updating-your-pull-request-branch), but if not you will have to rebase locally using
```
git fetch upstream
git rebase upstream/master
git push --force-with-lease
```
- If you need to change the base branch of the pull request, you can do so by [rebasing][rebase].
8. If your pull request is merged and [acceptable for releases][release-acceptable] you may [backport][pr-backport] the pull request.
### Pull request template
[pr-template]: #pull-request-template
The pull request template helps determine what steps have been made for a contribution so far, and will help guide maintainers on the status of a change. The motivation section of the PR should include any extra details the title does not address and link any existing issues related to the pull request.
When a PR is created, it will be pre-populated with some checkboxes detailed below:
#### Tested using sandboxing
When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of `fetch*` functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see [sandbox](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-sandbox) in the Nix manual for details.
Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for [nixpkgs](https://github.com/NixOS/nixpkgs/) people are asked to test builds with sandboxing enabled (see `Tested using sandboxing` in the pull request template) because in [Hydra](https://nixos.org/hydra/) sandboxing is also used.
Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing **before** building the package:
- **Globally enable sandboxing on NixOS**: add the following to `configuration.nix`
```nix
nix.settings.sandbox = true;
```
- **Globally enable sandboxing on non-NixOS platforms**: add the following to: `/etc/nix/nix.conf`
```ini
sandbox = true
```
#### Built on platform(s)
Many Nix packages are designed to run on multiple platforms. As such, its important to let the maintainer know which platforms your changes have been tested on. Its not always practical to test a change on all platforms, and is not required for a pull request to be merged. Only check the systems you tested the build on in this section.
#### Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
Packages with automated tests are much more likely to be merged in a timely fashion because it doesnt require as much manual testing by the maintainer to verify the functionality of the package. If there are existing tests for the package, they should be run to verify your changes do not break the tests. Tests can only be run on Linux. For more details on writing and running tests, see the [section in the NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests).
#### Tested compilation of all pkgs that depend on this change using `nixpkgs-review`
If you are modifying a package, you can use `nixpkgs-review` to make sure all packages that depend on the updated package still 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.
Review changes from pull request number 12345:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review pr 12345"
```
Alternatively, with flakes (and analogously for the other commands below):
```ShellSession
nix run nixpkgs#nixpkgs-review -- pr 12345
```
Review uncommitted changes:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
```
Review changes from last commit:
```ShellSession
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
```
#### Tested execution of all binary files (usually in `./result/bin/`)
Its important to test any executables generated by a build when you change or create a package in nixpkgs. This can be done by looking in `./result/bin` and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to texlive, you probably would only check the binaries associated with the change you made rather than testing all of them.
#### Meets Nixpkgs contribution standards
The last checkbox is about whether it fits the guidelines in this `CONTRIBUTING.md` file. This document has detailed information on standards the Nix community has for commit messages, reviews, licensing of contributions you make to the project, etc... Everyone should read and understand the standards the community has for contributing before submitting a pull request.
### Rebasing between branches (i.e. from master to staging)
[rebase]: #rebasing-between-branches-ie-from-master-to-staging
From time to time, changes between branches must be rebased, for example, if the
number of new rebuilds they would cause is too large for the target branch. When
rebasing, care must be taken to include only the intended changes, otherwise
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. As an additional precautionary measure,
you should temporarily mark the PR as draft for the duration of the operation.
This reduces the probability of mass-pinging people. (OfBorg might still
request a couple of persons for reviews though.)
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.
```console
# Rebase your commits onto the common merge base
git rebase --onto upstream/staging... upstream/master
# Force push your changes
git push origin feature --force-with-lease
```
The syntax `upstream/staging...` is equivalent to `upstream/staging...HEAD` and
stands for the merge base between `upstream/staging` and `HEAD` (hence between
`upstream/staging` and `upstream/master`).
Then 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
retargeted it might be necessary to do a final rebase onto the target branch, to
resolve any outstanding merge conflicts.
```console
# Rebase onto target branch
git rebase upstream/staging
# Review and fixup possible conflicts
git status
# Force push your changes
git push origin feature --force-with-lease
```
#### Something went wrong and a lot of people were pinged
It happens. Remember to be kind, especially to new contributors.
There is no way back, so the pull request should be closed and locked
(if possible). The changes should be re-submitted in a new PR, in which the people
originally involved in the conversation need to manually be pinged again.
No further discussion should happen on the original PR, as a lot of people
are now subscribed to it.
The following message (or a version thereof) might be left when closing to
describe the situation, since closing and locking without any explanation
is kind of rude:
```markdown
It looks like you accidentally mass-pinged a bunch of people, which are now subscribed
and getting notifications for everything in this pull request. Unfortunately, they
cannot be automatically unsubscribed from the issue (removing review request does not
unsubscribe), therefore development cannot continue in this pull request anymore.
Please open a new pull request with your changes, link back to this one and ping the
people actually involved in here over there.
In order to avoid this in the future, there are instructions for how to properly
rebase between branches in our [contribution guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#rebasing-between-branches-ie-from-master-to-staging).
Setting your pull request to draft prior to rebasing is strongly recommended.
In draft status, you can preview the list of people that are about to be requested
for review, which allows you to sidestep this issue.
This is not a bulletproof method though, as OfBorg still does review requests even on draft PRs.
```
## How to backport pull requests
[pr-backport]: #how-to-backport-pull-requests
Once a pull request has been merged into `master`, a backport pull request to the corresponding `release-YY.MM` branch can be created either automatically or manually.
### Automatically backporting changes
> **Note**
> You have to be a [Nixpkgs maintainer](./maintainers) to automatically create a backport pull request.
Add the [`backport release-YY.MM` label](https://github.com/NixOS/nixpkgs/labels?q=backport) to the pull request on the `master` branch.
This will cause [a GitHub Action](.github/workflows/backport.yml) to open a pull request to the `release-YY.MM` branch a few minutes later.
This can be done on both open or already merged pull requests.
### Manually backporting changes
To manually create a backport pull request, follow [the standard pull request process][pr-create], with these notable differences:
- Use `release-YY.MM` for the base branch, both for the local branch and the pull request.
> **Warning**
> Do not use the `nixos-YY.MM` branch, that is a branch pointing to the tested release channel commit
- Instead of manually making and committing the changes, use [`git cherry-pick -x`](https://git-scm.com/docs/git-cherry-pick) for each commit from the pull request you'd like to backport.
Either `git cherry-pick -x <commit>` when the reason for the backport is obvious (such as minor versions, fixes, etc.), otherwise use `git cherry-pick -xe <commit>` to add a reason for the backport to the commit message.
Here is [an example](https://github.com/nixos/nixpkgs/commit/5688c39af5a6c5f3d646343443683da880eaefb8) of this.
> **Warning**
> Ensure the commits exists on the master branch.
> In the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request.
- In the pull request description, link to the original pull request to `master`.
The pull request title should include `[YY.MM]` matching the release you're backporting to.
- 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.
## How to review pull requests
[pr-review]: #how-to-review-pull-requests
> **Warning**
> The following section is a draft, and the policy for reviewing is still being discussed in issues such as [#11166](https://github.com/NixOS/nixpkgs/issues/11166) and [#20836](https://github.com/NixOS/nixpkgs/issues/20836).
The Nixpkgs project receives a fairly high number of contributions via GitHub pull requests. Reviewing and approving these is an important task and a way to contribute to the project.
The high change rate of Nixpkgs makes any pull request that remains open for too long subject to conflicts that will require extra work from the submitter or the merger. Reviewing pull requests in a timely manner and being responsive to the comments is the key to avoid this issue. GitHub provides sort filters that can be used to see the [most recently](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) and the [least recently](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc) updated pull requests. We highly encourage looking at [this list of ready to merge, unreviewed pull requests](https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+review%3Anone+status%3Asuccess+-label%3A%222.status%3A+work-in-progress%22+no%3Aproject+no%3Aassignee+no%3Amilestone).
When reviewing a pull request, please always be nice and polite. Controversial changes can lead to controversial opinions, but it is important to respect every community member and their work.
GitHub provides reactions as a simple and quick way to provide feedback to pull requests or any comments. The thumb-down reaction should be used with care and if possible accompanied with some explanation so the submitter has directions to improve their contribution.
Pull request reviews should include a list of what has been reviewed in a comment, so other reviewers and mergers can know the state of the review.
All the review template samples provided in this section are generic and meant as examples. Their usage is optional and the reviewer is free to adapt them to their liking.
To get more information about how to review specific parts of Nixpkgs, refer to the documents linked to in the [overview section][overview].
If a pull request contains documentation changes that might require feedback from the documentation team, ping @NixOS/documentation-team on the pull request.
If you consider having enough knowledge and experience in a topic and would like to be a long-term reviewer for related submissions, please contact the current reviewers for that topic. They will give you information about the reviewing process. The main reviewers for a topic can be hard to find as there is no list, but checking past pull requests to see who reviewed or git-blaming the code to see who committed to that topic can give some hints.
Container system, boot system and library changes are some examples of the pull requests fitting this category.
## How to merge pull requests
[pr-merge]: #how-to-merge-pull-requests
The *Nixpkgs committers* are people who have been given
permission to merge.
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.
Please note that contributors with commit rights unactive for more than three months will have their commit rights revoked.
-->
Please see the discussion in [GitHub nixpkgs issue #50105](https://github.com/NixOS/nixpkgs/issues/50105) for information on how to proceed to be granted this level of access.
In a case a contributor definitively leaves the Nix community, they should create an issue or post on [Discourse](https://discourse.nixos.org) with references of packages and modules they maintain so the maintainership can be taken over by other contributors.
# Flow of merged pull requests
After a pull request is merged, it eventually makes it to the [official Hydra CI](https://hydra.nixos.org/).
Hydra regularly evaluates and builds Nixpkgs, updating [the official channels](https://channels.nixos.org/) when specific Hydra jobs succeeded.
See [Nix Channel Status](https://status.nixos.org/) for the current channels and their state.
Here's a brief overview of the main Git branches and what channels they're used for:
- `master`: The main branch, used for the unstable channels such as `nixpkgs-unstable`, `nixos-unstable` and `nixos-unstable-small`.
- `release-YY.MM` (e.g. `release-23.05`): The NixOS release branches, used for the stable channels such as `nixos-23.05`, `nixos-23.05-small` and `nixpkgs-23.05-darwin`.
When a channel is updated, a corresponding Git branch is also updated to point to the corresponding commit.
So e.g. the [`nixpkgs-unstable` branch](https://github.com/nixos/nixpkgs/tree/nixpkgs-unstable) corresponds to the Git commit from the [`nixpkgs-unstable` channel](https://channels.nixos.org/nixpkgs-unstable).
Nixpkgs in its entirety is tied to the NixOS release process, which is documented in the [NixOS Release Wiki](https://nixos.github.io/release-wiki/).
See [this section][branch] to know when to use the release branches.
## Staging
[staging]: #staging
The staging workflow exists to batch Hydra builds of many packages together.
It works by directing commits that cause [mass rebuilds][mass-rebuild] to a separate `staging` branch that isn't directly built by Hydra.
Regularly, the `staging` branch is _manually_ merged into a `staging-next` branch to be built by Hydra using the [`nixpkgs:staging-next` jobset](https://hydra.nixos.org/jobset/nixpkgs/staging-next).
The `staging-next` branch should then only receive direct commits in order to fix Hydra builds.
Once it is verified that there are no major regressions, it is merged into `master` using [a pull requests](https://github.com/NixOS/nixpkgs/pulls?q=head%3Astaging-next).
This is done manually in order to ensure it's a good use of Hydra's computing resources.
By keeping the `staging-next` branch separate from `staging`, this batching does not block developers from merging changes into `staging`.
In order for the `staging` and `staging-next` branches to be up-to-date with the latest commits on `master`, there are regular _automated_ merges from `master` into `staging-next` and `staging`.
This is implemented using GitHub workflows [here](.github/workflows/periodic-merge-6h.yml) and [here](.github/workflows/periodic-merge-24h.yml).
> **Note**
> Changes must be sufficiently tested before being merged into any branch.
> Hydra builds should not be used as testing platform.
Here is a Git history diagram showing the flow of commits between the three branches:
```mermaid
%%{init: {
'theme': 'base',
'themeVariables': {
'gitInv0': '#ff0000',
'gitInv1': '#ff0000',
'git2': '#ff4444',
'commitLabelFontSize': '15px'
},
'gitGraph': {
'showCommitLabel':true,
'mainBranchName': 'master',
'rotateCommitLabel': true
}
} }%%
gitGraph
commit id:" "
branch staging-next
branch staging
checkout master
checkout staging
checkout master
commit id:" "
checkout staging-next
merge master id:"automatic"
checkout staging
merge staging-next id:"automatic "
checkout staging-next
merge staging type:HIGHLIGHT id:"manual"
commit id:"fixup"
checkout master
checkout staging
checkout master
commit id:" "
checkout staging-next
merge master id:"automatic "
checkout staging
merge staging-next id:"automatic "
checkout staging-next
commit id:"fixup "
checkout master
merge staging-next type:HIGHLIGHT id:"manual (PR)"
```
Here's an overview of the different branches:
| branch | `master` | `staging` | `staging-next` |
| --- | --- | --- | --- |
| Used for development | ✔️ | ✔️ | ❌ |
| Built by Hydra | ✔️ | ❌ | ✔️ |
| [Mass rebuilds][mass-rebuild] | ❌ | ✔️ | ⚠️ Only to fix Hydra builds |
| Critical security fixes | ✔️ for non-mass-rebuilds | ❌ | ✔️ for mass-rebuilds |
| Automatically merged into | `staging-next` | - | `staging` |
| Manually merged into | - | `staging-next` | `master` |
The staging workflow is used for all main branches, `master` and `release-YY.MM`, with corresponding names:
- `master`/`release-YY.MM`
- `staging`/`staging-YY.MM`
- `staging-next`/`staging-next-YY.MM`
# Conventions
## Branch conventions
<!-- This section is relevant to both contributors and reviewers -->
[branch]: #branch-conventions
Most changes should go to the `master` branch, but sometimes other branches should be used instead.
Use the following decision process to figure out which one it should be:
Is the change [acceptable for releases][release-acceptable] and do you wish to have the change in the release?
- No: Use the `master` branch, do not backport the pull request.
- Yes: Can the change be implemented the same way on the `master` and release branches?
For example, a packages major version might differ between the `master` and release branches, such that separate security patches are required.
- Yes: Use the `master` branch and [backport the pull request](#how-to-backport-pull-requests).
- No: Create separate pull requests to the `master` and `release-XX.YY` branches.
Furthermore, if the change causes a [mass rebuild][mass-rebuild], use the appropriate staging branch instead:
- Mass rebuilds to `master` should go to `staging` instead.
- Mass rebuilds to `release-XX.YY` should go to `staging-XX.YY` instead.
See [this section][staging] for more details about such changes propagate between the branches.
### Changes acceptable for releases
[release-acceptable]: #changes-acceptable-for-releases
Only changes to supported releases may be accepted.
The oldest supported release (`YYMM`) can be found using
```
nix-instantiate --eval -A lib.trivial.oldestSupportedRelease
```
The release branches should generally only receive backwards-compatible changes, both for the Nix expressions and derivations.
Here are some examples of backwards-compatible changes that are okay to backport:
- ✔️ New packages, modules and functions
- ✔️ Security fixes
- ✔️ Package version updates
- ✔️ Patch versions with fixes
- ✔️ Minor versions with new functionality, but no breaking changes
In addition, major package version updates with breaking changes are also acceptable for:
- ✔️ Services that would fail without up-to-date client software, such as `spotify`, `steam`, and `discord`
- ✔️ Security critical applications, such as `firefox` and `chromium`
### Changes causing mass rebuilds
[mass-rebuild]: #changes-causing-mass-rebuilds
Which changes cause mass rebuilds is not formally defined.
In order to help the decision, CI automatically assigns [`rebuild` labels](https://github.com/NixOS/nixpkgs/labels?q=rebuild) to pull requests based on the number of packages they cause rebuilds for.
As a rule of thumb, if the number of rebuilds is **over 500**, it can be considered a mass rebuild.
To get a sense for what changes are considered mass rebuilds, see [previously merged pull requests to the staging branches](https://github.com/NixOS/nixpkgs/issues?q=base%3Astaging+-base%3Astaging-next+is%3Amerged).
## Commit conventions
[commit-conventions]: #commit-conventions
- Create a commit for each logical unit.
- Check for unnecessary whitespace with `git diff --check` before committing.
- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
- For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
- When adding yourself as maintainer in the same pull request, make a separate
commit with the message `maintainers: add <handle>`.
Add the commit before those making changes to the package or module.
See [Nixpkgs Maintainers](./maintainers/README.md) for details.
- Make sure you read about any commit conventions specific to the area you're touching. See:
- [Commit conventions](./pkgs/README.md#commit-conventions) for changes to `pkgs`.
- [Commit conventions](./lib/README.md#commit-conventions) for changes to `lib`.
- [Commit conventions](./nixos/README.md#commit-conventions) for changes to `nixos`.
- [Commit conventions](./doc/README.md#commit-conventions) for changes to `doc`, the Nixpkgs manual.
### Writing good commit messages
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.
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.
Pull requests should not be squash merged in order to keep complete commit messages and GPG signatures intact and must not be when the change doesn't make sense as a single commit.
## Code conventions
[code-conventions]: #code-conventions
### Release notes
If you removed packages or made some major NixOS changes, write about it in the release notes for the next stable release in [`nixos/doc/manual/release-notes`](./nixos/doc/manual/release-notes).
### File naming and organisation
Names of files and directories should be in lowercase, with dashes between words — not in camel case. For instance, it should be `all-packages.nix`, not `allPackages.nix` or `AllPackages.nix`.
### Syntax
- Use 2 spaces of indentation per indentation level in Nix expressions, 4 spaces in shell scripts.
- Do not use tab characters, i.e. configure your editor to use soft tabs. For instance, use `(setq-default indent-tabs-mode nil)` in Emacs. Everybody has different tab settings so its asking for trouble.
- Use `lowerCamelCase` for variable names, not `UpperCamelCase`. Note, this rule does not apply to package attribute names, which instead follow the rules in [package naming](./pkgs/README.md#package-naming).
- Function calls with attribute set arguments are written as
```nix
foo {
arg = ...;
}
```
not
```nix
foo
{
arg = ...;
}
```
Also fine is
```nix
foo { arg = ...; }
```
if it's a short call.
- In attribute sets or lists that span multiple lines, the attribute names or list elements should be aligned:
```nix
# A long list.
list = [
elem1
elem2
elem3
];
# A long attribute set.
attrs = {
attr1 = short_expr;
attr2 =
if true then big_expr else big_expr;
};
# Combined
listOfAttrs = [
{
attr1 = 3;
attr2 = "fff";
}
{
attr1 = 5;
attr2 = "ggg";
}
];
```
- Short lists or attribute sets can be written on one line:
```nix
# A short list.
list = [ elem1 elem2 elem3 ];
# A short set.
attrs = { x = 1280; y = 1024; };
```
- Breaking in the middle of a function argument can give hard-to-read code, like
```nix
someFunction { x = 1280;
y = 1024; } otherArg
yetAnotherArg
```
(especially if the argument is very large, spanning multiple lines).
Better:
```nix
someFunction
{ x = 1280; y = 1024; }
otherArg
yetAnotherArg
```
or
```nix
let res = { x = 1280; y = 1024; };
in someFunction res otherArg yetAnotherArg
```
- The bodies of functions, asserts, and withs are not indented to prevent a lot of superfluous indentation levels, i.e.
```nix
{ arg1, arg2 }:
assert system == "i686-linux";
stdenv.mkDerivation { ...
```
not
```nix
{ arg1, arg2 }:
assert system == "i686-linux";
stdenv.mkDerivation { ...
```
- Function formal arguments are written as:
```nix
{ arg1, arg2, arg3 }:
```
but if they don't fit on one line they're written as:
```nix
{ arg1, arg2, arg3
, arg4, ...
, # Some comment...
argN
}:
```
- Functions should list their expected arguments as precisely as possible. That is, write
```nix
{ stdenv, fetchurl, perl }: ...
```
instead of
```nix
args: with args; ...
```
or
```nix
{ stdenv, fetchurl, perl, ... }: ...
```
For functions that are truly generic in the number of arguments (such as wrappers around `mkDerivation`) that have some required arguments, you should write them using an `@`-pattern:
```nix
{ stdenv, doCoverageAnalysis ? false, ... } @ args:
stdenv.mkDerivation (args // {
... if doCoverageAnalysis then "bla" else "" ...
})
```
instead of
```nix
args:
args.stdenv.mkDerivation (args // {
... if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "" ...
})
```
- Unnecessary string conversions should be avoided. Do
```nix
rev = version;
```
instead of
```nix
rev = "${version}";
```
- Building lists conditionally _should_ be done with `lib.optional(s)` instead of using `if cond then [ ... ] else null` or `if cond then [ ... ] else [ ]`.
```nix
buildInputs = lib.optional stdenv.isDarwin iconv;
```
instead of
```nix
buildInputs = if stdenv.isDarwin then [ iconv ] else null;
```
As an exception, an explicit conditional expression with null can be used when fixing a important bug without triggering a mass rebuild.
If this is done a follow up pull request _should_ be created to change the code to `lib.optional(s)`.

View File

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

131
README.md
View File

@@ -1,100 +1,47 @@
<p align="center">
<a href="https://nixos.org#gh-light-mode-only">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/master/logo/nixos-hires.png" width="500px" alt="NixOS logo"/>
</a>
<a href="https://nixos.org#gh-dark-mode-only">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png" width="500px" alt="NixOS logo"/>
</a>
</p>
[<img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />](https://nixos.org/nixos)
<p align="center">
<a href="https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md"><img src="https://img.shields.io/github/contributors-anon/NixOS/nixpkgs" alt="Contributors badge" /></a>
<a href="https://opencollective.com/nixos"><img src="https://opencollective.com/nixos/tiers/supporter/badge.svg?label=supporters&color=brightgreen" alt="Open Collective supporters" /></a>
</p>
[![Code Triagers Badge](https://www.codetriage.com/nixos/nixpkgs/badges/users.svg)](https://www.codetriage.com/nixos/nixpkgs)
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over
80,000 software packages that can be installed with the
[Nix](https://nixos.org/nix/) package manager. It also implements
[NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
Nixpkgs is a collection of packages for the [Nix](https://nixos.org/nix/) package
manager. It is periodically built and tested by the [Hydra](https://hydra.nixos.org/)
build daemon as so-called channels. To get channel information via git, add
[nixpkgs-channels](https://github.com/NixOS/nixpkgs-channels.git) as a remote:
# Manuals
```
% git remote add channels https://github.com/NixOS/nixpkgs-channels.git
```
* [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution
* [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions
* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expressions (programs), and how to use Nix command line tools
For stability and maximum binary package support, it is recommended to maintain
custom changes on top of one of the channels, e.g. `nixos-19.03` for the latest
release and `nixos-unstable` for the latest successful build of master:
# Community
```
% git remote update channels
% git rebase channels/nixos-19.03
```
For pull requests, please rebase onto nixpkgs `master`.
[NixOS](https://nixos.org/nixos/) Linux distribution source code is located inside
`nixos/` folder.
* [NixOS installation instructions](https://nixos.org/nixos/manual/#ch-installation)
* [Documentation (Nix Expression Language chapter)](https://nixos.org/nix/manual/#ch-expression-language)
* [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/)
* [Manual (NixOS)](https://nixos.org/nixos/manual/)
* [Community maintained wiki](https://nixos.wiki/)
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for 19.03 release](https://hydra.nixos.org/jobset/nixos/release-19.03)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for 19.03 release](https://hydra.nixos.org/job/nixos/release-19.03/tested#tabs-constituents)
Communication:
* [Discourse Forum](https://discourse.nixos.org/)
* [Matrix Chat](https://matrix.to/#/#community:nixos.org)
* [NixOS Weekly](https://weekly.nixos.org/)
* [Community-maintained wiki](https://nixos.wiki/)
* [Community-maintained list of ways to get in touch](https://nixos.wiki/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)
# Other Project Repositories
The sources of all official Nix-related projects are in the [NixOS
organization on GitHub](https://github.com/NixOS/). Here are some of
the main ones:
* [Nix](https://github.com/NixOS/nix) - the purely functional package manager
* [NixOps](https://github.com/NixOS/nixops) - the tool to remotely deploy NixOS machines
* [nixos-hardware](https://github.com/NixOS/nixos-hardware) - NixOS profiles to optimize settings for different hardware
* [Nix RFCs](https://github.com/NixOS/rfcs) - the formal process for making substantial changes to the community
* [NixOS homepage](https://github.com/NixOS/nixos-homepage) - the [NixOS.org](https://nixos.org) website
* [hydra](https://github.com/NixOS/hydra) - our continuous integration system
* [NixOS Artwork](https://github.com/NixOS/nixos-artwork) - NixOS artwork
# Continuous Integration and Distribution
Nixpkgs and NixOS are built and tested by our continuous integration
system, [Hydra](https://hydra.nixos.org/).
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for the NixOS 23.11 release](https://hydra.nixos.org/jobset/nixos/release-23.11)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for the NixOS 23.11 release](https://hydra.nixos.org/job/nixos/release-23.11/tested#tabs-constituents)
Artifacts successfully built with Hydra are published to cache at
https://cache.nixos.org/. When successful build and test criteria are
met, the Nixpkgs expressions are distributed via [Nix
channels](https://nixos.org/manual/nix/stable/package-management/channels.html).
# Contributing
Nixpkgs is among the most active projects on GitHub. While thousands
of open issues and pull requests might seem a lot at first, it helps
consider it in the context of the scope of the project. Nixpkgs
describes how to build tens of thousands of pieces of software and implements a
Linux distribution. The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse)
page gives a sense of the project activity.
Community contributions are always welcome through GitHub Issues and
Pull Requests.
For more information about contributing to the project, please visit
the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
# Donations
The infrastructure for NixOS and related projects is maintained by a
nonprofit organization, the [NixOS
Foundation](https://nixos.org/nixos/foundation.html). To ensure the
continuity and expansion of the NixOS infrastructure, we are looking
for donations to our organization.
You can donate to the NixOS foundation through [SEPA bank
transfers](https://nixos.org/donate.html) or by using Open Collective:
<a href="https://opencollective.com/nixos#support"><img src="https://opencollective.com/nixos/tiers/supporter.svg?width=890" /></a>
# License
Nixpkgs is licensed under the [MIT License](COPYING).
Note: MIT license does not apply to the packages built by Nixpkgs,
merely to the files in this repository (the Nix expressions, build
scripts, NixOS modules, etc.). It also might not apply to patches
included in Nixpkgs, which may be derivative works of the packages to
which they apply. The aforementioned artifacts are all covered by the
licenses of the respective packages.
Note: MIT license does not apply to the packages built by Nixpkgs, merely to
the package descriptions (Nix expressions, build scripts, and so on). It also
might not apply to patches included in Nixpkgs, which may be derivative works
of the packages to which they apply. The aforementioned artifacts are all
covered by the licenses of the respective packages.

View File

@@ -14,7 +14,7 @@ if ! builtins ? nixVersion || builtins.compareVersions requiredVersion builtins.
- If you installed Nix using the install script (https://nixos.org/nix/install),
it is safe to upgrade by running it again:
curl -L https://nixos.org/nix/install | sh
curl https://nixos.org/nix/install | sh
For more information, please see the NixOS release notes at
https://nixos.org/nixos/manual or locally at

7
doc/.gitignore vendored Normal file
View File

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

112
doc/Makefile Normal file
View File

@@ -0,0 +1,112 @@
MD_TARGETS=$(addsuffix .xml, $(basename $(wildcard ./*.md ./**/*.md)))
.PHONY: all
all: validate format out/html/index.html out/epub/manual.epub
.PHONY: debug
debug:
nix-shell --run "xmloscopy --docbook5 ./manual.xml ./manual-full.xml"
.PHONY: format
format:
find . -iname '*.xml' -type f | while read f; do \
echo $$f ;\
xmlformat --config-file "$$XMLFORMAT_CONFIG" -i $$f ;\
done
.PHONY: fix-misc-xml
fix-misc-xml:
find . -iname '*.xml' -type f \
-exec ../nixos/doc/varlistentry-fixer.rb {} ';'
.PHONY: clean
clean:
rm -f ${MD_TARGETS} .version manual-full.xml functions/library/locations.xml functions/library/generated
rm -rf ./out/ ./highlightjs
.PHONY: validate
validate: manual-full.xml
jing "$$RNG" manual-full.xml
out/html/index.html: manual-full.xml style.css highlightjs
mkdir -p out/html
xsltproc ${xsltFlags} \
--nonet --xinclude \
--output $@ \
"$$XSL/docbook/xhtml/docbook.xsl" \
./manual-full.xml
mkdir -p out/html/highlightjs/
cp -r highlightjs out/html/
cp ./overrides.css out/html/
cp ./style.css out/html/style.css
mkdir -p out/html/images/callouts
cp "$$XSL/docbook/images/callouts/"*.svg out/html/images/callouts/
chmod u+w -R out/html/
out/epub/manual.epub: manual-full.xml
mkdir -p out/epub/scratch
xsltproc ${xsltFlags} --nonet \
--output out/epub/scratch/ \
"$$XSL/docbook/epub/docbook.xsl" \
./manual-full.xml
cp ./overrides.css out/epub/scratch/OEBPS
cp ./style.css out/epub/scratch/OEBPS
mkdir -p out/epub/scratch/OEBPS/images/callouts/
cp "$$XSL/docbook/images/callouts/"*.svg out/epub/scratch/OEBPS/images/callouts/
echo "application/epub+zip" > mimetype
zip -0Xq "out/epub/manual.epub" mimetype
rm mimetype
cd "out/epub/scratch/" && zip -Xr9D "../manual.epub" *
rm -rf "out/epub/scratch/"
highlightjs:
mkdir -p highlightjs
cp -r "$$HIGHLIGHTJS/highlight.pack.js" highlightjs/
cp -r "$$HIGHLIGHTJS/LICENSE" highlightjs/
cp -r "$$HIGHLIGHTJS/mono-blue.css" highlightjs/
cp -r "$$HIGHLIGHTJS/loader.js" highlightjs/
manual-full.xml: ${MD_TARGETS} .version functions/library/locations.xml functions/library/generated *.xml **/*.xml **/**/*.xml
xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml
.version:
nix-instantiate --eval \
-E '(import ../lib).version' > .version
function_locations := $(shell nix-build --no-out-link ./lib-function-locations.nix)
functions/library/locations.xml:
ln -s $(function_locations) ./functions/library/locations.xml
functions/library/generated:
nix-build ./lib-function-docs.nix \
--arg locationsXml $(function_locations)\
--out-link ./functions/library/generated
%.section.xml: %.section.md
pandoc $^ -w docbook+smart \
-f markdown+smart \
| sed -e 's|<ulink url=|<link xlink:href=|' \
-e 's|</ulink>|</link>|' \
-e 's|<sect. id=|<section xml:id=|' \
-e 's|</sect[0-9]>|</section>|' \
-e '1s| id=| xml:id=|' \
-e '1s|\(<[^ ]* \)|\1xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" |' \
| cat > $@
%.chapter.xml: %.chapter.md
pandoc $^ -w docbook+smart \
--top-level-division=chapter \
-f markdown+smart \
| sed -e 's|<ulink url=|<link xlink:href=|' \
-e 's|</ulink>|</link>|' \
-e 's|<sect. id=|<section xml:id=|' \
-e 's|</sect[0-9]>|</section>|' \
-e '1s| id=| xml:id=|' \
-e '1s|\(<[^ ]* \)|\1|' \
| cat > $@

View File

@@ -1,137 +0,0 @@
# Contributing to the Nixpkgs manual
This directory houses the sources files for the Nixpkgs manual.
You can find the [rendered documentation for Nixpkgs `unstable` on nixos.org](https://nixos.org/manual/nixpkgs/unstable/).
The rendering tool is [nixos-render-docs](../pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs), sometimes abbreviated `nrd`.
[Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available.
If you're only getting started with Nix, go to [nixos.org/learn](https://nixos.org/learn).
## Contributing to this documentation
You can quickly check your edits with `nix-build`:
```ShellSession
$ cd /path/to/nixpkgs
$ nix-build doc
```
If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`.
### devmode
The shell in the manual source directory makes available a command, `devmode`.
It is a daemon, that:
1. watches the manual's source for changes and when they occur — rebuilds
2. HTTP serves the manual, injecting a script that triggers reload on changes
3. opens the manual in the default browser
## Syntax
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, all of which can be used in NixOS option documentation. The following extensions are currently used:
#### Tables
Tables, using the [GitHub-flavored Markdown syntax](https://github.github.com/gfm/#tables-extension-).
#### 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).
It uses the widely compatible [header attributes](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/attributes.md) syntax:
```markdown
## Syntax {#sec-contributing-markup}
```
> **Note**
> NixOS option documentation does not support headings in general.
#### Inline Anchors
Allow linking arbitrary place in the text (e.g. individual list items, sentences…).
They are defined using a hybrid of the link syntax with the attributes syntax known from headings, called [bracketed spans](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/bracketed_spans.md):
```markdown
- []{#ssec-gnome-hooks-glib} `glib` setup hook will populate `GSETTINGS_SCHEMAS_PATH` and then `wrapGAppsHook` will prepend it to `XDG_DATA_DIRS`.
```
#### Automatic links
If you **omit a link text** for a link pointing to a section, the text will be substituted automatically. For example `[](#chap-contributing)`.
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing).
#### Roles
If you want to link to a man page, you can use `` {manpage}`nix.conf(5)` ``. The references will turn into links when a mapping exists in [`doc/manpage-urls.json`](./manpage-urls.json).
A few markups for other kinds of literals are also available:
- `` {command}`rm -rfi` ``
- `` {env}`XDG_DATA_DIRS` ``
- `` {file}`/etc/passwd` ``
- `` {option}`networking.useDHCP` ``
- `` {var}`/etc/passwd` ``
These literal kinds are used mostly in NixOS option documentation.
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.
#### Admonitions
Set off from the text to bring attention to something.
It uses pandocs [fenced `div`s syntax](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/fenced_divs.md):
```markdown
::: {.warning}
This is a warning
:::
```
The following are supported:
- [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
- [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
#### [Definition lists](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md)
For defining a group of terms:
```markdown
pear
: green or yellow bulbous fruit
watermelon
: green fruit with red flesh
```
## Commit conventions
- Make sure you read about the [commit conventions](../CONTRIBUTING.md#commit-conventions) common to Nixpkgs as a whole.
- If creating a commit purely for documentation changes, format the commit message in the following way:
```
doc: (documentation summary)
(Motivation for change, relevant links, additional information.)
```
Examples:
* doc: update the kernel config documentation to use `nix-shell`
* doc: add information about `nix-update-script`
Closes #216321.
- If the commit contains more than just documentation changes, follow the commit message format relevant for the rest of the changes.

View File

@@ -1,28 +0,0 @@
# Build helpers {#part-builders}
A build helper is a function that produces derivations.
:::{.warning}
This is not to be confused with the [`builder` argument of the Nix `derivation` primitive](https://nixos.org/manual/nix/unstable/language/derivations.html), which refers to the executable that produces the build result, or [remote builder](https://nixos.org/manual/nix/stable/advanced-topics/distributed-builds.html), which refers to a remote machine that could run such an executable.
:::
Such a function is usually designed to abstract over a typical workflow for a given programming language or framework.
This allows declaring a build recipe by setting a limited number of options relevant to the particular use case instead of using the `derivation` function directly.
[`stdenv.mkDerivation`](#part-stdenv) is the most widely used build helper, and serves as a basis for many others.
In addition, it offers various options to customize parts of the builds.
There is no uniform interface for build helpers.
[Trivial build helpers](#chap-trivial-builders) and [fetchers](#chap-pkgs-fetchers) have various input types for convenience.
[Language- or framework-specific build helpers](#chap-language-support) usually follow the style of `stdenv.mkDerivation`, which accepts an attribute set or a fixed-point function taking an attribute set.
```{=include=} chapters
build-helpers/fetchers.chapter.md
build-helpers/trivial-build-helpers.chapter.md
build-helpers/testers.chapter.md
build-helpers/special.md
build-helpers/images.md
hooks/index.md
languages-frameworks/index.md
packages/index.md
```

View File

@@ -1,283 +0,0 @@
# Fetchers {#chap-pkgs-fetchers}
Building software with Nix often requires downloading source code and other files from the internet.
To this end, Nixpkgs provides *fetchers*: functions to obtain remote sources via various protocols and services.
Nixpkgs fetchers differ from built-in fetchers such as [`builtins.fetchTarball`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchTarball):
- A built-in fetcher will download and cache files at evaluation time and produce a [store path](https://nixos.org/manual/nix/stable/glossary#gloss-store-path).
A Nixpkgs fetcher will create a ([fixed-output](https://nixos.org/manual/nix/stable/glossary#gloss-fixed-output-derivation)) [derivation](https://nixos.org/manual/nix/stable/language/derivations), and files are downloaded at build time.
- Built-in fetchers will invalidate their cache after [`tarball-ttl`](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-tarball-ttl) expires, and will require network activity to check if the cache entry is up to date.
Nixpkgs fetchers only re-download if the specified hash changes or the store object is not otherwise available.
- Built-in fetchers do not use [substituters](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-substituters).
Derivations produced by Nixpkgs fetchers will use any configured binary cache transparently.
This significantly reduces the time needed to evaluate the entirety of Nixpkgs, and allows [Hydra](https://nixos.org/hydra) to retain and re-distribute sources used by Nixpkgs in the [public binary cache](https://cache.nixos.org).
For these reasons, built-in fetchers are not allowed in Nixpkgs source code.
The following table shows an overview of the differences:
| Fetchers | Download | Output | Cache | Re-download when |
|-|-|-|-|-|
| `builtins.fetch*` | evaluation time | store path | `/nix/store`, `~/.cache/nix` | `tarball-ttl` expires, cache miss in `~/.cache/nix`, output store object not in local store |
| `pkgs.fetch*` | build time | derivation | `/nix/store`, substituters | output store object not available |
## Caveats {#chap-pkgs-fetchers-caveats}
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";
hash = "sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=";
};
```
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";
hash = "sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=";
};
```
**This will reuse the old contents**.
Remember to invalidate the hash argument, in this case by setting the `hash` attribute to an empty string.
```nix
fetchurl {
url = "http://www.example.org/hello-1.1.tar.gz";
hash = "";
};
```
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-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=
```
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.
## `fetchurl` and `fetchzip` {#fetchurl}
Two basic fetchers are `fetchurl` and `fetchzip`. Both of these have two required arguments, a URL and a hash. The hash is typically `hash`, although many more hash algorithms are supported. Nixpkgs contributors are currently recommended to use `hash`. This hash will be used by Nix to identify your source. A typical usage of `fetchurl` is provided below.
```nix
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "hello";
src = fetchurl {
url = "http://www.example.org/hello.tar.gz";
hash = "sha256-BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=";
};
}
```
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.
- `decode`: Pipe the downloaded data through this command before processing it as a 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 `hash` argument is changed as well.
Most other fetchers return a directory rather than a single file.
## `fetchDebianPatch` {#fetchdebianpatch}
A wrapper around `fetchpatch`, which takes:
- `patch` and `hash`: the patch's filename,
and its hash after normalization by `fetchpatch` ;
- `pname`: the Debian source package's name ;
- `version`: the upstream version number ;
- `debianRevision`: the [Debian revision number] if applicable ;
- the `area` of the Debian archive: `main` (default), `contrib`, or `non-free`.
Here is an example of `fetchDebianPatch` in action:
```nix
{ lib
, fetchDebianPatch
, buildPythonPackage
}:
buildPythonPackage rec {
pname = "pysimplesoap";
version = "1.16.2";
src = ...;
patches = [
(fetchDebianPatch {
inherit pname version;
debianRevision = "5";
name = "Add-quotes-to-SOAPAction-header-in-SoapClient.patch";
hash = "sha256-xA8Wnrpr31H8wy3zHSNfezFNjUJt1HbSXn3qUMzeKc0=";
})
];
...
}
```
Patches are fetched from `sources.debian.org`, and so must come from a
package version that was uploaded to the Debian archive. Packages may
be removed from there once that specific version isn't in any suite
anymore (stable, testing, unstable, etc.), so maintainers should use
`copy-tarballs.pl` to archive the patch if it needs to be available
longer-term.
[Debian revision number]: https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
## `fetchsvn` {#fetchsvn}
Used with Subversion. Expects `url` to a Subversion directory, `rev`, and `hash`.
## `fetchgit` {#fetchgit}
Used with Git. Expects `url` to a Git repo, `rev`, and `hash`. `rev` in this case can be full the git commit id (SHA1 hash) or a tag name like `refs/tags/v1.0`.
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:
```nix
{ stdenv, fetchgit }:
stdenv.mkDerivation {
name = "hello";
src = fetchgit {
url = "https://...";
sparseCheckout = [
"directory/to/be/included"
"another/directory"
];
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
}
```
## `fetchfossil` {#fetchfossil}
Used with Fossil. Expects `url` to a Fossil archive, `rev`, and `hash`.
## `fetchcvs` {#fetchcvs}
Used with CVS. Expects `cvsRoot`, `tag`, and `hash`.
## `fetchhg` {#fetchhg}
Used with Mercurial. Expects `url`, `rev`, and `hash`.
A number of fetcher functions wrap part of `fetchurl` and `fetchzip`. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.
## `fetchFromGitea` {#fetchfromgitea}
`fetchFromGitea` expects five arguments. `domain` is the gitea server name. `owner` is a string corresponding to the Gitea user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every Gitea HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `hash` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `hash` is currently preferred.
## `fetchFromGitHub` {#fetchfromgithub}
`fetchFromGitHub` expects four arguments. `owner` is a string corresponding to the GitHub user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `hash` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available, but `hash` is currently preferred.
To use a different GitHub instance, use `githubBase` (defaults to `"github.com"`).
`fetchFromGitHub` uses `fetchzip` to download the source archive generated by GitHub for the specified revision. If `leaveDotGit`, `deepClone` or `fetchSubmodules` are set to `true`, `fetchFromGitHub` will use `fetchgit` instead. Refer to its section for documentation of these options.
## `fetchFromGitLab` {#fetchfromgitlab}
This is used with GitLab repositories. It behaves similarly to `fetchFromGitHub`, and expects `owner`, `repo`, `rev`, and `hash`.
To use a specific GitLab instance, use `domain` (defaults to `"gitlab.com"`).
## `fetchFromGitiles` {#fetchfromgitiles}
This is used with Gitiles repositories. The arguments expected are similar to `fetchgit`.
## `fetchFromBitbucket` {#fetchfrombitbucket}
This is used with BitBucket repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromSavannah` {#fetchfromsavannah}
This is used with Savannah repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromRepoOrCz` {#fetchfromrepoorcz}
This is used with repo.or.cz repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromSourcehut` {#fetchfromsourcehut}
This is used with sourcehut repositories. Similar to `fetchFromGitHub` above,
it expects `owner`, `repo`, `rev` and `hash`, but don't forget the tilde (~)
in front of the username! Expected arguments also include `vc` ("git" (default)
or "hg"), `domain` and `fetchSubmodules`.
If `fetchSubmodules` is `true`, `fetchFromSourcehut` uses `fetchgit`
or `fetchhg` with `fetchSubmodules` or `fetchSubrepos` set to `true`,
respectively. Otherwise, the fetcher uses `fetchzip`.
## `requireFile` {#requirefile}
`requireFile` allows requesting files that cannot be fetched automatically, but whose content is known.
This is a useful last-resort workaround for license restrictions that prohibit redistribution, or for downloads that are only accessible after authenticating interactively in a browser.
If the requested file is present in the Nix store, the resulting derivation will not be built, because its expected output is already available.
Otherwise, the builder will run, but fail with a message explaining to the user how to provide the file. The following code, for example:
```
requireFile {
name = "jdk-${version}_linux-x64_bin.tar.gz";
url = "https://www.oracle.com/java/technologies/javase-jdk11-downloads.html";
hash = "sha256-lL00+F7jjT71nlKJ7HRQuUQ7kkxVYlZh//5msD8sjeI=";
}
```
results in this error message:
```
***
Unfortunately, we cannot download file jdk-11.0.10_linux-x64_bin.tar.gz automatically.
Please go to https://www.oracle.com/java/technologies/javase-jdk11-downloads.html to download it yourself, and add it to the Nix store
using either
nix-store --add-fixed sha256 jdk-11.0.10_linux-x64_bin.tar.gz
or
nix-prefetch-url --type sha256 file:///path/to/jdk-11.0.10_linux-x64_bin.tar.gz
***
```
## `fetchtorrent` {#fetchtorrent}
`fetchtorrent` expects two arguments. `url` which can either be a Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file. It can also take a `config` argument which will craft a `settings.json` configuration file and give it to `transmission`, the underlying program that is performing the fetch. The available config options for `transmission` can be found [here](https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md#options)
```
{ fetchtorrent }:
fetchtorrent {
config = { peer-limit-global = 100; };
url = "magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c";
sha256 = "";
}
```
### Parameters {#fetchtorrent-parameters}
- `url`: Magnet URI (Magnet Link) such as `magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c` or an HTTP URL pointing to a `.torrent` file.
- `backend`: Which bittorrent program to use. Default: `"transmission"`. Valid values are `"rqbit"` or `"transmission"`. These are the two most suitable torrent clients for fetching in a fixed-output derivation at the time of writing, as they can be easily exited after usage. `rqbit` is written in Rust and has a smaller closure size than `transmission`, and the performance and peer discovery properties differs between these clients, requiring experimentation to decide upon which is the best.
- `config`: When using `transmission` as the `backend`, a json configuration can
be supplied to transmission. Refer to the [upstream documentation](https://github.com/transmission/transmission/blob/main/docs/Editing-Configuration-Files.md) for information on how to configure.

View File

@@ -1,13 +0,0 @@
# Images {#chap-images}
This chapter describes tools for creating various types of images.
```{=include=} sections
images/appimagetools.section.md
images/dockertools.section.md
images/ocitools.section.md
images/snaptools.section.md
images/portableservice.section.md
images/makediskimage.section.md
images/binarycache.section.md
```

View File

@@ -1,48 +0,0 @@
# pkgs.appimageTools {#sec-pkgs-appimageTools}
`pkgs.appimageTools` is a set of functions for extracting and wrapping [AppImage](https://appimage.org/) files. They are meant to be used if traditional packaging from source is infeasible, or it would take too long. To quickly run an AppImage file, `pkgs.appimage-run` can be used as well.
::: {.warning}
The `appimageTools` API is unstable and may be subject to backwards-incompatible changes in the future.
:::
## AppImage formats {#ssec-pkgs-appimageTools-formats}
There are different formats for AppImages, see [the specification](https://github.com/AppImage/AppImageSpec/blob/74ad9ca2f94bf864a4a0dac1f369dd4f00bd1c28/draft.md#image-format) for details.
- Type 1 images are ISO 9660 files that are also ELF executables.
- Type 2 images are ELF executables with an appended filesystem.
They can be told apart with `file -k`:
```ShellSession
$ file -k type1.AppImage
type1.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) ISO 9660 CD-ROM filesystem data 'AppImage' (Lepton 3.x), scale 0-0,
spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 0.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=d629f6099d2344ad82818172add1d38c5e11bc6d, stripped\012- data
$ file -k type2.AppImage
type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x), scale 232-60668, spot sensor temperature -4.187500, color scheme 15, show scale bar, calibration: offset -0.000000, slope 0.000000 (Lepton 2.x), scale 4111-45000, spot sensor temperature 412442.250000, color scheme 3, minimum point enabled, calibration: offset -75402534979642766821519867692934234112.000000, slope 5815371847733706829839455140374904832.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79dcc4e55a61c293c5e19edbd8d65b202842579f, stripped\012- data
```
Note how the type 1 AppImage is described as an `ISO 9660 CD-ROM filesystem`, and the type 2 AppImage is not.
## Wrapping {#ssec-pkgs-appimageTools-wrapping}
Depending on the type of AppImage you're wrapping, you'll have to use `wrapType1` or `wrapType2`.
```nix
appimageTools.wrapType2 { # or wrapType1
name = "patchwork";
src = fetchurl {
url = "https://github.com/ssbc/patchwork/releases/download/v3.11.4/Patchwork-3.11.4-linux-x86_64.AppImage";
hash = "sha256-OqTitCeZ6xmWbqYTXp8sDrmVgTNjPZNW0hzUPW++mq4=";
};
extraPkgs = pkgs: with pkgs; [ ];
}
```
- `name` specifies the name of the resulting image.
- `src` specifies the AppImage file to extract.
- `extraPkgs` allows you to pass a function to include additional packages inside the FHS environment your AppImage is going to run in. There are a few ways to learn which dependencies an application needs:
- Looking through the extracted AppImage files, reading its scripts and running `patchelf` and `ldd` on its executables. This can also be done in `appimage-run`, by setting `APPIMAGE_DEBUG_EXEC=bash`.
- Running `strace -vfefile` on the wrapped executable, looking for libraries that can't be found.

View File

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

View File

@@ -1,539 +0,0 @@
# pkgs.dockerTools {#sec-pkgs-dockerTools}
`pkgs.dockerTools` is a set of functions for creating and manipulating Docker images according to the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#docker-image-specification-v120). Docker itself is not used to perform any of the operations done by these functions.
## buildImage {#ssec-pkgs-dockerTools-buildImage}
This function is analogous to the `docker build` command, in that it can be used to build a Docker-compatible repository tarball containing a single image with one or multiple layers. As such, the result is suitable for being loaded in Docker with `docker load`.
The parameters of `buildImage` with relative example values are described below:
[]{#ex-dockerTools-buildImage}
[]{#ex-dockerTools-buildImage-runAsRoot}
```nix
buildImage {
name = "redis";
tag = "latest";
fromImage = someBaseImage;
fromImageName = null;
fromImageTag = "latest";
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ pkgs.redis ];
pathsToLink = [ "/bin" ];
};
runAsRoot = ''
#!${pkgs.runtimeShell}
mkdir -p /data
'';
config = {
Cmd = [ "/bin/redis-server" ];
WorkingDir = "/data";
Volumes = { "/data" = { }; };
};
diskSize = 1024;
buildVMMemorySize = 512;
}
```
The above example will build a Docker image `redis/latest` from the given base image. Loading and running this image in Docker results in `redis-server` being started automatically.
- `name` specifies the name of the resulting image. This is the only required argument for `buildImage`.
- `tag` specifies the tag of the resulting image. By default it's `null`, which indicates that the nix output hash will be used as tag.
- `fromImage` is the repository tarball containing the base image. It must be a valid Docker image, such as exported by `docker save`. By default it's `null`, which can be seen as equivalent to `FROM scratch` of a `Dockerfile`.
- `fromImageName` can be used to further specify the base image within the repository, in case it contains multiple images. By default it's `null`, in which case `buildImage` will peek the first image available in the repository.
- `fromImageTag` can be used to further specify the tag of the base image within the repository, in case an image contains multiple tags. By default it's `null`, in which case `buildImage` will peek the first tag available for the base image.
- `copyToRoot` is a derivation that will be copied in the new layer of the resulting image. This can be similarly seen as `ADD contents/ /` in a `Dockerfile`. By default it's `null`.
- `runAsRoot` is a bash script that will run as root in an environment that overlays the existing layers of the base image with the new resulting layer, including the previously copied `contents` derivation. This can be similarly seen as `RUN ...` in a `Dockerfile`.
> **_NOTE:_** Using this parameter requires the `kvm` device to be available.
- `config` is used to specify the configuration of the containers that will be started off the built image in Docker. The available options are listed in the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions).
- `architecture` is _optional_ and used to specify the image architecture, this is useful for multi-architecture builds that don't need cross compiling. If not specified it will default to `hostPlatform`.
- `diskSize` is used to specify the disk size of the VM used to build the image in megabytes. By default it's 1024 MiB.
- `buildVMMemorySize` is used to specify the memory size of the VM to build the image in megabytes. By default it's 512 MiB.
After the new layer has been created, its closure (to which `contents`, `config` and `runAsRoot` contribute) will be copied in the layer itself. Only new dependencies that are not already in the existing layers will be copied.
At the end of the process, only one new single layer will be produced and added to the resulting image.
The resulting repository will only list the single image `image/tag`. In the case of [the `buildImage` example](#ex-dockerTools-buildImage), it would be `redis/latest`.
It is possible to inspect the arguments with which an image was built using its `buildArgs` attribute.
> **_NOTE:_** If you see errors similar to `getProtocolByName: does not exist (no such protocol name: tcp)` you may need to add `pkgs.iana-etc` to `contents`.
> **_NOTE:_** If you see errors similar to `Error_Protocol ("certificate has unknown CA",True,UnknownCa)` you may need to add `pkgs.cacert` to `contents`.
By default `buildImage` will use a static date of one second past the UNIX Epoch. This allows `buildImage` to produce binary reproducible images. When listing images with `docker images`, the newly created images will be listed like this:
```ShellSession
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest 08c791c7846e 48 years ago 25.2MB
```
You can break binary reproducibility but have a sorted, meaningful `CREATED` column by setting `created` to `now`.
```nix
pkgs.dockerTools.buildImage {
name = "hello";
tag = "latest";
created = "now";
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [ pkgs.hello ];
pathsToLink = [ "/bin" ];
};
config.Cmd = [ "/bin/hello" ];
}
```
Now the Docker CLI will display a reasonable date and sort the images as expected:
```ShellSession
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest de2bf4786de6 About a minute ago 25.2MB
```
However, the produced images will not be binary reproducible.
## buildLayeredImage {#ssec-pkgs-dockerTools-buildLayeredImage}
Create a Docker image with many of the store paths being on their own layer to improve sharing between images. The image is realized into the Nix store as a gzipped tarball. Depending on the intended usage, many users might prefer to use `streamLayeredImage` instead, which this function uses internally.
`name`
: The name of the resulting image.
`tag` _optional_
: Tag of the generated image.
*Default:* the output path's hash
`fromImage` _optional_
: The repository tarball containing the base image. It must be a valid Docker image, such as one exported by `docker save`.
*Default:* `null`, which can be seen as equivalent to `FROM scratch` of a `Dockerfile`.
`contents` _optional_
: Top-level paths in the container. Either a single derivation, or a list of derivations.
*Default:* `[]`
`config` _optional_
`architecture` is _optional_ and used to specify the image architecture, this is useful for multi-architecture builds that don't need cross compiling. If not specified it will default to `hostPlatform`.
: Run-time configuration of the container. A full list of the options available is in the [Docker Image Specification v1.2.0](https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions).
*Default:* `{}`
`created` _optional_
: Date and time the layers were created. Follows the same `now` exception supported by `buildImage`.
*Default:* `1970-01-01T00:00:01Z`
`maxLayers` _optional_
: Maximum number of layers to create.
*Default:* `100`
*Maximum:* `125`
`extraCommands` _optional_
: Shell commands to run while building the final layer, without access to most of the layer contents. Changes to this layer are "on top" of all the other layers, so can create additional directories and files.
`fakeRootCommands` _optional_
: Shell commands to run while creating the archive for the final layer in a fakeroot environment. Unlike `extraCommands`, you can run `chown` to change the owners of the files in the archive, changing fakeroot's state instead of the real filesystem. The latter would require privileges that the build user does not have. Static binaries do not interact with the fakeroot environment. By default all files in the archive will be owned by root.
`enableFakechroot` _optional_
: Whether to run in `fakeRootCommands` in `fakechroot`, making programs behave as though `/` is the root of the image being created, while files in the Nix store are available as usual. This allows scripts that perform installation in `/` to work as expected. Considering that `fakechroot` is implemented via the same mechanism as `fakeroot`, the same caveats apply.
*Default:* `false`
### Behavior of `contents` in the final image {#dockerTools-buildLayeredImage-arg-contents}
Each path directly listed in `contents` will have a symlink in the root of the image.
For example:
```nix
pkgs.dockerTools.buildLayeredImage {
name = "hello";
contents = [ pkgs.hello ];
}
```
will create symlinks for all the paths in the `hello` package:
```ShellSession
/bin/hello -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/bin/hello
/share/info/hello.info -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/info/hello.info
/share/locale/bg/LC_MESSAGES/hello.mo -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/locale/bg/LC_MESSAGES/hello.mo
```
### Automatic inclusion of `config` references {#dockerTools-buildLayeredImage-arg-config}
The closure of `config` is automatically included in the closure of the final image.
This allows you to make very simple Docker images with very little code. This container will start up and run `hello`:
```nix
pkgs.dockerTools.buildLayeredImage {
name = "hello";
config.Cmd = [ "${pkgs.hello}/bin/hello" ];
}
```
### Adjusting `maxLayers` {#dockerTools-buildLayeredImage-arg-maxLayers}
Increasing the `maxLayers` increases the number of layers which have a chance to be shared between different images.
Modern Docker installations support up to 128 layers, but older versions support as few as 42.
If the produced image will not be extended by other Docker builds, it is safe to set `maxLayers` to `128`. However, it will be impossible to extend the image further.
The first (`maxLayers-2`) most "popular" paths will have their own individual layers, then layer \#`maxLayers-1` will contain all the remaining "unpopular" paths, and finally layer \#`maxLayers` will contain the Image configuration.
Docker's Layers are not inherently ordered, they are content-addressable and are not explicitly layered until they are composed in to an Image.
## streamLayeredImage {#ssec-pkgs-dockerTools-streamLayeredImage}
Builds a script which, when run, will stream an uncompressed tarball of a Docker image to stdout. The arguments to this function are as for `buildLayeredImage`. This method of constructing an image does not realize the image into the Nix store, so it saves on IO and disk/cache space, particularly with large images.
The image produced by running the output script can be piped directly into `docker load`, to load it into the local docker daemon:
```ShellSession
$(nix-build) | docker load
```
Alternatively, the image be piped via `gzip` into `skopeo`, e.g., to copy it into a registry:
```ShellSession
$(nix-build) | gzip --fast | skopeo copy docker-archive:/dev/stdin docker://some_docker_registry/myimage:tag
```
## pullImage {#ssec-pkgs-dockerTools-fetchFromRegistry}
This function is analogous to the `docker pull` command, in that it can be used to pull a Docker image from a Docker registry. By default [Docker Hub](https://hub.docker.com/) is used to pull images.
Its parameters are described in the example below:
```nix
pullImage {
imageName = "nixos/nix";
imageDigest =
"sha256:473a2b527958665554806aea24d0131bacec46d23af09fef4598eeab331850fa";
finalImageName = "nix";
finalImageTag = "2.11.1";
sha256 = "sha256-qvhj+Hlmviz+KEBVmsyPIzTB3QlVAFzwAY1zDPIBGxc=";
os = "linux";
arch = "x86_64";
}
```
- `imageName` specifies the name of the image to be downloaded, which can also include the registry namespace (e.g. `nixos`). This argument is required.
- `imageDigest` specifies the digest of the image to be downloaded. This argument is required.
- `finalImageName`, if specified, this is the name of the image to be created. Note it is never used to fetch the image since we prefer to rely on the immutable digest ID. By default it's equal to `imageName`.
- `finalImageTag`, if specified, this is the tag of the image to be created. Note it is never used to fetch the image since we prefer to rely on the immutable digest ID. By default it's `latest`.
- `sha256` is the checksum of the whole fetched image. This argument is required.
- `os`, if specified, is the operating system of the fetched image. By default it's `linux`.
- `arch`, if specified, is the cpu architecture of the fetched image. By default it's `x86_64`.
`nix-prefetch-docker` command can be used to get required image parameters:
```ShellSession
$ nix run nixpkgs#nix-prefetch-docker -- --image-name mysql --image-tag 5
```
Since a given `imageName` may transparently refer to a manifest list of images which support multiple architectures and/or operating systems, you can supply the `--os` and `--arch` arguments to specify exactly which image you want. By default it will match the OS and architecture of the host the command is run on.
```ShellSession
$ nix-prefetch-docker --image-name mysql --image-tag 5 --arch x86_64 --os linux
```
Desired image name and tag can be set using `--final-image-name` and `--final-image-tag` arguments:
```ShellSession
$ nix-prefetch-docker --image-name mysql --image-tag 5 --final-image-name eu.gcr.io/my-project/mysql --final-image-tag prod
```
## exportImage {#ssec-pkgs-dockerTools-exportImage}
This function is analogous to the `docker export` command, in that it can be used to flatten a Docker image that contains multiple layers. It is in fact the result of the merge of all the layers of the image. As such, the result is suitable for being imported in Docker with `docker import`.
> **_NOTE:_** Using this function requires the `kvm` device to be available.
The parameters of `exportImage` are the following:
```nix
exportImage {
fromImage = someLayeredImage;
fromImageName = null;
fromImageTag = null;
name = someLayeredImage.name;
}
```
The parameters relative to the base image have the same synopsis as described in [buildImage](#ssec-pkgs-dockerTools-buildImage), except that `fromImage` is the only required argument in this case.
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}
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:
```nix
buildImage {
name = "shadow-basic";
runAsRoot = ''
#!${pkgs.runtimeShell}
${pkgs.dockerTools.shadowSetup}
groupadd -r redis
useradd -r -g redis redis
mkdir /data
chown redis:redis /data
'';
}
```
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" ];
};
}
```
## buildNixShellImage {#ssec-pkgs-dockerTools-buildNixShellImage}
Create a Docker image that sets up an environment similar to that of running `nix-shell` on a derivation.
When run in Docker, this environment somewhat resembles the Nix sandbox typically used by `nix-build`, with a major difference being that access to the internet is allowed.
It additionally also behaves like an interactive `nix-shell`, running things like `shellHook` and setting an interactive prompt.
If the derivation is fully buildable (i.e. `nix-build` can be used on it), running `buildDerivation` inside such a Docker image will build the derivation, with all its outputs being available in the correct `/nix/store` paths, pointed to by the respective environment variables like `$out`, etc.
::: {.warning}
The behavior doesn't match `nix-shell` or `nix-build` exactly and this function is known not to work correctly for e.g. fixed-output derivations, content-addressed derivations, impure derivations and other special types of derivations.
:::
### Arguments {#ssec-pkgs-dockerTools-buildNixShellImage-arguments}
`drv`
: The derivation on which to base the Docker image.
Adding packages to the Docker image is possible by e.g. extending the list of `nativeBuildInputs` of this derivation like
```nix
buildNixShellImage {
drv = someDrv.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs or [] ++ [
somethingExtra
];
});
# ...
}
```
Similarly, you can extend the image initialization script by extending `shellHook`
`name` _optional_
: The name of the resulting image.
*Default:* `drv.name + "-env"`
`tag` _optional_
: Tag of the generated image.
*Default:* the resulting image derivation output path's hash
`uid`/`gid` _optional_
: The user/group ID to run the container as. This is like a `nixbld` build user.
*Default:* 1000/1000
`homeDirectory` _optional_
: The home directory of the user the container is running as
*Default:* `/build`
`shell` _optional_
: The path to the `bash` binary to use as the shell. This shell is started when running the image.
*Default:* `pkgs.bashInteractive + "/bin/bash"`
`command` _optional_
: Run this command in the environment of the derivation, in an interactive shell. See the `--command` option in the [`nix-shell` documentation](https://nixos.org/manual/nix/stable/command-ref/nix-shell.html?highlight=nix-shell#options).
*Default:* (none)
`run` _optional_
: Same as `command`, but runs the command in a non-interactive shell instead. See the `--run` option in the [`nix-shell` documentation](https://nixos.org/manual/nix/stable/command-ref/nix-shell.html?highlight=nix-shell#options).
*Default:* (none)
### Example {#ssec-pkgs-dockerTools-buildNixShellImage-example}
The following shows how to build the `pkgs.hello` package inside a Docker container built with `buildNixShellImage`.
```nix
with import <nixpkgs> {};
dockerTools.buildNixShellImage {
drv = hello;
}
```
Build the derivation:
```console
nix-build hello.nix
```
these 8 derivations will be built:
/nix/store/xmw3a5ln29rdalavcxk1w3m4zb2n7kk6-nix-shell-rc.drv
...
Creating layer 56 from paths: ['/nix/store/crpnj8ssz0va2q0p5ibv9i6k6n52gcya-stdenv-linux']
Creating layer 57 with customisation...
Adding manifests...
Done.
/nix/store/cpyn1lc897ghx0rhr2xy49jvyn52bazv-hello-2.12-env.tar.gz
Load the image:
```console
docker load -i result
```
0d9f4c4cd109: Loading layer [==================================================>] 2.56MB/2.56MB
...
ab1d897c0697: Loading layer [==================================================>] 10.24kB/10.24kB
Loaded image: hello-2.12-env:pgj9h98nal555415faa43vsydg161bdz
Run the container:
```console
docker run -it hello-2.12-env:pgj9h98nal555415faa43vsydg161bdz
```
[nix-shell:/build]$
In the running container, run the build:
```console
buildDerivation
```
unpacking sources
unpacking source archive /nix/store/8nqv6kshb3vs5q5bs2k600xpj5bkavkc-hello-2.12.tar.gz
...
patching script interpreter paths in /nix/store/z5wwy5nagzy15gag42vv61c2agdpz2f2-hello-2.12
checking for references to /build/ in /nix/store/z5wwy5nagzy15gag42vv61c2agdpz2f2-hello-2.12...
Check the build result:
```console
$out/bin/hello
```
Hello, world!

View File

@@ -1,108 +0,0 @@
# `<nixpkgs/nixos/lib/make-disk-image.nix>` {#sec-make-disk-image}
`<nixpkgs/nixos/lib/make-disk-image.nix>` is a function to create _disk images_ in multiple formats: raw, QCOW2 (QEMU), QCOW2-Compressed (compressed version), VDI (VirtualBox), VPC (VirtualPC).
This function can create images in two ways:
- using `cptofs` without any virtual machine to create a Nix store disk image,
- using a virtual machine to create a full NixOS installation.
When testing early-boot or lifecycle parts of NixOS such as a bootloader or multiple generations, it is necessary to opt for a full NixOS system installation.
Whereas for many web servers, applications, it is possible to work with a Nix store only disk image and is faster to build.
NixOS tests also use this function when preparing the VM. The `cptofs` method is used when `virtualisation.useBootLoader` is false (the default). Otherwise the second method is used.
## Features {#sec-make-disk-image-features}
For reference, read the function signature source code for documentation on arguments: <https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/make-disk-image.nix>.
Features are separated in various sections depending on if you opt for a Nix-store only image or a full NixOS image.
### Common {#sec-make-disk-image-features-common}
- arbitrary NixOS configuration
- automatic or bound disk size: `diskSize` parameter, `additionalSpace` can be set when `diskSize` is `auto` to add a constant of disk space
- multiple partition table layouts: EFI, legacy, legacy + GPT, hybrid, none through `partitionTableType` parameter
- OVMF or EFI firmwares and variables templates can be customized
- root filesystem `fsType` can be customized to whatever `mkfs.${fsType}` exist during operations
- root filesystem label can be customized, defaults to `nix-store` if it's a Nix store image, otherwise `nixpkgs/nixos`
- arbitrary code can be executed after disk image was produced with `postVM`
- the current nixpkgs can be realized as a channel in the disk image, which will change the hash of the image when the sources are updated
- additional store paths can be provided through `additionalPaths`
### Full NixOS image {#sec-make-disk-image-features-full-image}
- arbitrary contents with permissions can be placed in the target filesystem using `contents`
- a `/etc/nixpkgs/nixos/configuration.nix` can be provided through `configFile`
- bootloaders are supported
- EFI variables can be mutated during image production and the result is exposed in `$out`
- boot partition size when partition table is `efi` or `hybrid`
### On bit-to-bit reproducibility {#sec-make-disk-image-features-reproducibility}
Images are **NOT** deterministic, please do not hesitate to try to fix this, source of determinisms are (not exhaustive) :
- bootloader installation have timestamps
- SQLite Nix store database contain registration times
- `/etc/shadow` is in a non-deterministic order
A `deterministic` flag is available for best efforts determinism.
## Usage {#sec-make-disk-image-usage}
To produce a Nix-store only image:
```nix
let
pkgs = import <nixpkgs> {};
lib = pkgs.lib;
make-disk-image = import <nixpkgs/nixos/lib/make-disk-image.nix>;
in
make-disk-image {
inherit pkgs lib;
config = {};
additionalPaths = [ ];
format = "qcow2";
onlyNixStore = true;
partitionTableType = "none";
installBootLoader = false;
touchEFIVars = false;
diskSize = "auto";
additionalSpace = "0M"; # Defaults to 512M.
copyChannel = false;
}
```
Some arguments can be left out, they are shown explicitly for the sake of the example.
Building this derivation will provide a QCOW2 disk image containing only the Nix store and its registration information.
To produce a NixOS installation image disk with UEFI and bootloader installed:
```nix
let
pkgs = import <nixpkgs> {};
lib = pkgs.lib;
make-disk-image = import <nixpkgs/nixos/lib/make-disk-image.nix>;
evalConfig = import <nixpkgs/nixos/lib/eval-config.nix>;
in
make-disk-image {
inherit pkgs lib;
config = evalConfig {
modules = [
{
fileSystems."/" = { device = "/dev/vda"; fsType = "ext4"; autoFormat = true; };
boot.grub.device = "/dev/vda";
}
];
};
format = "qcow2";
onlyNixStore = false;
partitionTableType = "legacy+gpt";
installBootLoader = true;
touchEFIVars = true;
diskSize = "auto";
additionalSpace = "0M"; # Defaults to 512M.
copyChannel = false;
memSize = 2048; # Qemu VM memory size in megabytes. Defaults to 1024M.
}
```

View File

@@ -1,37 +0,0 @@
# pkgs.ociTools {#sec-pkgs-ociTools}
`pkgs.ociTools` is a set of functions for creating containers according to the [OCI container specification v1.0.0](https://github.com/opencontainers/runtime-spec). Beyond that, it makes no assumptions about the container runner you choose to use to run the created container.
## buildContainer {#ssec-pkgs-ociTools-buildContainer}
This function creates a simple OCI container that runs a single command inside of it. An OCI container consists of a `config.json` and a rootfs directory. The nix store of the container will contain all referenced dependencies of the given command.
The parameters of `buildContainer` with an example value are described below:
```nix
buildContainer {
args = [
(with pkgs;
writeScript "run.sh" ''
#!${bash}/bin/bash
exec ${bash}/bin/bash
'').outPath
];
mounts = {
"/data" = {
type = "none";
source = "/var/lib/mydata";
options = [ "bind" ];
};
};
readonly = false;
}
```
- `args` specifies a set of arguments to run inside the container. This is the only required argument for `buildContainer`. All referenced packages inside the derivation will be made available inside the container.
- `mounts` specifies additional mount points chosen by the user. By default only a minimal set of necessary filesystems are mounted into the container (e.g procfs, cgroupfs)
- `readonly` makes the container's rootfs read-only if it is set to true. The default value is false `false`.

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

@@ -1,71 +0,0 @@
# pkgs.snapTools {#sec-pkgs-snapTools}
`pkgs.snapTools` is a set of functions for creating Snapcraft images. Snap and Snapcraft is not used to perform these operations.
## The makeSnap Function {#ssec-pkgs-snapTools-makeSnap-signature}
`makeSnap` takes a single named argument, `meta`. This argument mirrors [the upstream `snap.yaml` format](https://docs.snapcraft.io/snap-format) exactly.
The `base` should not be specified, as `makeSnap` will force set it.
Currently, `makeSnap` does not support creating GUI stubs.
## Build a Hello World Snap {#ssec-pkgs-snapTools-build-a-snap-hello}
The following expression packages GNU Hello as a Snapcraft snap.
``` {#ex-snapTools-buildSnap-hello .nix}
let
inherit (import <nixpkgs> { }) snapTools hello;
in snapTools.makeSnap {
meta = {
name = "hello";
summary = hello.meta.description;
description = hello.meta.longDescription;
architectures = [ "amd64" ];
confinement = "strict";
apps.hello.command = "${hello}/bin/hello";
};
}
```
`nix-build` this expression and install it with `snap install ./result --dangerous`. `hello` will now be the Snapcraft version of the package.
## Build a Graphical Snap {#ssec-pkgs-snapTools-build-a-snap-firefox}
Graphical programs require many more integrations with the host. This example uses Firefox as an example because it is one of the most complicated programs we could package.
``` {#ex-snapTools-buildSnap-firefox .nix}
let
inherit (import <nixpkgs> { }) snapTools firefox;
in snapTools.makeSnap {
meta = {
name = "nix-example-firefox";
summary = firefox.meta.description;
architectures = [ "amd64" ];
apps.nix-example-firefox = {
command = "${firefox}/bin/firefox";
plugs = [
"pulseaudio"
"camera"
"browser-support"
"avahi-observe"
"cups-control"
"desktop"
"desktop-legacy"
"gsettings"
"home"
"network"
"mount-observe"
"removable-media"
"x11"
];
};
confinement = "strict";
};
}
```
`nix-build` this expression and install it with `snap install ./result --dangerous`. `nix-example-firefox` will now be the Snapcraft version of the Firefox package.
The specific meaning behind plugs can be looked up in the [Snapcraft interface documentation](https://docs.snapcraft.io/supported-interfaces).

View File

@@ -1,11 +0,0 @@
# Special build helpers {#chap-special}
This chapter describes several special build helpers.
```{=include=} sections
special/fhs-environments.section.md
special/makesetuphook.section.md
special/mkshell.section.md
special/vm-tools.section.md
special/checkpoint-build.section.md
```

View File

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

View File

@@ -1,56 +0,0 @@
# buildFHSEnv {#sec-fhs-environments}
`buildFHSEnv` provides a way to build and run FHS-compatible lightweight sandboxes. It creates an isolated root filesystem with the host's `/nix/store`, so its footprint in terms of disk space is quite small. This allows you to run software which is hard or unfeasible to patch for NixOS; 3rd-party source trees with FHS assumptions, games distributed as tarballs, software with integrity checking and/or external self-updated binaries for instance.
It uses Linux' namespaces feature to create temporary lightweight environments which are destroyed after all child processes exit, without requiring elevated privileges. It works similar to containerisation technology such as Docker or FlatPak but provides no security-relevant separation from the host system.
Accepted arguments are:
- `name`
The name of the environment and the wrapper executable.
- `targetPkgs`
Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
- `multiPkgs`
Packages to be installed for all architectures supported by a host (i.e. i686 and x86_64 on x86_64 installations). Only libraries are installed by default.
- `multiArch`
Whether to install 32bit multiPkgs into the FHSEnv in 64bit environments
- `extraBuildCommands`
Additional commands to be executed for finalizing the directory structure.
- `extraBuildCommandsMulti`
Like `extraBuildCommands`, but executed only on multilib architectures.
- `extraOutputsToInstall`
Additional derivation outputs to be linked for both target and multi-architecture packages.
- `extraInstallCommands`
Additional commands to be executed for finalizing the derivation with runner script.
- `runScript`
A shell command to be executed inside the sandbox. It defaults to `bash`. Command line arguments passed to the resulting wrapper are appended to this command by default.
This command must be escaped; i.e. `"foo app" --do-stuff --with "some file"`. See `lib.escapeShellArgs`.
- `profile`
Optional script for `/etc/profile` within the sandbox.
You can create a simple environment using a `shell.nix` like this:
```nix
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSEnv {
name = "simple-x11-env";
targetPkgs = pkgs: (with pkgs; [
udev
alsa-lib
]) ++ (with pkgs.xorg; [
libX11
libXcursor
libXrandr
]);
multiPkgs = pkgs: (with pkgs; [
udev
alsa-lib
]);
runScript = "bash";
}).env
```
Running `nix-shell` on it would drop you into a shell inside an FHS env where those libraries and binaries are available in FHS-compliant paths. Applications that expect an FHS structure (i.e. proprietary binaries) can run inside this environment without modification.
You can build a wrapper by running your binary in `runScript`, e.g. `./bin/start.sh`. Relative paths work as expected.
Additionally, the FHS builder links all relocated gsettings-schemas (the glib setup-hook moves them to `share/gsettings-schemas/${name}/glib-2.0/schemas`) to their standard FHS location. This means you don't need to wrap binaries with `wrapGAppsHook`.

View File

@@ -1,37 +0,0 @@
# pkgs.makeSetupHook {#sec-pkgs.makeSetupHook}
`pkgs.makeSetupHook` is a build helper that produces hooks that go in to `nativeBuildInputs`
## Usage {#sec-pkgs.makeSetupHook-usage}
```nix
pkgs.makeSetupHook {
name = "something-hook";
propagatedBuildInputs = [ pkgs.commandsomething ];
depsTargetTargetPropagated = [ pkgs.libsomething ];
} ./script.sh
```
### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example}
```nix
pkgs.makeSetupHook {
name = "run-hello-hook";
propagatedBuildInputs = [ pkgs.hello ];
substitutions = { shell = "${pkgs.bash}/bin/bash"; };
passthru.tests.greeting = callPackage ./test { };
meta.platforms = lib.platforms.linux;
} (writeScript "run-hello-hook.sh" ''
#!@shell@
hello
'')
```
## Attributes {#sec-pkgs.makeSetupHook-attributes}
* `name` Set the name of the hook.
* `propagatedBuildInputs` Runtime dependencies (such as binaries) of the hook.
* `depsTargetTargetPropagated` Non-binary dependencies.
* `meta`
* `passthru`
* `substitutions` Variables for `substituteAll`

View File

@@ -1,37 +0,0 @@
# pkgs.mkShell {#sec-pkgs-mkShell}
`pkgs.mkShell` is a specialized `stdenv.mkDerivation` that removes some
repetition when using it with `nix-shell` (or `nix develop`).
## Usage {#sec-pkgs-mkShell-usage}
Here is a common usage example:
```nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
packages = [ pkgs.gnumake ];
inputsFrom = [ pkgs.hello pkgs.gnutar ];
shellHook = ''
export DEBUG=1
'';
}
```
## Attributes {#sec-pkgs-mkShell-attributes}
* `name` (default: `nix-shell`). Set the name of the derivation.
* `packages` (default: `[]`). Add executable packages to the `nix-shell` environment.
* `inputsFrom` (default: `[]`). Add build dependencies of the listed derivations to the `nix-shell` environment.
* `shellHook` (default: `""`). Bash statements that are executed by `nix-shell`.
... all the attributes of `stdenv.mkDerivation`.
## Building the shell {#sec-pkgs-mkShell-building}
This derivation output will contain a text file that contains a reference to
all the build inputs. This is useful in CI where we want to make sure that
every derivation, and its dependencies, build properly. Or when creating a GC
root so that the build dependencies don't get garbage-collected.

View File

@@ -1,148 +0,0 @@
# vmTools {#sec-vm-tools}
A set of VM related utilities, that help in building some packages in more advanced scenarios.
## `vmTools.createEmptyImage` {#vm-tools-createEmptyImage}
A bash script fragment that produces a disk image at `destination`.
### Attributes {#vm-tools-createEmptyImage-attributes}
* `size`. The disk size, in MiB.
* `fullName`. Name that will be written to `${destination}/nix-support/full-name`.
* `destination` (optional, default `$out`). Where to write the image files.
## `vmTools.runInLinuxVM` {#vm-tools-runInLinuxVM}
Run a derivation in a Linux virtual machine (using Qemu/KVM).
By default, there is no disk image; the root filesystem is a `tmpfs`, and the Nix store is shared with the host (via the [9P protocol](https://wiki.qemu.org/Documentation/9p#9p_Protocol)).
Thus, any pure Nix derivation should run unmodified.
If the build fails and Nix is run with the `-K/--keep-failed` option, a script `run-vm` will be left behind in the temporary build directory that allows you to boot into the VM and debug it interactively.
### Attributes {#vm-tools-runInLinuxVM-attributes}
* `preVM` (optional). Shell command to be evaluated *before* the VM is started (i.e., on the host).
* `memSize` (optional, default `512`). The memory size of the VM in MiB.
* `diskImage` (optional). A file system image to be attached to `/dev/sda`.
Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
### Examples {#vm-tools-runInLinuxVM-examples}
Build the derivation hello inside a VM:
```nix
{ pkgs }: with pkgs; with vmTools;
runInLinuxVM hello
```
Build inside a VM with extra memory:
```nix
{ pkgs }: with pkgs; with vmTools;
runInLinuxVM (hello.overrideAttrs (_: { memSize = 1024; }))
```
Use VM with a disk image (implicitly sets `diskImage`, see [`vmTools.createEmptyImage`](#vm-tools-createEmptyImage)):
```nix
{ pkgs }: with pkgs; with vmTools;
runInLinuxVM (hello.overrideAttrs (_: {
preVM = createEmptyImage {
size = 1024;
fullName = "vm-image";
};
}))
```
## `vmTools.extractFs` {#vm-tools-extractFs}
Takes a file, such as an ISO, and extracts its contents into the store.
### Attributes {#vm-tools-extractFs-attributes}
* `file`. Path to the file to be extracted.
Note that currently we expect the image to contain a filesystem, not a full disk image with a partition table etc.
* `fs` (optional). Filesystem of the contents of the file.
### Examples {#vm-tools-extractFs-examples}
Extract the contents of an ISO file:
```nix
{ pkgs }: with pkgs; with vmTools;
extractFs { file = ./image.iso; }
```
## `vmTools.extractMTDfs` {#vm-tools-extractMTDfs}
Like [](#vm-tools-extractFs), but it makes use of a [Memory Technology Device (MTD)](https://en.wikipedia.org/wiki/Memory_Technology_Device).
## `vmTools.runInLinuxImage` {#vm-tools-runInLinuxImage}
Like [](#vm-tools-runInLinuxVM), but instead of using `stdenv` from the Nix store, run the build using the tools provided by `/bin`, `/usr/bin`, etc. from the specified filesystem image, which typically is a filesystem containing a [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard)-based Linux distribution.
## `vmTools.makeImageTestScript` {#vm-tools-makeImageTestScript}
Generate a script that can be used to run an interactive session in the given image.
### Examples {#vm-tools-makeImageTestScript-examples}
Create a script for running a Fedora 27 VM:
```nix
{ pkgs }: with pkgs; with vmTools;
makeImageTestScript diskImages.fedora27x86_64
```
Create a script for running an Ubuntu 20.04 VM:
```nix
{ pkgs }: with pkgs; with vmTools;
makeImageTestScript diskImages.ubuntu2004x86_64
```
## `vmTools.diskImageFuns` {#vm-tools-diskImageFuns}
A set of functions that build a predefined set of minimal Linux distributions images.
### Images {#vm-tools-diskImageFuns-images}
* Fedora
* `fedora26x86_64`
* `fedora27x86_64`
* CentOS
* `centos6i386`
* `centos6x86_64`
* `centos7x86_64`
* Ubuntu
* `ubuntu1404i386`
* `ubuntu1404x86_64`
* `ubuntu1604i386`
* `ubuntu1604x86_64`
* `ubuntu1804i386`
* `ubuntu1804x86_64`
* `ubuntu2004i386`
* `ubuntu2004x86_64`
* `ubuntu2204i386`
* `ubuntu2204x86_64`
* Debian
* `debian10i386`
* `debian10x86_64`
* `debian11i386`
* `debian11x86_64`
### Attributes {#vm-tools-diskImageFuns-attributes}
* `size` (optional, defaults to `4096`). The size of the image, in MiB.
* `extraPackages` (optional). A list names of additional packages from the distribution that should be included in the image.
### Examples {#vm-tools-diskImageFuns-examples}
8GiB image containing Firefox in addition to the default packages:
```nix
{ pkgs }: with pkgs; with vmTools;
diskImageFuns.ubuntu2004x86_64 { extraPackages = [ "firefox" ]; size = 8192; }
```
## `vmTools.diskImageExtraFuns` {#vm-tools-diskImageExtraFuns}
Shorthand for `vmTools.diskImageFuns.<attr> { extraPackages = ... }`.
## `vmTools.diskImages` {#vm-tools-diskImages}
Shorthand for `vmTools.diskImageFuns.<attr> { }`.

View File

@@ -1,245 +0,0 @@
# Testers {#chap-testers}
This chapter describes several testing builders which are available in the `testers` namespace.
## `hasPkgConfigModules` {#tester-hasPkgConfigModules}
<!-- Old anchor name so links still work -->
[]{#tester-hasPkgConfigModule}
Checks whether a package exposes a given list of `pkg-config` modules.
If the `moduleNames` argument is omitted, `hasPkgConfigModules` will
use `meta.pkgConfigModules`.
Example:
```nix
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "libfoo" ];
};
```
If the package in question has `meta.pkgConfigModules` set, it is even simpler:
```nix
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
meta.pkgConfigModules = [ "libfoo" ];
```
## `testVersion` {#tester-testVersion}
Checks the command output contains the specified version
Although simplistic, this test assures that the main program
can run. While there's no substitute for a real test case,
it does catch dynamic linking errors and such. It also provides
some protection against accidentally building the wrong version,
for example when using an 'old' hash in a fixed-output derivation.
Examples:
```nix
passthru.tests.version = testers.testVersion { package = hello; };
passthru.tests.version = testers.testVersion {
package = seaweedfs;
command = "weed version";
};
passthru.tests.version = testers.testVersion {
package = key;
command = "KeY --help";
# Wrong '2.5' version in the code. Drop on next version.
version = "2.5";
};
passthru.tests.version = testers.testVersion {
package = ghr;
# The output needs to contain the 'version' string without any prefix or suffix.
version = "v${version}";
};
```
## `testBuildFailure` {#tester-testBuildFailure}
Make sure that a build does not succeed. This is useful for testing testers.
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}
Checks that two packages produce the exact same build instructions.
This can be used to make sure that a certain difference of configuration,
such as the presence of an overlay does not cause a cache miss.
When the derivations are equal, the return value is an empty file.
Otherwise, the build log explains the difference via `nix-diff`.
Example:
```nix
testers.testEqualDerivation
"The hello package must stay the same when enabling checks."
hello
(hello.overrideAttrs(o: { doCheck = true; }))
```
## `invalidateFetcherByDrvHash` {#tester-invalidateFetcherByDrvHash}
Use the derivation hash to invalidate the output via name, for testing.
Type: `(a@{ name, ... } -> Derivation) -> a -> Derivation`
Normally, fixed output derivations can and should be cached by their output
hash only, but for testing we want to re-fetch everytime the fetcher changes.
Changes to the fetcher become apparent in the drvPath, which is a hash of
how to fetch, rather than a fixed store path.
By inserting this hash into the name, we can make sure to re-run the fetcher
every time the fetcher changes.
This relies on the assumption that Nix isn't clever enough to reuse its
database of local store contents to optimize fetching.
You might notice that the "salted" name derives from the normal invocation,
not the final derivation. `invalidateFetcherByDrvHash` has to invoke the fetcher
function twice: once to get a derivation hash, and again to produce the final
fixed output derivation.
Example:
```nix
tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
name = "nix-source";
url = "https://github.com/NixOS/nix";
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
hash = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
};
```
## `runNixOSTest` {#tester-runNixOSTest}
A helper function that behaves exactly like the NixOS `runTest`, except it also assigns this Nixpkgs package set as the `pkgs` of the test and makes the `nixpkgs.*` options read-only.
If your test is part of the Nixpkgs repository, or if you need a more general entrypoint, see ["Calling a test" in the NixOS manual](https://nixos.org/manual/nixos/stable/index.html#sec-calling-nixos-tests).
Example:
```nix
pkgs.testers.runNixOSTest ({ lib, ... }: {
name = "hello";
nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.hello ];
};
testScript = ''
machine.succeed("hello")
'';
})
```
## `nixosTest` {#tester-nixosTest}
Run a NixOS VM network test using this evaluation of Nixpkgs.
NOTE: This function is primarily for external use. NixOS itself uses `make-test-python.nix` directly. Packages defined in Nixpkgs [reuse NixOS tests via `nixosTests`, plural](#ssec-nixos-tests-linking).
It is mostly equivalent to the function `import ./make-test-python.nix` from the
[NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests),
except that the current application of Nixpkgs (`pkgs`) will be used, instead of
letting NixOS invoke Nixpkgs anew.
If a test machine needs to set NixOS options under `nixpkgs`, it must set only the
`nixpkgs.pkgs` option.
### Parameter {#tester-nixosTest-parameter}
A [NixOS VM test network](https://nixos.org/nixos/manual/index.html#sec-nixos-tests), or path to it. Example:
```nix
{
name = "my-test";
nodes = {
machine1 = { lib, pkgs, nodes, ... }: {
environment.systemPackages = [ pkgs.hello ];
services.foo.enable = true;
};
# machine2 = ...;
};
testScript = ''
start_all()
machine1.wait_for_unit("foo.service")
machine1.succeed("hello | foo-send")
'';
}
```
### Result {#tester-nixosTest-result}
A derivation that runs the VM test.
Notable attributes:
* `nodes`: the evaluated NixOS configurations. Useful for debugging and exploring the configuration.
* `driverInteractive`: a script that launches an interactive Python session in the context of the `testScript`.

View File

@@ -1,240 +0,0 @@
# Trivial build helpers {#chap-trivial-builders}
Nixpkgs provides a couple of functions that help with building derivations. The most important one, `stdenv.mkDerivation`, has already been documented above. The following functions wrap `stdenv.mkDerivation`, making it easier to use in certain cases.
## `runCommand` {#trivial-builder-runCommand}
`runCommand :: String -> AttrSet -> String -> Derivation`
`runCommand name drvAttrs buildCommand` returns a derivation that is built by running the specified shell commands.
`name :: String`
: The name that Nix will append to the store path in the same way that `stdenv.mkDerivation` uses its `name` attribute.
`drvAttr :: AttrSet`
: Attributes to pass to the underlying call to [`stdenv.mkDerivation`](#chap-stdenv).
`buildCommand :: String`
: Shell commands to run in the derivation builder.
::: {.note}
You have to create a file or directory `$out` for Nix to be able to run the builder successfully.
:::
::: {.example #ex-runcommand-simple}
# Invocation of `runCommand`
```nix
(import <nixpkgs> {}).runCommand "my-example" {} ''
echo My example command is running
mkdir $out
echo I can write data to the Nix store > $out/message
echo I can also run basic commands like:
echo ls
ls
echo whoami
whoami
echo date
date
''
```
:::
## `runCommandCC` {#trivial-builder-runCommandCC}
This works just like `runCommand`. The only difference is that it also provides a C compiler in `buildCommand`'s environment. To minimize your dependencies, you should only use this if you are sure you will need a C compiler as part of running your command.
## `runCommandLocal` {#trivial-builder-runCommandLocal}
Variant of `runCommand` that forces the derivation to be built locally, it is not substituted. This is intended for very cheap commands (<1s execution time). It saves on the network round-trip and can speed up a build.
::: {.note}
This sets [`allowSubstitutes` to `false`](https://nixos.org/nix/manual/#adv-attr-allowSubstitutes), so only use `runCommandLocal` if you are certain the user will always have a builder for the `system` of the derivation. This should be true for most trivial use cases (e.g., just copying some files to a different location or adding symlinks) because there the `system` is usually the same as `builtins.currentSystem`.
:::
## `writeTextFile`, `writeText`, `writeTextDir`, `writeScript`, `writeScriptBin` {#trivial-builder-writeText}
These functions write `text` to the Nix store. This is useful for creating scripts from Nix expressions. `writeTextFile` takes an attribute set and expects two arguments, `name` and `text`. `name` corresponds to the name used in the Nix store path. `text` will be the contents of the file. You can also set `executable` to true to make this file have the executable bit set.
Many more commands wrap `writeTextFile` including `writeText`, `writeTextDir`, `writeScript`, and `writeScriptBin`. These are convenience functions over `writeTextFile`.
Here are a few examples:
```nix
# Writes my-file to /nix/store/<store path>
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
}
# See also the `writeText` helper function below.
# Writes executable my-file to /nix/store/<store path>/bin/my-file
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
executable = true;
destination = "/bin/my-file";
}
# Writes contents of file to /nix/store/<store path>
writeText "my-file"
''
Contents of File
'';
# Writes contents of file to /nix/store/<store path>/share/my-file
writeTextDir "share/my-file"
''
Contents of File
'';
# Writes my-file to /nix/store/<store path> and makes executable
writeScript "my-file"
''
Contents of File
'';
# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.
writeScriptBin "my-file"
''
Contents of File
'';
# Writes my-file to /nix/store/<store path> and makes executable.
writeShellScript "my-file"
''
Contents of File
'';
# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.
writeShellScriptBin "my-file"
''
Contents of File
'';
```
## `concatTextFile`, `concatText`, `concatScript` {#trivial-builder-concatText}
These functions concatenate `files` to the Nix store in a single file. This is useful for configuration files structured in lines of text. `concatTextFile` takes an attribute set and expects two arguments, `name` and `files`. `name` corresponds to the name used in the Nix store path. `files` will be the files to be concatenated. You can also set `executable` to true to make this file have the executable bit set.
`concatText` and`concatScript` are simple wrappers over `concatTextFile`.
Here are a few examples:
```nix
# Writes my-file to /nix/store/<store path>
concatTextFile {
name = "my-file";
files = [ drv1 "${drv2}/path/to/file" ];
}
# See also the `concatText` helper function below.
# Writes executable my-file to /nix/store/<store path>/bin/my-file
concatTextFile {
name = "my-file";
files = [ drv1 "${drv2}/path/to/file" ];
executable = true;
destination = "/bin/my-file";
}
# Writes contents of files to /nix/store/<store path>
concatText "my-file" [ file1 file2 ]
# Writes contents of files to /nix/store/<store path>
concatScript "my-file" [ file1 file2 ]
```
## `writeShellApplication` {#trivial-builder-writeShellApplication}
This can be used to easily produce a shell script that has some dependencies (`runtimeInputs`). It automatically sets the `PATH` of the script to contain all of the listed inputs, sets some sanity shellopts (`errexit`, `nounset`, `pipefail`), and checks the resulting script with [`shellcheck`](https://github.com/koalaman/shellcheck).
For example, look at the following code:
```nix
writeShellApplication {
name = "show-nixos-org";
runtimeInputs = [ curl w3m ];
text = ''
curl -s 'https://nixos.org' | w3m -dump -T text/html
'';
}
```
Unlike with normal `writeShellScriptBin`, there is no need to manually write out `${curl}/bin/curl`, setting the PATH
was handled by `writeShellApplication`. Moreover, the script is being checked with `shellcheck` for more strict
validation.
## `symlinkJoin` {#trivial-builder-symlinkJoin}
This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, `name`, and `paths`. `name` is the name used in the Nix store path for the created derivation. `paths` is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within.
Here is an example:
```nix
# adds symlinks of hello and stack to current build and prints "links added"
symlinkJoin { name = "myexample"; paths = [ pkgs.hello pkgs.stack ]; postBuild = "echo links added"; }
```
This creates a derivation with a directory structure like the following:
```
/nix/store/sglsr5g079a5235hy29da3mq3hv8sjmm-myexample
|-- bin
| |-- hello -> /nix/store/qy93dp4a3rqyn2mz63fbxjg228hffwyw-hello-2.10/bin/hello
| `-- stack -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/bin/stack
`-- share
|-- bash-completion
| `-- completions
| `-- stack -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/share/bash-completion/completions/stack
|-- fish
| `-- vendor_completions.d
| `-- stack.fish -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/share/fish/vendor_completions.d/stack.fish
...
```
## `writeReferencesToFile` {#trivial-builder-writeReferencesToFile}
Writes the closure of transitive dependencies to a file.
This produces the equivalent of `nix-store -q --requisites`.
For example,
```nix
writeReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
```
produces an output path `/nix/store/<hash>-runtime-deps` containing
```nix
/nix/store/<hash>-hello-2.10
/nix/store/<hash>-hi
/nix/store/<hash>-libidn2-2.3.0
/nix/store/<hash>-libunistring-0.9.10
/nix/store/<hash>-glibc-2.32-40
```
You can see that this includes `hi`, the original input path,
`hello`, which is a direct reference, but also
the other paths that are indirectly required to run `hello`.
## `writeDirectReferencesToFile` {#trivial-builder-writeDirectReferencesToFile}
Writes the set of references to the output file, that is, their immediate dependencies.
This produces the equivalent of `nix-store -q --references`.
For example,
```nix
writeDirectReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
```
produces an output path `/nix/store/<hash>-runtime-references` containing
```nix
/nix/store/<hash>-hello-2.10
```
but none of `hello`'s dependencies because those are not referenced directly
by `hi`'s output.

1065
doc/coding-conventions.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
{
outputPath = "share/doc/nixpkgs";
indexPath = "manual.html";
}

546
doc/configuration.xml Normal file
View File

@@ -0,0 +1,546 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-packageconfig">
<title>Global configuration</title>
<para>
Nix comes with certain defaults about what packages can and cannot be
installed, based on a package's metadata. By default, Nix will prevent
installation if any of the following criteria are true:
</para>
<itemizedlist>
<listitem>
<para>
The package is thought to be broken, and has had its
<literal>meta.broken</literal> set to <literal>true</literal>.
</para>
</listitem>
<listitem>
<para>
The package isn't intended to run on the given system, as none of its
<literal>meta.platforms</literal> match the given system.
</para>
</listitem>
<listitem>
<para>
The package's <literal>meta.license</literal> is set to a license which is
considered to be unfree.
</para>
</listitem>
<listitem>
<para>
The package has known security vulnerabilities but has not or can not be
updated for some reason, and a list of issues has been entered in to the
package's <literal>meta.knownVulnerabilities</literal>.
</para>
</listitem>
</itemizedlist>
<para>
Note that all this is checked during evaluation already, and the check
includes any package that is evaluated. In particular, all build-time
dependencies are checked. <literal>nix-env -qa</literal> will (attempt to)
hide any packages that would be refused.
</para>
<para>
Each of these criteria can be altered in the nixpkgs configuration.
</para>
<para>
The nixpkgs configuration for a NixOS system is set in the
<literal>configuration.nix</literal>, as in the following example:
<programlisting>
{
nixpkgs.config = {
allowUnfree = true;
};
}
</programlisting>
However, this does not allow unfree software for individual users. Their
configurations are managed separately.
</para>
<para>
A user's of nixpkgs configuration is stored in a user-specific configuration
file located at <filename>~/.config/nixpkgs/config.nix</filename>. For
example:
<programlisting>
{
allowUnfree = true;
}
</programlisting>
</para>
<para>
Note that we are not able to test or build unfree software on Hydra due to
policy. Most unfree licenses prohibit us from either executing or
distributing the software.
</para>
<section xml:id="sec-allow-broken">
<title>Installing broken packages</title>
<para>
There are two ways to try compiling a package which has been marked as
broken.
</para>
<itemizedlist>
<listitem>
<para>
For allowing the build of a broken package once, you can use an
environment variable for a single invocation of the nix tools:
<programlisting>$ export NIXPKGS_ALLOW_BROKEN=1</programlisting>
</para>
</listitem>
<listitem>
<para>
For permanently allowing broken packages to be built, you may add
<literal>allowBroken = true;</literal> to your user's configuration file,
like this:
<programlisting>
{
allowBroken = true;
}
</programlisting>
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-allow-unsupported-system">
<title>Installing packages on unsupported systems</title>
<para>
There are also two ways to try compiling a package which has been marked as
unsuported for the given system.
</para>
<itemizedlist>
<listitem>
<para>
For allowing the build of a broken package once, you can use an
environment variable for a single invocation of the nix tools:
<programlisting>$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1</programlisting>
</para>
</listitem>
<listitem>
<para>
For permanently allowing broken packages to be built, you may add
<literal>allowUnsupportedSystem = true;</literal> to your user's
configuration file, like this:
<programlisting>
{
allowUnsupportedSystem = true;
}
</programlisting>
</para>
</listitem>
</itemizedlist>
<para>
The difference between a package being unsupported on some system and
being broken is admittedly a bit fuzzy. If a program
<emphasis>ought</emphasis> to work on a certain platform, but doesn't, the
platform should be included in <literal>meta.platforms</literal>, but marked
as broken with e.g. <literal>meta.broken =
!hostPlatform.isWindows</literal>. Of course, this begs the question of what
"ought" means exactly. That is left to the package maintainer.
</para>
</section>
<section xml:id="sec-allow-unfree">
<title>Installing unfree packages</title>
<para>
There are several ways to tweak how Nix handles a package which has been
marked as unfree.
</para>
<itemizedlist>
<listitem>
<para>
To temporarily allow all unfree packages, you can use an environment
variable for a single invocation of the nix tools:
<programlisting>$ export NIXPKGS_ALLOW_UNFREE=1</programlisting>
</para>
</listitem>
<listitem>
<para>
It is possible to permanently allow individual unfree packages, while
still blocking unfree packages by default using the
<literal>allowUnfreePredicate</literal> configuration option in the user
configuration file.
</para>
<para>
This option is a function which accepts a package as a parameter, and
returns a boolean. The following example configuration accepts a package
and always returns false:
<programlisting>
{
allowUnfreePredicate = (pkg: false);
}
</programlisting>
</para>
<para>
For a more useful example, try the following. This configuration
only allows unfree packages named flash player and visual studio
code:
<programlisting>
{
allowUnfreePredicate = (pkg: builtins.elem
(builtins.parseDrvName pkg.name).name [
"flashplayer"
"vscode"
]);
}
</programlisting>
</para>
</listitem>
<listitem>
<para>
It is also possible to whitelist and blacklist licenses that are
specifically acceptable or not acceptable, using
<literal>whitelistedLicenses</literal> and
<literal>blacklistedLicenses</literal>, respectively.
</para>
<para>
The following example configuration whitelists the licenses
<literal>amd</literal> and <literal>wtfpl</literal>:
<programlisting>
{
whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];
}
</programlisting>
</para>
<para>
The following example configuration blacklists the <literal>gpl3</literal>
and <literal>agpl3</literal> licenses:
<programlisting>
{
blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];
}
</programlisting>
</para>
</listitem>
</itemizedlist>
<para>
A complete list of licenses can be found in the file
<filename>lib/licenses.nix</filename> of the nixpkgs tree.
</para>
</section>
<section xml:id="sec-allow-insecure">
<title>Installing insecure packages</title>
<para>
There are several ways to tweak how Nix handles a package which has been
marked as insecure.
</para>
<itemizedlist>
<listitem>
<para>
To temporarily allow all insecure packages, you can use an environment
variable for a single invocation of the nix tools:
<programlisting>$ export NIXPKGS_ALLOW_INSECURE=1</programlisting>
</para>
</listitem>
<listitem>
<para>
It is possible to permanently allow individual insecure packages, while
still blocking other insecure packages by default using the
<literal>permittedInsecurePackages</literal> configuration option in the
user configuration file.
</para>
<para>
The following example configuration permits the installation of the
hypothetically insecure package <literal>hello</literal>, version
<literal>1.2.3</literal>:
<programlisting>
{
permittedInsecurePackages = [
"hello-1.2.3"
];
}
</programlisting>
</para>
</listitem>
<listitem>
<para>
It is also possible to create a custom policy around which insecure
packages to allow and deny, by overriding the
<literal>allowInsecurePredicate</literal> configuration option.
</para>
<para>
The <literal>allowInsecurePredicate</literal> option is a function which
accepts a package and returns a boolean, much like
<literal>allowUnfreePredicate</literal>.
</para>
<para>
The following configuration example only allows insecure packages with
very short names:
<programlisting>
{
allowInsecurePredicate = (pkg: (builtins.stringLength (builtins.parseDrvName pkg.name).name) &lt;= 5);
}
</programlisting>
</para>
<para>
Note that <literal>permittedInsecurePackages</literal> is only checked if
<literal>allowInsecurePredicate</literal> is not specified.
</para>
</listitem>
</itemizedlist>
</section>
<!--============================================================-->
<section xml:id="sec-modify-via-packageOverrides">
<title>Modify packages via <literal>packageOverrides</literal></title>
<para>
You can define a function called <varname>packageOverrides</varname> in your
local <filename>~/.config/nixpkgs/config.nix</filename> to override Nix
packages. It must be a function that takes pkgs as an argument and returns a
modified set of packages.
<programlisting>
{
packageOverrides = pkgs: rec {
foo = pkgs.foo.override { ... };
};
}
</programlisting>
</para>
</section>
<section xml:id="sec-declarative-package-management">
<title>Declarative Package Management</title>
<section xml:id="sec-building-environment">
<title>Build an environment</title>
<para>
Using <literal>packageOverrides</literal>, it is possible to manage
packages declaratively. This means that we can list all of our desired
packages within a declarative Nix expression. For example, to have
<literal>aspell</literal>, <literal>bc</literal>,
<literal>ffmpeg</literal>, <literal>coreutils</literal>,
<literal>gdb</literal>, <literal>nixUnstable</literal>,
<literal>emscripten</literal>, <literal>jq</literal>,
<literal>nox</literal>, and <literal>silver-searcher</literal>, we could
use the following in <filename>~/.config/nixpkgs/config.nix</filename>:
</para>
<screen>
{
packageOverrides = pkgs: with pkgs; {
myPackages = pkgs.buildEnv {
name = "my-packages";
paths = [
aspell
bc
coreutils
gdb
ffmpeg
nixUnstable
emscripten
jq
nox
silver-searcher
];
};
};
}
</screen>
<para>
To install it into our environment, you can just run <literal>nix-env -iA
nixpkgs.myPackages</literal>. If you want to load the packages to be built
from a working copy of <literal>nixpkgs</literal> you just run
<literal>nix-env -f. -iA myPackages</literal>. To explore what's been
installed, just look through <filename>~/.nix-profile/</filename>. You can
see that a lot of stuff has been installed. Some of this stuff is useful
some of it isn't. Let's tell Nixpkgs to only link the stuff that we want:
</para>
<screen>
{
packageOverrides = pkgs: with pkgs; {
myPackages = pkgs.buildEnv {
name = "my-packages";
paths = [
aspell
bc
coreutils
gdb
ffmpeg
nixUnstable
emscripten
jq
nox
silver-searcher
];
pathsToLink = [ "/share" "/bin" ];
};
};
}
</screen>
<para>
<literal>pathsToLink</literal> tells Nixpkgs to only link the paths listed
which gets rid of the extra stuff in the profile. <filename>/bin</filename>
and <filename>/share</filename> are good defaults for a user environment,
getting rid of the clutter. If you are running on Nix on MacOS, you may
want to add another path as well, <filename>/Applications</filename>, that
makes GUI apps available.
</para>
</section>
<section xml:id="sec-getting-documentation">
<title>Getting documentation</title>
<para>
After building that new environment, look through
<filename>~/.nix-profile</filename> to make sure everything is there that
we wanted. Discerning readers will note that some files are missing. Look
inside <filename>~/.nix-profile/share/man/man1/</filename> to verify this.
There are no man pages for any of the Nix tools! This is because some
packages like Nix have multiple outputs for things like documentation (see
section 4). Let's make Nix install those as well.
</para>
<screen>
{
packageOverrides = pkgs: with pkgs; {
myPackages = pkgs.buildEnv {
name = "my-packages";
paths = [
aspell
bc
coreutils
ffmpeg
nixUnstable
emscripten
jq
nox
silver-searcher
];
pathsToLink = [ "/share/man" "/share/doc" "/bin" ];
extraOutputsToInstall = [ "man" "doc" ];
};
};
}
</screen>
<para>
This provides us with some useful documentation for using our packages.
However, if we actually want those manpages to be detected by man, we need
to set up our environment. This can also be managed within Nix expressions.
</para>
<screen>
{
packageOverrides = pkgs: with pkgs; rec {
myProfile = writeText "my-profile" ''
export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin
export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man
'';
myPackages = pkgs.buildEnv {
name = "my-packages";
paths = [
(runCommand "profile" {} ''
mkdir -p $out/etc/profile.d
cp ${myProfile} $out/etc/profile.d/my-profile.sh
'')
aspell
bc
coreutils
ffmpeg
man
nixUnstable
emscripten
jq
nox
silver-searcher
];
pathsToLink = [ "/share/man" "/share/doc" "/bin" "/etc" ];
extraOutputsToInstall = [ "man" "doc" ];
};
};
}
</screen>
<para>
For this to work fully, you must also have this script sourced when you are
logged in. Try adding something like this to your
<filename>~/.profile</filename> file:
</para>
<screen>
#!/bin/sh
if [ -d $HOME/.nix-profile/etc/profile.d ]; then
for i in $HOME/.nix-profile/etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
fi
</screen>
<para>
Now just run <literal>source $HOME/.profile</literal> and you can starting
loading man pages from your environent.
</para>
</section>
<section xml:id="sec-gnu-info-setup">
<title>GNU info setup</title>
<para>
Configuring GNU info is a little bit trickier than man pages. To work
correctly, info needs a database to be generated. This can be done with
some small modifications to our environment scripts.
</para>
<screen>
{
packageOverrides = pkgs: with pkgs; rec {
myProfile = writeText "my-profile" ''
export PATH=$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/sbin:/bin:/usr/sbin:/usr/bin
export MANPATH=$HOME/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man
export INFOPATH=$HOME/.nix-profile/share/info:/nix/var/nix/profiles/default/share/info:/usr/share/info
'';
myPackages = pkgs.buildEnv {
name = "my-packages";
paths = [
(runCommand "profile" {} ''
mkdir -p $out/etc/profile.d
cp ${myProfile} $out/etc/profile.d/my-profile.sh
'')
aspell
bc
coreutils
ffmpeg
man
nixUnstable
emscripten
jq
nox
silver-searcher
texinfoInteractive
];
pathsToLink = [ "/share/man" "/share/doc" "/share/info" "/bin" "/etc" ];
extraOutputsToInstall = [ "man" "doc" "info" ];
postBuild = ''
if [ -x $out/bin/install-info -a -w $out/share/info ]; then
shopt -s nullglob
for i in $out/share/info/*.info $out/share/info/*.info.gz; do
$out/bin/install-info $i $out/share/info/dir
done
fi
'';
};
};
}
</screen>
<para>
<literal>postBuild</literal> tells Nixpkgs to run a command after building
the environment. In this case, <literal>install-info</literal> adds the
installed info pages to <literal>dir</literal> which is GNU info's default
root node. Note that <literal>texinfoInteractive</literal> is added to the
environment to give the <literal>install-info</literal> command.
</para>
</section>
</section>
</chapter>

View File

@@ -1,10 +0,0 @@
# Contributing to Nixpkgs {#part-contributing}
```{=include=} chapters
contributing/quick-start.chapter.md
contributing/coding-conventions.chapter.md
contributing/submitting-changes.chapter.md
contributing/vulnerability-roundup.chapter.md
contributing/reviewing-contributions.chapter.md
contributing/contributing-to-documentation.chapter.md
```

35
doc/contributing.xml Normal file
View File

@@ -0,0 +1,35 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-contributing">
<title>Contributing to this documentation</title>
<para>
The DocBook sources of the Nixpkgs manual are in the
<filename
xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc</filename>
subdirectory of the Nixpkgs repository.
</para>
<para>
You can quickly check your edits with <command>make</command>:
</para>
<screen>
$ cd /path/to/nixpkgs/doc
$ nix-shell
[nix-shell]$ make
</screen>
<para>
If you experience problems, run <command>make debug</command> to help
understand the docbook errors.
</para>
<para>
After making modifications to the manual, it's important to build it before
committing. You can do that as follows:
<screen>
$ cd /path/to/nixpkgs/doc
$ nix-shell
[nix-shell]$ make clean
[nix-shell]$ nix-build .
</screen>
If the build succeeds, the manual will be in
<filename>./result/share/doc/nixpkgs/manual.html</filename>.
</para>
</chapter>

View File

@@ -1,63 +0,0 @@
# Coding conventions {#chap-conventions}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
## Syntax {#sec-syntax}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
## Package naming {#sec-package-naming}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## File naming and organisation {#sec-organisation}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
### Versioning {#sec-versioning}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Fetching Sources {#sec-sources}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Obtaining source hash {#sec-source-hashes}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
### Obtaining hashes securely {#sec-source-hashes-security}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Patches {#sec-patches}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Package tests {#sec-package-tests}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
### Writing inline package tests {#ssec-inline-package-tests-writing}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
### Writing larger package tests {#ssec-package-tests-writing}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
### Running package tests {#ssec-package-tests-running}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
### Examples of package tests {#ssec-package-tests-examples}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
### Linking NixOS module tests to a package {#ssec-nixos-tests-linking}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
### Import From Derivation {#ssec-import-from-derivation}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).

View File

@@ -1,11 +0,0 @@
# Contributing to Nixpkgs documentation {#chap-contributing}
This section has been moved to [doc/README.md](https://github.com/NixOS/nixpkgs/blob/master/doc/README.md).
## devmode {#sec-contributing-devmode}
This section has been moved to [doc/README.md](https://github.com/NixOS/nixpkgs/blob/master/doc/README.md).
## Syntax {#sec-contributing-markup}
This section has been moved to [doc/README.md](https://github.com/NixOS/nixpkgs/blob/master/doc/README.md).

View File

@@ -1,3 +0,0 @@
# Quick Start to Adding a Package {#chap-quick-start}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).

View File

@@ -1,35 +0,0 @@
# Reviewing contributions {#chap-reviewing-contributions}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
## Package updates {#reviewing-contributions-package-updates}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## New packages {#reviewing-contributions-new-packages}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Module updates {#reviewing-contributions-module-updates}
This section has been moved to [nixos/README.md](https://github.com/NixOS/nixpkgs/blob/master/nixos/README.md).
## New modules {#reviewing-contributions-new-modules}
This section has been moved to [nixos/README.md](https://github.com/NixOS/nixpkgs/blob/master/nixos/README.md).
## Individual maintainer list {#reviewing-contributions-individual-maintainer-list}
This section has been moved to [maintainers/README.md](https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md).
## Maintainer teams {#reviewing-contributions-maintainer-teams}
This section has been moved to [maintainers/README.md](https://github.com/NixOS/nixpkgs/blob/master/maintainers/README.md).
## Other submissions {#reviewing-contributions-other-submissions}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
## Merging pull requests {#reviewing-contributions--merging-pull-requests}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).

View File

@@ -1,88 +0,0 @@
# Submitting changes {#chap-submitting-changes}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
## Submitting changes {#submitting-changes-submitting-changes}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
## Submitting security fixes {#submitting-changes-submitting-security-fixes}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Deprecating/removing packages {#submitting-changes-deprecating-packages}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
### Steps to remove a package from Nixpkgs {#steps-to-remove-a-package-from-nixpkgs}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Pull Request Template {#submitting-changes-pull-request-template}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
### Tested using sandboxing {#submitting-changes-tested-with-sandbox}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
### Built on platform(s) {#submitting-changes-platform-diversity}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
### Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests) {#submitting-changes-nixos-tests}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
### Tested compilation of all pkgs that depend on this change using `nixpkgs-review` {#submitting-changes-tested-compilation}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
### Tested execution of all binary files (usually in `./result/bin/`) {#submitting-changes-tested-execution}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
### Meets Nixpkgs contribution standards {#submitting-changes-contribution-standards}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
## Hotfixing pull requests {#submitting-changes-hotfixing-pull-requests}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
## Commit policy {#submitting-changes-commit-policy}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
### Branches {#submitting-changes-branches}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
#### Master branch {#submitting-changes-master-branch}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
#### Staging branch {#submitting-changes-staging-branch}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
#### Staging-next branch {#submitting-changes-staging-next-branch}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
#### Stable release branches {#submitting-changes-stable-release-branches}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
#### Automatically backporting a Pull Request {#submitting-changes-stable-release-branches-automatic-backports}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
#### Manually backporting changes {#submitting-changes-stable-release-branches-manual-backports}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
#### Acceptable backport criteria {#acceptable-backport-criteria}
This section has been moved to [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).

View File

@@ -1,11 +0,0 @@
# Vulnerability Roundup {#chap-vulnerability-roundup}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Issues {#vulnerability-roundup-issues}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).
## Triaging and Fixing {#vulnerability-roundup-triaging-and-fixing}
This section has been moved to [pkgs/README.md](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md).

468
doc/cross-compilation.xml Normal file
View File

@@ -0,0 +1,468 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-cross">
<title>Cross-compilation</title>
<section xml:id="sec-cross-intro">
<title>Introduction</title>
<para>
"Cross-compilation" means compiling a program on one machine for another type
of machine. For example, a typical use of cross-compilation is to compile
programs for embedded devices. These devices often don't have the computing
power and memory to compile their own programs. One might think that
cross-compilation is a fairly niche concern. However, there are significant
advantages to rigorously distinguishing between build-time and run-time
environments! This applies even when one is developing and deploying on the
same machine. Nixpkgs is increasingly adopting the opinion that packages
should be written with cross-compilation in mind, and nixpkgs should evaluate
in a similar way (by minimizing cross-compilation-specific special cases)
whether or not one is cross-compiling.
</para>
<para>
This chapter will be organized in three parts. First, it will describe the
basics of how to package software in a way that supports cross-compilation.
Second, it will describe how to use Nixpkgs when cross-compiling. Third, it
will describe the internal infrastructure supporting cross-compilation.
</para>
</section>
<!--============================================================-->
<section xml:id="sec-cross-packaging">
<title>Packaging in a cross-friendly manner</title>
<section xml:id="sec-cross-platform-parameters">
<title>Platform parameters</title>
<para>
Nixpkgs follows the <link
xlink:href="https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html">conventions
of GNU autoconf</link>. We distinguish between 3 types of platforms when
building a derivation: <wordasword>build</wordasword>,
<wordasword>host</wordasword>, and <wordasword>target</wordasword>. In
summary, <wordasword>build</wordasword> is the platform on which a package
is being built, <wordasword>host</wordasword> is the platform on which it
will run. The third attribute, <wordasword>target</wordasword>, is relevant
only for certain specific compilers and build tools.
</para>
<para>
In Nixpkgs, these three platforms are defined as attribute sets under the
names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>,
and <literal>targetPlatform</literal>. They are always defined as
attributes in the standard environment. That means one can access them
like:
<programlisting>{ stdenv, fooDep, barDep, .. }: ...stdenv.buildPlatform...</programlisting>
.
</para>
<variablelist>
<varlistentry>
<term>
<varname>buildPlatform</varname>
</term>
<listitem>
<para>
The "build platform" is the platform on which a package is built. Once
someone has a built package, or pre-built binary package, the build
platform should not matter and can be ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>hostPlatform</varname>
</term>
<listitem>
<para>
The "host platform" is the platform on which a package will be run. This
is the simplest platform to understand, but also the one with the worst
name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>targetPlatform</varname>
</term>
<listitem>
<para>
The "target platform" attribute is, unlike the other two attributes, not
actually fundamental to the process of building software. Instead, it is
only relevant for compatibility with building certain specific compilers
and build tools. It can be safely ignored for all other packages.
</para>
<para>
The build process of certain compilers is written in such a way that the
compiler resulting from a single build can itself only produce binaries
for a single platform. The task of specifying this single "target
platform" is thus pushed to build time of the compiler. The root cause of
this that the compiler (which will be run on the host) and the standard
library/runtime (which will be run on the target) are built by a single
build process.
</para>
<para>
There is no fundamental need to think about a single target ahead of
time like this. If the tool supports modular or pluggable backends, both
the need to specify the target at build time and the constraint of
having only a single target disappear. An example of such a tool is
LLVM.
</para>
<para>
Although the existence of a "target platfom" is arguably a historical
mistake, it is a common one: examples of tools that suffer from it are
GCC, Binutils, GHC and Autoconf. Nixpkgs tries to avoid sharing in the
mistake where possible. Still, because the concept of a target platform
is so ingrained, it is best to support it as is.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
The exact schema these fields follow is a bit ill-defined due to a long and
convoluted evolution, but this is slowly being cleaned up. You can see
examples of ones used in practice in
<literal>lib.systems.examples</literal>; note how they are not all very
consistent. For now, here are few fields can count on them containing:
</para>
<variablelist>
<varlistentry>
<term>
<varname>system</varname>
</term>
<listitem>
<para>
This is a two-component shorthand for the platform. Examples of this
would be "x86_64-darwin" and "i686-linux"; see
<literal>lib.systems.doubles</literal> for more. The first component
corresponds to the CPU architecture of the platform and the second to the
operating system of the platform (<literal>[cpu]-[os]</literal>). This
format has built-in support in Nix, such as the
<varname>builtins.currentSystem</varname> impure string.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>config</varname>
</term>
<listitem>
<para>
This is a 3- or 4- component shorthand for the platform. Examples of this
would be <literal>x86_64-unknown-linux-gnu</literal> and
<literal>aarch64-apple-darwin14</literal>. This is a standard format
called the "LLVM target triple", as they are pioneered by LLVM. In the
4-part form, this corresponds to
<literal>[cpu]-[vendor]-[os]-[abi]</literal>. This format is strictly
more informative than the "Nix host double", as the previous format could
analogously be termed. This needs a better name than
<varname>config</varname>!
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>parsed</varname>
</term>
<listitem>
<para>
This is a Nix representation of a parsed LLVM target triple
with white-listed components. This can be specified directly,
or actually parsed from the <varname>config</varname>. See
<literal>lib.systems.parse</literal> for the exact
representation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>libc</varname>
</term>
<listitem>
<para>
This is a string identifying the standard C library used. Valid
identifiers include "glibc" for GNU libc, "libSystem" for Darwin's
Libsystem, and "uclibc" for µClibc. It should probably be refactored to
use the module system, like <varname>parse</varname>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>is*</varname>
</term>
<listitem>
<para>
These predicates are defined in <literal>lib.systems.inspect</literal>,
and slapped onto every platform. They are superior to the ones in
<varname>stdenv</varname> as they force the user to be explicit about
which platform they are inspecting. Please use these instead of those.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>platform</varname>
</term>
<listitem>
<para>
This is, quite frankly, a dumping ground of ad-hoc settings (it's an
attribute set). See <literal>lib.systems.platforms</literal> for
examples—there's hopefully one in there that will work verbatim for
each platform that is working. Please help us triage these flags and
give them better homes!
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="sec-cross-specifying-dependencies">
<title>Specifying Dependencies</title>
<para>
In this section we explore the relationship between both runtime and
build-time dependencies and the 3 Autoconf platforms.
</para>
<para>
A runtime dependency between 2 packages implies that between them both the
host and target platforms match. This is directly implied by the meaning of
"host platform" and "runtime dependency": The package dependency exists
while both packages are running on a single host platform.
</para>
<para>
A build time dependency, however, implies a shift in platforms between the
depending package and the depended-on package. The meaning of a build time
dependency is that to build the depending package we need to be able to run
the depended-on's package. The depending package's build platform is
therefore equal to the depended-on package's host platform. Analogously,
the depending package's host platform is equal to the depended-on package's
target platform.
</para>
<para>
In this manner, given the 3 platforms for one package, we can determine the
three platforms for all its transitive dependencies. This is the most
important guiding principle behind cross-compilation with Nixpkgs, and will
be called the <wordasword>sliding window principle</wordasword>.
</para>
<para>
Some examples will make this clearer. If a package is being built with a
<literal>(build, host, target)</literal> platform triple of <literal>(foo,
bar, bar)</literal>, then its build-time dependencies would have a triple of
<literal>(foo, foo, bar)</literal>, and <emphasis>those packages'</emphasis>
build-time dependencies would have a triple of <literal>(foo, foo,
foo)</literal>. In other words, it should take two "rounds" of following
build-time dependency edges before one reaches a fixed point where, by the
sliding window principle, the platform triple no longer changes. Indeed,
this happens with cross-compilation, where only rounds of native
dependencies starting with the second necessarily coincide with native
packages.
</para>
<note>
<para>
The depending package's target platform is unconstrained by the sliding
window principle, which makes sense in that one can in principle build
cross compilers targeting arbitrary platforms.
</para>
</note>
<para>
How does this work in practice? Nixpkgs is now structured so that build-time
dependencies are taken from <varname>buildPackages</varname>, whereas
run-time dependencies are taken from the top level attribute set. For
example, <varname>buildPackages.gcc</varname> should be used at build-time,
while <varname>gcc</varname> should be used at run-time. Now, for most of
Nixpkgs's history, there was no <varname>buildPackages</varname>, and most
packages have not been refactored to use it explicitly. Instead, one can use
the six (<emphasis>gasp</emphasis>) attributes used for specifying
dependencies as documented in <xref linkend="ssec-stdenv-dependencies"/>. We
"splice" together the run-time and build-time package sets with
<varname>callPackage</varname>, and then <varname>mkDerivation</varname> for
each of four attributes pulls the right derivation out. This splicing can be
skipped when not cross-compiling as the package sets are the same, but is a
bit slow for cross-compiling. Because of this, a best-of-both-worlds
solution is in the works with no splicing or explicit access of
<varname>buildPackages</varname> needed. For now, feel free to use either
method.
</para>
<note>
<para>
There is also a "backlink" <varname>targetPackages</varname>, yielding a
package set whose <varname>buildPackages</varname> is the current package
set. This is a hack, though, to accommodate compilers with lousy build
systems. Please do not use this unless you are absolutely sure you are
packaging such a compiler and there is no other way.
</para>
</note>
</section>
<section xml:id="sec-cross-cookbook">
<title>Cross packaging cookbook</title>
<para>
Some frequently encountered problems when packaging for cross-compilation
should be answered here. Ideally, the information above is exhaustive, so
this section cannot provide any new information, but it is ludicrous and
cruel to expect everyone to spend effort working through the interaction of
many features just to figure out the same answer to the same common problem.
Feel free to add to this list!
</para>
<qandaset>
<qandaentry xml:id="cross-qa-build-c-program-in-build-environment">
<question>
<para>
What if my package's build system needs to build a C program to be run
under the build environment?
</para>
</question>
<answer>
<para>
<programlisting>depsBuildBuild = [ buildPackages.stdenv.cc ];</programlisting>
Add it to your <function>mkDerivation</function> invocation.
</para>
</answer>
</qandaentry>
<qandaentry xml:id="cross-qa-fails-to-find-ar">
<question>
<para>
My package fails to find <command>ar</command>.
</para>
</question>
<answer>
<para>
Many packages assume that an unprefixed <command>ar</command> is
available, but Nix doesn't provide one. It only provides a prefixed one,
just as it only does for all the other binutils programs. It may be
necessary to patch the package to fix the build system to use a prefixed
`ar`.
</para>
</answer>
</qandaentry>
<qandaentry xml:id="cross-testsuite-runs-host-code">
<question>
<para>
My package's testsuite needs to run host platform code.
</para>
</question>
<answer>
<para>
<programlisting>doCheck = stdenv.hostPlatform != stdenv.buildPlatfrom;</programlisting>
Add it to your <function>mkDerivation</function> invocation.
</para>
</answer>
</qandaentry>
</qandaset>
</section>
</section>
<!--============================================================-->
<section xml:id="sec-cross-usage">
<title>Cross-building packages</title>
<para>
Nixpkgs can be instantiated with <varname>localSystem</varname> alone, in
which case there is no cross-compiling and everything is built by and for
that system, or also with <varname>crossSystem</varname>, 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,
<literal>lib.systems.examples</literal> has some platforms which are used as
arguments for these parameters in practice. You can use them
programmatically, or on the command line:
<programlisting>
nix-build &lt;nixpkgs&gt; --arg crossSystem '(import &lt;nixpkgs/lib&gt;).systems.examples.fooBarBaz' -A whatever</programlisting>
</para>
<note>
<para>
Eventually we would like to make these platform examples an unnecessary
convenience so that
<programlisting>
nix-build &lt;nixpkgs&gt; --arg crossSystem '{ config = "&lt;arch&gt;-&lt;os&gt;-&lt;vendor&gt;-&lt;abi&gt;"; }' -A whatever</programlisting>
works in the vast majority of cases. The problem today is dependencies on
other sorts of configuration which aren't given proper defaults. We rely on
the examples to crudely to set those configuration parameters in some
vaguely sane manner on the users behalf. Issue
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/34274">#34274</link>
tracks this inconvenience along with its root cause in crufty configuration
options.
</para>
</note>
<para>
While one is free to pass both parameters in full, there's a lot of logic to
fill in missing fields. As discussed in the previous section, only one of
<varname>system</varname>, <varname>config</varname>, and
<varname>parsed</varname> is needed to infer the other two. Additionally,
<varname>libc</varname> will be inferred from <varname>parse</varname>.
Finally, <literal>localSystem.system</literal> is also
<emphasis>impurely</emphasis> inferred based on the platform evaluation
occurs. This means it is often not necessary to pass
<varname>localSystem</varname> at all, as in the command-line example in the
previous paragraph.
</para>
<note>
<para>
Many sources (manual, wiki, etc) probably mention passing
<varname>system</varname>, <varname>platform</varname>, along with the
optional <varname>crossSystem</varname> to nixpkgs: <literal>import
&lt;nixpkgs&gt; { system = ..; platform = ..; crossSystem = ..;
}</literal>. Passing those two instead of <varname>localSystem</varname> is
still supported for compatibility, but is discouraged. Indeed, much of the
inference we do for these parameters is motivated by compatibility as much
as convenience.
</para>
</note>
<para>
One would think that <varname>localSystem</varname> and
<varname>crossSystem</varname> overlap horribly with the three
<varname>*Platforms</varname> (<varname>buildPlatform</varname>,
<varname>hostPlatform,</varname> and <varname>targetPlatform</varname>; see
<varname>stage.nix</varname> or the manual). Actually, those identifiers are
purposefully not used here to draw a subtle but important distinction: While
the granularity of having 3 platforms is necessary to properly *build*
packages, it is overkill for specifying the user's *intent* when making a
build plan or package set. A simple "build vs deploy" dichotomy is adequate:
the sliding window principle described in the previous section shows how to
interpolate between the these two "end points" to get the 3 platform triple
for each bootstrapping stage. That means for any package a given package set,
even those not bound on the top level but only reachable via dependencies or
<varname>buildPackages</varname>, the three platforms will be defined as one
of <varname>localSystem</varname> or <varname>crossSystem</varname>, with the
former replacing the latter as one traverses build-time dependencies. A last
simple difference is that <varname>crossSystem</varname> should be null when
one doesn't want to cross-compile, while the <varname>*Platform</varname>s
are always non-null. <varname>localSystem</varname> is always non-null.
</para>
</section>
<!--============================================================-->
<section xml:id="sec-cross-infra">
<title>Cross-compilation infrastructure</title>
<para>
To be written.
</para>
<note>
<para>
If one explores Nixpkgs, they will see derivations with names like
<literal>gccCross</literal>. Such <literal>*Cross</literal> derivations is a
holdover from before we properly distinguished between the host and target
platforms—the derivation with "Cross" in the name covered the <literal>build
= host != target</literal> case, while the other covered the <literal>host =
target</literal>, with build platform the same or not based on whether one
was using its <literal>.nativeDrv</literal> or <literal>.crossDrv</literal>.
This ugliness will disappear soon.
</para>
</note>
</section>
</chapter>

View File

@@ -1,152 +1,51 @@
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
let
inherit (pkgs) lib;
inherit (lib) hasPrefix removePrefix;
common = import ./common.nix;
lib-docs = import ./doc-support/lib-function-docs.nix {
inherit pkgs nixpkgs;
libsets = [
{ name = "asserts"; description = "assertion functions"; }
{ name = "attrsets"; description = "attribute set functions"; }
{ name = "strings"; description = "string manipulation functions"; }
{ name = "versions"; description = "version string functions"; }
{ name = "trivial"; description = "miscellaneous functions"; }
{ name = "fixedPoints"; baseName = "fixed-points"; description = "explicit recursion functions"; }
{ name = "lists"; description = "list manipulation functions"; }
{ name = "debug"; description = "debugging functions"; }
{ name = "options"; description = "NixOS / nixpkgs option handling"; }
{ name = "path"; description = "path functions"; }
{ name = "filesystem"; description = "filesystem functions"; }
{ name = "fileset"; description = "file set functions"; }
{ name = "sources"; description = "source filtering functions"; }
{ name = "cli"; description = "command-line serialization functions"; }
{ name = "gvariant"; description = "GVariant formatted string serialization functions"; }
{ name = "customisation"; description = "Functions to customise (derivation-related) functions, derivatons, or attribute sets"; }
{ name = "meta"; description = "functions for derivation metadata"; }
];
};
epub = pkgs.runCommand "manual.epub" {
nativeBuildInputs = with pkgs; [ libxslt zip ];
epub = ''
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="nixpkgs-manual">
<info>
<title>Nixpkgs Manual</title>
<subtitle>Version ${pkgs.lib.version}</subtitle>
</info>
<chapter>
<title>Temporarily unavailable</title>
<para>
The Nixpkgs manual is currently not available in EPUB format,
please use the <link xlink:href="https://nixos.org/nixpkgs/manual">HTML manual</link>
instead.
</para>
<para>
If you've used the EPUB manual in the past and it has been useful to you, please
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>.
</para>
</chapter>
</book>
'';
passAsFile = [ "epub" ];
} ''
mkdir scratch
xsltproc \
--param chapter.autolabel 0 \
--nonet \
--output scratch/ \
${pkgs.docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \
$epubPath
echo "application/epub+zip" > mimetype
zip -0Xq "$out" mimetype
cd scratch && zip -Xr9D "$out" *
'';
# NB: This file describes the Nixpkgs manual, which happens to use module
# docs infra originally developed for NixOS.
optionsDoc = pkgs.nixosOptionsDoc {
inherit (pkgs.lib.evalModules {
modules = [ ../pkgs/top-level/config.nix ];
class = "nixpkgsConfig";
}) 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;
};
};
lib = pkgs.lib;
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs; };
functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs; };
in pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual";
nativeBuildInputs = with pkgs; [
nixos-render-docs
];
buildInputs = with pkgs; [ pandoc libxml2 libxslt zip jing xmlformat ];
src = ./.;
# Hacking on these variables? Make sure to close and open
# nix-shell between each test, maybe even:
# $ nix-shell --run "make clean all"
# otherwise they won't reapply :)
HIGHLIGHTJS = pkgs.documentation-highlighter;
XSL = "${pkgs.docbook_xsl_ns}/xml/xsl";
RNG = "${pkgs.docbook5}/xml/rng/docbook/docbook.rng";
XMLFORMAT_CONFIG = ../nixos/doc/xmlformat.conf;
xsltFlags = lib.concatStringsSep " " [
"--param section.autolabel 1"
"--param section.label.includes.component.label 1"
"--stringparam html.stylesheet 'style.css overrides.css highlightjs/mono-blue.css'"
"--stringparam html.script './highlightjs/highlight.pack.js ./highlightjs/loader.js'"
"--param xref.with.number.and.title 1"
"--param toc.section.depth 3"
"--stringparam admon.style ''"
"--stringparam callout.graphics.extension .svg"
];
postPatch = ''
ln -s ${optionsDoc.optionsJSON}/share/doc/nixos/options.json ./config-options.json
'';
buildPhase = ''
cat \
./functions/library.md.in \
${lib-docs}/index.md \
> ./functions/library.md
substitute ./manual.md.in ./manual.md \
--replace '@MANUAL_VERSION@' '${pkgs.lib.version}'
mkdir -p out/media
mkdir -p out/highlightjs
cp -t out/highlightjs \
${pkgs.documentation-highlighter}/highlight.pack.js \
${pkgs.documentation-highlighter}/LICENSE \
${pkgs.documentation-highlighter}/mono-blue.css \
${pkgs.documentation-highlighter}/loader.js
cp -t out ./overrides.css ./style.css
nixos-render-docs manual html \
--manpage-urls ./manpage-urls.json \
--revision ${pkgs.lib.trivial.revisionWithDefault (pkgs.rev or "master")} \
--stylesheet style.css \
--stylesheet overrides.css \
--stylesheet highlightjs/mono-blue.css \
--script ./highlightjs/highlight.pack.js \
--script ./highlightjs/loader.js \
--toc-depth 1 \
--section-toc-depth 1 \
manual.md \
out/index.html
rm -rf ./functions/library/locations.xml
ln -s ${locationsXml} ./functions/library/locations.xml
ln -s ${functionDocs} ./functions/library/generated
echo ${lib.version} > .version
'';
installPhase = ''
dest="$out/${common.outputPath}"
dest="$out/share/doc/nixpkgs"
mkdir -p "$(dirname "$dest")"
mv out "$dest"
mv "$dest/index.html" "$dest/${common.indexPath}"
mv out/html "$dest"
mv "$dest/index.html" "$dest/manual.html"
cp ${epub} "$dest/nixpkgs-manual.epub"
mv out/epub/manual.epub "$dest/nixpkgs-manual.epub"
mkdir -p $out/nix-support/
echo "doc manual $dest ${common.indexPath}" >> $out/nix-support/hydra-build-products
echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products
echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
'';
}

View File

@@ -1,10 +0,0 @@
# Development of Nixpkgs {#part-development}
This section shows you how Nixpkgs is being developed and how you can interact with the contributors and the latest updates.
If you are interested in contributing yourself, see [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
<!-- In the future this section should also include: How to test pull requests, how to know if pull requests are available in channels, etc. -->
```{=include=} chapters
development/opening-issues.chapter.md
```

View File

@@ -1,7 +0,0 @@
# Opening issues {#sec-opening-issues}
* Make sure you have a [GitHub account](https://github.com/signup/free)
* Make sure there is no open issue on the topic
* [Submit a new issue](https://github.com/NixOS/nixpkgs/issues/new/choose) by choosing the kind of topic and fill out the template
<!-- In the future this section could also include more detailed information on the issue templates -->

View File

@@ -1,41 +0,0 @@
# Generates the documentation for library functions via nixdoc.
{ pkgs, nixpkgs, libsets }:
with pkgs;
let
locationsJSON = import ./lib-function-locations.nix { inherit pkgs nixpkgs libsets; };
in
stdenv.mkDerivation {
name = "nixpkgs-lib-docs";
src = ../../lib;
buildInputs = [ nixdoc ];
installPhase = ''
function docgen {
name=$1
baseName=$2
description=$3
# TODO: wrap lib.$name in <literal>, make nixdoc not escape it
if [[ -e "../lib/$baseName.nix" ]]; then
nixdoc -c "$name" -d "lib.$name: $description" -l ${locationsJSON} -f "$baseName.nix" > "$out/$name.md"
else
nixdoc -c "$name" -d "lib.$name: $description" -l ${locationsJSON} -f "$baseName/default.nix" > "$out/$name.md"
fi
echo "$out/$name.md" >> "$out/index.md"
}
mkdir -p "$out"
cat > "$out/index.md" << 'EOF'
```{=include=} sections
EOF
${lib.concatMapStrings ({ name, baseName ? name, description }: ''
docgen ${name} ${baseName} ${lib.escapeShellArg description}
'') libsets}
echo '```' >> "$out/index.md"
'';
}

View File

@@ -1,75 +0,0 @@
{ pkgs, nixpkgs ? { }, libsets }:
let
revision = pkgs.lib.trivial.revisionWithDefault (nixpkgs.rev or "master");
libDefPos = prefix: set:
builtins.concatMap
(name: [{
name = builtins.concatStringsSep "." (prefix ++ [name]);
location = builtins.unsafeGetAttrPos name set;
}] ++ nixpkgsLib.optionals
(builtins.length prefix == 0 && builtins.isAttrs set.${name})
(libDefPos (prefix ++ [name]) set.${name})
) (builtins.attrNames set);
libset = toplib:
builtins.map
(subsetname: {
subsetname = subsetname;
functions = libDefPos [] toplib.${subsetname};
})
(builtins.map (x: x.name) libsets);
nixpkgsLib = pkgs.lib;
flattenedLibSubset = { subsetname, functions }:
builtins.map
(fn: {
name = "lib.${subsetname}.${fn.name}";
value = fn.location;
})
functions;
locatedlibsets = libs: builtins.map flattenedLibSubset (libset libs);
removeFilenamePrefix = prefix: filename:
let
prefixLen = (builtins.stringLength prefix) + 1; # +1 to remove the leading /
filenameLen = builtins.stringLength filename;
substr = builtins.substring prefixLen filenameLen filename;
in substr;
removeNixpkgs = removeFilenamePrefix (builtins.toString pkgs.path);
liblocations =
builtins.filter
(elem: elem.value != null)
(nixpkgsLib.lists.flatten
(locatedlibsets nixpkgsLib));
fnLocationRelative = { name, value }:
{
inherit name;
value = value // { file = removeNixpkgs value.file; };
};
relativeLocs = (builtins.map fnLocationRelative liblocations);
sanitizeId = builtins.replaceStrings
[ "'" ]
[ "-prime" ];
urlPrefix = "https://github.com/NixOS/nixpkgs/blob/${revision}";
jsonLocs = builtins.listToAttrs
(builtins.map
({ name, value }: {
name = sanitizeId name;
value =
let
text = "${value.file}:${builtins.toString value.line}";
target = "${urlPrefix}/${value.file}#L${builtins.toString value.line}";
in
"[${text}](${target}) in `<nixpkgs>`";
})
relativeLocs);
in
pkgs.writeText "locations.json" (builtins.toJSON jsonLocs)

View File

@@ -1,11 +0,0 @@
# Functions reference {#chap-functions}
The nixpkgs repository has several utility functions to manipulate Nix expressions.
```{=include=} sections
functions/library.md
functions/generators.section.md
functions/debug.section.md
functions/prefer-remote-fetch.section.md
functions/nix-gitignore.section.md
```

22
doc/functions.xml Normal file
View File

@@ -0,0 +1,22 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="chap-functions">
<title>Functions reference</title>
<para>
The nixpkgs repository has several utility functions to manipulate Nix
expressions.
</para>
<xi:include href="functions/library.xml" />
<xi:include href="functions/overrides.xml" />
<xi:include href="functions/generators.xml" />
<xi:include href="functions/debug.xml" />
<xi:include href="functions/fetchers.xml" />
<xi:include href="functions/trivial-builders.xml" />
<xi:include href="functions/fhs-environments.xml" />
<xi:include href="functions/shell.xml" />
<xi:include href="functions/dockertools.xml" />
<xi:include href="functions/appimagetools.xml" />
<xi:include href="functions/prefer-remote-fetch.xml" />
<xi:include href="functions/nix-gitignore.xml" />
</chapter>

View File

@@ -0,0 +1,121 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-pkgs-appimageTools">
<title>pkgs.appimageTools</title>
<para>
<varname>pkgs.appimageTools</varname> is a set of functions for extracting and wrapping
<link xlink:href="https://appimage.org/">AppImage</link> files.
They are meant to be used if traditional packaging from source is infeasible, or it would take too long.
To quickly run an AppImage file, <literal>pkgs.appimage-run</literal> can be used as well.
</para>
<warning>
<para>
The <varname>appimageTools</varname> API is unstable and may be subject to
backwards-incompatible changes in the future.
</para>
</warning>
<section xml:id="ssec-pkgs-appimageTools-formats">
<title>AppImage formats</title>
<para>
There are different formats for AppImages, see
<link xlink:href="https://github.com/AppImage/AppImageSpec/blob/74ad9ca2f94bf864a4a0dac1f369dd4f00bd1c28/draft.md#image-format">the specification</link> for details.
</para>
<itemizedlist>
<listitem>
<para>
Type 1 images are ISO 9660 files that are also ELF executables.
</para>
</listitem>
<listitem>
<para>
Type 2 images are ELF executables with an appended filesystem.
</para>
</listitem>
</itemizedlist>
<para>
They can be told apart with <command>file -k</command>:
</para>
<screen>
<prompt>$ </prompt>file -k type1.AppImage
type1.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) ISO 9660 CD-ROM filesystem data 'AppImage' (Lepton 3.x), scale 0-0,
spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 0.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=d629f6099d2344ad82818172add1d38c5e11bc6d, stripped\012- data
<prompt>$ </prompt>file -k type2.AppImage
type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x), scale 232-60668, spot sensor temperature -4.187500, color scheme 15, show scale bar, calibration: offset -0.000000, slope 0.000000 (Lepton 2.x), scale 4111-45000, spot sensor temperature 412442.250000, color scheme 3, minimum point enabled, calibration: offset -75402534979642766821519867692934234112.000000, slope 5815371847733706829839455140374904832.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79dcc4e55a61c293c5e19edbd8d65b202842579f, stripped\012- data
</screen>
<para>
Note how the type 1 AppImage is described as an <literal>ISO 9660 CD-ROM filesystem</literal>, and the type 2 AppImage is not.
</para>
</section>
<section xml:id="ssec-pkgs-appimageTools-wrapping">
<title>Wrapping</title>
<para>
Depending on the type of AppImage you're wrapping, you'll have to use
<varname>wrapType1</varname> or <varname>wrapType2</varname>.
</para>
<programlisting>
appimageTools.wrapType2 { # or wrapType1
name = "patchwork"; <co xml:id='ex-appimageTools-wrapping-1' />
src = fetchurl { <co xml:id='ex-appimageTools-wrapping-2' />
url = https://github.com/ssbc/patchwork/releases/download/v3.11.4/Patchwork-3.11.4-linux-x86_64.AppImage;
sha256 = "1blsprpkvm0ws9b96gb36f0rbf8f5jgmw4x6dsb1kswr4ysf591s";
};
extraPkgs = pkgs: with pkgs; [ ]; <co xml:id='ex-appimageTools-wrapping-3' />
}</programlisting>
<calloutlist>
<callout arearefs='ex-appimageTools-wrapping-1'>
<para>
<varname>name</varname> specifies the name of the resulting image.
</para>
</callout>
<callout arearefs='ex-appimageTools-wrapping-2'>
<para>
<varname>src</varname> specifies the AppImage file to extract.
</para>
</callout>
<callout arearefs='ex-appimageTools-wrapping-2'>
<para>
<varname>extraPkgs</varname> allows you to pass a function to include additional packages
inside the FHS environment your AppImage is going to run in.
There are a few ways to learn which dependencies an application needs:
<itemizedlist>
<listitem>
<para>
Looking through the extracted AppImage files, reading its scripts and running <command>patchelf</command> and <command>ldd</command> on its executables.
This can also be done in <command>appimage-run</command>, by setting <command>APPIMAGE_DEBUG_EXEC=bash</command>.
</para>
</listitem>
<listitem>
<para>
Running <command>strace -vfefile</command> on the wrapped executable, looking for libraries that can't be found.
</para>
</listitem>
</itemizedlist>
</para>
</callout>
</calloutlist>
</section>
</section>

View File

@@ -1,5 +0,0 @@
# Debugging Nix Expressions {#sec-debug}
Nix is a unityped, dynamic language, this means every value can potentially appear anywhere. Since it is also non-strict, evaluation order and what ultimately is evaluated might surprise you. Therefore it is important to be able to debug nix expressions.
In the `lib/debug.nix` file you will find a number of functions that help (pretty-)printing values while evaluation is running. You can even specify how deep these values should be printed recursively, and transform them on the fly. Please consult the docstrings in `lib/debug.nix` for usage information.

21
doc/functions/debug.xml Normal file
View File

@@ -0,0 +1,21 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-debug">
<title>Debugging Nix Expressions</title>
<para>
Nix is a unityped, dynamic language, this means every value can potentially
appear anywhere. Since it is also non-strict, evaluation order and what
ultimately is evaluated might surprise you. Therefore it is important to be
able to debug nix expressions.
</para>
<para>
In the <literal>lib/debug.nix</literal> file you will find a number of
functions that help (pretty-)printing values while evaluation is runnnig. You
can even specify how deep these values should be printed recursively, and
transform them on the fly. Please consult the docstrings in
<literal>lib/debug.nix</literal> for usage information.
</para>
</section>

View File

@@ -0,0 +1,564 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-pkgs-dockerTools">
<title>pkgs.dockerTools</title>
<para>
<varname>pkgs.dockerTools</varname> is a set of functions for creating and
manipulating Docker images according to the
<link xlink:href="https://github.com/moby/moby/blob/master/image/spec/v1.2.md#docker-image-specification-v120">
Docker Image Specification v1.2.0 </link>. Docker itself is not used to
perform any of the operations done by these functions.
</para>
<warning>
<para>
The <varname>dockerTools</varname> API is unstable and may be subject to
backwards-incompatible changes in the future.
</para>
</warning>
<section xml:id="ssec-pkgs-dockerTools-buildImage">
<title>buildImage</title>
<para>
This function is analogous to the <command>docker build</command> command,
in that it can be used to build a Docker-compatible repository tarball containing
a single image with one or multiple layers. As such, the result is suitable
for being loaded in Docker with <command>docker load</command>.
</para>
<para>
The parameters of <varname>buildImage</varname> with relative example values
are described below:
</para>
<example xml:id='ex-dockerTools-buildImage'>
<title>Docker build</title>
<programlisting>
buildImage {
name = "redis"; <co xml:id='ex-dockerTools-buildImage-1' />
tag = "latest"; <co xml:id='ex-dockerTools-buildImage-2' />
fromImage = someBaseImage; <co xml:id='ex-dockerTools-buildImage-3' />
fromImageName = null; <co xml:id='ex-dockerTools-buildImage-4' />
fromImageTag = "latest"; <co xml:id='ex-dockerTools-buildImage-5' />
contents = pkgs.redis; <co xml:id='ex-dockerTools-buildImage-6' />
runAsRoot = '' <co xml:id='ex-dockerTools-buildImage-runAsRoot' />
#!${pkgs.runtimeShell}
mkdir -p /data
'';
config = { <co xml:id='ex-dockerTools-buildImage-8' />
Cmd = [ "/bin/redis-server" ];
WorkingDir = "/data";
Volumes = {
"/data" = {};
};
};
}
</programlisting>
</example>
<para>
The above example will build a Docker image <literal>redis/latest</literal>
from the given base image. Loading and running this image in Docker results
in <literal>redis-server</literal> being started automatically.
</para>
<calloutlist>
<callout arearefs='ex-dockerTools-buildImage-1'>
<para>
<varname>name</varname> specifies the name of the resulting image. This is
the only required argument for <varname>buildImage</varname>.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-2'>
<para>
<varname>tag</varname> specifies the tag of the resulting image. By
default it's <literal>null</literal>, which indicates that the nix output
hash will be used as tag.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-3'>
<para>
<varname>fromImage</varname> is the repository tarball containing the base
image. It must be a valid Docker image, such as exported by
<command>docker save</command>. By default it's <literal>null</literal>,
which can be seen as equivalent to <literal>FROM scratch</literal> of a
<filename>Dockerfile</filename>.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-4'>
<para>
<varname>fromImageName</varname> can be used to further specify the base
image within the repository, in case it contains multiple images. By
default it's <literal>null</literal>, in which case
<varname>buildImage</varname> will peek the first image available in the
repository.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-5'>
<para>
<varname>fromImageTag</varname> 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 <literal>null</literal>, in which case
<varname>buildImage</varname> will peek the first tag available for the
base image.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-6'>
<para>
<varname>contents</varname> is a derivation that will be copied in the new
layer of the resulting image. This can be similarly seen as <command>ADD
contents/ /</command> in a <filename>Dockerfile</filename>. By default
it's <literal>null</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-runAsRoot'>
<para>
<varname>runAsRoot</varname> 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
<varname>contents</varname> derivation. This can be similarly seen as
<command>RUN ...</command> in a <filename>Dockerfile</filename>.
<note>
<para>
Using this parameter requires the <literal>kvm</literal> device to be
available.
</para>
</note>
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-8'>
<para>
<varname>config</varname> 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
<link xlink:href="https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions">
Docker Image Specification v1.2.0 </link>.
</para>
</callout>
</calloutlist>
<para>
After the new layer has been created, its closure (to which
<varname>contents</varname>, <varname>config</varname> and
<varname>runAsRoot</varname> contribute) will be copied in the layer itself.
Only new dependencies that are not already in the existing layers will be
copied.
</para>
<para>
At the end of the process, only one new single layer will be produced and
added to the resulting image.
</para>
<para>
The resulting repository will only list the single image
<varname>image/tag</varname>. In the case of
<xref linkend='ex-dockerTools-buildImage'/> it would be
<varname>redis/latest</varname>.
</para>
<para>
It is possible to inspect the arguments with which an image was built using
its <varname>buildArgs</varname> attribute.
</para>
<note>
<para>
If you see errors similar to <literal>getProtocolByName: does not exist (no
such protocol name: tcp)</literal> you may need to add
<literal>pkgs.iana-etc</literal> to <varname>contents</varname>.
</para>
</note>
<note>
<para>
If you see errors similar to <literal>Error_Protocol ("certificate has
unknown CA",True,UnknownCa)</literal> you may need to add
<literal>pkgs.cacert</literal> to <varname>contents</varname>.
</para>
</note>
<example xml:id="example-pkgs-dockerTools-buildImage-creation-date">
<title>Impurely Defining a Docker Layer's Creation Date</title>
<para>
By default <function>buildImage</function> will use a static date of one
second past the UNIX Epoch. This allows <function>buildImage</function> to
produce binary reproducible images. When listing images with
<command>docker images</command>, the newly created images will be
listed like this:
</para>
<screen><![CDATA[
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest 08c791c7846e 48 years ago 25.2MB
]]></screen>
<para>
You can break binary reproducibility but have a sorted, meaningful
<literal>CREATED</literal> column by setting <literal>created</literal> to
<literal>now</literal>.
</para>
<programlisting><![CDATA[
pkgs.dockerTools.buildImage {
name = "hello";
tag = "latest";
created = "now";
contents = pkgs.hello;
config.Cmd = [ "/bin/hello" ];
}
]]></programlisting>
<para>
and now the Docker CLI will display a reasonable date and sort the images
as expected:
<screen><![CDATA[
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello latest de2bf4786de6 About a minute ago 25.2MB
]]></screen>
however, the produced images will not be binary reproducible.
</para>
</example>
</section>
<section xml:id="ssec-pkgs-dockerTools-buildLayeredImage">
<title>buildLayeredImage</title>
<para>
Create a Docker image with many of the store paths being on their own layer
to improve sharing between images.
</para>
<variablelist>
<varlistentry>
<term>
<varname>name</varname>
</term>
<listitem>
<para>
The name of the resulting image.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>tag</varname> <emphasis>optional</emphasis>
</term>
<listitem>
<para>
Tag of the generated image.
</para>
<para>
<emphasis>Default:</emphasis> the output path's hash
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>contents</varname> <emphasis>optional</emphasis>
</term>
<listitem>
<para>
Top level paths in the container. Either a single derivation, or a list
of derivations.
</para>
<para>
<emphasis>Default:</emphasis> <literal>[]</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>config</varname> <emphasis>optional</emphasis>
</term>
<listitem>
<para>
Run-time configuration of the container. A full list of the options are
available at in the
<link xlink:href="https://github.com/moby/moby/blob/master/image/spec/v1.2.md#image-json-field-descriptions">
Docker Image Specification v1.2.0 </link>.
</para>
<para>
<emphasis>Default:</emphasis> <literal>{}</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>created</varname> <emphasis>optional</emphasis>
</term>
<listitem>
<para>
Date and time the layers were created. Follows the same
<literal>now</literal> exception supported by
<literal>buildImage</literal>.
</para>
<para>
<emphasis>Default:</emphasis> <literal>1970-01-01T00:00:01Z</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>maxLayers</varname> <emphasis>optional</emphasis>
</term>
<listitem>
<para>
Maximum number of layers to create.
</para>
<para>
<emphasis>Default:</emphasis> <literal>24</literal>
</para>
</listitem>
</varlistentry>
</variablelist>
<section xml:id="dockerTools-buildLayeredImage-arg-contents">
<title>Behavior of <varname>contents</varname> in the final image</title>
<para>
Each path directly listed in <varname>contents</varname> will have a
symlink in the root of the image.
</para>
<para>
For example:
<programlisting><![CDATA[
pkgs.dockerTools.buildLayeredImage {
name = "hello";
contents = [ pkgs.hello ];
}
]]></programlisting>
will create symlinks for all the paths in the <literal>hello</literal>
package:
<screen><![CDATA[
/bin/hello -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/bin/hello
/share/info/hello.info -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/info/hello.info
/share/locale/bg/LC_MESSAGES/hello.mo -> /nix/store/h1zb1padqbbb7jicsvkmrym3r6snphxg-hello-2.10/share/locale/bg/LC_MESSAGES/hello.mo
]]></screen>
</para>
</section>
<section xml:id="dockerTools-buildLayeredImage-arg-config">
<title>Automatic inclusion of <varname>config</varname> references</title>
<para>
The closure of <varname>config</varname> is automatically included in the
closure of the final image.
</para>
<para>
This allows you to make very simple Docker images with very little code.
This container will start up and run <command>hello</command>:
<programlisting><![CDATA[
pkgs.dockerTools.buildLayeredImage {
name = "hello";
config.Cmd = [ "${pkgs.hello}/bin/hello" ];
}
]]></programlisting>
</para>
</section>
<section xml:id="dockerTools-buildLayeredImage-arg-maxLayers">
<title>Adjusting <varname>maxLayers</varname></title>
<para>
Increasing the <varname>maxLayers</varname> increases the number of layers
which have a chance to be shared between different images.
</para>
<para>
Modern Docker installations support up to 128 layers, however older
versions support as few as 42.
</para>
<para>
If the produced image will not be extended by other Docker builds, it is
safe to set <varname>maxLayers</varname> to <literal>128</literal>. However
it will be impossible to extend the image further.
</para>
<para>
The first (<literal>maxLayers-2</literal>) most "popular" paths will have
their own individual layers, then layer #<literal>maxLayers-1</literal>
will contain all the remaining "unpopular" paths, and finally layer
#<literal>maxLayers</literal> will contain the Image configuration.
</para>
<para>
Docker's Layers are not inherently ordered, they are content-addressable
and are not explicitly layered until they are composed in to an Image.
</para>
</section>
</section>
<section xml:id="ssec-pkgs-dockerTools-fetchFromRegistry">
<title>pullImage</title>
<para>
This function is analogous to the <command>docker pull</command> command, in
that it can be used to pull a Docker image from a Docker registry. By default
<link xlink:href="https://hub.docker.com/">Docker Hub</link> is used to pull
images.
</para>
<para>
Its parameters are described in the example below:
</para>
<example xml:id='ex-dockerTools-pullImage'>
<title>Docker pull</title>
<programlisting>
pullImage {
imageName = "nixos/nix"; <co xml:id='ex-dockerTools-pullImage-1' />
imageDigest = "sha256:20d9485b25ecfd89204e843a962c1bd70e9cc6858d65d7f5fadc340246e2116b"; <co xml:id='ex-dockerTools-pullImage-2' />
finalImageTag = "1.11"; <co xml:id='ex-dockerTools-pullImage-3' />
sha256 = "0mqjy3zq2v6rrhizgb9nvhczl87lcfphq9601wcprdika2jz7qh8"; <co xml:id='ex-dockerTools-pullImage-4' />
os = "linux"; <co xml:id='ex-dockerTools-pullImage-5' />
arch = "x86_64"; <co xml:id='ex-dockerTools-pullImage-6' />
}
</programlisting>
</example>
<calloutlist>
<callout arearefs='ex-dockerTools-pullImage-1'>
<para>
<varname>imageName</varname> specifies the name of the image to be
downloaded, which can also include the registry namespace (e.g.
<literal>nixos</literal>). This argument is required.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-2'>
<para>
<varname>imageDigest</varname> specifies the digest of the image to be
downloaded. Skopeo can be used to get the digest of an image, with its
<varname>inspect</varname> subcommand. Since a given
<varname>imageName</varname> may transparently refer to a manifest list of
images which support multiple architectures and/or operating systems,
supply the `--override-os` and `--override-arch` arguments to specify
exactly which image you want. By default it will match the OS and
architecture of the host the command is run on.
<programlisting>
$ nix-shell --packages skopeo jq --command "skopeo --override-os linux --override-arch x86_64 inspect docker://docker.io/nixos/nix:1.11 | jq -r '.Digest'"
sha256:20d9485b25ecfd89204e843a962c1bd70e9cc6858d65d7f5fadc340246e2116b
</programlisting>
This argument is required.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-3'>
<para>
<varname>finalImageTag</varname>, if specified, this is the tag of the
image to be created. Note it is never used to fetch the image since we
prefer to rely on the immutable digest ID. By default it's
<literal>latest</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-4'>
<para>
<varname>sha256</varname> is the checksum of the whole fetched image. This
argument is required.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-5'>
<para>
<varname>os</varname>, if specified, is the operating system of the
fetched image. By default it's <literal>linux</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-6'>
<para>
<varname>arch</varname>, if specified, is the cpu architecture of the
fetched image. By default it's <literal>x86_64</literal>.
</para>
</callout>
</calloutlist>
</section>
<section xml:id="ssec-pkgs-dockerTools-exportImage">
<title>exportImage</title>
<para>
This function is analogous to the <command>docker export</command> command,
in that it can be used to flatten a Docker image that contains multiple layers. It
is in fact the result of the merge of all the layers of the image. As such,
the result is suitable for being imported in Docker with <command>docker
import</command>.
</para>
<note>
<para>
Using this function requires the <literal>kvm</literal> device to be
available.
</para>
</note>
<para>
The parameters of <varname>exportImage</varname> are the following:
</para>
<example xml:id='ex-dockerTools-exportImage'>
<title>Docker export</title>
<programlisting>
exportImage {
fromImage = someLayeredImage;
fromImageName = null;
fromImageTag = null;
name = someLayeredImage.name;
}
</programlisting>
</example>
<para>
The parameters relative to the base image have the same synopsis as
described in <xref linkend='ssec-pkgs-dockerTools-buildImage'/>, except that
<varname>fromImage</varname> is the only required argument in this case.
</para>
<para>
The <varname>name</varname> argument is the name of the derivation output,
which defaults to <varname>fromImage.name</varname>.
</para>
</section>
<section xml:id="ssec-pkgs-dockerTools-shadowSetup">
<title>shadowSetup</title>
<para>
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 <varname>runAsRoot</varname>
<xref linkend='ex-dockerTools-buildImage-runAsRoot'/> script for cases like
in the example below:
</para>
<example xml:id='ex-dockerTools-shadowSetup'>
<title>Shadow base files</title>
<programlisting>
buildImage {
name = "shadow-basic";
runAsRoot = ''
#!${pkgs.runtimeShell}
${shadowSetup}
groupadd -r redis
useradd -r -g redis redis
mkdir /data
chown redis:redis /data
'';
}
</programlisting>
</example>
<para>
Creating base files like <literal>/etc/passwd</literal> or
<literal>/etc/login.defs</literal> is necessary for shadow-utils to
manipulate users and groups.
</para>
</section>
</section>

206
doc/functions/fetchers.xml Normal file
View File

@@ -0,0 +1,206 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-pkgs-fetchers">
<title>Fetcher functions</title>
<para>
When using Nix, you will frequently need to download source code
and other files from the internet. Nixpkgs comes with a few helper
functions that allow you to fetch fixed-output derivations in a
structured way.
</para>
<para>
The two fetcher primitives are <function>fetchurl</function> and
<function>fetchzip</function>. Both of these have two required
arguments, a URL and a hash. The hash is typically
<literal>sha256</literal>, although many more hash algorithms are
supported. Nixpkgs contributors are currently recommended to use
<literal>sha256</literal>. This hash will be used by Nix to
identify your source. A typical usage of fetchurl is provided
below.
</para>
<programlisting><![CDATA[
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "hello";
src = fetchurl {
url = "http://www.example.org/hello.tar.gz";
sha256 = "1111111111111111111111111111111111111111111111111111";
};
}
]]></programlisting>
<para>
The main difference between <function>fetchurl</function> and
<function>fetchzip</function> is in how they store the contents.
<function>fetchurl</function> will store the unaltered contents of
the URL within the Nix store. <function>fetchzip</function> on the
other hand will decompress the archive for you, making files and
directories directly accessible in the future.
<function>fetchzip</function> can only be used with archives.
Despite the name, <function>fetchzip</function> is not limited to
.zip files and can also be used with any tarball.
</para>
<para>
<function>fetchpatch</function> works very similarly to
<function>fetchurl</function> with the same arguments expected. It
expects patch files as a source and 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.
</para>
<para>
Other fetcher functions allow you to add source code directly from
a VCS such as subversion or git. These are mostly straightforward
names based on the name of the command used with the VCS system.
Because they give you a working repository, they act most like
<function>fetchzip</function>.
</para>
<variablelist>
<varlistentry>
<term>
<literal>fetchsvn</literal>
</term>
<listitem>
<para>
Used with Subversion. Expects <literal>url</literal> to a
Subversion directory, <literal>rev</literal>, and
<literal>sha256</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>fetchgit</literal>
</term>
<listitem>
<para>
Used with Git. Expects <literal>url</literal> to a Git repo,
<literal>rev</literal>, and <literal>sha256</literal>.
<literal>rev</literal> in this case can be full the git commit
id (SHA1 hash) or a tag name like
<literal>refs/tags/v1.0</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>fetchfossil</literal>
</term>
<listitem>
<para>
Used with Fossil. Expects <literal>url</literal> to a Fossil
archive, <literal>rev</literal>, and <literal>sha256</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>fetchcvs</literal>
</term>
<listitem>
<para>
Used with CVS. Expects <literal>cvsRoot</literal>,
<literal>tag</literal>, and <literal>sha256</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>fetchhg</literal>
</term>
<listitem>
<para>
Used with Mercurial. Expects <literal>url</literal>,
<literal>rev</literal>, and <literal>sha256</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
A number of fetcher functions wrap part of
<function>fetchurl</function> and <function>fetchzip</function>.
They are mainly convenience functions intended for commonly used
destinations of source code in Nixpkgs. These wrapper fetchers are
listed below.
</para>
<variablelist>
<varlistentry>
<term>
<literal>fetchFromGitHub</literal>
</term>
<listitem>
<para>
<function>fetchFromGitHub</function> expects four arguments.
<literal>owner</literal> is a string corresponding to the
GitHub user or organization that controls this repository.
<literal>repo</literal> corresponds to the name of the
software repository. These are located at the top of every
GitHub HTML page as
<literal>owner</literal>/<literal>repo</literal>.
<literal>rev</literal> corresponds to the Git commit hash or
tag (e.g <literal>v1.0</literal>) that will be downloaded from
Git. Finally, <literal>sha256</literal> corresponds to the
hash of the extracted directory. Again, other hash algorithms
are also available but <literal>sha256</literal> is currently
preferred.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>fetchFromGitLab</literal>
</term>
<listitem>
<para>
This is used with GitLab repositories. The arguments expected
are very similar to fetchFromGitHub above.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>fetchFromBitbucket</literal>
</term>
<listitem>
<para>
This is used with BitBucket repositories. The arguments expected
are very similar to fetchFromGitHub above.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>fetchFromSavannah</literal>
</term>
<listitem>
<para>
This is used with Savannah repositories. The arguments expected
are very similar to fetchFromGitHub above.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>fetchFromRepoOrCz</literal>
</term>
<listitem>
<para>
This is used with repo.or.cz repositories. The arguments
expected are very similar to fetchFromGitHub above.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>

View File

@@ -0,0 +1,142 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-fhs-environments">
<title>buildFHSUserEnv</title>
<para>
<function>buildFHSUserEnv</function> provides a way to build and run
FHS-compatible lightweight sandboxes. It creates an isolated root with bound
<filename>/nix/store</filename>, so its footprint in terms of disk space
needed is quite small. This allows one to run software which is hard or
unfeasible to patch for NixOS -- 3rd-party source trees with FHS assumptions,
games distributed as tarballs, software with integrity checking and/or
external self-updated binaries. It uses Linux namespaces feature to create
temporary lightweight environments which are destroyed after all child
processes exit, without root user rights requirement. Accepted arguments are:
</para>
<variablelist>
<varlistentry>
<term>
<literal>name</literal>
</term>
<listitem>
<para>
Environment name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>targetPkgs</literal>
</term>
<listitem>
<para>
Packages to be installed for the main host's architecture (i.e. x86_64 on
x86_64 installations). Along with libraries binaries are also installed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>multiPkgs</literal>
</term>
<listitem>
<para>
Packages to be installed for all architectures supported by a host (i.e.
i686 and x86_64 on x86_64 installations). Only libraries are installed by
default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>extraBuildCommands</literal>
</term>
<listitem>
<para>
Additional commands to be executed for finalizing the directory structure.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>extraBuildCommandsMulti</literal>
</term>
<listitem>
<para>
Like <literal>extraBuildCommands</literal>, but executed only on multilib
architectures.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>extraOutputsToInstall</literal>
</term>
<listitem>
<para>
Additional derivation outputs to be linked for both target and
multi-architecture packages.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>extraInstallCommands</literal>
</term>
<listitem>
<para>
Additional commands to be executed for finalizing the derivation with
runner script.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>runScript</literal>
</term>
<listitem>
<para>
A command that would be executed inside the sandbox and passed all the
command line arguments. It defaults to <literal>bash</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
One can create a simple environment using a <literal>shell.nix</literal> like
that:
</para>
<programlisting><![CDATA[
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "simple-x11-env";
targetPkgs = pkgs: (with pkgs;
[ udev
alsaLib
]) ++ (with pkgs.xorg;
[ libX11
libXcursor
libXrandr
]);
multiPkgs = pkgs: (with pkgs;
[ udev
alsaLib
]);
runScript = "bash";
}).env
]]></programlisting>
<para>
Running <literal>nix-shell</literal> would then drop you into a shell with
these libraries and binaries available. You can use this to run closed-source
applications which expect FHS structure without hassles: simply change
<literal>runScript</literal> to the application path, e.g.
<filename>./bin/start.sh</filename> -- relative paths are supported.
</para>
</section>

View File

@@ -1,56 +0,0 @@
# Generators {#sec-generators}
Generators are functions that create file formats from nix data structures, e.g. for configuration files. There are generators available for: `INI`, `JSON` and `YAML`
All generators follow a similar call interface: `generatorName configFunctions data`, where `configFunctions` is an attrset of user-defined functions that format nested parts of the content. They each have common defaults, so often they do not need to be set manually. An example is `mkSectionName ? (name: libStr.escape [ "[" "]" ] name)` from the `INI` generator. It receives the name of a section and sanitizes it. The default `mkSectionName` escapes `[` and `]` with a backslash.
Generators can be fine-tuned to produce exactly the file format required by your application/service. One example is an INI-file format which uses `: ` as separator, the strings `"yes"`/`"no"` as boolean values and requires all string values to be quoted:
```nix
with lib;
let
customToINI = generators.toINI {
# specifies how to format a key/value pair
mkKeyValue = generators.mkKeyValueDefault {
# specifies the generated string for a subset of nix values
mkValueString = v:
if v == true then ''"yes"''
else if v == false then ''"no"''
else if isString v then ''"${v}"''
# and delegates all other values to the default generator
else generators.mkValueStringDefault {} v;
} ":";
};
# the INI file can now be given as plain old nix values
in customToINI {
main = {
pushinfo = true;
autopush = false;
host = "localhost";
port = 42;
};
mergetool = {
merge = "diff3";
};
}
```
This will produce the following INI file as nix string:
```INI
[main]
autopush:"no"
host:"localhost"
port:42
pushinfo:"yes"
str\:ange:"very::strange"
[mergetool]
merge:"diff3"
```
::: {.note}
Nix store paths can be converted to strings by enclosing a derivation attribute like so: `"${drv}"`.
:::
Detailed documentation for each generator can be found in `lib/generators.nix`.

View File

@@ -0,0 +1,89 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-generators">
<title>Generators</title>
<para>
Generators are functions that create file formats from nix data structures,
e.g. for configuration files. There are generators available for:
<literal>INI</literal>, <literal>JSON</literal> and <literal>YAML</literal>
</para>
<para>
All generators follow a similar call interface: <code>generatorName
configFunctions data</code>, where <literal>configFunctions</literal> is an
attrset of user-defined functions that format nested parts of the content.
They each have common defaults, so often they do not need to be set manually.
An example is <code>mkSectionName ? (name: libStr.escape [ "[" "]" ]
name)</code> from the <literal>INI</literal> generator. It receives the name
of a section and sanitizes it. The default <literal>mkSectionName</literal>
escapes <literal>[</literal> and <literal>]</literal> with a backslash.
</para>
<para>
Generators can be fine-tuned to produce exactly the file format required by
your application/service. One example is an INI-file format which uses
<literal>: </literal> as separator, the strings
<literal>"yes"</literal>/<literal>"no"</literal> as boolean values and
requires all string values to be quoted:
</para>
<programlisting>
with lib;
let
customToINI = generators.toINI {
# specifies how to format a key/value pair
mkKeyValue = generators.mkKeyValueDefault {
# specifies the generated string for a subset of nix values
mkValueString = v:
if v == true then ''"yes"''
else if v == false then ''"no"''
else if isString v then ''"${v}"''
# and delegats all other values to the default generator
else generators.mkValueStringDefault {} v;
} ":";
};
# the INI file can now be given as plain old nix values
in customToINI {
main = {
pushinfo = true;
autopush = false;
host = "localhost";
port = 42;
};
mergetool = {
merge = "diff3";
};
}
</programlisting>
<para>
This will produce the following INI file as nix string:
</para>
<programlisting>
[main]
autopush:"no"
host:"localhost"
port:42
pushinfo:"yes"
str\:ange:"very::strange"
[mergetool]
merge:"diff3"
</programlisting>
<note>
<para>
Nix store paths can be converted to strings by enclosing a derivation
attribute like so: <code>"${drv}"</code>.
</para>
</note>
<para>
Detailed documentation for each generator can be found in
<literal>lib/generators.nix</literal>.
</para>
</section>

View File

@@ -1,5 +0,0 @@
# Nixpkgs Library Functions {#sec-functions-library}
Nixpkgs provides a standard library at `pkgs.lib`, or through `import <nixpkgs/lib>`.
<!-- nixdoc-generated documentation must be appended here during build! -->

24
doc/functions/library.xml Normal file
View File

@@ -0,0 +1,24 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-functions-library">
<title>Nixpkgs Library Functions</title>
<para>
Nixpkgs provides a standard library at <varname>pkgs.lib</varname>, or
through <code>import &lt;nixpkgs/lib&gt;</code>.
</para>
<xi:include href="./library/asserts.xml" />
<xi:include href="./library/attrsets.xml" />
<!-- These docs are generated via nixdoc. To add another generated
library function file to this list, the file
`lib-function-docs.nix` must also be updated. -->
<xi:include href="./library/generated/strings.xml" />
<xi:include href="./library/generated/trivial.xml" />
<xi:include href="./library/generated/lists.xml" />
<xi:include href="./library/generated/debug.xml" />
<xi:include href="./library/generated/options.xml" />
</section>

View File

@@ -0,0 +1,117 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-functions-library-asserts">
<title>Assert functions</title>
<section xml:id="function-library-lib.asserts.assertMsg">
<title><function>lib.asserts.assertMsg</function></title>
<subtitle><literal>assertMsg :: Bool -> String -> Bool</literal>
</subtitle>
<xi:include href="./locations.xml" xpointer="lib.asserts.assertMsg" />
<para>
Print a trace message if <literal>pred</literal> is false.
</para>
<para>
Intended to be used to augment asserts with helpful error messages.
</para>
<variablelist>
<varlistentry>
<term>
<varname>pred</varname>
</term>
<listitem>
<para>
Condition under which the <varname>msg</varname> should
<emphasis>not</emphasis> be printed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>msg</varname>
</term>
<listitem>
<para>
Message to print.
</para>
</listitem>
</varlistentry>
</variablelist>
<example xml:id="function-library-lib.asserts.assertMsg-example-false">
<title>Printing when the predicate is false</title>
<programlisting><![CDATA[
assert lib.asserts.assertMsg ("foo" == "bar") "foo is not bar, silly"
stderr> trace: foo is not bar, silly
stderr> assert failed
]]></programlisting>
</example>
</section>
<section xml:id="function-library-lib.asserts.assertOneOf">
<title><function>lib.asserts.assertOneOf</function></title>
<subtitle><literal>assertOneOf :: String -> String ->
StringList -> Bool</literal>
</subtitle>
<xi:include href="./locations.xml" xpointer="lib.asserts.assertOneOf" />
<para>
Specialized <function>asserts.assertMsg</function> for checking if
<varname>val</varname> is one of the elements of <varname>xs</varname>.
Useful for checking enums.
</para>
<variablelist>
<varlistentry>
<term>
<varname>name</varname>
</term>
<listitem>
<para>
The name of the variable the user entered <varname>val</varname> into,
for inclusion in the error message.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>val</varname>
</term>
<listitem>
<para>
The value of what the user provided, to be compared against the values in
<varname>xs</varname>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>xs</varname>
</term>
<listitem>
<para>
The list of valid values.
</para>
</listitem>
</varlistentry>
</variablelist>
<example xml:id="function-library-lib.asserts.assertOneOf-example">
<title>Ensuring a user provided a possible value</title>
<programlisting><![CDATA[
let sslLibrary = "bearssl";
in lib.asserts.assertOneOf "sslLibrary" sslLibrary [ "openssl" "bearssl" ];
=> false
stderr> trace: sslLibrary must be one of "openssl", "libressl", but is: "bearssl"
]]></programlisting>
</example>
</section>
</section>

File diff suppressed because it is too large Load Diff

View File

@@ -1,49 +0,0 @@
# pkgs.nix-gitignore {#sec-pkgs-nix-gitignore}
`pkgs.nix-gitignore` is a function that acts similarly to `builtins.filterSource` but also allows filtering with the help of the gitignore format.
## Usage {#sec-pkgs-nix-gitignore-usage}
`pkgs.nix-gitignore` exports a number of functions, but you'll most likely need either `gitignoreSource` or `gitignoreSourcePure`. As their first argument, they both accept either 1. a file with gitignore lines or 2. a string with gitignore lines, or 3. a list of either of the two. They will be concatenated into a single big string.
```nix
{ pkgs ? import <nixpkgs> {} }:
nix-gitignore.gitignoreSource [] ./source
# Simplest version
nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source
# This one reads the ./source/.gitignore and concats the auxiliary ignores
nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source
# Use this string as gitignore, don't read ./source/.gitignore.
nix-gitignore.gitignoreSourcePure ["ignore-this\nignore-that\n", ~/.gitignore] ./source
# It also accepts a list (of strings and paths) that will be concatenated
# once the paths are turned to strings via readFile.
```
These functions are derived from the `Filter` functions by setting the first filter argument to `(_: _: true)`:
```nix
gitignoreSourcePure = gitignoreFilterSourcePure (_: _: true);
gitignoreSource = gitignoreFilterSource (_: _: true);
```
Those filter functions accept the same arguments the `builtins.filterSource` function would pass to its filters, thus `fn: gitignoreFilterSourcePure fn ""` should be extensionally equivalent to `filterSource`. The file is blacklisted if it's blacklisted by either your filter or the gitignoreFilter.
If you want to make your own filter from scratch, you may use
```nix
gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
```
## gitignore files in subdirectories {#sec-pkgs-nix-gitignore-usage-recursive}
If you wish to use a filter that would search for .gitignore files in subdirectories, just like git does by default, use this function:
```nix
gitignoreFilterRecursiveSource = filter: patterns: root:
# OR
gitignoreRecursiveSource = gitignoreFilterSourcePure (_: _: true);
```

View File

@@ -0,0 +1,78 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-pkgs-nix-gitignore">
<title>pkgs.nix-gitignore</title>
<para>
<function>pkgs.nix-gitignore</function> is a function that acts similarly to
<literal>builtins.filterSource</literal> but also allows filtering with the
help of the gitignore format.
</para>
<section xml:id="sec-pkgs-nix-gitignore-usage">
<title>Usage</title>
<para>
<literal>pkgs.nix-gitignore</literal> exports a number of functions, but
you'll most likely need either <literal>gitignoreSource</literal> or
<literal>gitignoreSourcePure</literal>. As their first argument, they both
accept either 1. a file with gitignore lines or 2. a string
with gitignore lines, or 3. a list of either of the two. They will be
concatenated into a single big string.
</para>
<programlisting><![CDATA[
{ pkgs ? import <nixpkgs> {} }:
nix-gitignore.gitignoreSource [] ./source
# Simplest version
nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source
# This one reads the ./source/.gitignore and concats the auxiliary ignores
nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source
# Use this string as gitignore, don't read ./source/.gitignore.
nix-gitignore.gitignoreSourcePure ["ignore-this\nignore-that\n", ~/.gitignore] ./source
# It also accepts a list (of strings and paths) that will be concatenated
# once the paths are turned to strings via readFile.
]]></programlisting>
<para>
These functions are derived from the <literal>Filter</literal> functions
by setting the first filter argument to <literal>(_: _: true)</literal>:
</para>
<programlisting><![CDATA[
gitignoreSourcePure = gitignoreFilterSourcePure (_: _: true);
gitignoreSource = gitignoreFilterSource (_: _: true);
]]></programlisting>
<para>
Those filter functions accept the same arguments the <literal>builtins.filterSource</literal> function would pass to its filters, thus <literal>fn: gitignoreFilterSourcePure fn ""</literal> should be extensionally equivalent to <literal>filterSource</literal>. The file is blacklisted iff it's blacklisted by either your filter or the gitignoreFilter.
</para>
<para>
If you want to make your own filter from scratch, you may use
</para>
<programlisting><![CDATA[
gitignoreFilter = ign: root: filterPattern (gitignoreToPatterns ign) root;
]]></programlisting>
</section>
<section xml:id="sec-pkgs-nix-gitignore-usage-recursive">
<title>gitignore files in subdirectories</title>
<para>
If you wish to use a filter that would search for .gitignore files in subdirectories, just like git does by default, use this function:
</para>
<programlisting><![CDATA[
gitignoreFilterRecursiveSource = filter: patterns: root:
# OR
gitignoreRecursiveSource = gitignoreFilterSourcePure (_: _: true);
]]></programlisting>
</section>
</section>

212
doc/functions/overrides.xml Normal file
View File

@@ -0,0 +1,212 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-overrides">
<title>Overriding</title>
<para>
Sometimes one wants to override parts of <literal>nixpkgs</literal>, e.g.
derivation attributes, the results of derivations.
</para>
<para>
These functions are used to make changes to packages, returning only single
packages. <link xlink:href="#chap-overlays">Overlays</link>, on the other
hand, can be used to combine the overridden packages across the entire
package set of Nixpkgs.
</para>
<section xml:id="sec-pkg-override">
<title>&lt;pkg&gt;.override</title>
<para>
The function <varname>override</varname> is usually available for all the
derivations in the nixpkgs expression (<varname>pkgs</varname>).
</para>
<para>
It is used to override the arguments passed to a function.
</para>
<para>
Example usages:
<programlisting>pkgs.foo.override { arg1 = val1; arg2 = val2; ... }</programlisting>
<!-- TODO: move below programlisting to a new section about extending and overlays
and reference it
-->
<programlisting>
import pkgs.path { overlays = [ (self: super: {
foo = super.foo.override { barSupport = true ; };
})]};
</programlisting>
<programlisting>
mypkg = pkgs.callPackage ./mypkg.nix {
mydep = pkgs.mydep.override { ... };
}
</programlisting>
</para>
<para>
In the first example, <varname>pkgs.foo</varname> is the result of a
function call with some default arguments, usually a derivation. Using
<varname>pkgs.foo.override</varname> will call the same function with the
given new arguments.
</para>
</section>
<section xml:id="sec-pkg-overrideAttrs">
<title>&lt;pkg&gt;.overrideAttrs</title>
<para>
The function <varname>overrideAttrs</varname> allows overriding the
attribute set passed to a <varname>stdenv.mkDerivation</varname> call,
producing a new derivation based on the original one. This function is
available on all derivations produced by the
<varname>stdenv.mkDerivation</varname> function, which is most packages in
the nixpkgs expression <varname>pkgs</varname>.
</para>
<para>
Example usage:
<programlisting>
helloWithDebug = pkgs.hello.overrideAttrs (oldAttrs: rec {
separateDebugInfo = true;
});
</programlisting>
</para>
<para>
In the above example, the <varname>separateDebugInfo</varname> attribute is
overridden to be true, thus building debug info for
<varname>helloWithDebug</varname>, while all other attributes will be
retained from the original <varname>hello</varname> package.
</para>
<para>
The argument <varname>oldAttrs</varname> is conventionally used to refer to
the attr set originally passed to <varname>stdenv.mkDerivation</varname>.
</para>
<note>
<para>
Note that <varname>separateDebugInfo</varname> is processed only by the
<varname>stdenv.mkDerivation</varname> function, not the generated, raw Nix
derivation. Thus, using <varname>overrideDerivation</varname> will not work
in this case, as it overrides only the attributes of the final derivation.
It is for this reason that <varname>overrideAttrs</varname> should be
preferred in (almost) all cases to <varname>overrideDerivation</varname>,
i.e. to allow using <varname>stdenv.mkDerivation</varname> to process input
arguments, as well as the fact that it is easier to use (you can use the
same attribute names you see in your Nix code, instead of the ones
generated (e.g. <varname>buildInputs</varname> vs
<varname>nativeBuildInputs</varname>), and it involves less typing).
</para>
</note>
</section>
<section xml:id="sec-pkg-overrideDerivation">
<title>&lt;pkg&gt;.overrideDerivation</title>
<warning>
<para>
You should prefer <varname>overrideAttrs</varname> in almost all cases, see
its documentation for the reasons why.
<varname>overrideDerivation</varname> is not deprecated and will continue
to work, but is less nice to use and does not have as many abilities as
<varname>overrideAttrs</varname>.
</para>
</warning>
<warning>
<para>
Do not use this function in Nixpkgs as it evaluates a Derivation before
modifying it, which breaks package abstraction and removes error-checking
of function arguments. In addition, this evaluation-per-function
application incurs a performance penalty, which can become a problem if
many overrides are used. It is only intended for ad-hoc customisation, such
as in <filename>~/.config/nixpkgs/config.nix</filename>.
</para>
</warning>
<para>
The function <varname>overrideDerivation</varname> creates a new derivation
based on an existing one by overriding the original's attributes with the
attribute set produced by the specified function. This function is available
on all derivations defined using the <varname>makeOverridable</varname>
function. Most standard derivation-producing functions, such as
<varname>stdenv.mkDerivation</varname>, are defined using this function,
which means most packages in the nixpkgs expression,
<varname>pkgs</varname>, have this function.
</para>
<para>
Example usage:
<programlisting>
mySed = pkgs.gnused.overrideDerivation (oldAttrs: {
name = "sed-4.2.2-pre";
src = fetchurl {
url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;
sha256 = "11nq06d131y4wmf3drm0yk502d2xc6n5qy82cg88rb9nqd2lj41k";
};
patches = [];
});
</programlisting>
</para>
<para>
In the above example, the <varname>name</varname>, <varname>src</varname>,
and <varname>patches</varname> of the derivation will be overridden, while
all other attributes will be retained from the original derivation.
</para>
<para>
The argument <varname>oldAttrs</varname> is used to refer to the attribute
set of the original derivation.
</para>
<note>
<para>
A package's attributes are evaluated *before* being modified by the
<varname>overrideDerivation</varname> function. For example, the
<varname>name</varname> attribute reference in <varname>url =
"mirror://gnu/hello/${name}.tar.gz";</varname> is filled-in *before* the
<varname>overrideDerivation</varname> function modifies the attribute set.
This means that overriding the <varname>name</varname> attribute, in this
example, *will not* change the value of the <varname>url</varname>
attribute. Instead, we need to override both the <varname>name</varname>
*and* <varname>url</varname> attributes.
</para>
</note>
</section>
<section xml:id="sec-lib-makeOverridable">
<title>lib.makeOverridable</title>
<para>
The function <varname>lib.makeOverridable</varname> is used to make the
result of a function easily customizable. This utility only makes sense for
functions that accept an argument set and return an attribute set.
</para>
<para>
Example usage:
<programlisting>
f = { a, b }: { result = a+b; };
c = lib.makeOverridable f { a = 1; b = 2; };
</programlisting>
</para>
<para>
The variable <varname>c</varname> is the value of the <varname>f</varname>
function applied with some default arguments. Hence the value of
<varname>c.result</varname> is <literal>3</literal>, in this example.
</para>
<para>
The variable <varname>c</varname> however also has some additional
functions, like <link linkend="sec-pkg-override">c.override</link> which can
be used to override the default arguments. In this example the value of
<varname>(c.override { a = 4; }).result</varname> is 6.
</para>
</section>
</section>

View File

@@ -1,17 +0,0 @@
# prefer-remote-fetch overlay {#sec-prefer-remote-fetch}
`prefer-remote-fetch` is an overlay that download sources on remote builder. This is useful when the evaluating machine has a slow upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay:
```nix
self: super:
(super.prefer-remote-fetch self super)
```
A full configuration example for that sets the overlay up for your own account, could look like this
```ShellSession
$ mkdir ~/.config/nixpkgs/overlays/
$ cat > ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix <<EOF
self: super: super.prefer-remote-fetch self super
EOF
```

View File

@@ -0,0 +1,27 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/xinclude"
xml:id="sec-prefer-remote-fetch">
<title>prefer-remote-fetch overlay</title>
<para>
<function>prefer-remote-fetch</function> is an overlay that download sources
on remote builder. This is useful when the evaluating machine has a slow
upload while the builder can fetch faster directly from the source.
To use it, put the following snippet as a new overlay:
<programlisting>
self: super:
(super.prefer-remote-fetch self super)
</programlisting>
A full configuration example for that sets the overlay up for your own account,
could look like this
<programlisting>
$ mkdir ~/.config/nixpkgs/overlays/
$ cat &gt; ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix &lt;&lt;EOF
self: super: super.prefer-remote-fetch self super
EOF
</programlisting>
</para>
</section>

26
doc/functions/shell.xml Normal file
View File

@@ -0,0 +1,26 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-pkgs-mkShell">
<title>pkgs.mkShell</title>
<para>
<function>pkgs.mkShell</function> is a special kind of derivation that is
only useful when using it combined with <command>nix-shell</command>. It will
in fact fail to instantiate when invoked with <command>nix-build</command>.
</para>
<section xml:id="sec-pkgs-mkShell-usage">
<title>Usage</title>
<programlisting><![CDATA[
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
# this will make all the build inputs from hello and gnutar
# available to the shell environment
inputsFrom = with pkgs; [ hello gnutar ];
buildInputs = [ pkgs.gnumake ];
}
]]></programlisting>
</section>
</section>

View File

@@ -0,0 +1,124 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-trivial-builders">
<title>Trivial builders</title>
<para>
Nixpkgs provides a couple of functions that help with building
derivations. The most important one,
<function>stdenv.mkDerivation</function>, has already been
documented above. The following functions wrap
<function>stdenv.mkDerivation</function>, making it easier to use
in certain cases.
</para>
<variablelist>
<varlistentry>
<term>
<literal>runCommand</literal>
</term>
<listitem>
<para>
This takes three arguments, <literal>name</literal>,
<literal>env</literal>, and <literal>buildCommand</literal>.
<literal>name</literal> is just the name that Nix will append
to the store path in the same way that
<literal>stdenv.mkDerivation</literal> uses its
<literal>name</literal> attribute. <literal>env</literal> is an
attribute set specifying environment variables that will be set
for this derivation. These attributes are then passed to the
wrapped <literal>stdenv.mkDerivation</literal>.
<literal>buildCommand</literal> specifies the commands that
will be run to create this derivation. Note that you will need
to create <literal>$out</literal> for Nix to register the
command as successful.
</para>
<para>
An example of using <literal>runCommand</literal> is provided
below.
</para>
<programlisting>
(import &lt;nixpkgs&gt; {}).runCommand "my-example" {} ''
echo My example command is running
mkdir $out
echo I can write data to the Nix store > $out/message
echo I can also run basic commands like:
echo ls
ls
echo whoami
whoami
echo date
date
''
</programlisting>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>runCommandCC</literal>
</term>
<listitem>
<para>
This works just like <literal>runCommand</literal>. The only
difference is that it also provides a C compiler in
<literal>buildCommand</literal>s environment. To minimize your
dependencies, you should only use this if you are sure you will
need a C compiler as part of running your command.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>writeTextFile</literal>, <literal>writeText</literal>,
<literal>writeTextDir</literal>, <literal>writeScript</literal>,
<literal>writeScriptBin</literal>
</term>
<listitem>
<para>
These functions write <literal>text</literal> to the Nix store.
This is useful for creating scripts from Nix expressions.
<literal>writeTextFile</literal> takes an attribute set and
expects two arguments, <literal>name</literal> and
<literal>text</literal>. <literal>name</literal> corresponds to
the name used in the Nix store path. <literal>text</literal>
will be the contents of the file. You can also set
<literal>executable</literal> to true to make this file have
the executable bit set.
</para>
<para>
Many more commands wrap <literal>writeTextFile</literal>
including <literal>writeText</literal>,
<literal>writeTextDir</literal>,
<literal>writeScript</literal>, and
<literal>writeScriptBin</literal>. These are convenience
functions over <literal>writeTextFile</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<literal>symlinkJoin</literal>
</term>
<listitem>
<para>
This can be used to put many derivations into the same directory
structure. It works by creating a new derivation and adding
symlinks to each of the paths listed. It expects two arguments,
<literal>name</literal>, and <literal>paths</literal>.
<literal>name</literal> is the name used in the Nix store path
for the created derivation. <literal>paths</literal> is a list of
paths that will be symlinked. These paths can be to Nix store
derivations or any other subdirectory contained within.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>

View File

@@ -1,3 +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,3 +0,0 @@
# Automake {#setup-hook-automake}
Adds the `share/aclocal` subdirectory of each build input to the `ACLOCAL_PATH` environment variable.

View File

@@ -1,11 +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 `[ "*" ]` 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,7 +0,0 @@
# bmake {#bmake-hook}
[bmake](https://www.crufty.net/help/sjg/bmake.html) is the portable variant of
NetBSD make utility.
In Nixpkgs, `bmake` comes with a hook that overrides the default build, check,
install and dist phases.

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