Compare commits

..

788 Commits

Author SHA1 Message Date
Vladimír Čunát
120b013e0c 18.03 release notes: final edits
(cherry picked from commit 0bee079d97)
2018-04-04 09:02:31 +02:00
Tim Steinbach
e4cc8c1397 openjdk10: Use included cacerts
(cherry picked from commit a415963ef7464d7ce8f9c73684728625e83d8d63)
2018-04-03 19:18:25 -04:00
Franz Pletz
ca6b64ae7b nixos/version: fix nixops pre 1.6 compatibility
We should be able to deploy a NixOS 18.03 system with the current nixops
stable release. Some options were renamed, so instead of
`mkRenamedOptionModule` we introduce them as read-only interal options
that won't be rendered in the manual.

Only the options that are needed to make nixops evaluations succeed were
added.

This commit should probably be reverted after or before the 18.09 release,
depending on the nixops 1.6 release.

The user will not get the warning that these have been renamed but
this change is mentioned in the release notes.

Fixes #34253.

(cherry picked from commit 70c6f6572d)
2018-04-04 00:10:21 +02:00
Maximilian Bode
cbccde97dd tectonic: fix darwin build
(cherry picked from commit 8f2102def6)
2018-04-03 22:08:42 +02:00
Matthieu Coudron
d5c26dd063 qemu-vm: passing QEMU_NET_OPTS would fail
because of a change in #36850.
spotted by @jtojnar b7a2333ebe (commitcomment-28134992)

(cherry picked from commit 33b0ad83e9)
2018-04-03 17:57:17 +02:00
Samuel Dionne-Riel
251bc50e95 dbeaver: 4.3.3 -> 5.0.2
(cherry picked from commit a829977561)

Reason: backports the current revision of the software.
2018-04-03 22:01:43 +08:00
Tuomas Tynkkynen
43f1db5b0d nixos/sd-image-*: Raspberry Pi firmware no longer falls under unfree
It's just unfreeRedistributableFirmware now.

(cherry picked from commit 1e5cb384d5)
2018-04-03 00:13:17 +03:00
Tuomas Tynkkynen
c1c01c7848 raspberrypifw: Drop all non-firmware parts
They are now built from source in raspberrypi-tools.

(cherry picked from commit b59f9497aa)
2018-04-03 00:13:10 +03:00
Tuomas Tynkkynen
d93b08e6d2 raspberrypi-tools: Init at 2018-02-05
(cherry picked from commit 434722ba62)
2018-04-03 00:13:08 +03:00
Tuomas Tynkkynen
c51459026a nixos/release.nix: Add Hydra job for AArch64 SD image
Based on how ISO images are added to the release.

(cherry picked from commit 181e0675da)
2018-04-03 00:12:53 +03:00
Tuomas Tynkkynen
ac447b0524 nixos/sd-image: Make it more similar to iso-image.nix
- Add `imageName` and `imageBaseName` options similar to the `isoName`
  and `isoBaseName` options
- Make the filename of the iso match what iso-image.nix does
- Generate a nix-support/hydra-build-products like iso-image.nix does

(cherry picked from commit 4c21180a13)
2018-04-03 00:12:18 +03:00
Nikolay Amiantov
47caeb1272 nodePackages.parsoid: pin service-runner to 2.3.0
service-runner had a backwards incompatible update, and parsoid 0.9.0
doesn't work with current stable MediaWiki. Instead use as a source
a repository with 0.8.0 and pinned service-runner version.

(cherry picked from commit 37546be900)
2018-04-02 22:43:02 +03:00
Sébastien Maccagnoni
5bcdc86715 nodePackages vue-cli: init at 2.9.3 (#36391)
(cherry picked from commit e8ad790710)
2018-04-02 22:42:37 +03:00
Peter Romfeld
ecb39c43c2 nodePackages_8_x.swagger: init at 0.7.5
(cherry picked from commit 72e8987068)
2018-04-02 22:42:08 +03:00
Michael Raskin
d7aa359bcd Merge pull request #38331 from r-ryantm/auto-update/veracrypt
veracrypt: 1.21 -> 1.22
(cherry picked from commit cace5017cb)
2018-04-02 17:53:19 +02:00
Vladimír Čunát
bc632a2f55 Merge branch 'staging-18.03' into release-18.03 2018-04-02 17:13:45 +02:00
Vladimír Čunát
b3c938bfeb Merge: systemd: 238 -> 237 (downgrade!)
Let's be conservative and stay with version we've been testing
on unstable/master for a long time.
Discussion on https://github.com/NixOS/nixpkgs/commit/6b9771e4a
2018-04-02 12:14:59 +02:00
Vladimír Čunát
6684b3e160 Merge branch 'release-18.03' into staging-18.03 2018-04-02 12:14:42 +02:00
Vladimír Čunát
b2bc3db8f5 Revert "systemd: 237 -> 238"
This reverts commit 2d2ab94cd2.
2018-04-02 12:10:54 +02:00
Vladimír Čunát
b39bb9bead Revert "systemd: use stable tree"
This reverts commit 48856a91c0.
2018-04-02 12:10:51 +02:00
Vladimír Čunát
a6d00d0d8f nixos.tests.containers-imperative: fix impurity failure
I can't claim to fully understand this, but the change seems safe,
and it fixes the test on my machine.

(cherry picked from commit 75e4d3f2f0)
2018-04-02 11:43:02 +02:00
xeji
f0c713c813 pythonPackages.python-gnupg: 0.4.1 -> 0.4.2 2018-04-02 03:53:48 -05:00
xeji
9af18ff545 ixgbevf: 4.3.3 -> 4.3.4
4.3.3 didn't build with linux 4.15

(cherry picked from commit a7435092c0)
2018-04-02 03:44:03 -05:00
Austin Seipp
9331411a27 timescaledb: 0.6.0 -> 0.9.1
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 6ac2b11d13)
2018-04-02 03:44:03 -05:00
Vladimír Čunát
652a754cad Merge #38133: dwb: remove abandoned package
cf. https://wiki.archlinux.org/index.php/dwb

(cherry picked from commit 333245e852)
2018-04-02 10:04:27 +02:00
rnhmjoj
09bca91e3b monero-gui: 0.11.1.0 -> 2018-03-31
(cherry picked from commit e0fbaaa595)
2018-04-02 00:46:19 +02:00
rnhmjoj
ba239f468f monero: cleanup
(cherry picked from commit 6545d15020)
2018-04-02 00:46:19 +02:00
Piotr Bogdan
1dd960f66e buildGoPackage: use a separator when joining extraSrcPaths together
(cherry picked from commit d1fad21401)
2018-04-02 00:37:47 +02:00
xeji
f67968cdfa pythonPackages.root_numpy: fix build
checkPhase must use nosetest

(cherry picked from commit ebd4d38651)
2018-04-02 00:33:25 +02:00
xeji
79910a4452 pythonPackages.smart_open: fix build, 1.5.6 -> 1.5.7
(cherry picked from commit 3ea8574f17)
2018-04-02 00:33:24 +02:00
Franz Pletz
27974ed369 nixos/unbound: don't fail on root trust anchor updates
Exit code on updates is 1 which makes the inital start of unbound fail.

(cherry picked from commit 35f474d61d)
2018-04-01 23:57:43 +02:00
xeji
da36dfff14 pythonPackages.imbalanced-learn: 0.3.2 -> 0.3.3, fix build
minor bump, fix tests, move to development/python-modules

(cherry picked from commit 6b2bc4b5d1)
2018-04-01 11:13:21 +02:00
Vladimír Čunát
154e0a254a knot-resolver: fix /bin/sh impurity
Manifestation in this case: ./scripts/embed-lua.sh: line 4: alias: not found

(cherry picked from commit 366ae3dfe0)
2018-04-01 10:53:53 +02:00
Johannes Lötzsch
829d2cdb5c monitoring-plugins: fix typo in meta (#38259)
(cherry picked from commit 2e566aaf95)
2018-04-01 10:53:52 +02:00
Dan Lidral-Porter
021ee7d93b gflags: build on case-insensitive FSs, add meta
Darwin machines come with a case-insensitive filesystem by default. The
gflags package's source contains a file 'BUILD' and the build process
attempts to create a directory called 'build', which fails on
case-insensitive filesystems.

Add a prePatch hook to rename the BUILD file (which is for use with an
unrelated build tool) to something that doesn't conflict with the
'build' directory. This hook allows this derivation to be built on
case-insensitive filesystems.

Add metadata to the derivation because previously it had none.

(cherry picked from commit 66bbee3b81)
2018-04-01 09:24:38 +02:00
Tim Steinbach
b8edfed0e2 linux-copperhead: 4.15.14.a -> 4.15.15.a
(cherry picked from commit 2dfaf6992c)
2018-03-31 17:17:45 -04:00
Tim Steinbach
311dcc7462 linux: 4.15.14 -> 4.15.15
(cherry picked from commit 32e47b19f2)
2018-03-31 17:17:18 -04:00
Tim Steinbach
e54a063017 linux: 4.14.31 -> 4.14.32
(cherry picked from commit c8e2312c88)
2018-03-31 17:17:09 -04:00
Tim Steinbach
585aa0e9ee linux: 4.9.91 -> 4.9.92
(cherry picked from commit 804789e49b)
2018-03-31 17:17:00 -04:00
Tim Steinbach
8039a49f1e linux: 4.4.125 -> 4.4.126
(cherry picked from commit b9bde5bc03)
2018-03-31 17:16:51 -04:00
Daiderd Jordan
96ccbe16ee gnumake: mark head variant lowPrio
Fixes #38257

(cherry picked from commit 86705445dc)
2018-03-31 23:01:01 +02:00
Robert Schütz
a2c57c5336 pythonPackages.nipype: enable tests
(cherry picked from commit ee1896d63d)
2018-03-31 21:12:41 +02:00
Maximilian Bosch
a7c0fdbc9e pythonPackage.nipype: fix build
`pythonPackages.prov` has been bumped to `1.5.2`, however `nipype`
pinned `prov` to `1.5.0`. Patching `nipype/info.py` fixes this issue by
bumping to the current `prov` version in nixpkgs.

See https://hydra.nixos.org/build/71817962/log
See ticket #36453

(cherry picked from commit db0fa06fce)
2018-03-31 21:12:41 +02:00
Maximilian Bosch
97afec420e frescobaldi: 2.0.16 -> 3.0.0; fix build
3.0.0 works with Python 3 and QT5 (proivded by pyqt5). These fixes are
another step towards #32883 by getting rid of the unused poppler-qt4.

See https://hydra.nixos.org/build/71816154/log
See ticket #36453

(cherry picked from commit 545495b132)
2018-03-31 17:29:04 +02:00
Maximilian Bosch
29a6d29e66 pythonPackages.poppler-qt5: init at 0.24.2
related to #32883

(cherry picked from commit 8446cd9c32)
2018-03-31 17:28:59 +02:00
Maximilian Bosch
d798fa02f9 pythonPackages.python-ly: init at 0.9.5
(cherry picked from commit d50943ad46)
2018-03-31 17:28:53 +02:00
Maximilian Bosch
cde1f31f28 pythonPackages.mrbob: fix build
Tests broke on Hydra as the `checkPhase` wasn't configured properly. By
explicitly relying on `nosetests` and injecting `LC_ALL` into the
`checkPhase` the tests work again.

The license (bsd3) according to `LICENSE` distributed with the upstream
package wasn't specified in the meta section which could've caused legal
issues.

The expression has been moved into its own file to reduce the length and
complexity of `pkgs/top-level/python-packages.nix`.

See https://hydra.nixos.org/build/70689499/log
See #36453

(cherry picked from commit 9215e03e17)
2018-03-31 17:05:50 +02:00
Joachim Schiele
0a224fe280 user/group assertion to not exceed the 32 character limit
(cherry picked from commit 1b0cb040d9)
(original PR: #36556)
2018-03-31 14:29:14 +02:00
Maxime Dénès
834d892989 psc-package: 0.2.5 -> 0.3.2-pre
Note: the previous version was not building due to outdated upstream
dependencies.

(cherry picked from commit 1e1839239c)
Signed-off-by: Domen Kožar <domen@dev.si>
2018-03-31 10:43:20 +01:00
Symphorien Gibol
7d9e35afc2 giac: fix url
the previous url was a moving target and was updated at each point
release. Use a frozen source instead.

(cherry picked from commit 262fff26ed)
2018-03-30 22:58:44 +02:00
Vladimír Čunát
0c79da12a3 cups: fix patch download without a rebuild
One needs to specify git commit to make the fetch always work.
Close #38113.

(cherry picked from commit 514e3e8a07)
2018-03-30 21:35:41 +02:00
Silvan Mosberger
efb1868bba tlspool: 20170123 -> 20180227 and fix
(cherry picked from commit 7ffbbd334f)
2018-03-30 21:28:05 +02:00
Vladimír Čunát
1de51da824 dhcpcd: fix /bin/sh impurity
The usual error during configuration:
syntax error: you disabled math support for $((arith)) syntax

(cherry picked from commit cb196f490e)
2018-03-30 21:24:21 +02:00
Dmitry Kalinkin
2013114be0 rivet: 2.6.0 -> 2.6.0
upstream just replaced the tarball with a new version without bumping anything
2018-03-30 20:22:51 +01:00
Tor Hedin Brønner
2bbd0df63a nix-bash-completions: 0.6.4 -> 0.6.5 2018-03-30 19:08:50 +02:00
Pascal Wittmann
43106ec955 nzbget: 19.0 -> 19.1 2018-03-30 18:49:24 +02:00
Domen Kožar
11238ffbe1 btrfs-progs: 4.14.1 -> 4.15.1 2018-03-30 14:21:43 +01:00
Piotr Bogdan
0d91583166 ppp: fix build with newer kernel headers
The package would build but with some components missing, see
https://github.com/NixOS/nixpkgs/issues/37926 and
https://hydra.nixos.org/build/70939248/nixlog/1 -> CTRL-F error:

(cherry picked from commit da9b564bed)
2018-03-30 10:17:40 +03:00
Piotr Bogdan
a4f5011b73 linuxPackages.v4l2loopback: 0.9.1 -> 0.11.0
(cherry picked from commit 6b8a6faf62)
2018-03-30 10:16:23 +03:00
Piotr Bogdan
0f51a9b9d9 linuxPackages.phc-intel: 0.4.0-rev24 -> 0.4.0-rev25
(cherry picked from commit 1365d6ad9c)
2018-03-30 10:15:42 +03:00
Ryan Mulligan
c8163071bf yakuake: 3.0.4 -> 3.0.5
Semi-automatic update generated by https://github.com/ryantm/nix-update tools.

This update was made based on information from https://repology.org/metapackage/yakuake/versions.

These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 3.0.5 with grep in /nix/store/8ynmx32jvp39xw8x1n6spjxn7acamcys-yakuake-3.0.5
- directory tree listing: https://gist.github.com/b997d1ba53b4383b309cdbe6423958b6

(cherry picked from commit adc39a9b98)
2018-03-30 07:58:18 +02:00
Matthew Pickering
7292975ca0 Fix grass build on darwin
(cherry picked from commit 49182bcd34)
2018-03-29 23:36:33 +02:00
Franz Pletz
69a03de038 nixos/dovecot: set group in config
The dovecot bump to 2.3.1 caused the dovecot service to fail to start
because it would try to chgrp sockets to dovecot whereas our default
dovecot group is called dovecot2.

(cherry picked from commit 6a15c8d6f7)
2018-03-29 21:39:22 +02:00
Franz Pletz
e79abe3062 dovecot_pigeonhole: 0.5.0.1 -> 0.5.1
(cherry picked from commit 96d4f13fc5)
2018-03-29 21:39:16 +02:00
Ryan Mulligan
2ddacd2959 dovecot: 2.3.0.1 -> 2.3.1
Semi-automatic update generated by https://github.com/ryantm/nix-update tools.

This update was made based on information from https://repology.org/metapackage/dovecot/versions.

These checks were done:

- built on NixOS
- ran `/nix/store/c20ip7wyymd39l7zisx38ky3bxp1sybv-dovecot-2.3.1/bin/dovecot --help` got 0 exit code
- ran `/nix/store/c20ip7wyymd39l7zisx38ky3bxp1sybv-dovecot-2.3.1/bin/dovecot --version` and found version 2.3.1
- found 2.3.1 with grep in /nix/store/c20ip7wyymd39l7zisx38ky3bxp1sybv-dovecot-2.3.1
- directory tree listing: https://gist.github.com/6d90467ee7649d7efc0a48eeacfc42c8

(cherry picked from commit a668ca4aac)
2018-03-29 21:39:09 +02:00
Robin Gloster
c30303e038 gitlab: disable
The last rubygems update broke this

(cherry picked from commit 68c4605f1a)
2018-03-29 19:18:45 +02:00
Domen Kožar
e6114781b0 e2fsprogs: 1.43.8 -> 1.44.1 2018-03-29 17:43:31 +01:00
Bastian Köcher
fbc2cb78b7 hplip: Adds missing depdency sip
(cherry picked from commit 8152db99d7)
2018-03-29 12:10:58 +02:00
Tim Steinbach
d40fc89bc2 linux-copperhead: 4.15.13.a -> 4.15.14.a
(cherry picked from commit decfd44b19)
2018-03-28 16:56:54 -04:00
Tim Steinbach
343a3e28cc linux: 4.15.13 -> 4.15.14
(cherry picked from commit e6ec944444)
2018-03-28 16:56:45 -04:00
Tim Steinbach
a07b79c3fd linux: 4.14.30 -> 4.14.31
(cherry picked from commit 6baf64f8f1)
2018-03-28 16:56:37 -04:00
Tim Steinbach
1dbe306ede linux: 4.9.90 -> 4.9.91
(cherry picked from commit 97c840eeeb)
2018-03-28 16:56:28 -04:00
Tim Steinbach
21dd95bacf linux: 4.4.124 -> 4.4.125
(cherry picked from commit 50e8d2ad8d)
2018-03-28 16:56:20 -04:00
Vladyslav M
1784c7727a skypeforlinux: 8.17.0.2 -> 8.18.0.6
(cherry picked from commit f4b9da7c6a)
2018-03-28 22:12:17 +02:00
Vasyl Solovei
8f354913e6 skypeforlinux: 8.16.0.4 -> 8.17.0.2
(cherry picked from commit 044d4b0875)
2018-03-28 22:12:05 +02:00
Daiderd Jordan
75e1a7ed59 python-celery: fix darwin build
(cherry picked from commit d33a26b370)
2018-03-28 20:56:23 +02:00
Maximilian Bosch
78e13f5da2 Revert restrictive validation behavior for DM/WM defaults in the X module
The original idea behind this change (described in ticket #11064) was to
improve the assertions to avoid that users of the X server accidentally
forget to configure a DM or WM.

However this caused several issues with setups that require X, but no DM
or WM. The keymap testcases became instable as well as now disabling DMs
needs to be done explicitly.
(see https://github.com/NixOS/nixpkgs/pull/31268#issuecomment-347080036)

In the end the idea behind the change and #11064 was obviously a
mistake, so reverting it completely for now should be fine.

(cherry picked from commit 5caa22fe0a)
2018-03-28 20:34:40 +02:00
Shea Levy
ba717c5471 ghc: Use persistent URL for abi-depends determinism patch.
(cherry picked from commit fbe8deb282)
2018-03-28 12:31:50 -04:00
Rob Vermaas
7daf4299f5 nixops: update to 1.6
(cherry picked from commit 2a28e65742)
2018-03-28 13:05:38 +02:00
Ryan Mulligan
9f24495851 php: 7.2.3 -> 7.2.4
Semi-automatic update generated by https://github.com/ryantm/nix-update tools.

This update was made based on information from https://repology.org/metapackage/php/versions.

These checks were done:

- built on NixOS
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phar.phar help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phar.phar version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phar.phar help` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php -v` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php --version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phpdbg -V` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/phpdbg --version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-cgi -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-cgi --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-cgi -v` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-cgi --version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear -V` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pear version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev -V` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/peardev version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl -V` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/pecl version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm -h` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm --help` got 0 exit code
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm -v` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm --version` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm -h` and found version 7.2.4
- ran `/nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4/bin/php-fpm --help` and found version 7.2.4
- found 7.2.4 with grep in /nix/store/jkzy4favahn0mxn1i9ags1zazg4z7y8l-php-7.2.4
- directory tree listing: https://gist.github.com/3c197892ad9174dae3d07c1dd61b418c

(cherry picked from commit 43c6a3f23a)
2018-03-28 11:15:21 +02:00
Bart Brouns
4b148bce24 helmholtz: fix failing build
(cherry picked from commit 5bb96e7161)
2018-03-28 08:44:34 +02:00
xeji
da3ef811d1 spice-gtk: fix symlink errors, add withPolkit option
(cherry picked from commit e26810069e)
2018-03-28 08:44:34 +02:00
Piotr Bogdan
6d04965db9 cloudfoundry-cli: fix build
(cherry picked from commit 760e972a86)
2018-03-28 08:44:34 +02:00
xeji
255f999541 nixos/tests/atd : remove test of batch command
"batch" executes jobs based on system load.
test was not deterministic.

(cherry picked from commit b08560fb0a)
2018-03-28 08:44:33 +02:00
Matt McHenry
b0f5bc0f4a openjdk10: minor cleanups
* with only one source bundle (per JEP-296), we can use src instead of
  srcs, and avoid the need to cd in prePatch

* fetch sources from jdk10u instead of jdk10, to make it easier to
  grab updates when they start coming.

* removed commented-out code that became irrelevant in the 8 -> 9
  transition (*.pf files, infinality font rendering)

* create jdk10, jre10, and jre10_headless attributes in
  all-packages.nix

(cherry picked from commit aabf45c163)
2018-03-28 08:43:14 +02:00
Ryan Mulligan
b65794b46e telepathy-gabble: 0.18.3 -> 0.18.4
Semi-automatic update generated by https://github.com/ryantm/nix-update tools.

This update was made based on information from https://repology.org/metapackage/telepathy-gabble/versions.

These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 0.18.4 with grep in /nix/store/pg936ixgiw96xqsrdzbwc1civylmy1q5-telepathy-gabble-0.18.4
- found 0.18.4 in filename of file in /nix/store/pg936ixgiw96xqsrdzbwc1civylmy1q5-telepathy-gabble-0.18.4
- directory tree listing: https://gist.github.com/92190024cdfe17a3e79730f988d904f6

(cherry picked from commit 14e24db9db)
2018-03-28 08:43:13 +02:00
Justin Humm
be798556eb apache-httpd: fix typo in config servedFiles
(cherry picked from commit 169468c406)
2018-03-28 08:43:08 +02:00
Franz Pletz
b6474a3a3b Merge pull request #37948 from andir/18.03/openssl
[18.03] openssl{,1_1_0} update (1.0.2o, 1.1.0h)
2018-03-28 06:00:59 +00:00
Franz Pletz
718952b03b Merge pull request #37964 from andir/18.03/firefox
[18.03] firefox{,-bin,-esr} updates for MFSA2018-10
2018-03-28 05:59:02 +00:00
Franz Pletz
caba43d6fa xmrig: init at 2.5.2
(cherry picked from commit 5d86c50057)
2018-03-28 07:28:04 +02:00
Franz Pletz
d9e3401dbe xmr-stak: 2.2.0 -> 2.3.0
(cherry picked from commit d12daee695)
2018-03-28 07:28:04 +02:00
Franz Pletz
2f5dae1b33 monero: 0.11.1.0 -> 0.12.0.0
(cherry picked from commit 28c00f8f3b)
2018-03-28 07:28:04 +02:00
Franz Pletz
4d9d3cbfeb lib/modules: fix typo
(cherry picked from commit e6f4614e85)
2018-03-28 07:28:03 +02:00
Franz Pletz
39e76f5a34 caddy: 0.10.11 -> 0.10.12
(cherry picked from commit a8375e4056)
2018-03-28 07:28:03 +02:00
Franz Pletz
d206dca875 firmwareLinuxNonfree: simplify source fetching
The iwlwifi repo has been merged into linux-firmware.

(cherry picked from commit ecf5caf457)
2018-03-28 07:28:03 +02:00
Will Dietz
4bf9dd12af firmwareLinuxNonfree: 2018-01-04 -> 2018-03-20
(cherry picked from commit c787555b94)
2018-03-28 07:28:02 +02:00
Garrett Berg
54c76d597f docs: extend rust docs (#35587)
- Add example for setting up nix-shell, improve rust docs
- Rust docs: add gcc rust dependencies and fix carnix commands
- Fix a typo with the carnix command.

(cherry picked from commit f7342a3625)
2018-03-28 02:08:10 +01:00
Piotr Bogdan
51c49db0f0 linuxPackages.ena: 1.5.0 -> 1.5.2
(cherry picked from commit b353ff944a)
2018-03-28 01:23:44 +01:00
Sarah Brofeldt
f74188b551 Merge pull request #37940 from srhb/mythtv-cherry
Backport: mythtv: 0.27.4 -> 29.1
2018-03-28 00:50:30 +02:00
Maximilian Bosch
27ae4cea4e qpid-cpp: fix build
The compilation broke due to the flag `-Werror=int-in-bool-context`
which caused several compilation errors with GCC v7. Disabling this
warning manually with `-Wno-error` in `NIX_CFLAGS_COMPILE` should be
fine.

This package experienced several radical changes as the entire python
build in `$src/management/python` was broken since the given Python
interpreter missed several needed modules (including
`pythonPackages.qpid-python`). As the CMake build tried to invoke the
affected `setup.py` manually and patched the shebangs with `disutil` and
caused non-functional executables, I split the package up into two
parts, the actual `qpid-cpp` lib and the Python module that will be
composed using `buildEnv`.

Furthermore I added myself as maintainer for the package as the diff
became quite huge and we should have more folks available to maintain
this.

See https://hydra.nixos.org/build/71519082/log
See tickets #36453 and #31747
2018-03-28 00:37:22 +02:00
Carles Pagès
a7d6297032 qpid-cpp: 0.34 -> 1.37.0 2018-03-28 00:37:22 +02:00
Michael Raskin
d5f40d0ebd firefox: 59.0.1 -> 59.0.2
(cherry picked from commit 73a7d67795)
2018-03-28 00:36:41 +02:00
Andreas Rammhold
2251b7bfa7 firefox-esr: 52.7.2esr -> 52.7.3esr
Fixes MFSA2018-10 [1].

[1] https://www.mozilla.org/en-US/security/advisories/mfsa2018-10/

(cherry picked from commit 24a2c3fe58)
2018-03-28 00:36:41 +02:00
Andreas Rammhold
7c4115b0c4 firefox-bin: 59.0.1 -> 59.0.2
Fixes MFSA2018-10 [1].

[1] https://www.mozilla.org/en-US/security/advisories/mfsa2018-10/

(cherry picked from commit 6abbe39551)
2018-03-28 00:36:41 +02:00
Mario Rodas
0101637e2e gerbil: enable on darwin
(cherry picked from commit f43878ca4d)
2018-03-28 00:18:05 +02:00
Mario Rodas
b052ce05d0 gambit: enable on darwin
(cherry picked from commit 0874789dd5)
2018-03-28 00:17:49 +02:00
Sarah Brofeldt
6c056757fb Merge pull request #37944 from srhb/s3ql-cherry
s3ql: 2.21 -> 2.26
2018-03-28 00:13:19 +02:00
Sarah Brofeldt
f21299103f Merge pull request #37942 from srhb/opal-cherry
Backport: opal: build with gcc6
2018-03-28 00:10:37 +02:00
Sarah Brofeldt
7b43a4ffec Merge pull request #37941 from srhb/notary-cherry
Backport: notary: 0.5.1 -> 0.6.0
2018-03-27 23:47:49 +02:00
Andreas Rammhold
877cde2272 openssl: 1.0.2n -> 1.0.2o (fixes CVE-2017-3738, CVE-2018-0739)
Announcement can be found at [1].

[1] https://www.openssl.org/news/secadv/20180327.txt

(cherry picked from commit 4bf9b4a328)
2018-03-27 23:47:17 +02:00
Andreas Rammhold
f9b510b476 openssl_1_1_0: 1.1.0g -> 1.1.0h (fixes CVE-2018-0739, CVE-2017-3738)
Also fixes CVE-2018-0733 but we do not support HP-UX to my knowledge :-)

Announcement at [1].

[1] https://www.openssl.org/news/secadv/20180327.txt

(cherry picked from commit 72110322c0)
2018-03-27 23:47:13 +02:00
Sarah Brofeldt
45715be8a9 Merge pull request #37939 from srhb/kmsxx-cherry
Backport: kmsxx: build with gcc6
2018-03-27 23:38:55 +02:00
Sarah Brofeldt
bfd827cba1 Merge pull request #37938 from srhb/gosmore-cherry
gosmore: fix build with gcc7
2018-03-27 23:37:47 +02:00
Ryan Mulligan
8410194b6b s3ql: 2.21 -> 2.26
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.fsck.s3ql-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.fsck.s3ql-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.fsck.s3ql-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/fsck.s3ql -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/fsck.s3ql --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/fsck.s3ql --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.mkfs.s3ql-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.mkfs.s3ql-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.mkfs.s3ql-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/mkfs.s3ql -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/mkfs.s3ql --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/mkfs.s3ql --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.mount.s3ql-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.mount.s3ql-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.mount.s3ql-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/mount.s3ql -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/mount.s3ql --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/mount.s3ql --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3ql_oauth_client-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3ql_oauth_client-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3ql_oauth_client-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3ql_oauth_client -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3ql_oauth_client --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3ql_oauth_client --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3ql_verify-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3ql_verify-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3ql_verify-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3ql_verify -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3ql_verify --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3ql_verify --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qladm-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qladm-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qladm-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qladm -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qladm --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qladm --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlcp-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlcp-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlcp-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlcp -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlcp --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlcp --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlctrl-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlctrl-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlctrl-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlctrl -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlctrl --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlctrl --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qllock-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qllock-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qllock-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qllock -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qllock --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qllock --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlrm-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlrm-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlrm-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlrm -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlrm --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlrm --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlstat-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlstat-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.s3qlstat-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlstat -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlstat --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/s3qlstat --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.umount.s3ql-wrapped -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.umount.s3ql-wrapped --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/.umount.s3ql-wrapped --version` and found version 2.26
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/umount.s3ql -h` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/umount.s3ql --help` got 0 exit code
- ran `/nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26/bin/umount.s3ql --version` and found version 2.26
- found 2.26 with grep in /nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26
- found 2.26 in filename of file in /nix/store/rkms0h08sfvsbpz7yp7fikhd272g28p2-s3ql-2.26

(cherry picked from commit e3db2501f9)
2018-03-27 23:31:43 +02:00
Michael Raskin
df8996671e opal: build with gcc6
(cherry picked from commit 6a589dea59)
2018-03-27 23:28:36 +02:00
lewo
65d266574e notary: 0.5.1 -> 0.6.0
(cherry picked from commit a12ad22c2c)
2018-03-27 23:26:36 +02:00
Daniel Fullmer
2d11ec0612 mythtv: 0.27.4 -> 29.1
(cherry picked from commit 70abab8eaf)
2018-03-27 23:24:42 +02:00
xeji
45a8928acd kmsxx: build with gcc6
gcc7 build fails with "internal compiler error"

(cherry picked from commit d78464723b)
2018-03-27 23:22:17 +02:00
Symphorien Gibol
0a73cde76f gosmore: fix build with gcc7
(cherry picked from commit d6aff3d65b)
2018-03-27 23:17:32 +02:00
Joachim F
2ee303490f Merge pull request #37937 from srhb/godot-cherry
Backport: godot: 2.1.4 -> 3.0 + godot_headers
2018-03-27 21:14:39 +00:00
Sarah Brofeldt
0bf74b94ba godot: 2.1.4 -> 3.0 + godot_headers
(cherry picked from commit 048724c4af)
2018-03-27 23:00:45 +02:00
Shea Levy
92b1816591 pythonPackages.pyspark: Init at 2.3.0
(cherry picked from commit 2963d76ca3)
2018-03-27 14:17:13 -04:00
Shea Levy
77c457b2b2 pythonPackages.py4j: Init at 0.10.6.
(cherry picked from commit 4322f2b8c8)
2018-03-27 14:17:05 -04:00
Joachim Fasting
9e8f45e671 tor-browser-bundle-bin: 7.5.2 -> 7.5.3
(cherry picked from commit 707a1ce0da)
2018-03-27 18:16:01 +02:00
Joachim Fasting
43a979c918 electrum: 3.1.0 -> 3.1.1
(cherry picked from commit f5a48fe3c9)

Bugfix release
2018-03-27 18:13:44 +02:00
Nikolay Amiantov
05c9191a20 linuxPackages.nvidia_x11_legacy173: drop mentions
Thanks to pbogdan for noticing this. I'd like to have a "no direct commit"
policy implemented for my own good ^_^".

Tested with ofborg's outpaths.nix

(cherry picked from commit 67adb994bc)
2018-03-27 17:21:29 +03:00
Tristan Helmich
7c34ee2b80 apacheHttpd: 2.4.29 -> 2.4.33
(cherry picked from commit 737bf1d229)
2018-03-27 16:13:30 +02:00
Nikolay Amiantov
824d63448b linuxPackages.nvidia_x11_legacy304.settings: force i686
This legacy settings application doesn't support x86_64.

(cherry picked from commit 4b67702e5b)
2018-03-27 16:54:57 +03:00
Nikolay Amiantov
34a2cd7d08 linuxPackages.nvidia_x11: build only for x86 Linux
(cherry picked from commit 00e5b20d17)
2018-03-27 16:54:49 +03:00
Nikolay Amiantov
d2b6e655ca linuxPackages.nvidia_x11_legacy173: drop
There's no kernel in nixpkgs suitable for this old driver -- tested with 4.4.

(cherry picked from commit 25ac79647c)
2018-03-27 16:54:35 +03:00
volth
b65061a3fd nvidiaLegacy304: fix build
Fixes #37768. Fixes #33395. Closes #37866.

abbradar: don't fix settings in a NixOS module.

(cherry picked from commit f396dd1dcb)
2018-03-27 16:51:02 +03:00
Graham Christensen
0d02468af7 nixpkgs docs: syntax highlight
(cherry picked from commit 8dac5ce146)
2018-03-27 09:41:37 -04:00
Tim Steinbach
5afb48364d ammonite: 1.0.5 -> 1.1.0
(cherry picked from commit 945b681d3b)
2018-03-27 08:59:22 -04:00
Tim Steinbach
6a582b7a78 sbt: 1.1.1 -> 1.1.2
(cherry picked from commit ca28546bfc)
2018-03-27 08:56:52 -04:00
Shea Levy
8e34b6def1 Merge branch 'staging-18.03' into release-18.03 2018-03-27 07:54:39 -04:00
Daniel Kuehn
40212de191 ceph: Change hardcoded site-packages path to utilizing the python2Packages.python.sitePackages attribute instead
(cherry picked from commit d74bcbc8ad)
2018-03-27 10:56:29 +01:00
Daniel Kuehn
38302326ce ceph: Add makeWrapper to dependencies and nativeBuildInputs
The ceph-mgr daemon needs to know the location of cephs own-made python modules for some of the modules
that you can enable for it.
With wrapProgram, a wrapper is added that sets the proper pythonpath environment variable for the ceph-mgr
daemon so its modules can find the ceph python modules

(cherry picked from commit a9a7580c3f)
2018-03-27 10:56:29 +01:00
Graham Christensen
22782ef953 documentation-highlighter: init
(cherry picked from commit a8d08b04a2)
2018-03-26 21:43:11 -04:00
Alex Vorobiev
37b5385f88 Update default.nix
(cherry picked from commit 8c7883c027)
2018-03-27 00:14:39 +02:00
Moritz Ulrich
2e569319fa erlang: Fix order of commands in postPach and postInstall phases.
Fixes #36853
Fixes #36823
2018-03-26 22:43:05 +02:00
Shea Levy
883b7c54d8 haskellPackages.lenz-template: Fix against lenz 3
(cherry picked from commit 2456060458)
2018-03-26 16:13:56 -04:00
Graham Christensen
a50e55382b Move the overridden CSS to overrides.css which can be applied on nixos.org
(cherry picked from commit da17974541)
2018-03-26 16:02:04 -04:00
Graham Christensen
c0c6e98690 nixpkgs docs: Use SVGs for callouts
(cherry picked from commit a80856cec5)
2018-03-26 16:02:00 -04:00
Shea Levy
bccc513396 haskellPackages.lenz: Remove outdated patch.
(cherry picked from commit 2b3ba40c03)
2018-03-26 13:40:31 -04:00
Sarah Brofeldt
5d817cfa4b Merge pull request #37879 from srhb/backport-#37877
Backport: dockerTools.tarsum: Fix upstream import
2018-03-26 19:31:55 +02:00
Sarah Brofeldt
d610810de0 dockerTools.tarsum: Fix upstream import
(cherry picked from commit 4874ce1701)
Backport of #37877
2018-03-26 19:17:27 +02:00
Lancelot SIX
732e3d05de qgis: 2.18.16 -> 2.18.17
(cherry picked from commit 4aaf23a698)
2018-03-26 17:49:26 +02:00
Shea Levy
ae174ee217 haskell.compiler.ghc8{22,41}: Fix abi-depends non-determinism.
See https://github.com/haskell/cabal/issues/4728 for symptoms,
https://phabricator.haskell.org/D4159 for the base of the fix.

(cherry picked from commit 59a53aada0)
2018-03-26 10:17:06 -04:00
Joachim Fasting
a585401f3f tor-browser-bundle-bin: 7.5.1 -> 7.5.2
(cherry picked from commit d09b4d7b2e)
2018-03-26 15:09:26 +02:00
Joachim Fasting
3d007c880e tor-browser-bundle-bin: 7.5 -> 7.5.1
(cherry picked from commit 6f9a9e8876)
2018-03-26 15:09:20 +02:00
Graham Christensen
0f188554ac Add 'make debug' to call xmloscopy
(cherry picked from commit 67f9d2425d)
2018-03-26 08:37:15 -04:00
Graham Christensen
a758dcd467 Move validate to top-level so it doesn't rebuild the outputs every time
(cherry picked from commit fce1fb7e75)
2018-03-26 08:37:15 -04:00
Graham Christensen
dad020675d Validate when building outputs
(cherry picked from commit 30dd2d3feb)
2018-03-26 08:37:14 -04:00
Graham Christensen
0e8f36fb1f Document shell.nix / xmloscopy / make for the nixpkgs docs
(cherry picked from commit f67ea4a6d0)
2018-03-26 08:37:14 -04:00
Graham Christensen
a4c1951910 docs: Build with a makefile
(cherry picked from commit 7e25ff7106)
2018-03-26 08:37:14 -04:00
Graham Christensen
663c605492 Ignore generated XML and other generated files
(cherry picked from commit 8c7be5927e)
2018-03-26 08:37:14 -04:00
Graham Christensen
b38f07ccac Move all nixpkgs doc files in to the doc directory
This makes a makefile-driven developer workflow nicer.

(cherry picked from commit 92d53362d4)

Edited to remove the emscripten references, which were new on
master
2018-03-26 08:37:08 -04:00
Graham Christensen
8ebd176017 xmloscopy: 0.1.1 -> 0.1.2
Ugh this is embarassing

(cherry picked from commit 6e4a51fe54)
2018-03-26 08:30:20 -04:00
Graham Christensen
a1b27036c5 xmloscopy: init at 0.1.1
(cherry picked from commit 72a4c54c71)
2018-03-26 08:30:19 -04:00
Josef Kemetmüller
0b9fea1e1a keepassxc: 2.3.0 -> 2.3.1
(cherry picked from commit 3f1a03b20e)
2018-03-26 10:05:41 +01:00
Josef Kemetmüller
58d56020b7 keepassxc: fix darwin build
(cherry picked from commit 2a80448fed)
2018-03-26 10:05:41 +01:00
Peter Hoeg
35e62a279d Merge pull request #37847 from peterhoeg/hass1803
home-assistant: backport of a number of python packages
2018-03-26 16:02:13 +08:00
Peter Hoeg
7662b6c9f4 home-assistant: add missing dependencies
(cherry picked from commit 15f63cb114)
2018-03-26 15:03:16 +08:00
Robert Schütz
972c80d30e pythonPackages.async: uninit because deprecated
Citing from PyPI:
DEPRECATION NOTE: Please do not use this library ! It’s not working correctly in python 3, and besides that might be called a failed experiment.

(cherry picked from commit 33e16997b9)
2018-03-26 15:01:19 +08:00
Peter Hoeg
1d3e888bda pythonPackages.miniupnpc: init at 2.0.2
(cherry picked from commit b1d7d13e64)
2018-03-26 15:01:12 +08:00
Peter Hoeg
79086fbc1e pythonPackages.ha-ffmpeg: init at 1.9
(cherry picked from commit 083ac5add3)
2018-03-26 15:01:06 +08:00
Peter Hoeg
05e0dc4c6d pythonPackages.sseclient: init at 0.0.19
(cherry picked from commit 91456c6705)
2018-03-26 15:00:54 +08:00
Peter Hoeg
af9b83af22 pythonPackages.deluge-client: init at 1.2.0
(cherry picked from commit 0bb55edb3a)
2018-03-26 15:00:46 +08:00
Peter Hoeg
c4e37974c3 pythonPackages.yahooweather: init at 0.10
(cherry picked from commit 4af9a88107)
2018-03-26 15:00:33 +08:00
Herwig Hochleitner
4166986dfa chromium: 65.0.3325.162 -> 65.0.3325.181
dev: 66 -> 67

cc @YorikSar @aszlig

(cherry picked from commit 8cbf295b6c)
2018-03-26 01:54:11 +02:00
Will Dietz
f9245e3e80 erlang R18-20: updates
(cherry picked from commit f967d23403)
2018-03-25 23:40:04 +02:00
Tim Steinbach
79bf41dfb0 linux: 4.15.12 -> 4.15.13
(cherry picked from commit 5040564737f8fdc0d5edb1c5bcef0925e125f648)
2018-03-25 15:06:55 -04:00
Tim Steinbach
2208739d1c linux: 4.14.29 -> 4.14.30
(cherry picked from commit ab2b67ebfe76a885a9f0cfbf5a4e5a4a110ab4e5)
2018-03-25 15:06:47 -04:00
Tim Steinbach
933ba214e9 linux: 4.9.89 -> 4.9.90
(cherry picked from commit 32a9c9ff73f8b43e6f370754777a2ab20c5d7158)
2018-03-25 15:06:37 -04:00
Tim Steinbach
4e0b497cab linux: 4.4.123 -> 4.4.124
(cherry picked from commit 1df36eba3170897ad44ca9e4d19460a233aedf10)
2018-03-25 15:06:28 -04:00
Tim Steinbach
06022fff51 linux-copperhead: 4.15.12.a -> 4.15.13.a
(cherry picked from commit 64396ec8c1343828749f4866d941148104f2d0de)
2018-03-25 15:06:20 -04:00
Michael Raskin
741ae94dc0 Merge pull request #35073 from Infinisil/fix/znapzend
nixos/znapzend: fix when no previous zetup

(cherry picked from commit 296dca019b)
2018-03-25 19:42:25 +02:00
xeji
0192dc6321 ptlib: fix build
patch typedef clashes with unixODBC>=2.3.5

(cherry picked from commit 4308403c30)
2018-03-25 20:03:39 +03:00
Josef Kemetmüller
c9ab869bd2 mp3blaster: fix darwin build
/cc ZHF #36454

(cherry picked from commit 11aae21cf8)
2018-03-25 19:01:24 +02:00
Tuomas Tynkkynen
ad027421c3 nixos/tests/misc: Fix on aarch64
The psmouse module is for PS/2 mouse only, which doesn't exist outside
x86. But we can test for the mousedev module just as well which is used
for the '-device usb-tablet' emulated by QEMU.

(cherry picked from commit d27f7942b7)
2018-03-25 18:38:57 +03:00
Daiderd Jordan
b6ddb9913f swftools: fix darwin build
/cc ZHF #36454

(cherry picked from commit 3301258190)
2018-03-25 17:02:01 +02:00
Tuomas Tynkkynen
4403f33860 llvm_34, llvm_35: Disable on aarch64
https://hydra.nixos.org/build/71176565
https://hydra.nixos.org/build/71167754
(cherry picked from commit bec461a35a)
2018-03-25 17:58:23 +03:00
Gabriel Ebner
7a752aa8f8 gogs: 0.11.29 -> 0.11.34
There were security fixes in the 0.11.33 release.

(cherry picked from commit 19fa3a5e53)
2018-03-25 16:15:08 +02:00
Daiderd Jordan
12deb60a67 shairplay: fix darwin build
/cc ZHF #36454

(cherry picked from commit 3ca8b20328)
2018-03-25 15:35:21 +02:00
Daiderd Jordan
642a86ba84 scowl: fix darwin build
/cc ZHF #36454

(cherry picked from commit e52250b33c)
2018-03-25 15:27:25 +02:00
Daiderd Jordan
22ad26e23d runit: mark linux only
/cc ZHF #36454

(cherry picked from commit 713ff855e0)
2018-03-25 15:03:37 +02:00
Daiderd Jordan
2224dd1599 ragel: fix clang build
/cc ZHF #36454

(cherry picked from commit 319c61c893)
2018-03-25 14:41:37 +02:00
Tuomas Tynkkynen
91b09422cf U-Boot: Disable parallel build
https://hydra.nixos.org/build/71880710
(cherry picked from commit 50dc85ed62)
2018-03-25 12:59:46 +03:00
Tuomas Tynkkynen
c4597d2568 armTrustedFirmware: Disable parallel build
I think https://hydra.nixos.org/build/71541345 is parallel build
related.

(cherry picked from commit bab5a0664c)
2018-03-25 12:59:45 +03:00
Tuomas Tynkkynen
f2c9a2557b armTrustedFirmwareQemu: 1.4 -> 1.5, fixes build with GCC7
(cherry picked from commit 107eaa8780)
2018-03-25 12:59:45 +03:00
Tuomas Tynkkynen
298ea40d39 armTrustedFirmware: Remove targetPlatforms like was done in U-Boot
Should also fix Hydra attempting to build this stuff on x86, like
https://hydra.nixos.org/build/71533289

(cherry picked from commit a2d8a9aad7)
2018-03-25 12:59:45 +03:00
Tuomas Tynkkynen
a68e60f450 U-Boot: Make ubootJetsonTK1 install even more files
(cherry picked from commit 4fe75d11b2)
2018-03-25 12:59:45 +03:00
Tuomas Tynkkynen
1896fcff60 U-Boot: Add Pine64 build
(cherry picked from commit 4b77663edf)
2018-03-25 12:59:45 +03:00
Samuel Dionne-Riel
176d151f4d U-Boot: Add SOPINE Baseboard build
This build is compatible with PINE A64-LTS.

[dezgeg changed the original device tree patch to v4 of the patch series
"sunxi: sync H3, H5, A64 DTs from mainline Linux" submitted to the
upstream mailing list by Andre Przywara. Also install the
u-boot-sunxi-with-spl.bin binary similar to 32-bit boards
since it's now being built by the upstream build system.]

(cherry picked from commit 2ff31f71ae)
2018-03-25 12:59:44 +03:00
Samuel Dionne-Riel
cf87889431 arm-trusted-firmware: Inits at various versions
For qemu, at 1.4 from upstream.

For Sopine / Pine A64-LTS, at 1.0 from fork.

(cherry picked from commit f2175e1bd4)
2018-03-25 12:59:44 +03:00
Tuomas Tynkkynen
eff6d9628c U-Boot: Add AArch64 QEMU build
See

https://github.com/u-boot/u-boot/blob/master/doc/README.qemu-arm

on how to use it.

(cherry picked from commit 6b069c656a)
2018-03-25 12:59:44 +03:00
Ben Wolsieffer
4c669db598 uboot: fix cross-build of ubootTools
(cherry picked from commit 28fd7d9594)
2018-03-25 12:59:44 +03:00
Ben Wolsieffer
48ade50d8e uboot: sheevplug and guruplug: use mainline U-Boot
These derivations have not seen any updates since they were created in 2010,
and some of their sources have disappeared. There are upstream configs for
these boards, so these are now used, and they build correctly. I have no way
of testing them, and I don't if anyone even uses either board with Nix anymore.

(cherry picked from commit 01020b3263)
2018-03-25 12:59:44 +03:00
Ben Wolsieffer
b0abe78b5c uboot: rock64: use binary blob for TPL
This stops the kernel from crashing immediately after boot.

(cherry picked from commit ba3e470651)
2018-03-25 12:59:43 +03:00
Ben Wolsieffer
828fdd61b9 uboot: add patch to increase maximum path length in extlinux.conf
This fixes problems with cross compiled kernels failing to boot.

(cherry picked from commit 1f4bb8c61d)
2018-03-25 12:59:43 +03:00
Ben Wolsieffer
94c403fb92 arm-trusted-firmware: init
ARM trusted firmware is required as part of the boot process on some ARMv8-A
boards. Currently, only the RK3328 is supported in nixpkgs.

This makes the Rock64 u-boot image bootable.

(cherry picked from commit 0ab76c5a4e)
2018-03-25 12:59:43 +03:00
Ben Wolsieffer
e794f9abbf maintainers: add lopsided98
(cherry picked from commit 0264c9bb47)
2018-03-25 12:59:43 +03:00
Ben Wolsieffer
dc01b66eef uboot: add Rock64 support
The bootloader is currently non-functional because it lacks the ARM Trusted
Firmware image (bl31.elf).

(cherry picked from commit 6f5a0bded2)
2018-03-25 12:59:42 +03:00
Ben Wolsieffer
7c46833b04 uboot: 2017.11 -> 2018.03, cross fixes
(cherry picked from commit 5804547243)
2018-03-25 12:59:42 +03:00
Kai Harries
1da25dd104 debian-devscripts: add dpkg in PATH
The script uscan was complaining about missing dpkg, therefore I have
added it to the PATH.

(cherry picked from commit 404c80791f)
2018-03-25 10:25:21 +01:00
Tim Steinbach
d843d7f21a minikube: 0.25.0 -> 0.25.2
(cherry picked from commit 040a9ab240)
2018-03-25 00:50:19 -04:00
Tim Steinbach
ccabf39f5c zulu: 9.0.4 -> 10
(cherry picked from commit 351688f53e)
2018-03-25 00:50:12 -04:00
Tim Steinbach
35a6799b17 openjdk: Add JDK 10
(cherry picked from commit f00db926c6)
2018-03-25 00:50:05 -04:00
Tim Steinbach
e2b8732980 vault: Fix test
(cherry picked from commit 3aa3738bb2)
2018-03-25 01:01:34 +01:00
Robin Gloster
bdac630c1d grpcio: use protobuf3_5
(cherry picked from commit c71bcb2744)
2018-03-24 20:34:39 +01:00
Robin Gloster
85d5fdce26 protobuf3_5: init at 3.5.1.1
partly cherry-picked from 4bbd6900f8
2018-03-24 20:34:39 +01:00
Jon Banafato
a903faf1d5 keybase-gui: Enable desktop notifications (#37711)
Add `libnotify` as a build input to make message notifications work.

(cherry picked from commit 8ac272f98d)
2018-03-24 19:28:37 +00:00
Josef Kemetmüller
a978eee06f libcdio-paranoia: fix darwin build
(cherry picked from commit 285ef9be09)
2018-03-24 19:21:11 +00:00
Josef Kemetmüller
e32dee886f glyr: enable darwin build
(cherry picked from commit ad3eb5d8fc)
2018-03-24 19:15:40 +00:00
volth
6f384b77d2 babelstone-han: 10.0.2 -> 11.0.0
new font version; old link answers with 404

(cherry picked from commit 64c756d50d)
2018-03-24 19:15:40 +00:00
Pascal Wittmann
898cddd756 autossh: 1.4e -> 1.4f 2018-03-24 19:35:44 +01:00
Tuomas Tynkkynen
e789f6f6e5 ghc: Disable on AArch64
For some reason compiling the proper GHC from the binary one eventually
segfaults at some point.

Since it has never worked, just disable it and investigate later.

(cherry picked from commit a6425fc66d)
2018-03-24 18:37:20 +02:00
Tuomas Tynkkynen
be44525d04 nixos/tests/installer: Give eval failure on unsupported boot methods
(cherry picked from commit 3131daace1)
2018-03-24 18:37:20 +02:00
Tim Steinbach
9d8c6c71c0 docker: 18.02 -> 18.03
(cherry picked from commit b072dcffae)
2018-03-24 12:33:47 -04:00
Franz Pletz
15e3aad1a2 openra: 20180218 -> 20180307
(cherry picked from commit 204a029101)
2018-03-24 17:11:59 +01:00
Franz Pletz
4e67f8974a browserpass: 2.0.13 -> 2.0.17
(cherry picked from commit 8df9cf585a)
2018-03-24 17:11:58 +01:00
Tad Fisher
86508d4ea4 browserpass: 2.0.11 -> 2.0.13
(cherry picked from commit 82f2c19d98)
2018-03-24 17:11:56 +01:00
Tuomas Tynkkynen
f45bc2b3e4 nixos/tests: Make simpleUefiGrub test work on AArch64
Needs more refactoring for the AArch64 '-enable-kvm' stuff some day...

(cherry picked from commit e58624a877)
2018-03-24 16:51:06 +02:00
Tuomas Tynkkynen
ad57d1ec63 edk2, OVMF: Build on aarch64
And also build in parallel.

I don't understand why we manually tediously link every single directory
from the source, but I don't want to investigate too much.

(cherry picked from commit f59eab75d2)
2018-03-24 16:51:00 +02:00
Tuomas Tynkkynen
75276115bf OVMF: Reformat a bit for readability
- Use 'somePkg == null' instead of 'somePkg == false' which is more
  conventional in rest of Nixpkgs
- Use lib.optionalString where applicable

(cherry picked from commit 1645011983)
2018-03-24 16:50:48 +02:00
Tuomas Tynkkynen
7a79af0b8d edk2: Reformat a bit for readability
- Have only one sed expression per line
- Put the important stuff closer to the command and not hidden in some
continuation line. That is, don't do:

sed \
    <boring stuff> \
    <boring stuff> \
    <boring stuff> \
    <boring stuff> \
    <boring stuff> \
    <IMPORTANT STUFF>

but:

sed <IMPORTANT STUFF> \
    <boring stuff> \
    <boring stuff> \
    <boring stuff> \
    <boring stuff> \
    <boring stuff>

(cherry picked from commit 1d854b479c)
2018-03-24 16:50:41 +02:00
Vladimír Čunát
0d20e7db5b Merge #37702: telepathy-gabble: fix source URL
(cherry picked from commit 902b3a161c)
2018-03-24 15:14:35 +01:00
Vladimír Čunát
a3be411dbd Merge #37262: snabb: 2016.04 -> 2018.01.2
(cherry picked from commit 7110d4a63b)
It didn't build before this commit.
2018-03-24 15:06:11 +01:00
Daiderd Jordan
2a57fc65b0 qscreenshot: fix darwin build
/cc ZHF #36454

(cherry picked from commit b5b77a6886)
2018-03-24 14:28:02 +01:00
Robin Gloster
d4f3c16982 jsduck: fix build
json 1.8.3 is broken with ruby 2.4

(cherry picked from commit f59a544bf1)
2018-03-24 14:08:31 +01:00
Matthew Justin Bauer
f61244da2e Merge #33685: amdgpu-pro: 17.10 -> 17.40
(cherry picked from commit ce01740dae)
> It's definitely less broken than 17.10.
2018-03-24 12:57:47 +01:00
Robin Gloster
f4770f2030 qgroundcontrol: 3.2.7 -> 3.3.0
(cherry picked from commit 1b27260a0b)
2018-03-24 12:09:03 +01:00
Robin Gloster
1febd196e7 libsForQt5.qtspeech: enable
(cherry picked from commit 8a244db9f3)
2018-03-24 12:09:02 +01:00
Vladimír Čunát
9c85d196a9 Merge #37724:thunderbird*: 52.6.0 -> 52.7.0 (security)
(cherry picked from commit 56fb68dcef)
2018-03-24 11:01:55 +01:00
Robin Gloster
0058e51c8c python.pkgs.logster: 7475c53822 -> 1.0.1
(cherry picked from commit 2e6aacb056)
2018-03-24 10:36:40 +01:00
Robin Gloster
4a34e749f7 python.pkgs.pygtail: init at 0.8.0
(cherry picked from commit 6a286fcba7)
2018-03-24 10:36:39 +01:00
Daiderd Jordan
3976ff79e8 picosat: fix darwin build
/cc ZHF #36454

(cherry picked from commit 23d0c17130)
2018-03-24 02:25:57 +01:00
Daiderd Jordan
f6c0edb3ec openexrid-unstable: fix clang build
/cc ZHF #36454

(cherry picked from commit f16db19610)
2018-03-24 02:25:47 +01:00
Jörg Thalheim
08101d052d Merge pull request #37714 from flokli/nuke-networkmanager-pptp-18.03
networkmanager-pptp: remove package (18.03)
2018-03-23 22:58:21 +00:00
Florian Klink
fb4847ebdd networkmanager-pptp: remove package
backport of #37712

Currently broken on NixOS due to hardcoded modprobe binary path (see
bug #30756 from Oct 2017), no activity on a proposed fix for months.
As the protocol is terribly broken anyways, let's better remove it
completely, and not talk about anymore ;-)

Closes #30756.

(cherry picked from commit 6ac74d60ad)
2018-03-23 23:16:09 +01:00
Tuomas Tynkkynen
ba2a04f656 glslviewer: 1.2 -> 2018-01-31, fixes build
(cherry picked from commit a8eb2c9ef9)
2018-03-23 21:06:23 +02:00
Tuomas Tynkkynen
af6cc8e704 riscv-pk: Set correct platforms
https://hydra.nixos.org/build/70691103

(cherry picked from commit a2c37c0700)
2018-03-23 20:06:09 +02:00
xeji
296c09a355 t: 2.9.0 -> 3.1.0
2.9.0 didn't build anymore

(cherry picked from commit 8cd005b6fb)
2018-03-23 20:01:51 +02:00
Nikolay Amiantov
48856a91c0 systemd: use stable tree
This fixes a bug with changed qemu network interface names and also generally
should be preferred to using a release tag.

(cherry picked from commit 6b9771e4a7)
2018-03-23 17:23:10 +01:00
Albert Safin
cdb97353df wine: disable bindnow hardening
(cherry picked from commit ba960ac383)
2018-03-23 18:13:13 +02:00
Shea Levy
9e804ba5bf Remove HIE package set until automation can be put in place.
(cherry picked from commit ead2ba8809)
2018-03-23 10:25:59 -04:00
Jörg Thalheim
3cf448faf2 vis: patch shebang to use system bash
(cherry picked from commit 0203a6281c)
2018-03-23 07:59:59 +00:00
Andrew Childs
01204cf872 avrdude: add darwin platform
(cherry picked from commit b4888489e3)
2018-03-23 01:42:18 +01:00
Andrew Childs
eef14cb305 libftdi1: add darwin platform
(cherry picked from commit d0df007843)
2018-03-23 01:42:17 +01:00
Daiderd Jordan
31ba589e50 ntbtls: fix darwin build
/cc ZHF #36454

(cherry picked from commit 366bf3a309)
2018-03-22 23:17:43 +01:00
Nikolay Amiantov
2d2ab94cd2 systemd: 237 -> 238
(cherry picked from commit 0ccab4946d)
2018-03-22 23:12:42 +01:00
Nikolay Amiantov
01cce78ec4 kernel: enable CGROUP_NET_PRIO
It's required by systemd 238 because of a bug, otherwise systemd aborts.

(cherry picked from commit e31c3f8b9f)
2018-03-22 23:12:39 +01:00
Josef Kemetmüller
361bd591ea streamripper: Don't use included libmad
streamripper ships its own version of libmad, which does not compile on
clang, due to the usage of incompatible compiler flags. We can get the
build working by using the already packaged libmad, which includes
patches for clang.

(cherry picked from commit e77071289e)
2018-03-22 21:57:42 +01:00
Robin Gloster
a614f9f4c1 openpts: remove
Broken, dead prject that only was a PoC implementation.

(cherry picked from commit 678211bb37)
2018-03-22 17:16:11 +01:00
WilliButz
b828d00ffd nixos/prometheus-exporters: add postfix exporter & documentation
(cherry picked from commit c54aa1f293)
2018-03-22 15:24:55 +01:00
WilliButz
135e13f8fc release notes: add information about prometheus exporters
(cherry picked from commit 8a13101226)
2018-03-22 15:24:55 +01:00
WilliButz
55e97a2ebb nixos/prometheus-exporters: rewrite and restructure
- prometheus exporters are now configured with
  `services.prometheus.exporters.<name>`
- the exporters are now defined by attribute sets
  from which the options for each exporter are generated
- most of the exporter definitions are used unchanged,
  except for some changes that should't have any impact
  on the functionality.

(cherry picked from commit f4d03b5c9c)
2018-03-22 15:24:55 +01:00
Sander van der Burg
510fd552eb xcodeenv: publish xcarchive directory in the output store path if requested
(cherry picked from commit 112ebed491)
2018-03-22 15:02:41 +01:00
Sander van der Burg
d200e2cfde xcodeenv: replace deprecated package application procedure by the new export archive operation
(cherry picked from commit f2bd9d4745)
2018-03-22 14:34:18 +01:00
Robin Gloster
ba11500aa8 prosody: add test to release.nix
(cherry picked from commit faaf32a0ee)
2018-03-22 14:33:10 +01:00
Robin Gloster
766a80ec84 prosody: improve module handling
(cherry picked from commit 0a80f2c0f4)
2018-03-22 14:33:10 +01:00
Florian Jacob
b9084d0160 nixos/prosody: add a basic test
(cherry picked from commit 88f06c5ce9)
2018-03-22 14:33:09 +01:00
Florian Jacob
05f206c3c1 prosody: update community modules
(cherry picked from commit 2c0b230330)
2018-03-22 14:33:09 +01:00
Florian Jacob
7ef13f58b6 prosody: 0.9.12 -> 0.10.0
updating config options, removing luazlib as mod_compression was removed
for security reasons.

(cherry picked from commit 226965da67)
2018-03-22 14:33:09 +01:00
Florian Jacob
64301d0a32 luaevent: 0.4.3 -> 0.4.4
(cherry picked from commit 0c74665bad)
2018-03-22 14:33:08 +01:00
Tim Steinbach
d01e4430b3 linux: 4.9.88 -> 4.9.89
(cherry picked from commit d9e21f3270a3dcc2a67b6e20248a3f83e98dada3)
2018-03-22 09:17:31 -04:00
Tim Steinbach
bbde130fd7 linux: 4.4.122 -> 4.4.123
(cherry picked from commit 8b18ed859285127c40a2cf90c0ad8b172b532732)
2018-03-22 09:17:22 -04:00
Tim Steinbach
d011c7bd02 linux-copperhead: 4.15.11.a -> 4.15.12.a
(cherry picked from commit b7dff1f41fec299eb4b7e09813bfd09aa52a5c5e)
2018-03-22 09:17:13 -04:00
Michael Brantley
ef716bb5cf perlPackages.GSSAPI: depend on krb5Full, fix misspelling
(cherry picked from commit 0d6fdac8e2)
2018-03-22 11:43:58 +00:00
adisbladis
13958f4a36 Merge pull request #37614 from clefru/cherry-18.03
pycurl: 7.19.5.1 -> 7.43.0.1
2018-03-22 17:35:21 +08:00
Will Dietz
72314d37e8 pycurl: 7.19.5.1 -> 7.43.0.1
(cherry picked from commit 99131b4fc2)
2018-03-22 10:23:27 +01:00
giraffito
0e735393c7 python.md: fix grammar around bdist_wheel FAQ
(cherry picked from commit 319866ae11)
2018-03-22 07:30:22 +01:00
Robin Gloster
103e2c4efb graylog: use jre_headless
(cherry picked from commit fa347164b6)
2018-03-22 02:32:43 +01:00
Franz Pletz
eb80bdc402 gitlab service: use recommended unicorn config
(cherry picked from commit e5a854e740)
2018-03-22 02:32:27 +01:00
Robin Gloster
07d1b17941 gitlab: 10.5.4 -> 10.5.6
(cherry picked from commit 08946efdc8)
2018-03-22 02:32:27 +01:00
Simon Lackerbauer
d6595b4d5b gitlab: 10.3.4 -> 10.5.4
(cherry picked from commit 1b55905806)
2018-03-22 02:32:27 +01:00
Robin Gloster
ca3bf23f5f gitaly: 0.59.2 -> 0.81.0
(cherry picked from commit 73a7f984d6)
2018-03-22 02:32:27 +01:00
Simon Lackerbauer
9680902949 gitlab-workhorse: 3.3.1 -> 3.6.0
(cherry picked from commit 9ccd010217)
2018-03-22 02:32:26 +01:00
Simon Lackerbauer
5445bb1583 gitlab-shell: 5.10.2 -> 6.0.3
(cherry picked from commit 08bf87420f)
2018-03-22 02:32:26 +01:00
Robin Gloster
75842fe98c gitlab-shell: fix config path finding
and remove TimeoutSec for gitlab

(cherry picked from commit 31d77fd4f3)
2018-03-22 02:32:26 +01:00
Franz Pletz
8c3cb029e0 zfs, spl: 0.7.6 -> 0.7.7
Remove spl patch that was introduced for grsecurity which we don't support
anymore. ZFS now needs perl for some scripts that are call in the configure
script.

(cherry picked from commit f744f83072)
2018-03-22 01:50:06 +01:00
Franz Pletz
b8673bc3e0 altcoins.masari: init at 0.1.4.0
(cherry picked from commit ab5f98a77e)
2018-03-22 01:50:06 +01:00
Franz Pletz
2b397bfa75 nmap: 7.60 -> 7.70
(cherry picked from commit f2fea9042e)
2018-03-22 01:50:05 +01:00
Franz Pletz
0782536e49 squid4: 4.0.23 -> 4.0.24
(cherry picked from commit 1e15d08cac)
2018-03-22 01:50:05 +01:00
Franz Pletz
8b578b862b matterircd: 0.12.0 -> 0.16.5
(cherry picked from commit 7dee8ab568)
2018-03-22 01:50:05 +01:00
Franz Pletz
5150a7ef50 prometheus-node-exporter: 0.15.0 -> 0.15.2
(cherry picked from commit 9152ef910b)
2018-03-22 01:50:04 +01:00
Franz Pletz
a6146ec8bb clamav: 0.99.3 -> 0.99.4 for multiple CVEs
Fixes CVE-2012-6706, CVE-2017-6419, CVE-2017-11423, CVE-2018-0202,
CVE-2018-1000085.

(cherry picked from commit 5050d05656)
2018-03-22 01:50:04 +01:00
Franz Pletz
96c97c51cb prometheus-blackbox-exporter: 0.11.0 -> 0.12.0
(cherry picked from commit 1497815543)
2018-03-22 01:50:04 +01:00
Tim Steinbach
ad06aec8b5 linux: 4.15.11 -> 4.15.12
(cherry picked from commit 55b96a4a3c)
2018-03-21 20:45:19 -04:00
Tim Steinbach
80c6cd1a9e linux: 4.14.28 -> 4.14.29
(cherry picked from commit deb9ff164f)
2018-03-21 20:45:08 -04:00
Daiderd Jordan
9914060dfb nullmailer: fix darwin build
/cc ZHF #36454

(cherry picked from commit 0477af8a09)
2018-03-22 00:11:49 +01:00
Daiderd Jordan
d49e4f607f mysocketw: fix darwin build
/cc ZHF #36454

(cherry picked from commit 18474c1842)
2018-03-21 23:55:29 +01:00
Daiderd Jordan
beea3c9d36 monero: fix darwin build
/cc ZHF #36454

(cherry picked from commit 5d4d4df8c0)
2018-03-21 22:44:37 +01:00
xeji
5995e9c217 libhttpseverywhere: fix build
run tests in correct directory

(cherry picked from commit fa50e903cf)
2018-03-21 23:24:27 +02:00
Daiderd Jordan
c0b813ed17 masscan: fix build
(cherry picked from commit 38323015e2)
2018-03-21 21:51:26 +01:00
Nikolay Amiantov
da20f8dd22 pyqt5: propagate Qt dependencies
This is so that Qt user environment packages are also propagated. Fixes
Electrum environment installations when no other Qt applications are installed.

Added `dev` output so that closure size won't explode.

(cherry picked from commit b1b4c6c4eb)
2018-03-21 23:36:48 +03:00
Daiderd Jordan
d775a130a3 lxtask: fix darwin build
/cc ZHF #36454

(cherry picked from commit 9b5669b5a6)
2018-03-21 21:30:04 +01:00
Daiderd Jordan
9a81f1ba5b luaffi: fix darwin build
/cc ZHF #36454

(cherry picked from commit fe37684525)
2018-03-21 21:29:57 +01:00
Daiderd Jordan
79378daa0e libqglviewer: fix darwin build
/cc ZHF #36454

(cherry picked from commit c2ca5c057d)
2018-03-21 21:29:50 +01:00
Daiderd Jordan
c6603050ba libnfs: fix clang build
/cc ZHF #36454

(cherry picked from commit 9a054d7cd6)
2018-03-21 21:29:35 +01:00
Hendrik Schaeidt
11f1cb7819 add hschaeidt to maintainer list
(cherry picked from commit 86ff559f82)
2018-03-21 19:39:04 +01:00
Hendrik Schaeidt
555ac8418c stabber: init at 2016-11-09
(cherry picked from commit 6634049f22)
2018-03-21 19:38:48 +01:00
Hendrik Schaeidt
dc70be405f profanity: refactor build to build from source
* fix osx build
* fix undefined macros in configure.ac
* activate the check phase to run the test suite

(cherry picked from commit 501b6d0e13)
2018-03-21 19:38:19 +01:00
Sander van der Burg
0f74315456 titaniumenv: fix renaming strategy
(cherry picked from commit 479ec3d888)
2018-03-21 16:09:30 +01:00
Sander van der Burg
6297c190d0 titaniumenv: update example app
(cherry picked from commit 603556085b)
2018-03-21 15:51:36 +01:00
Sander van der Burg
7fa2f865b8 titaniumenv: fix Android signing on darwin
(cherry picked from commit 4beb695ece)
2018-03-21 14:58:56 +01:00
Michael Raskin
ea9f3fca65 Merge pull request #37559 from dylex/release-18.03
julia: update rmath-julia hash for 0.1
2018-03-21 13:25:25 +00:00
Dylan Simon
c0cd5eeab8 julia: update rmath-julia hash for 0.1 2018-03-21 08:30:58 -04:00
Lancelot SIX
cc25915367 octave: 4.2.1 -> 4.2.2
See http://lists.gnu.org/archive/html/info-gnu/2018-03/msg00006.html
for release announcement

(cherry picked from commit 3a7854032a)
2018-03-21 11:48:30 +01:00
Antoine Eiche
5df02d9783 dockerTools: add --sort=name options on all tar calls
This is to go to a reproducible image build.
Note without this options image are identical from the Docker point of
view but generated docker archives could have different hashes.

(cherry picked from commit ac0c491836)
2018-03-21 08:56:49 +01:00
Antoine Eiche
e28a58fb09 dockerTools: dereference hard links in tar archives
This is to improve image creation reproducibility. Since the nar
format doesn't support hard link, the tar stream of a layer can be
different if a dependency of a layer has been built locally or if it
has been fetched from a binary cache.

If the dependency has been build locally, it can contain hard links
which are encoded in the tar stream. If the dependency has been
fetched from a binary cache, the tar stream doesn't contain any hard
link. So even if the content is the same, tar streams are different.

(cherry picked from commit 346996ceec)
2018-03-21 08:56:49 +01:00
Florian Klink
032a3286fd sqldeveloper: 17.4.0.355.2349 -> 17.4.1.054.0712
(cherry picked from commit f9dda86b39)
2018-03-20 21:59:42 +00:00
Johannes Frankenau
9cd1122df5 masterpdfeditor: 4.3.61 -> 4.3.82
(cherry picked from commit 77b205b9fd)
2018-03-20 21:59:42 +00:00
Nikolay Amiantov
97a2621dae xdg_utils: fix xdg-screensaver
(cherry picked from commit ab67f36e73)
2018-03-20 22:21:03 +03:00
Nikolay Amiantov
69e8d7ddd8 steam: add dependencies for Surviving Mars
(cherry picked from commit 792161895f)
2018-03-20 22:21:00 +03:00
Andrew Kelley
77c052d908 zig: 0.1.1 -> 0.2.0
(cherry picked from commit dc3b791854)
2018-03-20 13:56:53 -05:00
Will Dietz
fa78cd4d68 brotli: 1.0.2 -> 1.0.3
https://github.com/google/brotli/releases/tag/v1.0.3
(cherry picked from commit c1c502e93b)
2018-03-20 13:53:26 -05:00
Will Dietz
9fd4a62b64 llvm6: patch to enable sanitizers w/musl
(cherry picked from commit 60bf299e6a)
2018-03-20 13:52:11 -05:00
Will Dietz
043ee6c65d llvm_5: patch sanitizers to enable w/musl
https://gitweb.gentoo.org/proj/musl.git/plain/sys-libs/compiler-rt-sanitizers/files/compiler-rt-sanitizers-5.0.0-musl-patches.patch
(cherry picked from commit a8824ab4fb)
2018-03-20 13:52:06 -05:00
Will Dietz
67cdc01ba8 llvm4: same treatment
(cherry picked from commit b2e6952f37)
2018-03-20 13:51:00 -05:00
Will Dietz
828d15e9d3 python*: set thread stack size on musl
Ensure recursion limit is reached before stack overflow.

Python does this for OSX and BSD:
13ff24582c/Python/thread_pthread.h (L22)

Size of 1MB chosen to match value in Alpine:
https://git.alpinelinux.org/cgit/aports/commit/main/python2/APKBUILD?id=2f35283fec8ec451fe5fb477dd32ffdcc0776e89

Manual testing via Alpine's test-stacksize.py crashes on these
previously, and works with these changes.

(cherry picked from commit 9aa22191cf)
2018-03-20 13:50:20 -05:00
Robert Schütz
7b9ca7b7c5 pythonPackages.altair: fix build
(cherry picked from commit 43d822178b)
2018-03-20 18:11:24 +01:00
Robert Schütz
f638751bb2 pythonPackages.WSME: 0.8.0 -> 0.9.2
(cherry picked from commit 2773b76f33)
2018-03-20 18:11:23 +01:00
Robert Schütz
7098c05b59 pythonPackages.WSME: move expression
(cherry picked from commit 9f54b031fd)
2018-03-20 18:11:23 +01:00
Robert Schütz
c6eac40de4 pythonPackages.astropy: disable for python 2
(cherry picked from commit 3d989e3d7a)
2018-03-20 18:11:23 +01:00
Robert Schütz
c8ac1a2176 pythonPackages.klein: 15.3.1 -> 17.10.0
(cherry picked from commit b34af91889)
2018-03-20 18:11:23 +01:00
Robert Schütz
c7b7779ee2 pythonPackages.klein: move expression
(cherry picked from commit 86e007bd31)
2018-03-20 18:11:22 +01:00
Robert Schütz
19e7212940 pythonPackages.deform: 2.0.a2 -> 2.0.5
(cherry picked from commit 86f21360ac)
2018-03-20 18:11:22 +01:00
Robert Schütz
7185278447 pythonPackages.deform: move expression
(cherry picked from commit a1b9cc7938)
2018-03-20 18:11:22 +01:00
Robert Schütz
6d2fd84beb pythonPackages.zope_copy: 4.0.2 -> 4.1.0
(cherry picked from commit 12695be641)
2018-03-20 18:11:22 +01:00
Robert Schütz
9fd7e2eee2 pythonPackages.stem: run unit tests
(cherry picked from commit 685dd8d21d)
2018-03-20 18:11:22 +01:00
Robert Schütz
15d741b62b pythonPackages.stem: move expression
(cherry picked from commit 061e79806e)
2018-03-20 18:11:21 +01:00
Robert Schütz
b87bafdffd pythonPackages.{reviewboard,djblets}: uninit
Djblets is unmaintained: has not been updated since 2015, but had many releases.
Dependency django_pipeline_1_3 is broken and should anyway be removed from pythonPackages because we want to have a consistent package set.
Because the reviewboard package also hasn't been updated since 2015 and depends on djblets, it is removed as well.

(cherry picked from commit fbff08f2f2)
2018-03-20 18:11:21 +01:00
Robert Schütz
0aafdaecee pythonPackages.django_pipeline: 1.5.1 -> 1.6.14
(cherry picked from commit 6e78005ef1)
2018-03-20 18:11:21 +01:00
Robert Schütz
99ac0883cc pythonPackages.slimit: init at 0.8.1
(cherry picked from commit 127045d8e0)
2018-03-20 18:11:21 +01:00
Robert Schütz
f6c66f6cb1 pythonPackages.django_pipeline: move expression
(cherry picked from commit ba74cf4d5c)
2018-03-20 18:11:09 +01:00
Sander van der Burg
5a777d237c titaniumenv: remove obsolete java fix wrapper on darwin
(cherry picked from commit 5532cc1641)
2018-03-20 17:55:25 +01:00
Sander van der Burg
0938277468 titaniumenv: add 7.1 SDK and make it the default
(cherry picked from commit e8e7e78d9f)
2018-03-20 17:55:15 +01:00
zimbatm
d2bb154421 nix-serve: patch for nix 2.0 (#37459)
Fixes incompatible secret file handling. See https://github.com/edolstra/nix-serve/pull/8

(cherry picked from commit 8add42f90c)
2018-03-20 16:41:10 +00:00
Tim Steinbach
f086e3ebde scala: 2.12.4 -> 2.12.5
(cherry picked from commit a429ae273ab752c61ed0c5dc955331617b9e7364)
2018-03-20 09:38:51 -04:00
Robert Schütz
225eac1f37 pythonPackages.bleach: 2.1.2 -> 2.1.3
(cherry picked from commit 9f276ccd38)
2018-03-20 12:29:21 +01:00
Matthieu Coudron
8337d1ddca pythonPackages.neovim: 0.2.3 -> 0.2.4
required to work with latest deoplete for instance

(cherry picked from commit 366c79e17f)
2018-03-20 11:06:12 +01:00
Frederik Rietdijk
8d24d4fac9 python: neovim: 0.2.1 -> 0.2.3
(cherry picked from commit 7ce85c014e)
2018-03-20 11:06:05 +01:00
Peter Hoeg
14cbca54da Merge pull request #37402 from badi/unifi
unifi: 5.6.30 -> 5.6.36
2018-03-20 13:24:05 +08:00
Tim Steinbach
e530ee1af5 linux-copperhead: 4.15.10.a -> 4.15.11.a
(cherry picked from commit bb2c260a231154b743d4c7ba6c43bd14da9d0284)
2018-03-19 22:32:55 -04:00
Badi Abdul-Wahid
9553628c22 unifi: 5.6.30 -> 5.6.36
[Release Notes](https://community.ubnt.com/t5/UniFi-Updates-Blog/UniFi-5-6-36-LTS-Stable-has-been-released/ba-p/2277323)

(cherry picked from commit 754911847e)
2018-03-19 22:00:36 -04:00
Andrew Childs
c2a0eeeb1a Chromium: fix skia build on aarch64
Patch imported from Arch Linux ARM

(cherry picked from commit 3928fd9081)
2018-03-20 02:44:23 +02:00
Yuriy Taraday
5abaf2a959 chromium: 65.0.3325.146 -> 65.0.3325.162
Also bump dev branch to ensure that next beta will work.

(cherry picked from commit 6b0732a956)
2018-03-20 02:43:45 +02:00
Tuomas Tynkkynen
607fc823d0 nss: Fix aarch64 build
(cherry picked from commit 8254d2cfb0)
2018-03-20 02:43:35 +02:00
gnidorah
63e3251637 cgit: wrap python scripts
(cherry picked from commit 55f1bbe623)
2018-03-19 23:24:07 +00:00
Josef Kemetmüller
42e2ed6520 pythonPackages.notebook: fix darwin build
The send2trash library, which is now included in the notebook doesn't
succeed during build, even though it works.

(cherry picked from commit 8aaa17c52a)
2018-03-20 00:05:24 +01:00
Daiderd Jordan
a3983d6d05 libftdi: mark linux only
(cherry picked from commit 3f964978d8)
2018-03-20 00:04:11 +01:00
Daiderd Jordan
a2b75703d5 kore: fix clang build
/cc ZHF #36454

(cherry picked from commit 031492cbfe)
2018-03-20 00:03:57 +01:00
Daiderd Jordan
9ba0bf3e52 iniparser: fix darwin build
/cc ZHF #36454

(cherry picked from commit 5873a3418b)
2018-03-20 00:03:01 +01:00
Daiderd Jordan
517d8261d1 imatix_gsl: fix clang build
/cc ZHF #36454

(cherry picked from commit e616725ba0)
2018-03-20 00:02:52 +01:00
Daiderd Jordan
ed8c29fa65 ii: fix darwin build
/cc ZHF #36454

(cherry picked from commit d7856d3c2a)
2018-03-20 00:02:42 +01:00
Josef Kemetmüller
7e39d25600 python3Packages.pycurl: fix darwin build
(cherry picked from commit bd836b7761)
2018-03-19 23:57:09 +01:00
xeji
084993f345 altermime: fix build
(cherry picked from commit f9ed23d271)
2018-03-19 22:36:13 +00:00
Robert Schütz
7a5c7c1818 nixos/borgbackup: init
(cherry picked from commit fdf0f037be)
2018-03-19 20:32:43 +01:00
WilliButz
280d762338 grafana: 5.0.1 -> 5.0.3, fix headless phantomjs
(cherry picked from commit ca7b29050f)
2018-03-19 20:00:45 +01:00
Ryan Mulligan
f6779e0f45 graylog: 2.4.1 -> 2.4.3
Semi-automatic update. These checks were done:

- built on NixOS
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl -h` got 0 exit code
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl --help` got 0 exit code
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl help` got 0 exit code
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl -V` and found version 2.4.3
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl -v` and found version 2.4.3
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl --version` and found version 2.4.3
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl version` and found version 2.4.3
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl -h` and found version 2.4.3
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl --help` and found version 2.4.3
- ran `/nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3/bin/graylogctl help` and found version 2.4.3
- found 2.4.3 with grep in /nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3
- found 2.4.3 in filename of file in /nix/store/qyrv15995w1pl2vmf1i720ii4s9gb3x3-graylog-2.4.3

(cherry picked from commit e716a11026)
2018-03-19 20:00:45 +01:00
Andreas Rammhold
b8b740808c Merge pull request #37309 from andir/18.03/firefox
[18.03] firefox updates (59.0 -> 59.0.1, firefox-esr: 52.7.1esr -> 52.7.2esr)
2018-03-19 19:29:52 +01:00
Andreas Rammhold
f87594f3ca firefox-esr: add CVE-2018-5147 patch for ARM platforms
The patch was missing in the release tag and must be added manually.
Read [1] for further details.

[1] http://seclists.org/oss-sec/2018/q1/242
2018-03-19 19:17:35 +01:00
taku0
a8cdcc52d8 firefox-bin: 59.0 -> 59.0.1
(cherry picked from commit 3d28c32921)
2018-03-19 19:17:35 +01:00
taku0
89ed0cfde6 firefox: 58.0.2 -> 59.0.1
(cherry picked from commit 9aae5d7c80 & 8170c05afc)
2018-03-19 19:17:35 +01:00
Robert Schütz
ddbff03f0f asciidoc: add enableJava option
fixes https://github.com/NixOS/nixpkgs/issues/37045

(cherry picked from commit 9ede31bfbe)
2018-03-19 17:51:40 +01:00
Tim Steinbach
5bbfe48355 linux: 4.15.10 -> 4.15.11
(cherry picked from commit 80d0ccaaab)
2018-03-19 09:03:24 -04:00
Tim Steinbach
19daa8ca0d linux: 4.14.27 -> 4.14.28
(cherry picked from commit e9ce4c019b)
2018-03-19 09:03:19 -04:00
Tim Steinbach
6c3638cff5 linux: 4.9.87 -> 4.9.88
(cherry picked from commit c4963d395d)
2018-03-19 09:03:13 -04:00
Tim Steinbach
10c404acd2 linux: 4.4.121 -> 4.4.122
(cherry picked from commit 04f11faa68)
2018-03-19 09:03:08 -04:00
Vaibhav Sagar
e8f7e1e76c pythonPackages.thumbor: mark as broken under Python 3 2018-03-19 10:27:34 +01:00
Vladimír Čunát
27994f8cdf Merge #37335: wideland: fix build and .desktop
(cherry picked from commit 940fab424a)
2018-03-18 23:47:42 +01:00
Josef Kemetmüller
b964be2410 pythonPackages.tkinter: fix darwin build
(cherry picked from commit af0f9fa26b)
2018-03-18 23:24:03 +01:00
Daiderd Jordan
3b1e354a2c guile-lint: disable tests on darwin
(cherry picked from commit 4e1ab9d44c)
2018-03-18 22:29:19 +01:00
Pascal Wittmann
6759a03179 homebank: 5.1.7 -> 5.1.8 2018-03-18 20:51:16 +01:00
Pascal Wittmann
0b0bd0c8cc icmake: 9.02.06 -> 9.02.07 2018-03-18 20:45:58 +01:00
taku0
ac2378d812 firefox-esr: 52.6.0esr -> 52.7.2esr
(cherry picked from commit d947db7e3c)
2018-03-18 20:20:00 +01:00
taku0
548044350a nss: 3.34.1 -> 3.35; cacert.certdata2pem: 20160104 -> 20170717
(cherry picked from commit 16ee6b5ed9)
2018-03-18 20:19:52 +01:00
Ryan Mulligan
6924132355 spaceFM: 1.0.5 -> 1.0.6
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/.spacefm-wrapped -h` got 0 exit code
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/.spacefm-wrapped --help` got 0 exit code
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/.spacefm-wrapped --version` and found version 1.0.6
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/spacefm -h` got 0 exit code
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/spacefm --help` got 0 exit code
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/spacefm --version` and found version 1.0.6
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/.spacefm-installer-wrapped --help` got 0 exit code
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/.spacefm-installer-wrapped help` got 0 exit code
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/spacefm-installer --help` got 0 exit code
- ran `/nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6/bin/spacefm-installer help` got 0 exit code
- found 1.0.6 with grep in /nix/store/4hdgd1vlac5isgsb728f3qjpqcs2zxqp-spacefm-1.0.6
- directory tree listing: https://gist.github.com/1af4e8f53a36978c67e557c6c4c22b8d

(cherry picked from commit bb165a9d6f)
2018-03-18 18:50:24 +00:00
Maximilian Bode
b506cdbf90 spass: make gcc dependency explicit
(cherry picked from commit 9dc0f229ad)
2018-03-18 18:30:31 +01:00
Maximilian Bode
dda33d697d samtools: make gcc dependency explicit
(cherry picked from commit 92c5097c6d)
2018-03-18 18:30:15 +01:00
Daiderd Jordan
715338b4bb gnu-apl: fix clang build
/cc ZHF #36454

(cherry picked from commit ec15ef011a)
2018-03-18 18:13:29 +01:00
Pascal Wittmann
0184e3f8cc zim: 0.67 -> 0.68 2018-03-18 18:12:18 +01:00
Maximilian Bosch
6baf97fe61 pythonPackages.thumbor: 6.3.2 -> 6.4.2; fix build
Origianlly the package was broken as bumping `pythonPackages.pillow` to
5.x broke `thumbor`. The latest upstream version `6.4.2` solved this
issue, so a simple package bump was sufficient.

Furthermore the following changes were made:

- moved the expression into its own file
- added myself as maintainer in case of any further breackage
- re-enabled python3 build: 6.4.2 is fine with python3, however the
  `futures` dependency can't be satisfied anymore as it's part of
  Python3. Therefore a patch for `setup.py` will be applied for Python3
  buildsto drop the dependency

Note: the testsuite is disabled for now as several impure tests are done
and our testing environment seems to be unable to work the with the
natively compiled python modules properly.

Therefore I tested the module using the following expression:

``` nix
with import ./. {};

stdenv.mkDerivation {
  name = "thumbor-test";
  src = null;
  buildInputs = [ python pythonPackages.thumbor ];
}
```

Inside this nix shell `thumbor` works fine and the native modules can be
imported.

See https://hydra.nixos.org/build/71062729/log
See ticket #36453

(cherry picked from commit 23e6689578)
2018-03-18 17:19:08 +01:00
Robert Schütz
747a426ce6 pythonPackages.flake8-debugger: fix build
(cherry picked from commit 5c897bdd59)
2018-03-18 16:44:09 +01:00
Robert Schütz
1287bc21b2 pythonPackages.dlib: fix build
(cherry picked from commit 4779989c4e)
2018-03-18 16:44:09 +01:00
Robert Schütz
c310c64d71 pythonPackages.colander: 1.0 -> 1.4
(cherry picked from commit 93b10cd879)
2018-03-18 16:44:09 +01:00
Robert Schütz
b34d370eb7 pythonPackages.colander: move expression
(cherry picked from commit a6cbdeaef3)
2018-03-18 16:44:09 +01:00
Robert Schütz
18221dde69 pythonPackages.robomachine: fix build
(cherry picked from commit edc94294c8)
2018-03-18 16:44:09 +01:00
Robert Schütz
eecc751716 pythonPackages.allpairspy: init at 2.4.0
(cherry picked from commit bd7a7bd817)
2018-03-18 16:44:09 +01:00
Robert Schütz
ce032734c7 pythonPackages.pyshphere: uninit
Build is broken and project is unmaintained since 2013.

(cherry picked from commit 097dd635fa)
2018-03-18 16:44:09 +01:00
Robert Schütz
f999bc180b pythonPackages.pyhomematic: disable tests because of unreliable timimg
(cherry picked from commit 97e54c4f75)
2018-03-18 16:44:09 +01:00
Robert Schütz
f1f0134dbd pythonPackages.credstash: fix build
This applies https://github.com/fugue/credstash/pull/178.

(cherry picked from commit 14ed0f5fe0)
2018-03-18 16:44:09 +01:00
Robert Schütz
7a85df0ecd pythonPackages.odo: mark as broken
Odo is incompatible with Networkx 2.
See https://github.com/blaze/odo/pull/601.

(cherry picked from commit 0b6a2b2037)
2018-03-18 16:44:09 +01:00
Robert Schütz
e68997c03a klaus: move out of pythonPackages and 0.9.1 -> 1.2.2
(cherry picked from commit 19797d8464)
2018-03-18 16:44:09 +01:00
Robert Schütz
5141fe1cf3 pythonPackages.python-ctags3: init at 1.2.4
(cherry picked from commit bd3280fbae)
2018-03-18 16:44:09 +01:00
Robert Schütz
ee97df8432 pythonPackages.scikitlearn: disable doctests
fixes https://github.com/NixOS/nixpkgs/issues/35436

(cherry picked from commit cc305174e2)
2018-03-18 16:44:09 +01:00
Robert Schütz
e496420972 pythonPackages.hvac: 0.2.15 -> 0.5.0
(cherry picked from commit bc9dc2ccf1)
2018-03-18 16:44:09 +01:00
Robert Schütz
a5d75da87f pythonPackages.hvac: move expression
(cherry picked from commit 3394feaeef)
2018-03-18 16:44:09 +01:00
Robert Schütz
bf4578f62e pythonPackages.paypalrestsdk: 0.7.0 -> 1.13.1
(cherry picked from commit 5ec4b9d819)
2018-03-18 16:44:09 +01:00
Robert Schütz
d3c1ae3576 pythonPackages.paypalrestsdk: move expression
(cherry picked from commit ba5d1bb28b)
2018-03-18 16:44:09 +01:00
Robert Schütz
7249ff9d5b pythonPackages.pyamf: disable for Python 3
(cherry picked from commit 104f58d6a1)
2018-03-18 16:44:09 +01:00
Robert Schütz
244e3da862 pythonPackages.pushbullet: 0.10.0 -> 0.11.0 and fix build
(cherry picked from commit 4e35388878)
2018-03-18 16:44:09 +01:00
Robert Schütz
02a6deb7af pythonPackages.pushbullet: move expression
(cherry picked from commit 127f99e22e)
2018-03-18 16:44:08 +01:00
Robert Schütz
35ca4c5115 pythonPackages.moinmoin: disable for Python 3
(cherry picked from commit 7e8e3807f3)
2018-03-18 16:44:08 +01:00
Robert Schütz
f9def2f4e3 pythonPackages.readme_renderer: 17.2 -> 17.4
(cherry picked from commit 922b0cec82)
2018-03-18 16:44:08 +01:00
Robert Schütz
090ca7e47c pythonPackages.CommonMark: 0.6.3 -> 0.7.5
(cherry picked from commit d7d4ce735e)
2018-03-18 16:44:08 +01:00
Robert Schütz
9dfac9497d pythonPackages.CommonMark: move expression
(cherry picked from commit b549f18b6c)
2018-03-18 16:44:08 +01:00
Peter Hoeg
6e30c6b265 nixos home-assistant: a couple of fixes (#36338)
a) set path to /run/wrappers so ping works
b) run via a target so we can easily inject other components (config copier,
appdaemon)

(cherry picked from commit 2859483fe9)
2018-03-18 23:43:24 +08:00
Robert Schütz
6daee8c3f8 pythonPackages.tmdb3: 0.6.17 -> 0.7.2
(cherry picked from commit f76e8cb742)
2018-03-18 16:33:42 +01:00
Robert Schütz
5e4411f45b pythonPackages.tmdb3: move expression
(cherry picked from commit 9e29b4b269)
2018-03-18 16:33:29 +01:00
Benjamin Saunders
f2390ae057 matrix-synapse: 0.26.0 -> 0.26.1
Security hotfix

(cherry picked from commit cef5ed1bc2)
2018-03-18 14:33:33 +00:00
Peter Hoeg
199da0db1e home-assistant: support pushover
(cherry picked from commit e1080b0d43)
2018-03-18 21:03:38 +08:00
Jörg Thalheim
0b3170b874 python.pkgs.pushover: tests exists, but require network
(cherry picked from commit c3535901c3)
2018-03-18 21:03:25 +08:00
Jörg Thalheim
3ae19a3610 python.pkgs.pushover: there are no tests
(cherry picked from commit 3336a7b8ac)
2018-03-18 21:03:18 +08:00
Peter Hoeg
c68ed70878 pythonPackages.pushover: init at 0.3
(cherry picked from commit 1b129b0b54)
2018-03-18 21:03:00 +08:00
giraffito
0869801a69 nixos/security: fix description of sudo.wheelNeedsPassword
the previous description mistakenly described the opposite semantics

(cherry picked from commit b9639d7e1f)
2018-03-18 12:29:00 +00:00
Andreas Wiese
fce096accc nixos/window-managers: actually add evilwm to default.nix
Commit 1f2b938 introduced a module for evilwm as a window-manager, but
did not actually add this module to window-manager's default.nix which
renders it useless.

(cherry picked from commit c7e1dff94e)
2018-03-18 11:13:53 +00:00
Echo Nolan
3f6c94e3df workrave: fix alert sounds by including the right GST plugins
(cherry picked from commit 5b0985d055)
2018-03-18 10:51:10 +00:00
Echo Nolan
2380e3071c workrave: 1.10.7 -> 1.10.20
Also: switch to GTK-3, fix GSettings by using wrapGAppsHook.
(cherry picked from commit 250c19c746)
2018-03-18 10:51:09 +00:00
Vladimír Čunát
617d73f229 Merge #37264: archiveopteryx: fix build w/gcc7
(cherry picked from commit 214016c118)
2018-03-18 11:02:41 +01:00
Tim Steinbach
557aa6e7d7 curl: 7.58.0 -> 7.59.0
(cherry picked from commit 837ecc2f6a)
It fixes three vulnerabilities.
2018-03-18 10:52:47 +01:00
xeji
5aeb26da06 heapster: fix build
fetchFromGitHub returned a different sha256 for the same revision

(cherry picked from commit 690939730a)
2018-03-18 09:43:48 +00:00
Elis Hirwing
280ac9b471 gitea: fix usage over ssh
Using gitea over ssh had two isses:
 1. No shell was set for the user
 2. Gitea tried to write logs to
 /nix/store/x83q12kyd9gw1pay036dxz2dq0apf17h-gitea-1.3.2-bin/log when
 serving the ssh usage.

(cherry picked from commit fa76c9a385)
2018-03-18 09:42:23 +00:00
Vladimír Čunát
ebcf130a84 tremor: rename according to our docs
https://nixos.org/nixpkgs/manual/#sec-package-naming
I forgot to include this commit in the parent merge.

(cherry picked from commit bbe8c1e593)
2018-03-18 10:34:14 +01:00
Vladimír Čunát
ed6e9c5e19 Merge #37267: libvorbis, tremor: CVE-2018-5146 updates + SDL build impurity.
(cherry picked from commit 65cf335715)
2018-03-18 10:34:10 +01:00
Dmitry Kalinkin
f949149dc4 pyslurm: 20171102 -> 20170302 to fix after slurm bump
(cherry picked from commit 8b1fba582a)
2018-03-18 09:16:08 +00:00
Corey O'Connor
d64af3e40f jenkins: Add "java.awt.headless=true" to JDK options.
This is consistent with the recommended jenkins startup script. See:

* https://wiki.jenkins.io/display/JENKINS/JenkinsLinuxStartupScript

(cherry picked from commit 28a55f5bd6)
2018-03-18 08:54:39 +00:00
Corey O'Connor
83e6969c44 jenkins: Include Deja-Vu fonts in system environment to silence jenkins warning.
(cherry picked from commit 241160aacc)
2018-03-18 08:54:34 +00:00
rnhmjoj
592fb2c5a1 noteshrink: init at 0.1.1
(cherry picked from commit dc1c9fb251)
2018-03-18 09:39:57 +01:00
Richard Marko
4937ce0100 nixos manual: fix (n)of typo
(cherry picked from commit d5de7bbc92)
2018-03-18 08:35:45 +00:00
Jörg Thalheim
d0d3a639a3 telegraf: 1.5.1 -> 1.5.3
(cherry picked from commit d5c077b109)
2018-03-18 08:32:33 +00:00
Ryan Mulligan
5b2d17228c autofs: 5.1.3 -> 5.1.4
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- ran `/nix/store/wbax6msw4jcf95a3b56rgb5qyy08v3gb-autofs-5.1.4/bin/automount -h` got 0 exit code
- ran `/nix/store/wbax6msw4jcf95a3b56rgb5qyy08v3gb-autofs-5.1.4/bin/automount --help` got 0 exit code
- ran `/nix/store/wbax6msw4jcf95a3b56rgb5qyy08v3gb-autofs-5.1.4/bin/automount -V` and found version 5.1.4
- ran `/nix/store/wbax6msw4jcf95a3b56rgb5qyy08v3gb-autofs-5.1.4/bin/automount --version` and found version 5.1.4
- ran `/nix/store/wbax6msw4jcf95a3b56rgb5qyy08v3gb-autofs-5.1.4/bin/automount -h` and found version 5.1.4
- ran `/nix/store/wbax6msw4jcf95a3b56rgb5qyy08v3gb-autofs-5.1.4/bin/automount --help` and found version 5.1.4
- found 5.1.4 with grep in /nix/store/wbax6msw4jcf95a3b56rgb5qyy08v3gb-autofs-5.1.4
- directory tree listing: https://gist.github.com/419a24d78045772aea1e7ca68b950f1f

(cherry picked from commit 6cd68c2ad9)
2018-03-18 09:04:25 +01:00
Michiel Derhaeg
d467692907 spotify: 1.0.69.336.g7edcc575-39 -> 1.0.72.117.g6bd7cc73-35
(cherry picked from commit febe728bf5)
2018-03-17 23:16:39 +00:00
Daiderd Jordan
8a7a75372b gargoyle: fix darwin build
/cc ZHF #36454

(cherry picked from commit 6da3ba48a7)
2018-03-17 22:20:53 +01:00
DarkScythe97
725c6f452b microcode-intel: 20171117 -> 20180312
(cherry picked from commit a4fd4e3af0)
2018-03-17 21:12:57 +01:00
Maximilian Bosch
039365d20f pythonPackages.tablib: fix build
`openpyxl` v5 breaks `tablib`, the following patch fixes the API
incompatibility: https://github.com/kennethreitz/tablib/pull/296

See https://hydra.nixos.org/build/70694938/log
See ticket #36453

(cherry picked from commit 4a0c0401b5)
2018-03-17 20:46:32 +01:00
Daiderd Jordan
88075cf435 libconfuse: fix tests on darwin
/cc ZHF #36454

(cherry picked from commit 1798563e62)
2018-03-17 19:41:33 +01:00
Daiderd Jordan
de8842891f far2l: fix clang build
/cc ZHF #36454

(cherry picked from commit 879f144d7f)
2018-03-17 18:48:48 +01:00
Robert Schütz
c8b6fd95d4 pythonPackages.wp_export_parser: uninit
Package is broken and umnaintained.
Upstream has not been updated since 2013.

(cherry picked from commit 94baae5e6b)
2018-03-17 16:30:42 +01:00
Vladimír Čunát
0e7c9b3281 Merge #37059: liferea: 1.12.1 -> 1.12.2 (bugfix)
(cherry picked from commit c3aadd5b4e)
2018-03-17 13:59:13 +01:00
xeji
6e6417c013 libdynd: fix build w/gcc7
(cherry picked from commit 4436d21dfa)
2018-03-17 13:58:40 +01:00
xeji
b1053e6191 rename: fix build
failed since there is no 'devdoc' output

(cherry picked from commit 6f01885fbe)
2018-03-17 13:58:17 +01:00
xeji
c1c6b00627 manticore: 2014.08.18 -> 2017.08.22, fix build
(cherry picked from commit 7ec30b3fcd)
2018-03-17 13:25:04 +01:00
xeji
deebf75a72 libs3: 2015-04-23 -> 2017-06-01, fix build
(cherry picked from commit 823b155adb)
2018-03-17 13:23:32 +01:00
xeji
c4e19a11bc itk: 4.11.0 -> 4.12.2, fix build 2018-03-17 13:17:41 +01:00
Maximilian Bosch
d862661b7c aspino: fix build
Aspino patched `libglucose` for their own uses, however they currently
depend on glucose v4.0.
(see e31c3b4e57/patches)

The patches don't apply properly on `glucose-4.1` anymore, furthermore
the new source directory caused the `bootstrap.sh` from `aspino` which
was supposed to apply the patches and recompile the setup to break.

Furthermore some minor changes to the derivation were introduced:

- upgraded from `2016-01-31` to `2017-03-09`
- the name contains an `-unstable-` infix as upstream has no releases
- instead of a `patchPhase` the `postPatch` hook will be used for
  `substituteInPlace` to keep advanced patching features from `nixpkgs`
  available.
- `patchShebangs` will be called to avoid impurities because of the
  implicit reliance on `/bin/sh`
- added myself as second maintainer to have more people available in
  case of any further breackage

See https://hydra.nixos.org/build/70688471/log
See ticket #36453
2018-03-17 13:07:35 +01:00
Ryan Mulligan
4062990844 lighttpd: 1.4.48 -> 1.4.49
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done:

- built on NixOS
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd -h` got 0 exit code
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd -V` and found version 1.4.49
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd -v` and found version 1.4.49
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd -h` and found version 1.4.49
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd-angel -h` got 0 exit code
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd-angel --help` got 0 exit code
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd-angel help` got 0 exit code
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd-angel -V` and found version 1.4.49
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd-angel -v` and found version 1.4.49
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd-angel --version` and found version 1.4.49
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd-angel -h` and found version 1.4.49
- ran `/nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49/bin/lighttpd-angel --help` and found version 1.4.49
- found 1.4.49 with grep in /nix/store/zqq4z003jl443djfygasflfqk091wphx-lighttpd-1.4.49
- directory tree listing: https://gist.github.com/3f87cc8cd06f4c87b583c225172f1c2e

(cherry picked from commit f589e77842)
2018-03-17 11:22:33 +01:00
Jörg Thalheim
3c3e44a506 flexget: add disclaimer
(cherry picked from commit 7c680e1f39)
2018-03-17 09:56:00 +00:00
rnhmjoj
473fd8a01e flexget: 2.10.82 -> 2.13.5 2018-03-17 09:55:31 +00:00
Vladimír Čunát
0c52ab986b policycoreutils: fixup build with gcc7
Close #37148.  It's safer do disable warnings than to switch the compiler.
2018-03-17 09:36:17 +01:00
volth
0e00bd52bd rpm: 4.14.0 -> 4.14.1
(cherry picked from commit e47175638b)
2018-03-17 07:37:31 +00:00
Jude Taylor
2a32f6bc0c review comment
(cherry picked from commit ea1377419c)
2018-03-16 21:36:15 +01:00
Jude Taylor
f23e611426 fix whois build
(cherry picked from commit a34479850e)
2018-03-16 21:35:51 +01:00
Graham Christensen
5cef3289e7 Merge pull request #36923 from tokudan/ffb59-1803
firefox-bin: 58.0.2 -> 59.0
2018-03-16 10:35:06 -04:00
Nikolay Amiantov
9e3aa30b79 nvidiabl: 0.87 -> 2017-09-26
Fix build on newer kernels. Fixes #36356.

Thanks to yorickvP for suggestions and maintainership.

(cherry picked from commit 7cf6df8903)
2018-03-16 16:49:03 +03:00
Maximilian Bode
7f16996a35 kubernetes: use go 1.9 instead of 1.10
Build using go 1.10 fails due to an error in a vendored dependency
[Upstream Issue](https://github.com/kubernetes/kubernetes/pull/60373)

(cherry picked from commit 29be8dd70c)
2018-03-16 12:53:18 +00:00
Andreas Rammhold
e557b37549 dino: unstable-2018-02-11 -> unstable-2018-03-10
(cherry picked from commit 97ab4c1072)
2018-03-16 09:44:45 +00:00
Nikolay Amiantov
12a88b2c51 steam: improvements for native runtime
* Update dependencies using steam-native-runtime from Arch Linux as a
  reference.
* Remove native-only Steam Runtime, just use installed libraries
  instead.
* Mark native-only Steam as broken (due to segfault inside D-Bus). Seems it was
  already broken for a long time. Doesn't apply to steam-run.
* Some cleanups for chrootenv.

(cherry picked from commit 9c8137ca81)
2018-03-16 03:20:36 +03:00
Nikolay Amiantov
685cf3ee5e steam: don't add zoneinfo manually
We already have this done for FHS environments in general.

(cherry picked from commit 8332b7aef9)
2018-03-16 03:19:46 +03:00
Nikolay Amiantov
39099eafe8 buildFHSEnv: export TZDIR
This is needed since NixOS keeps tzdata in non-standard /etc/zoneinfo path.

(cherry picked from commit 9db2a3e638)
2018-03-16 03:19:29 +03:00
Nikolay Amiantov
af126c64fb libva1: init at 1.7.3
(cherry picked from commit a4a04528e4)
2018-03-16 03:17:42 +03:00
Tim Steinbach
90d01305fb vscode: 1.21.0 -> 1.21.1
(cherry picked from commit f93d4b6181)
2018-03-15 18:41:01 -04:00
Tim Steinbach
6fc7f86338 atom: 1.24.1 -> 1.25.0
(cherry picked from commit eed77950a9196ccb299e8af5da8f5388b63582f7)
2018-03-15 18:35:14 -04:00
Tim Steinbach
6dc10f3d04 linux-copperhead: 4.15.9.a -> 4.15.10.a
(cherry picked from commit ff9db1ffc4)
2018-03-15 16:28:36 -04:00
Elis Hirwing
812b2196fc gitea: enable and configure postgres service if selected as database
(cherry picked from commit 1ad75d0c50)
2018-03-15 14:04:09 -04:00
Tim Steinbach
e95d2412ac linux: 4.15.9 -> 4.15.10
(cherry picked from commit 64c5795c2be9c60e3d7ca716888e7b5a397a7d97)
2018-03-15 10:52:44 -04:00
Tim Steinbach
10e896f4e2 linux: 4.14.26 -> 4.14.27
(cherry picked from commit cad9fabfc26a6c2e31f61966b2e6a24e3f3acf16)
2018-03-15 10:52:35 -04:00
Robert Schütz
408c8c0678 home-assistant: 0.63.3 -> 0.65.5
(cherry picked from commit 306ee199a7)
2018-03-15 15:20:12 +01:00
Robert Schütz
27a8abf0e8 pythonPackages.aiohttp: 3.0.5 -> 3.0.9
(cherry picked from commit 7dfbb8c53c)
2018-03-15 15:20:06 +01:00
Robert Schütz
b1ef373069 pythonPackages.idna-ssl: 1.0.0 -> 1.0.1
(cherry picked from commit cdd2593da1)
2018-03-15 15:20:00 +01:00
Robert Schütz
fb3308d17a python36Packages.hbmqtt: 0.9.1 -> 0.9.2
(cherry picked from commit 81f0cf2cd5)
2018-03-15 15:19:54 +01:00
Timo Kaufmann
177e20c14e conan: Locally pin deps, enable tests
(cherry picked from commit 488835ec6e)
2018-03-15 13:55:14 +01:00
Maximilian Bosch
94ed4376e8 pythonPackages.diff_cover: fix build
In order to adjust the language with `LC_ALL` properly the
`glibcLocales` is needed as `checkInput`. This was the only thing
preventing the testsuite from passing.

See ticket #36453
See https://hydra.nixos.org/build/70682982/nixlog/3

(cherry picked from commit 7dd7638cba)
2018-03-15 12:57:19 +01:00
Augustin Borsu
52e6f6f60c python.spacy: 1.8.2 -> 2.0.9
(cherry picked from commit 22fdb0bd9d)
2018-03-14 23:44:37 +01:00
Augustin Borsu
6381f5a4ee python.ftfy: 5.3.0 -> 4.4.3
V5 only supports python3. Since at the moment the only packages
that use ftfy are spacy and textacy which both support
python2 and 3, I propose to roll back to v4 until another package
requires v5, at that point we can make a duplicate package.

(cherry picked from commit 8187d93da2)
2018-03-14 23:44:30 +01:00
Augustin Borsu
a2684671a1 add aborsu as maintainer
(cherry picked from commit 458ba30fa9)
2018-03-14 23:42:50 +01:00
Augustin Borsu
be85709dfb python.thinc: 6.5.1 -> 6.10.2
(cherry picked from commit 9478948f4d)
2018-03-14 23:41:15 +01:00
Augustin Borsu
4aa47178c9 python.murmurhash: 0.26.4 -> 0.28.0
(cherry picked from commit 2e67c8e030)
2018-03-14 23:40:57 +01:00
Augustin Borsu
92548bc6f0 python.msgpack-numpy: init 0.4.1
(cherry picked from commit 5568e25fa0)
2018-03-14 23:40:37 +01:00
Daiderd Jordan
95f07cc550 cdo: fix darwin build
/cc ZHF #36454

(cherry picked from commit 0c8e8ce7e8)
2018-03-14 23:16:56 +01:00
Daiderd Jordan
2401186d2c ccl: fix darwin build
/cc ZHF #36454

(cherry picked from commit ee6d0a7025)
2018-03-14 23:04:00 +01:00
Will Dietz
655704bf00 busybox: patchshebangs to fix build on "limited" /bin/sh builders
(cherry picked from commit b546c7440e)
2018-03-14 16:59:40 -05:00
taku0
37b31ea04f flashplayer: 28.0.0.161 -> 29.0.0.113
(cherry picked from commit 864f4ceba4)
2018-03-14 16:46:54 -05:00
Daiderd Jordan
af97515d70 cataclysm-dda: fix clang build
/cc ZHF #36454

(cherry picked from commit 5defdee634)
2018-03-14 22:43:19 +01:00
Will Dietz
1d5485c8c8 libdwarf: 20170709 -> 20180129
Upstream describes changes:

Fixes libdwarf/dwarfdump vulnerabilities related to detecting corrupt
DWARF and includes other small improvements

(cherry picked from commit 4bc0f88bb3)
2018-03-14 16:36:06 -05:00
Peter Simons
622c5bebbe haskell-SHA: fix compiler crash while trying to build the test suite on i686
Fixes https://github.com/NixOS/nixpkgs/issues/36949.

(cherry picked from commit 1583cc6449)
2018-03-14 21:24:44 +01:00
Peter Simons
0bdb853ef8 Fix cross-compilation builds of several Haskell packages some more.
(cherry picked from commit 2f2ad74369)
2018-03-14 21:09:34 +01:00
Will Dietz
32c2d99f01 gllvm: init at 2018-02-09
(cherry picked from commit 43c474457c)
2018-03-14 15:02:14 -05:00
Daiderd Jordan
07f1fe42bb python-selenium: fix darwin build
/cc ZHF #36454

(cherry picked from commit b02694dd45)
2018-03-14 21:00:57 +01:00
Tuomas Tynkkynen
b26595f873 nixos/qemu-vm: Add virtualized display + HID devices on AArch64
(cherry picked from commit 9e78baf5c7)
2018-03-14 21:55:32 +02:00
Peter Simons
736189fe74 Fix cross-compilation builds of several Haskell packages.
(cherry picked from commit 70467b9a12)
2018-03-14 20:51:13 +01:00
Josef Kemetmüller
490e46dea6 pythonPackages.pycurl: Fix darwin build
(cherry picked from commit 42555f6c7d)
2018-03-14 20:43:44 +01:00
Daiderd Jordan
6692ae9684 avian: fix darwin build
/cc ZHF #36454

(cherry picked from commit db691029d6)
2018-03-14 20:41:43 +01:00
Daiderd Jordan
7cb4bebacd python-tkinter: mark linux only
/cc ZHF #36454

(cherry picked from commit 9b044a1dba)
2018-03-14 19:53:48 +01:00
Josef Kemetmüller
f024b57f39 glm: fix darwin build
(cherry picked from commit 863fb7b86a)
2018-03-14 19:42:47 +01:00
Matthew Pickering
ec191e7d96 Only apply patch on darwin
(cherry picked from commit 4e96d0e2b7)
2018-03-14 19:35:15 +01:00
Matthew Pickering
4ab4af1bb5 Fix qca-qt5 build on darwin
(cherry picked from commit 2b114a8c29)
2018-03-14 19:35:03 +01:00
xeji
f2d24b8ec6 pythonPackages.nevow: fix build, 0.14.2->0.14.3
fix tests, minor update, move to development/python-modules/

(cherry picked from commit 9a10c55a8a)
2018-03-14 19:09:05 +01:00
Robert Schütz
683c5794b0 pythonPackages.csvkit: fix build
(cherry picked from commit c0466ef834)
2018-03-14 17:00:31 +01:00
Robert Schütz
b4645c3783 pythonPackages.mysql_connector_repackaged: uninit
Package has last been updated in 2012.
There is now also pythonPackages.mysql-connector.

(cherry picked from commit 198bdf39b6)
2018-03-14 16:59:04 +01:00
Robert Schütz
22f0d6474c pythonPackages.ecpy: disable for python 2
setup.py specifies
    python_requires='>=3'

(cherry picked from commit 9b37f0a06d)
2018-03-14 16:58:32 +01:00
Robert Schütz
0f1c8dded7 pythonPackages.konfig: fix tests
(cherry picked from commit 0862ca375c)
2018-03-14 16:58:03 +01:00
Robert Schütz
e666b54155 pythonPackages.konfig: move expression
(cherry picked from commit c7a6483309)
2018-03-14 16:57:57 +01:00
Robert Schütz
4116dd129d pythonPackages.promegranate: mark as broken
"pomegranate does not yet work with networkx 2.0"

(cherry picked from commit 882cf122be)
2018-03-14 16:56:51 +01:00
Robert Schütz
f50a31681e pythonPackages.faker: 0.8.8 -> 0.8.11
This fixes the build failure by adding a missing dependency and because 0.8.11 allows a newer version of ukpostcodeparser.

(cherry picked from commit 495bb794d1)
2018-03-14 16:52:42 +01:00
Robert Schütz
6121f5b376 pythonPackages.text-unidecode: init at 1.1
(cherry picked from commit 35ee24f966)
2018-03-14 16:52:35 +01:00
Robert Schütz
d2326197be pythonPackages.daphne: fix build and enable tests
(cherry picked from commit 40b0c58549)
2018-03-14 16:51:06 +01:00
Robert Schütz
6564e4f227 pythonPackages.green: 2.3.0 -> 2.12.0
(cherry picked from commit 2bdee9b0c3)
2018-03-14 16:42:17 +01:00
Robert Schütz
39609cc945 pythonPackages.xdot: move expression
(cherry picked from commit fac32de1db)
2018-03-14 16:41:37 +01:00
Robert Schütz
2bebfbd3cc pythonPackages.prov: fix build and enable tests
Tests do not actually take 60 minutes.

(cherry picked from commit 8f93cba89c)
2018-03-14 16:40:36 +01:00
Robert Schütz
88d768c59e pythonPackages.networkx: 1.11 -> 2.1
(cherry picked from commit 46d7d069ef)
2018-03-14 16:40:27 +01:00
Robert Schütz
736661ec4b pythonPackages.rednose: 1.2.1 -> 1.3.0
(cherry picked from commit 276fb96532)
2018-03-14 16:38:00 +01:00
Robert Schütz
82378f031a pythonPackages.termstyle: 0.1.10 -> 0.1.11
(cherry picked from commit 09ae15ea50)
2018-03-14 16:37:21 +01:00
Robert Schütz
6480eb59f7 pythonPackages.dbf: fix tests
(cherry picked from commit 84fbf2a410)
2018-03-14 16:36:15 +01:00
Robert Schütz
300ceef5c3 pythonPackages.curtsies: correct dependencies
(cherry picked from commit 674ceb9c2b)
2018-03-14 16:35:51 +01:00
Robert Schütz
480fb8c05e pythonPackages.bibtexparser: enable tests
(cherry picked from commit d322a5b3ec)
2018-03-14 16:35:26 +01:00
Robert Schütz
362b9457a0 pythonPackages.bibtexparser: add propagatedBuildInputs
(cherry picked from commit e1176503e9)
2018-03-14 16:35:13 +01:00
Robert Schütz
a34123b711 pythonPackages.binaryornot: 0.4.0 -> 0.4.4
(cherry picked from commit 4a9a7d3036)
2018-03-14 16:34:37 +01:00
Vladimír Čunát
ddc2ad4e2e Merge #36788: nextcloud-client: restrict to linux
(cherry picked from commit 883b26b98f)
2018-03-14 15:51:40 +01:00
Vladimír Čunát
857d5a086a Merge #36936: libsemanage: fixup build with gcc7
(cherry picked from commit 527ff9c5fd)
2018-03-14 15:47:18 +01:00
Robert Schütz
5e38637412 pythonPackages.ftputil: 3.3 -> 3.4 and fix tests
(cherry picked from commit 62bb869309)
2018-03-14 13:45:14 +01:00
Robert Schütz
1a4173a683 pythonPackages.ftputil: move expression
(cherry picked from commit 92896e2739)
2018-03-14 13:45:05 +01:00
Robert Schütz
81afea1f98 pythonPackages.django-polymorphic: fix tests
(cherry picked from commit ae56cc1f30)
2018-03-14 13:44:02 +01:00
Robert Schütz
8860315c20 pythonPackages.dj-database-url: init at 0.5.0
(cherry picked from commit 7b525acee2)
2018-03-14 13:43:49 +01:00
Robert Schütz
ab326cb02a pythonPackages.affinity: disable for Python 3
(cherry picked from commit 143fd427d4)
2018-03-14 13:42:37 +01:00
Robert Schütz
4d7ed482dc pythonPackages.pycups: fix on Darwin
(cherry picked from commit a5e1dfe3e2)
2018-03-14 13:42:19 +01:00
Robert Schütz
5ab9937099 pythonPackages.pycups: move expression
(cherry picked from commit 150d0b7428)
2018-03-14 13:42:13 +01:00
Robert Schütz
5f9ae3929b pythonPackages.ldappool: 1.0 -> 2.2.0
(cherry picked from commit 3680fc9fd4)
2018-03-14 13:42:00 +01:00
Robert Schütz
4298a313ad pythonPackages.ldappool: move expression
(cherry picked from commit f14c9ae883)
2018-03-14 13:41:53 +01:00
Robert Schütz
cd7765df84 pythonPackages.BlinkStick: patch for newer pyusb version
(cherry picked from commit bfe6d6ab34)
2018-03-14 13:40:47 +01:00
Robert Schütz
7c37a863e0 pythonPackages.BlinkStick: move expression
(cherry picked from commit 250aa352c4)
2018-03-14 13:40:38 +01:00
Robert Schütz
fda0d2fbbe pythonPackages.virtual-display: 0.1.5 -> 0.2.1 and disable tests
(cherry picked from commit 5d7f24e8b5)
2018-03-14 13:40:09 +01:00
Robert Schütz
fed17ce233 pythonPackages.virtual-display: move expression
(cherry picked from commit 7076991eec)
2018-03-14 13:40:02 +01:00
Robert Schütz
11d8ea3f8f pythonPackages.tunigo: fix tests
(cherry picked from commit c5d6e665c9)
2018-03-14 13:38:50 +01:00
Robert Schütz
beccfcd7a1 pythonPackages.tunigo: move expression
(cherry picked from commit cf5b06f9ce)
2018-03-14 13:38:42 +01:00
Piotr Bogdan
fa8e61d118 pingus: fix build with gcc7
(cherry picked from commit 2dfeb6fc53)
2018-03-14 12:57:37 +01:00
Michael Raskin
5687a38cb0 netsurfPackages.libcss: fix build by -Wno-error=implicit-fallthrough.
(cherry picked from commit 0077c7651c)
2018-03-14 12:09:28 +01:00
Michael Raskin
dcb1b693ef Merge pull request #36871 from vbgl/clingo-fix-url
clingo: fix URL
2018-03-14 11:51:59 +01:00
Michael Raskin
016274cc6c graphviz_2_32: restore libgraph, the reason to keep this version
(cherry picked from commit 352c567d1c)
2018-03-14 11:47:38 +01:00
Jörg Thalheim
136a39ee4d shuttle: disable buggy test on darwin
(cherry picked from commit ca1921eb5b)
2018-03-14 09:35:04 +00:00
volth
fd6d464cfc sshuttle: fix build on i686-linux
(cherry picked from commit f161fe06b8)
2018-03-14 09:35:04 +00:00
Badi Abdul-Wahid
85cbd5391a qtlocation: fix darwin build
A dependency (boost) makes use of `std::auto_ptr`, which is no longer
supported in C++17 in Clang. This change re-enables `std::auto_ptr`
capabilities.

(cherry picked from commit 833851cd6e)
2018-03-14 00:15:31 +01:00
Will Dietz
f9cb527902 virtualbox: 5.2.6 -> 5.2.8
Tested against all the VirtualBox VM tests.

Signed-off-by: aszlig <aszlig@nix.build>
Closes: #36127
(cherry picked from commit 273fd896bc)
Reason: The update is trivial in terms of affected packages and contains
        a bunch of Linux-specific fixes.
Signed-off-by: aszlig <aszlig@nix.build>
2018-03-13 23:38:20 +01:00
Peter Simons
3fcbb254fb hackage2nix: update list of failing Hydra builds 2018-03-13 22:04:08 +01:00
aszlig
b05df747cb nixos/tests/virtualbox: Work around test failures
I've started digging into the actual cause of the problem a week ago but
didn't continue fixing this.

The reason why the tests are failing is because
torvalds/linux/commit/72f5e08dbba2d01aa90b592cf76c378ea233b00b has
remapped the location of the TSS into the CPU entry area and we did
update our default kernel to version 4.14 in NixOS/nixpkgs@88530e02b6.

Back to VirtualBox: The guru meditation happens in
selmRCGuestTssPostWriteCheck, which I think is only a followup error. I
believe the right location couldn't be determined by VirtualBox and thus
the write check function triggers that panic because it's reading from
the wrong location.

So the actual problem *only* surfaces whenever we use software
virtualization, which we do for our tests because we don't have nested
virtualization available.

Our tests are also for testing the functionality of VirtualBox itself
and not certain kernel versions or kernel features, so for the time
being and until this is fixed, let's actually use kernel version 4.9 for
the guests within the VM tests. Kernel 4.9 didn't have the mentioned
change of the TSS location and thus the tests succeed.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @dtzWill
(cherry picked from commit ba816ee087)
2018-03-13 22:01:22 +01:00
volth
72fa68058e xfce: do not use old names
(cherry picked from commit fe70fbdefe)
2018-03-13 19:46:31 +01:00
Averell Dalton
4a573f8ae1 teamviewer: 12.0.85001 -> 12.0.90041
(cherry picked from commit 4b00e5c1a9)
2018-03-13 19:46:30 +01:00
Bart Brouns
2d3e899b06 qutebrowser: 1.1.1 -> 1.2.0
(cherry picked from commit f043e09e02)
2018-03-13 19:46:30 +01:00
Eli Flanagan
2a5231c403 timewarrior: enable for darwin
(cherry picked from commit e0bf8113bf)
2018-03-13 19:46:09 +01:00
Will Dietz
038560d68b metrics: fix "values" to be count not bytes, to match prev behavior
https://github.com/NixOS/nixpkgs/pull/36896#discussion_r174163744
(cherry picked from commit 29d46471e0)
2018-03-13 19:45:58 +01:00
Daiderd Jordan
5c5b188afd v8: only use -Wno-error=unused-lambda-capture with clang
(cherry picked from commit 15ee5ff446)
2018-03-13 19:23:48 +01:00
Daniel Frank
a64dea5c2f firefox-bin: 58.0.2 -> 59.0
(cherry picked from commit 43da40ecae)
2018-03-13 19:22:50 +01:00
Maximilian Bosch
9697a84a79 freeorion: fix build
`boost::system::posix_error` is deprecated since v1.37, however the
default Boost version in NixOS is 1.66.

The following upstream patch fixed the issue:
c9b5b13fb8

See ticket #36453

(cherry picked from commit 7da70c0b87)
2018-03-13 18:55:33 +01:00
Franz Pletz
a35928047c fetchurl: remove broken samba mirror
(cherry picked from commit 4f17851fb2)
2018-03-13 17:17:04 +01:00
Franz Pletz
6afb73a984 samba: 4.7.5 -> 4.7.6 for multiple CVEs
Fixes CVE-2018-1050, CVE-2018-1057.

(cherry picked from commit d2582dc92a)
2018-03-13 15:46:51 +01:00
Tim Steinbach
b7a4c0e3c0 samba: 4.7.4 -> 4.7.5
Also, fix kerberos dependency to include krb5kdc

(cherry picked from commit a14df21aae)
2018-03-13 15:46:51 +01:00
Lassulus
66ed24239d altcoins.bitcoin-unlimited: 1.0.2.0 - > 1.0.3.0 (#36715)
* altcoins.bitcoin-unlimited: 1.0.2.0 - > 1.0.3.0

* Update default.nix

(cherry picked from commit bfc75b5198)
2018-03-13 15:02:06 +01:00
Matthieu Coudron
075908d34b grub-install.pl: more details on blkid failure
(cherry picked from commit c476d2f592)
2018-03-13 15:02:05 +01:00
Matthieu Coudron
3264fe594d build-vm: remove trailing dot from script path
Allow to double click/middle click paste path a bit quicker.

(cherry picked from commit 7b7860ff89)
2018-03-13 15:02:05 +01:00
Matthieu Coudron
2c8a6a879c qemu-vm: removes warning when running build-vm
get rid of deprecated qemu commands

(cherry picked from commit b7a2333ebe)
2018-03-13 15:02:05 +01:00
Timo Kaufmann
570cf67110 conan: Fix build
conan has very strict requirements on the versions of its dependencies.
This patch adds downgraded versinos of node-semver and distro to
statisfy these requirements.

(cherry picked from commit 5fdfe61b35)
2018-03-13 15:02:04 +01:00
Luke Adams
9a02553f8a sambaMaster: 4.8.0_2018-01-25 -> 2018-03-09
(cherry picked from commit da45e8d099)
2018-03-13 15:02:04 +01:00
Antoine Eiche
763ec32dd7 tests/docker-tools: add onTopOfPulledImage test
(cherry picked from commit bc1e8f95d4)
2018-03-13 15:02:04 +01:00
Antoine Eiche
7ad7c976d8 dockerTools: add an onTopOfPulledImage example
This allows to test if a pulled image can be updated by using our
Docker tools.

(cherry picked from commit e8f452f110)
2018-03-13 15:02:03 +01:00
Will Dietz
1f9ffb4004 metrics: fixup sed expr to work with Nix 2
(cherry picked from commit 5eb07e2396)
2018-03-13 15:02:03 +01:00
adisbladis
06e99e0a7f overmind: init at 1.1.1
(cherry picked from commit ce78db79a3)
2018-03-13 15:02:03 +01:00
Bart Brouns
75f8209e3b i3: 4.14.1 -> 4.15
(cherry picked from commit cfa4c065d9)
2018-03-13 15:02:02 +01:00
Michael Weiss
2271731c30 androidStudioPackages.{dev,canary}: init at 3.2.0.5
Switch the naming scheme to the channel names.

(cherry picked from commit 74d922638b)
2018-03-13 15:02:02 +01:00
Michael Weiss
a14d18e39b androidStudioPackages.beta: 3.1.0.12 -> 3.1.0.14
(cherry picked from commit 310a665b98)
2018-03-13 15:02:02 +01:00
Nikolay Amiantov
1769af7a28 android-studio: fix GTK LaF
Closes #36887.

(cherry picked from commit d7470c1f1e)
2018-03-13 16:13:43 +03:00
Sander van der Burg
98bc0c37bf airfield: regenerate with node2nix 1.5.3
(cherry picked from commit ebb562d29a)
2018-03-13 10:47:26 +01:00
Sander van der Burg
41f93c6273 nixui: regenerate with node2nix 1.5.3
(cherry picked from commit e2cb020a27)
2018-03-13 10:47:05 +01:00
Sander van der Burg
f04f613270 remarkjs: regenerate dependencies with node2nix 1.5.3
(cherry picked from commit 3a5e38fa00)
2018-03-13 10:46:46 +01:00
Sander van der Burg
74f70f91a2 zed: regenerate packages with node2nix 1.5.3
(cherry picked from commit f9bb730d77)
2018-03-13 10:46:28 +01:00
Johannes Frankenau
3d5ae7dd9c gitea: 1.3.2 -> 1.3.3
(cherry picked from commit fa9950c0ae)
2018-03-12 22:45:58 -04:00
xeji
ad6601bc06 rush: fix build
see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=853649

(cherry picked from commit 50d3c09e67)
2018-03-13 01:35:24 +01:00
Symphorien Gibol
d75137ece7 ssr: fix build
ssr uses the deprecated get_generic_category() in ./configure
pass the flag enabling that to boost

(cherry picked from commit 7ba5a94e35)
2018-03-13 01:33:52 +01:00
Yuriy Taraday
14d6a5dd23 bitcoin-unlimited: fix build with boost 1.66
Use part of fix for mainline bitcoin:
1ec0c0a01c

Also enable parallel builds for speed.

(cherry picked from commit 876420f04e)
2018-03-13 01:33:52 +01:00
Franz Pletz
bfb9424e13 nodePackages: fix evaluation
Introduced in 40e3ad60aa.

(cherry picked from commit 2c9d2d6526)
2018-03-13 00:45:14 +01:00
xeji
ef49c300a6 ufraw: fix build by using gcc6
doesn't build with gcc7 due to ill-formed upstream code,
see https://gcc.gnu.org/gcc-7/porting_to.html#cmath

(cherry picked from commit 817cd00bb9)
2018-03-13 00:41:37 +01:00
xeji
f275ec88ad torque: fix build w/gcc7
(cherry picked from commit db2b306747)
2018-03-13 00:41:37 +01:00
xeji
380dac18a0 vxl: fix build by using gcc6
upstream code incompatible w/gcc7. no newer version available.

(cherry picked from commit 0367a6235c)
2018-03-13 00:41:36 +01:00
Maximilian Bosch
c8adc90361 pythonPackages.gplaycli: 0.1.2 -> 3.21
Fix the broken package: https://hydra.nixos.org/build/70687256/log

The newer version requires two new dependencies that have been added as
well:

- gpapi (Unofficial Python API for Google Play) at version 0.4.2
- pyaxmlparser (Parser for Android's XML handler) at version 0.3.7

See ticket #36453
See https://hydra.nixos.org/build/70687256/log

(cherry picked from commit 4feaaa7f06)
2018-03-13 00:41:36 +01:00
Maximilian Bosch
5ceb25c217 pythonPackages.asana: fix build
Fetching sources from GitHub to have needed files like `LICENSE` and
tests available to provide safer builds.

See https://hydra.nixos.org/build/70676254/log
See ticket #36453

(cherry picked from commit 17e1795db0)
2018-03-13 00:41:36 +01:00
xeji
36eee0b9a3 dislocker: 0.6.1 -> 0.7.1
(cherry picked from commit 2d70431553)
2018-03-13 00:41:35 +01:00
xeji
a332101652 codeblocks: 16.01 -> 17.12, fix build
(cherry picked from commit 58b7f17a0f)
2018-03-13 00:41:35 +01:00
xeji
2062aef4f0 jfbview: mark as broken (upstream issue)
incompatible with current libmupdf:
https://github.com/jichu4n/JFBView/issues/17
does not appear actively maintained.

(cherry picked from commit a4f53eae2c)
2018-03-13 00:41:35 +01:00
Yuri Aisaka
050ad5dd36 cpp-gsl: treat sign-conversion as warning (#36630)
(cherry picked from commit 77e2f28b45)
2018-03-13 00:41:34 +01:00
WilliButz
442da8b898 grafana: 5.0.0 -> 5.0.1
(cherry picked from commit ef90ff2d8e)
2018-03-13 00:39:44 +01:00
Ryan Mulligan
378041f1b6 sdcc: 3.6.0 -> 3.7.0
Semi-automatic update. These checks were done:

- built on NixOS
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/as2gbmap -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/as2gbmap --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcdb -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcdb --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/s51 -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/s51 -v` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sz80 -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sz80 -v` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/stlcs -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/stlcs -v` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/shc08 -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/shc08 -v` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sstm8 -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sstm8 -v` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdar -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdar --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdar -h` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdar --help` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdranlib -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdranlib --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdranlib -h` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdranlib --help` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdobjcopy -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdobjcopy --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdobjcopy -h` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdobjcopy --help` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdnm -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdnm --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdnm -h` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdnm --help` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/packihx -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/packihx --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/makebin -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcpp --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcc -h` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcc --help` got 0 exit code
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcc -v` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcc --version` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcc -h` and found version 3.7.0
- ran `/nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0/bin/sdcc --help` and found version 3.7.0
- found 3.7.0 with grep in /nix/store/5xwjrizy4782acsnrjjfpypif8yjp41n-sdcc-3.7.0

(cherry picked from commit 29ea34c6db)
2018-03-13 00:30:28 +01:00
Sander van der Burg
89242aadcc nodePackages: regenerate with node2nix 1.5.3 2018-03-13 00:13:12 +01:00
Maximilian Bosch
f0da9baaa4 pythonPackages.mt-940: fix build (#36784)
- added missing `enum34` dependency
- enabled tests
- moved expression into its own file

See ticket #36453
See https://hydra.nixos.org/build/70677609/log

/cc @the-kenny
2018-03-12 23:36:04 +01:00
Nikolay Amiantov
52d6b940ff warsow: add missing patch
(cherry picked from commit 28264de9fc)
2018-03-13 01:12:29 +03:00
Nikolay Amiantov
0f558b07e3 warsow: 1.03 -> 2.1.2
Fix build, split into engine and game to build engine on Hydra.

(cherry picked from commit 5ed883a40b)
2018-03-13 01:11:09 +03:00
Nikolay Amiantov
99901537c7 dfhack: fix checksum
Fixes #36819.

(cherry picked from commit 2dfbef2764)
2018-03-13 01:11:02 +03:00
Nikolay Amiantov
8f7a7dfbdd xgboost: disable on AArch64
It requires SSE2.

(cherry picked from commit 5e9e30799b)
2018-03-13 01:10:49 +03:00
Amine Chikhaoui
8be8c91d0a pcstat: init at 2017-05-28 (#33643)
(cherry picked from commit d5dd7f4413)
2018-03-12 23:02:25 +01:00
symphorien
0cc0001756 wxhexeditor: 0.22 -> 0.24 (#36832)
(cherry picked from commit 991e5ca486)
2018-03-12 22:44:23 +01:00
Vladyslav M
b9cfe0cefb hplip: 3.17.10 -> 3.17.11
(cherry picked from commit be6d9e1e69)
2018-03-12 22:44:22 +01:00
Lenz Weber
d6986819fb gitkraken: 3.3.4 -> 3.4.0
(cherry picked from commit e11f0aee7c)
2018-03-12 22:32:47 +01:00
Markus Kowalewski
55f626e58f beegfs: 6.17 -> 6.18
(cherry picked from commit 11d40d5331)
2018-03-12 22:31:22 +01:00
Niklas Hambüchen
0c077427e1 nixos-container: Fix destroy terminating before it's done. Fixes #32545.
This also fixes the race condition found in #32551.

And it fixes nixops's repeated destroy/deploy being broken
(https://github.com/NixOS/nixops/issues/809).

(cherry picked from commit 5d83988c1e)
2018-03-12 22:29:04 +01:00
Franz Pletz
a3d87f1ed8 nixos/tests/containers-tmpfs: fix test name
(cherry picked from commit b0fa004fa9)
2018-03-12 22:28:51 +01:00
Johannes Frankenau
2783e4e755 wireguard: 0.0.20180218 -> 0.0.20180304
(cherry picked from commit a0cc592c3e)
2018-03-12 22:14:44 +01:00
Lloyd Hazlett
60d6d53eee spideroak: 6.1.9 -> 7.0.1
(cherry picked from commit 47c7ad14ef)
2018-03-12 22:10:21 +01:00
Sarah Brofeldt
9dbc763949 nixos/tests/acme: use mail-test-srv tls certs from source
(cherry picked from commit df3706c47c)
2018-03-12 22:10:20 +01:00
Sarah Brofeldt
665c75eccb nixos/tests/acme: go compat update, unvendor pkcs11
(cherry picked from commit bd35580860)
2018-03-12 22:10:20 +01:00
Daiderd Jordan
449ad50644 libcdio: fix darwin build
/cc ZHF #36454

(cherry picked from commit af041b34a2)
2018-03-12 21:35:07 +01:00
Daiderd Jordan
30c9664568 libpar2: fix clang build
/cc ZHF #36454

(cherry picked from commit 4ba61cd136)
2018-03-12 21:24:48 +01:00
Daiderd Jordan
7fbb31a12b sslscan: fix clang build
/cc ZHF #36454

(cherry picked from commit 0fdbf3edeb)
2018-03-12 21:14:48 +01:00
Daiderd Jordan
9bf324b5d0 v8: fix clang build
/cc ZHF #36454

(cherry picked from commit 0c629e9c23)
2018-03-12 21:09:52 +01:00
Vladimír Čunát
ec46986f86 Merge #36764: bip: fixup build with gcc7
(cherry picked from commit 8eca63588d)
2018-03-12 20:35:37 +01:00
Daiderd Jordan
545665b51a xarchiver: fix darwion build
/cc ZHF #36454

(cherry picked from commit c5d531ddfb)
2018-03-12 20:34:06 +01:00
Vladimír Čunát
580d00d507 Merge #36686: darling-dmg: fix build with gcc7
(cherry picked from commit 1d968d180a)
2018-03-12 20:29:56 +01:00
Vladimír Čunát
bb88585479 Merge #36626: libgroove: fix build
(cherry picked from commit 8a74c75e22)
2018-03-12 20:22:38 +01:00
Vladimír Čunát
0092cf65e9 Merge #36807: fcgiwrap: avoid failure on warning
(cherry picked from commit b0b1de897f)
2018-03-12 20:22:34 +01:00
Johannes Frankenau
b999b5e80c bcal: 1.7 -> 1.8
The tests failed for a good reason on Darwin and should not have been
disabled. The issue has been resolved upstream with version 1.8 which
now also supports AArch64.

(cherry picked from commit 59cc47d802)
2018-03-12 19:49:52 +01:00
Josef Kemetmüller
6b44b2ee32 pythonPackages.shapely: fix darwin build
(cherry picked from commit 74b81ea91c)
2018-03-12 19:43:20 +01:00
Josef Kemetmüller
a333b11963 petsc: fix darwin build
(cherry picked from commit edef344458)
2018-03-12 19:12:04 +01:00
Matthias Beyer
c568f4d21a lumail: Use lua5.1
This is necessary because the standard library which is distributed with
lumail (the lumail core configuration so to speak) is written for lua5.1
apparently.

The website states 5.1 or 5.2 or 5.3, but 5.2 fails because "loadstring"
was deprecated in lua 5.2.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit 13e95f33db)
2018-03-12 16:38:44 +00:00
Matthias Beyer
556857bc22 lumail: Fix package definition
Includes:

* Package gets a flag to use the debug build
* install phase installs all lua scripts from the package and makes
  lumail find them
* global configuration which is shipped with the package can be
  overridden, if desired
* parallel building enabled

(cherry picked from commit bb8e1c4512)
2018-03-12 16:38:44 +00:00
Matthias Beyer
a215099636 lumail: 2.9 -> 3.1
(cherry picked from commit 29c33ba5af)
2018-03-12 16:38:43 +00:00
Rok Garbas
d4fc1a0c0b vimPlugins: updating all vim plugings 2018-03-12 14:32:45 +01:00
John Children
11caaec824 LanguageClient-neovim: 2017-12-05 -> 2018-03-06
Following up from issue #33391, building LanguageClient-neovim now
requires some rust dependencies. This patch makes the plugin now longer
listed in vim-plugin-names file so that it will not be automatically
generated and instead lists it in non-generated plugins.

Also adds rustPlatform to arguments for vim plugins set.
2018-03-12 14:32:45 +01:00
Peter Simons
5065d28a1c hackage-packages.nix: fix gnome3-related evaluation errors
The file was generated by hackage2nix v2.9-5-g32974fc using Hackage at
2018-03-11T00:47:10Z (3efaeb24c3f48ef7f430beea9e9274c535a81c12).
2018-03-12 14:20:17 +01:00
Sander van der Burg
6afcd42e3b nodejs: patch bundled node-gyp module to not invoke xcodebuild on macOS causing modules with native dependencies to fail
(cherry picked from commit 634cbfa8f2)
2018-03-12 13:19:15 +01:00
Izorkin
ce68ae5d9a nftables: 0.8.2 -> 0.8.3
(cherry picked from commit c10b7a7d27)
2018-03-12 11:52:35 +00:00
Silvan Mosberger
313dab0c3f resilio: Adjust option description to 3d17573
(cherry picked from commit 86ca617948)
2018-03-12 11:05:27 +00:00
Tuomas Tynkkynen
1f34ba8343 nix: Fix build on ARMv6
(cherry picked from commit 22df741045)
2018-03-11 21:24:18 +02:00
Robert Helgesson
9ac481091f josm: 13478 -> 13500
(cherry picked from commit 37f6b0ff9c)
2018-03-11 19:45:52 +01:00
Tim Steinbach
62bdacf6bd rofi: Fix patches
(cherry picked from commit edec57043e)
2018-03-11 14:22:25 -04:00
Tim Steinbach
80a280f609 linux-copperhead: 4.15.8.a -> 4.15.9.a
(cherry picked from commit a5a14c3e5e0899ca836fcdca366f3ac8c20fd973)
2018-03-11 13:49:07 -04:00
Tim Steinbach
cb47e35408 linux: 4.4.120 -> 4.4.121
(cherry picked from commit 376c1272d74eae5f522b3ae3d02214705c96f290)
2018-03-11 13:49:00 -04:00
Tim Steinbach
656e1561f8 linux: 4.9.86 -> 4.9.87
(cherry picked from commit 06d5f03359b68b513090bd5e05156f7148e96e5d)
2018-03-11 13:48:54 -04:00
Tim Steinbach
7ec3ba485d linux: 4.14.25 -> 4.14.26
(cherry picked from commit 1e319c70e0322264871e2aba5ccc477447f4e4f8)
2018-03-11 13:48:48 -04:00
Tim Steinbach
131f9a4fe1 linux: 4.15.8 -> 4.15.9
(cherry picked from commit 3d7c5af2583dfa2033051267b6d5e926b8c4e562)
2018-03-11 13:48:42 -04:00
Tim Steinbach
f57a786cfb vscode: 1.20.1 -> 1.21.0
(cherry picked from commit 46037503f6)
2018-03-11 13:35:33 -04:00
Tim Steinbach
8fb34d8fc2 rofi: 1.4.2 -> 1.5.0
(cherry picked from commit de5a77c12f2dd8df2e88712867b0e2f659f927f5)
2018-03-11 13:24:32 -04:00
Peter Simons
b8ebbc0e3d Synchronize Haskell infrastructure with master @ f62deb0f92. 2018-03-11 16:08:16 +01:00
Michael Raskin
b6bd99869d Merge pull request #36794 from xeji/deprecate-xen-4-5-on-18-03
xenPackages: deprecate Xen 4.5 on 18.03, security support ended
2018-03-11 14:14:52 +00:00
Badi Abdul-Wahid
2f93afbd51 languagemachines: fix darwin build
(cherry picked from commit ff0f112527)
2018-03-11 15:11:38 +01:00
Badi Abdul-Wahid
81f8347c01 libtar: add darwin to supported platforms
(cherry picked from commit 3117ae6c4f)
2018-03-11 15:11:25 +01:00
Josef Kemetmüller
f9387d8e33 pythonPackages.discid: fix darwin build
(cherry picked from commit 57d862fecf)
2018-03-11 14:40:44 +01:00
Josef Kemetmüller
328a1c6ea2 pythonPackages.construct: Fix darwin build
The package runs fine on darwin. Using pytest as a test runner also
resolves the checkPhase issue on Python 3.5+.

(cherry picked from commit 91a9453496)
2018-03-11 14:38:56 +01:00
Josef Kemetmüller
bdb9c3b4e9 pythonPackages.regex: fix darwin build
The package works fine on darwin. We run some tests to prove this.

(cherry picked from commit d289736def)
2018-03-11 14:30:05 +01:00
Josef Kemetmüller
fc3b588207 mpv: fix darwin build
The optional video acceleration api (vaapi) is not supported on darwin.

(cherry picked from commit 38c589b5d0)
2018-03-11 13:21:20 +01:00
Josef Kemetmüller
013d0ba929 pythonPackages.robotframework: fix darwin build
(cherry picked from commit 8f9e814132)
2018-03-11 12:35:13 +01:00
Jan Malakhovski
af64b8d165 xenPackages: deprecate Xen 4.5, security support ended
cherry-picked from commit 3e3d72b95a
and resolved conflicts
2018-03-11 12:05:06 +01:00
Moritz Maxeiner
af554ad3cc Remove myself as maintainer
(cherry picked from commit 12a70fd571)
2018-03-11 09:00:38 +01:00
Maximilian Bosch
3b75b1004d pythonPackages.htmltreediff: fix build
- add `pythonPackages.nose` as `checkInput` to make the tests passing
- extract expression into its own file

See https://hydra.nixos.org/build/70680974/log
See ticket #36453

(cherry picked from commit 94458721a7)
2018-03-11 08:35:42 +01:00
Frederik Rietdijk
5b772cd2a5 python.pkgs.humanize: enable darwin build
(cherry picked from commit e2e4df611e908a5738a8d6913d75e0334f78a007)
2018-03-11 08:31:31 +01:00
lassulus
252397d7c1 altcoins.memorycoin: use boost165
(cherry picked from commit 8684de926c)
2018-03-10 22:08:38 +00:00
Nikolay Amiantov
6233a34505 zandronum: sound improvements
* Update fmod version to one with PulseAudio support;
* Dynamically link FluidSynth instead of using LD_LIBRARY_PATH;
* Use system libgme.

Fixes sound on some machines.

(cherry picked from commit f7c2288cfc)
2018-03-11 00:06:18 +03:00
Nikolay Amiantov
035c9265d3 buildFHSEnv: fix compiler search paths
Fixes OpenWrt compilation.

(cherry picked from commit 94f0ef6628)
2018-03-11 00:06:15 +03:00
xeji
3708494230 kore: fix build with gcc7
(cherry picked from commit 41cdea68da)
2018-03-10 13:17:36 -05:00
Timo Kaufmann
b43fbc45f4 blackmagic: Revert to gcc6
(cherry picked from commit 6b53a7cd09)
2018-03-10 18:23:50 +01:00
Michael Raskin
d19d0544bd Merge pull request #36690 from YorikSar/fix-chromium-build
chromium: fix GCC 7 related build issues
(cherry picked from commit cac24ccbe9)
2018-03-10 17:26:03 +01:00
lassulus
0bd5b4aa99 altcoins.btc1: 1.14.5 -> 1.15.1
(cherry picked from commit 0c15e1d1ee)
2018-03-10 16:11:08 +00:00
lassulus
330204b212 altcoins.dogecoin: use boost165
(cherry picked from commit 54572276ec)
2018-03-10 16:09:33 +00:00
lassulus
0585d51567 namecoin: nc0.13.0rc1 -> nc0.15.99-name-tab-beta2
(cherry picked from commit e50c1ad98a)
2018-03-10 16:07:13 +00:00
Jörg Thalheim
a32fcfd0da ht: fix gcc7 compilation
(cherry picked from commit 672e808dd3)
2018-03-10 16:01:32 +00:00
Silvan Mosberger
c536d4030b nixos/network-interfaces: Fix 2 small typos
(cherry picked from commit 08704aa2f7)
2018-03-10 15:56:16 +00:00
Lancelot SIX
c5ba8b96e9 pythonPackages.daphne: 2.0.3 -> 2.1.0
(cherry picked from commit ddddca5c2f)
2018-03-10 14:56:36 +01:00
Lancelot SIX
6ac7a6f909 pythonPackages.asgiref: 2.1.5 -> 2.2.0
(cherry picked from commit 38753d52bc)
2018-03-10 14:56:29 +01:00
Lancelot SIX
fa8607a4c7 pythonPackages.asgi_redis: drop
This was part of django-channel-1.x. The current version (2) does not
use it anymore

(cherry picked from commit dadba1cce3)
2018-03-10 14:56:22 +01:00
Lancelot SIX
57b6a82d95 pythonPackages.asgi_ipc: drop
This wath used for django-channels-1.x. The current version (2) does
not use it anymore

(cherry picked from commit 1347f90953)
2018-03-10 14:56:14 +01:00
lassulus
061f2bd51b altcoins.freicoin: fix hash
(cherry picked from commit 00c2008bee)
2018-03-10 12:59:39 +00:00
Robin Gloster
12a39b0f92 rugged: fix build
(cherry picked from commit 83ee88e70f)
2018-03-10 13:00:52 +01:00
Michael Raskin
f9f9c47419 mupdf: import upstream patches for CVEs: 2017-17858, 2018-1000051, 2018-6187, 2018-6192
(cherry picked from commit f2f7b0579b)
2018-03-10 12:58:36 +01:00
Robin Gloster
2b9270f54c errbot: fix build
Those version specs only exist to keep compat with python 3.3 which we
are not using anyway.

(cherry picked from commit 560b2bce6ce84628f97e242a3015201378a90eef)
(cherry picked from commit 679580be35)
2018-03-10 12:58:01 +01:00
Robert Schütz
a8aacac1bd pythonPackages.aiohttp: 3.0.1 -> 3.0.5
(cherry picked from commit 3387115364)
2018-03-10 12:50:42 +01:00
Frederik Rietdijk
da702c3ecb Python: fix update script for nix 2.0
(cherry picked from commit b92d994501)
2018-03-10 12:41:47 +01:00
Frederik Rietdijk
237391c8a8 python.pkgs.odo: disable failing test
(cherry picked from commit 2c406f6329)
2018-03-10 12:37:04 +01:00
Frederik Rietdijk
58cc2513d8 python.pkgs.datashape: disable several tests
(cherry picked from commit 5c1c6a3071)
2018-03-10 12:36:57 +01:00
lassulus
ece5594fd0 altcoins.litecoin: 0.14.2 -> 0.15.1
(cherry picked from commit 1bad821710)
2018-03-10 11:36:05 +00:00
Ryan Mulligan
379c3fd1cf taktuk: 3.7.5 -> 3.7.7
Semi-automatic update. These checks were done:

- built on NixOS
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk -h` got 0 exit code
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk --help` got 0 exit code
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk help` got 0 exit code
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk -v` and found version 3.7.7
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk --version` and found version 3.7.7
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk version` and found version 3.7.7
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk -h` and found version 3.7.7
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk --help` and found version 3.7.7
- ran `/nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7/bin/taktuk help` and found version 3.7.7
- found 3.7.7 with grep in /nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7
- found 3.7.7 in filename of file in /nix/store/l4zd353icm418x6asy4123a3gcpy14cr-taktuk-3.7.7

(cherry picked from commit c995db0853)
2018-03-10 12:16:07 +01:00
Elis Hirwing
124228bcfa polib: move to own file and fix homepage
(cherry picked from commit b6fc08795e)
2018-03-10 12:14:13 +01:00
Elis Hirwing
22b9e5d37f progressbar: move to own file and fix homepage
(cherry picked from commit 6c55f5479d)
2018-03-10 12:12:12 +01:00
Elis Hirwing
0cf830ecb6 publicsuffix: move to own file and fix homepage
(cherry picked from commit 605a373468)
2018-03-10 12:11:22 +01:00
Elis Hirwing
9a6e742e94 pyjade: move to own file and fix homepage
(cherry picked from commit 77330e18f4)
2018-03-10 12:06:29 +01:00
Frederik Rietdijk
2f3ea8863d Python: introduce toPythonApplication function
This commit introduces the `toPythonApplication` function. Certain
Python packages are considered both a library and an application, that
is, they expose importable modules, but typically executables that are
part of the package are used instead.

In this case, the package needs to be added to `python-packages.nix` in
order for it to be available as a library. An alias with this function
can then be added in `all-packages.nix`, e.g.:

```
ansible = with pythonPackages; toPythonApplication ansible;
```

(cherry picked from commit 03e54c5e88)
2018-03-10 12:05:06 +01:00
Elis Hirwing
ff94b5ced4 pychart: move to own file
Also update website and download of source.

(cherry picked from commit f1795e3957)
2018-03-10 12:03:04 +01:00
Elis Hirwing
8088cd2fbe proboscis: move to own file and fix homepage
(cherry picked from commit b29348257a)
2018-03-10 11:01:32 +00:00
Hugo Tavares Reis
db7068e685 nixnote2: fix icon and version
(cherry picked from commit 6e5cd9cbfb)
2018-03-09 20:46:34 +00:00
Vladimír Čunát
08d2a6a981 Merge #36680: apvlv: fix build with gcc7
(cherry picked from commit 922d55aae8)
2018-03-09 21:10:27 +01:00
Vladimír Čunát
7086687469 Merge #36663: hexcurse: fix build with gcc7
(cherry picked from commit 0ce2f04a04)
2018-03-09 20:51:59 +01:00
Vladimír Čunát
280b912570 Merge #36644: caffe2: fix compilation on gcc7
(cherry picked from commit b441512ced)
2018-03-09 20:50:00 +01:00
Vladimír Čunát
99dcf80e4b Merge #36645: mps: fix build with gcc7
(cherry picked from commit 897cecfb13)
2018-03-09 20:49:56 +01:00
Vladimír Čunát
d9f179252d WIP:
waiting for https://github.com/NixOS/nixos-org-configurations/pull/39
2018-03-09 20:49:56 +01:00
Matthew Bauer
e06c2d9cfe network_cmds: fix on darwin
(cherry picked from commit c7abef4c5d)
2018-03-09 19:33:41 +01:00
Matthew Bauer
33a4313eba darwin: disable broken packages
(cherry picked from commit 54e2c28b09)
2018-03-09 19:33:26 +01:00
Tim Steinbach
5d1b222116 atom: 1.24.0 -> 1.24.1
(cherry picked from commit 8338d38e20ed0ab961430d8629dfd3a16ad169bd)
2018-03-09 13:13:18 -05:00
Tim Steinbach
1189fd2504 linux-copperhead: 4.15.7.a -> 4.15.8.a
(cherry picked from commit 72dede4203)
2018-03-09 12:33:24 -05:00
Tim Steinbach
602e64b42d linux: 4.15.7 -> 4.15.8
(cherry picked from commit 3fdb1c57c88db51b72af47065249066b1e7a552a)
2018-03-09 12:28:19 -05:00
Tim Steinbach
cc1cda8bae linux: 4.14.24 -> 4.14.25
(cherry picked from commit e5efdb0f67cc195ee963391037fb0a2cf081baba)
2018-03-09 12:28:12 -05:00
Piotr Bogdan
7b72d7f713 yate: patch shebangs in configure
(cherry picked from commit 5a3550ede6)
2018-03-09 16:10:22 +00:00
Piotr Bogdan
d2bf584a75 yate: restrict platforms
doesn't build on aarch64-linux

(cherry picked from commit f497a39328)
2018-03-09 16:09:55 +00:00
Nikolay Amiantov
8234bcad01 double-conversion: hopefully fix on Darwin
(cherry picked from commit 948533180f)
2018-03-09 16:38:23 +03:00
Nikolay Amiantov
9bfeba6fc6 slade: disable on AArch64
Wants SSE.

(cherry picked from commit 325dece6a0)
2018-03-09 16:38:17 +03:00
Nikolay Amiantov
bef3bb584b linuxPackages.bbswitch: disable on AArch64
It makes no sense on non-x86 platforms.

(cherry picked from commit 1890fe359a)
2018-03-09 16:38:12 +03:00
Nikolay Amiantov
ceb427eb50 citra: disable on AArch64
Wants SSE2 instructions.

(cherry picked from commit 9983c7004b)
2018-03-09 16:38:06 +03:00
Nikolay Amiantov
c26c22b7ab tdesktop: disable on AArch64
Errors out with "please add support for your architecture".

(cherry picked from commit 4c3c71fdd4)
2018-03-09 16:38:00 +03:00
Nikolay Amiantov
0a0b31db3d dwarf-fortress-packages.dwarf-therapist: disable on AArch64
The game works only on x86 anyway.

(cherry picked from commit 986ea06036)
2018-03-09 16:37:52 +03:00
Nikolay Amiantov
686ce4dade deadbeef: disable on AArch64
(cherry picked from commit c292489da0)
2018-03-09 16:37:46 +03:00
Nikolay Amiantov
180d071c3a the-powder-toy: disable on AArch64
Wants SSE.

(cherry picked from commit 809297e595)
2018-03-09 16:37:37 +03:00
Ryan Mulligan
67a504ed46 cppcheck: 1.80 -> 1.82
Semi-automatic update. These checks were done:

- built on NixOS
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/misra.py -h` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/misra.py --help` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/misra.py help` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/naming.py -h` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/naming.py --help` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/naming.py help` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/y2038.py -h` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/y2038.py --help` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/y2038.py help` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/cppcheck -h` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/cppcheck --help` got 0 exit code
- ran `/nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82/bin/cppcheck --version` and found version 1.82
- found 1.82 with grep in /nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82
- found 1.82 in filename of file in /nix/store/klfqwbh75zch4zzdbwdyvk9qhgf28sln-cppcheck-1.82

(cherry picked from commit 62190a66ae)
2018-03-09 14:12:09 +01:00
Joachim Fasting
861f8bf015 electrum: 3.0.6 -> 3.1.0
(cherry picked from commit 53f057f21b)
2018-03-09 14:12:02 +01:00
Vladimír Čunát
01360a2845 gnat: mark as broken
https://github.com/NixOS/nixpkgs/commit/6ac7b19c978e9#commitcomment-27971572
https://github.com/NixOS/nixpkgs/pull/36551
2018-03-09 13:54:23 +01:00
Márton Boros
f1333eeaa1 idrisPackages.wl-pprint: 2016-09-28 -> 2017-03-13
(cherry picked from commit 4d4171d5f6)
2018-03-09 11:40:18 +00:00
Márton Boros
a9ee2cf9cc idrisPackages: fix errors
(cherry picked from commit 4f1d26288f)
2018-03-09 11:40:18 +00:00
Matthew Bauer
02a0fb8e74 demo: autologin through xserver
also disable upower on virtualbox
Fixes #36348
2018-03-09 11:37:11 +00:00
Maximilian Bosch
d308c7fc7a bonfire: fix build
The requirement's constraint for `pythonPackages.keyring` didn't allow
keyring v11. However it has been bumped in 93a16a2ace
by @FRidh.

Current failure: https://nix-cache.s3.amazonaws.com/log/2nw5adfx86jwiax32mn11kqpc35xwhsh-bonfire-unstable-2017-01-19.drv
See ticket #36453
2018-03-09 11:33:46 +00:00
Vladimír Čunát
77e99aa707 Merge #36518: xtreemfs: build with boost165
(cherry picked from commit d2d07a0bce)
It didn't build.
2018-03-09 11:05:15 +01:00
Vladimír Čunát
b8ec973e7d Merge #36555: libreswan: fix build with gcc7
(cherry picked from commit ffe2c4be02)
2018-03-09 10:52:01 +01:00
lassulus
e6d0584d78 bitcoin-abc: 0.16.0 -> 0.16.2
(cherry picked from commit d940c79130)
2018-03-09 08:03:44 +00:00
xeji
3c4c5913bb v8: build with gcc6 on linux
doesn't build with gcc 7 due to this issue in upstream code:
https://bugs.chromium.org/p/chromium/issues/detail?id=614289

(cherry picked from commit aa5a07977e)
2018-03-09 08:00:55 +00:00
Herwig Hochleitner
058417c31e chromium: 64.0.3282.186 -> 65.0.3325.146
see https://chromereleases.googleblog.com/2018/03/stable-channel-update-for-desktop.html

cc @aszlig @YorikSar

CVE-2017-11215
CVE-2017-11225
CVE-2018-6060
CVE-2018-6061
CVE-2018-6062
CVE-2018-6057
CVE-2018-6063
CVE-2018-6064
CVE-2018-6065
CVE-2018-6066
CVE-2018-6067
CVE-2018-6068
CVE-2018-6069
CVE-2018-6070
CVE-2018-6071
CVE-2018-6072
CVE-2018-6073
CVE-2018-6074
CVE-2018-6075
CVE-2018-6076
CVE-2018-6077
CVE-2018-6078
CVE-2018-6079
CVE-2018-6080
CVE-2018-6081
CVE-2018-6082
CVE-2018-6083

(cherry picked from commit 9b4ffd98a4)
2018-03-09 03:14:06 +01:00
xeji
8e58deb53f libav: remove /bin/sh dependencies
that resulted in some Hydra build fails

(cherry picked from commit adbd25c75c)
2018-03-08 20:21:23 -05:00
lassulus
eadbc34c6d bitcoin-classic: 1.3.6 -> 1.3.8
(cherry picked from commit bbd8664e01)
2018-03-08 23:00:32 +00:00
lassulus
0bbaa51b4c bitcoin-xt: 0.11G2 -> 0.11H
(cherry picked from commit 75f4b0fc0f)
2018-03-08 23:00:20 +00:00
Jörg Thalheim
1ce672458c google-cloud-sdk: also fix darwin
(cherry picked from commit a30cb1bf55)
2018-03-08 22:38:02 +00:00
xeji
6d88a00f01 rapidjson: fix gcc7 compile error
(cherry picked from commit 81776365f4)
2018-03-08 22:22:50 +00:00
Michael Brantley
ee88a41926 perlPackages.Socket: 2.020 -> 2.027
Also disable t/getaddrinfo.t test which requires network access.

(cherry picked from commit 467c03de31)
2018-03-08 21:52:06 +00:00
Ryan Mulligan
b312bdcd53 google-cloud-sdk: 184.0.0 -> 190.0.1
Semi-automatic update. These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 190.0.1 with grep in /nix/store/y7rvgsj3077w8div5qny11xhgyjvy06c-google-cloud-sdk-190.0.1

(cherry picked from commit 84cb658505)
2018-03-08 21:50:34 +00:00
Daiderd Jordan
9cde87b0ee bchunk: fix clang build
/cc ZHF #36454

(cherry picked from commit 13ca830f1d)
2018-03-08 22:33:39 +01:00
Daiderd Jordan
b31fd67d79 bazel_0_4: mark linux only
/cc ZHF #36454

(cherry picked from commit 37a97fa8e3)
2018-03-08 22:20:03 +01:00
Vincent Laporte
bd6d6078c6 wyrd: fix build
(cherry picked from commit 1d4bbef0e8)
2018-03-08 14:49:54 -06:00
Daiderd Jordan
f394f5230a libjack2: remove clang patch
/cc ZHF #36454

(cherry picked from commit f2661ed72b)
2018-03-08 21:27:50 +01:00
Daiderd Jordan
a4340341a6 nixos: inline set-environment for bash and zsh
(cherry picked from commit b00a3fc6fd)
2018-03-08 21:07:40 +01:00
Daiderd Jordan
9defa1d4c0 skhd: init at 0.0.10
(cherry picked from commit b84d22cbbd)
2018-03-08 21:04:44 +01:00
obadz
e78837f435 citrix-receiver: 13.8.0 -> 13.9.0
The "A network error occured (SSL error 4)" is finally fixed!

(cherry picked from commit daafd1d71f)
2018-03-08 19:27:17 +00:00
Will Dietz
ad6a090cfe llvmPackages_6: build using gcc6 on i686, like others.
(cherry picked from commit 42c33ce12f)
2018-03-08 13:21:02 -06:00
Will Dietz
43dd25e579 Merge pull request #34457 from dtzWill/feature/llvm-6
llvm 6: init

(cherry picked from commit b09b557fb7)
2018-03-08 13:20:50 -06:00
xeji
a053461720 wyrd: fix build error with ncurses-6.0-abi5-compat
(cherry picked from commit de1427fabf)
2018-03-08 12:52:38 -06:00
Will Dietz
724dcdd066 squishyball: fix w/new ncurses
https://github.com/NixOS/nixpkgs/pull/34477
https://bugs.debian.org/860334
(cherry picked from commit ce37526ed7)
2018-03-08 12:36:59 -06:00
Will Dietz
46fc5c8419 virtualbox: drop headless patch that no longer applies, fixed upstream
(cherry picked from commit 4191058bdd)
2018-03-08 12:36:42 -06:00
Will Dietz
fac8c4d2d9 lldb_4: fix w/gcc7
Same fix used in swift4, FWIW.

(cherry picked from commit 535ba5f7f7)
2018-03-08 12:36:02 -06:00
Jascha Geerds
0feab3dabe maintainer-list: Change my email address
(cherry picked from commit 300e272e02)
2018-03-08 16:33:39 +01:00
Peter Hoeg
df63bd6b9a syncthing: 0.14.44 -> 0.14.45
(cherry picked from commit 05412c95da)
2018-03-08 09:23:31 +08:00
Matthew Bauer
bf5e7c48c4 git-sizer: init at 1.0.0
(cherry picked from commit 0b04beb805)
2018-03-07 22:21:31 +01:00
Andrew Childs
17ff10ab83 gdb: Flexible target matching for darwin
Outside of the nix-build the target is `x86_64-apple-darwin17.4.0`,
while inside the target is `x86_64-apple-darwin`. This difference
causes the fallback target configuration for darwin, which disables
gdb. Add a patch to make the target matching more flexible.

(cherry picked from commit 4c76a21aae)
(cherry picked from commit fe0728fa2c)
2018-03-07 22:17:01 +01:00
Vladimír Čunát
82bb0a18f0 nixos release: more evaluation fixes
... if missing x86 in supportedSystems

(cherry picked from commit eab479a5f0)
2018-03-07 17:32:56 +01:00
Vladimír Čunát
aa84b58f00 nixos/release: fix evaluation if missing x86
... in supportedSystems

(cherry picked from commit e59b91bc9a)
2018-03-07 16:07:02 +01:00
Nikolay Amiantov
01f9a70647 gajim: add plugin installer
It's not included into repository checkout (which we use because of tests), so
get it from release tarball instead.

(cherry picked from commit 9edd4c8835)
2018-03-07 16:47:48 +03:00
Vladimír Čunát
5f98ff26d9 texlive: fix eval after parent commit 2018-03-07 14:40:45 +01:00
Vladimír Čunát
c43e04dd94 Revert "Merge #35370: texlive.bin: fix with poppler 0.62"
This reverts commit 4dd70f96cc.
It actually broke texlive - I somehow forgot we don't have the new
poppler in 18.03.
2018-03-07 14:40:06 +01:00
Ryan Mulligan
03dc796bbc nspr: 4.17 -> 4.18
Semi-automatic update. These checks were performed:

- built on NixOS
- found 4.18 with grep in /nix/store/23322yndj5lh6n4pr3maj26irnwklq31-nspr-4.18
- found 4.18 in filename of file in /nix/store/23322yndj5lh6n4pr3maj26irnwklq31-nspr-4.18

(cherry picked from commit 52b2e79a8b)
We would probably have to pick it soon anyway, due to Firefox updates.
2018-03-07 13:30:35 +01:00
Vladimír Čunát
eec99996ec mesa: 17.3.5 -> 17.3.6 (bugfix)
It's emergency bugfix for intel.

(cherry picked from commit 6a9ab8db11)
2018-03-07 13:30:34 +01:00
Jörg Thalheim
52859c481a Merge pull request #36203 from lsix/libunistring_0.9.9
libunistring: 0.9.8 -> 0.9.9
(cherry picked from commit ad338b8268)
It claims to contain a single bugfix only.
2018-03-07 13:30:34 +01:00
Daiderd Jordan
c6de8f318e Merge pull request #35349 from matthewbauer/qt5-darwin-pkgconfig
qt5: install pkg_config files on darwin
(cherry picked from commit b4cf3f7909)
2018-03-07 13:30:33 +01:00
Will Dietz
70e1ebe0c7 Merge pull request #35674 from dtzWill/fix/llvm-4-cmdline-help
llvm_4: fix cosmetic issue in help output

(cherry picked from commit 3092659d96)
2018-03-07 13:30:32 +01:00
Vladimír Čunát
69a3a1dce1 lightdm-gtk-greeter: fix build by ignoring a warning
(cherry picked from commit 0479e91309)
2018-03-07 13:30:32 +01:00
Shea Levy
48a724cebd texlive.bin: Fix duplicate patch definition
(cherry picked from commit 1ad37a8c6e)
2018-03-07 13:30:31 +01:00
Vladimír Čunát
4dd70f96cc Merge #35370: texlive.bin: fix with poppler 0.62
(cherry picked from commit 63ca2cc786)
2018-03-07 13:30:30 +01:00
Vladimír Čunát
e4fe0e4555 gtk3: 3.22.26 -> 3.22.28 (maintenance)
(cherry picked from commit 01bf8381fd)
2018-03-07 13:30:30 +01:00
Vladimír Čunát
8056287c13 Merge #35113: cups: upstream patch for a bug
(cherry picked from commit e719327694)
2018-03-07 13:30:29 +01:00
Vladimír Čunát
8022ebc47c Merge #34878: fontconfig: Fix for HFS+ 1s date resolution
(cherry picked from commit 753db3e2d0)
2018-03-07 13:30:28 +01:00
Vladimír Čunát
fee03226a6 mesa: 17.3.3 -> 17.3.5 (maintenance)
(cherry picked from commit ddb422714d)
2018-03-07 13:30:28 +01:00
Vladimír Čunát
b759739d05 libdrm: 2.4.89 -> 2.4.90
(cherry picked from commit b6476968c4)
2018-03-07 13:30:27 +01:00
adisbladis
f93e902ab2 Merge pull request #35421 from flokli/CVE-zziplib-0.13.67
zziplib: 0.13.67 -> 0.13.68
(cherry picked from commit 6f13032b6e)
Security fixes inside.
2018-03-07 13:30:27 +01:00
Nikolay Amiantov
6b3d6a9f7a cups service: fix client sockets
Use systemd to create the directory for UNIX socket. Also use localhost instead
of 127.0.0.1 as is done in default cupsd.conf so that IPv6 is enabled when
available.

(cherry picked from commit 9c1c424e52)
2018-03-07 13:30:26 +01:00
Nikolay Amiantov
9b53db5d7e cups: fix path to socket and run directory
We use default /var/run/cups/cups.sock in NixOS but here it's misdefined to be
/run/cups.sock. Return it to default.

(cherry picked from commit 998fdfdc94)
2018-03-07 13:30:25 +01:00
Eelco Dolstra
b0eb9ec92d nixUnstable: Point to Nix 2.0
(cherry picked from commit 1deb779a7a)
2018-03-07 13:30:25 +01:00
Michael Raskin
e4f2f026bd Merge pull request #36403 from elts/fix/cl-launch
cl-launch: change platforms to unix
(cherry picked from commit 07be75d512)
2018-03-07 13:30:24 +01:00
Marius Bergmann
fa64b9e64f restic: update project website (#36408)
* restic: update project website

The project website has changed, so I updated it.

* restic: no trailing slash

(cherry picked from commit 8154f9ebd5)
2018-03-07 13:30:23 +01:00
obadz
4069dab3ca nixos doc: give context and definition re NIXOS_LUSTRATE
Re #36272

(cherry picked from commit ee9a785c30)
2018-03-07 13:30:23 +01:00
Carles Pagès
2c1addb451 maintainers: remove wrong info
I tried to contact bjg through mail but got no answer and can't find his
actual github account.

(cherry picked from commit 15ddc6fcf8)
2018-03-07 13:30:22 +01:00
Carles Pagès
d0aa15abca SDL2_gfx: update homepage
(cherry picked from commit 5eb70d3481)
2018-03-07 13:30:21 +01:00
Michael Raskin
7b987e2e86 Merge pull request #36389 from cpages/sdl2
Sdl2 and friends update

(cherry picked from commit c8664a2640)
Security fixes inside, reportedly.
2018-03-07 13:30:21 +01:00
Tuomas Tynkkynen
6569c4f184 trinity: Fix 32-bit build
(cherry picked from commit 2372e93981)
2018-03-07 13:30:20 +01:00
lewo
1bebf7af74 Merge pull request #36343 from bignaux/soulseekqt
soulseekqt: init at 2016-1-17 (last official stable)
(cherry picked from commit 9cfeabb327)
2018-03-07 13:30:19 +01:00
Michael Raskin
f43ea6e7ff Merge pull request #36275 from oxij/lib/maintainers-list
lib: rename maintainers-list.nix into maintainers/maintainer-list.nix
(cherry picked from commit 1bd790d613)
The intention is to reduce conflicts during maintenance.
2018-03-07 13:30:19 +01:00
Michael Raskin
05ddccd657 Merge pull request #36380 from xeji/xen-4-8-xsa
xen 4.8: add xsa security patches 252-256

(cherry picked from commit 346e68d4f0)
2018-03-07 13:30:18 +01:00
Michael Raskin
4d6473908f Merge pull request #36375 from volth/commandLineArgs-escaping
chromium, google-chrome: fix escaping of commandLineArgs

(cherry picked from commit da97c73fb3)
2018-03-07 13:30:18 +01:00
Jörg Thalheim
4fb6f7b83d Merge pull request #36250 from sengaya/add-ansible-lint
ansible-lint: init at 3.4.20
(cherry picked from commit 07bc1ddace)
2018-03-07 13:30:17 +01:00
Jörg Thalheim
77d3830fda Merge pull request #36353 from xeji/xen-4-8
xen 4.8: fix gcc7-related build errors

(cherry picked from commit c7a92f3fee)
2018-03-07 13:30:16 +01:00
Jörg Thalheim
487731bcd3 Merge pull request #36350 from volth/nix-serve
nix-serve: nix 2.0 fixes
(cherry picked from commit 5fe1be88a5)
2018-03-07 13:30:16 +01:00
Robin Gloster
7539b80e17 json-c-0-11: remove
(cherry picked from commit ddba7e3ae9)
2018-03-07 13:30:15 +01:00
Robin Gloster
b5088858f6 grive: remove
dead and obsoleted by grive2

(cherry picked from commit fe7039b08b)
2018-03-07 13:30:14 +01:00
Robin Gloster
a2ab45f547 newsbeuter: dead and obsoleted by newsboat
(cherry picked from commit 1fb08b90dd)
2018-03-07 13:30:14 +01:00
Robert Helgesson
8e75367ced xfce4-timer-plugin: remove icon cache file from output
Adds hicolor-icon-theme as a build input to use its build hook to
clean up icon cache files.

(cherry picked from commit c7f40209c1)
2018-03-07 13:30:13 +01:00
Robert Helgesson
141aec6186 parole: remove icon cache file from output
Adds hicolor-icon-theme as a build input to use its build hook to
clean up icon cache files.

(cherry picked from commit 0203ab2ff9)
2018-03-07 13:30:12 +01:00
Nikolay Amiantov
0e44dd1677 megatools: 1.9.98 -> 2017-10-26
Old version doesn't work with new Mega API.

(cherry picked from commit b6a28336e5)
2018-03-07 14:45:14 +03:00
Nikolay Amiantov
5868f9ae1e primusLib: build only for x86 Linux
(cherry picked from commit 41939f29a1)
2018-03-07 13:58:18 +03:00
Peter Hoeg
5b18373a45 dxx-rebirth: fix compilation with gcc7
(cherry picked from commit 2e2063074d)
2018-03-07 12:37:35 +08:00
Eelco Dolstra
66a621d314 Merge pull request #36360 from dtzWill/fix/nix-use-brotli-for-sanity
nix: fix conditional so brotli is used w/2.0 builds, needed for logs!
(cherry picked from commit 40f9a3e9d2)
2018-03-06 20:25:37 +01:00
Nikolay Amiantov
a2037bb238 avidemux: restrict platforms
(cherry picked from commit 1f8d30f0bf)
2018-03-06 13:58:59 +03:00
45878 changed files with 910916 additions and 4416551 deletions

View File

@@ -1,5 +1,5 @@
# EditorConfig configuration for nixpkgs
# https://EditorConfig.org
# http://EditorConfig.org
# Top-most EditorConfig file
root = true
@@ -11,108 +11,18 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
# Ignore diffs/patches
[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
# We want readFile .version to return the version without a newline.
[.version]
insert_final_newline = false
# see https://nixos.org/nixpkgs/manual/#chap-conventions
# 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 files, set indent to spaces with width of two
[*.{nix,rb}]
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
[pkgs/kde/generated/**]
insert_final_newline = unset
end_of_line = unset
# Match diffs, avoid to trim trailing whitespace
[*.{diff,patch}]
trim_trailing_whitespace = false

View File

@@ -1,119 +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
# systemd: rewrite comments
92dfeb7b3dab820ae307c56c216d175c69ee93cd
# systemd: break too long lines of Nix code
67643f8ec84bef1482204709073e417c9f07eb87
# {pkgs/development/cuda-modules,pkgs/test/cuda,pkgs/top-level/cuda-packages.nix}: reformat all CUDA files with nixfmt-rfc-style 2023-03-01
802a1b4d3338f24cbc4efd704616654456d75a94
# postgresql: move packages.nix to ext/default.nix
719034f6f6749d624faa28dff259309fc0e3e730
# pkgs/os-specific/bsd: Reformat with nixfmt-rfc-style 2024-03-01
3fe3b055adfc020e6a923c466b6bcd978a13069a
# k3s: format with nixfmt-rfc-style
6cfcd3c75428ede517bc6b15a353d704837a2830
# python3Packages: format with nixfmt
59b1aef59071cae6e87859dc65de973d2cc595c0

18
.gitattributes vendored
View File

@@ -1,18 +0,0 @@
**/deps.nix linguist-generated
**/deps.json linguist-generated
**/deps.toml linguist-generated
**/node-packages.nix linguist-generated
pkgs/applications/editors/emacs-modes/*-generated.nix linguist-generated
pkgs/development/r-modules/*-packages.nix linguist-generated
pkgs/development/haskell-modules/hackage-packages.nix linguist-generated
pkgs/development/beam-modules/hex-packages.nix linguist-generated
doc/** linguist-documentation
doc/default.nix linguist-documentation=false
nixos/doc/** linguist-documentation
nixos/doc/default.nix linguist-documentation=false
nixos/modules/module-list.nix merge=union
# pkgs/top-level/all-packages.nix merge=union

398
.github/CODEOWNERS vendored
View File

@@ -6,360 +6,88 @@
#
# 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
# EditorConfig
/.editorconfig @Mic92 @zowoq
# This file
/.github/CODEOWNERS @edolstra
# Libraries
/lib @infinisil
/lib/systems @alyssais @ericson2314
/lib/generators.nix @infinisil @Profpatsch
/lib/cli.nix @infinisil @Profpatsch
/lib/debug.nix @infinisil @Profpatsch
/lib/asserts.nix @infinisil @Profpatsch
/lib/path.* @infinisil
/lib/fileset @infinisil
## Libraries / Module system
/lib/modules.nix @infinisil @roberth
/lib/types.nix @infinisil @roberth
/lib/options.nix @infinisil @roberth
/lib/tests/modules.sh @infinisil @roberth
/lib/tests/modules @infinisil @roberth
/lib @edolstra @nbp
/lib/systems @nbp @ericson2314
# 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
/pkgs/stdenv/generic/check-meta.nix @Ericson2314
/pkgs/stdenv/cross @Ericson2314
/pkgs/build-support/cc-wrapper @Ericson2314
/pkgs/build-support/bintools-wrapper @Ericson2314
/pkgs/build-support/setup-hooks @Ericson2314
/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
/pkgs/build-support/setup-hooks/auto-patchelf.py @layus
/pkgs/pkgs-lib @infinisil
## Format generators/serializers
/pkgs/pkgs-lib/formats/libconfig @ckiee @h7x4
/pkgs/pkgs-lib/formats/hocon @h7x4
# pkgs/by-name
/pkgs/test/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
# Nix, the package manager
pkgs/tools/package-management/nix/ @raitobezarius @ma27
nixos/modules/installer/tools/nix-fallback-paths.nix @raitobezarius @ma27
# Nixpkgs documentation
/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
/maintainers/scripts/doc @jtojnar @ryantm
# Contributor documentation
/CONTRIBUTING.md @infinisil
/.github/PULL_REQUEST_TEMPLATE.md @infinisil
/doc/contributing/ @infinisil
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @infinisil
/lib/README.md @infinisil
/doc/README.md @infinisil
/nixos/README.md @infinisil
/pkgs/README.md @infinisil
/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
/pkgs/stdenv
/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 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
# Systemd-boot
/nixos/modules/system/boot/loader/systemd-boot @JulienMalka
# Images and installer media
/nixos/modules/installer/cd-dvd/ @samueldr
/nixos/modules/installer/sd-card/ @samueldr
# Updaters
## update.nix
/maintainers/scripts/update.nix @jtojnar
/maintainers/scripts/update.py @jtojnar
## common-updater-scripts
/pkgs/common-updater/scripts/update-source-version @jtojnar
/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
# Python-related code and docs
/doc/languages-frameworks/python.section.md @mweinelt
/pkgs/development/interpreters/python/hooks @jonringer
/pkgs/top-level/python-packages.nix @FRidh
/pkgs/development/interpreters/python @FRidh
/pkgs/development/python-modules @FRidh
/doc/languages-frameworks/python.md @FRidh
# Haskell
/doc/languages-frameworks/haskell.section.md @sternenseemann @maralorn @ncfavier
/maintainers/scripts/haskell @sternenseemann @maralorn @ncfavier
/pkgs/development/compilers/ghc @sternenseemann @maralorn @ncfavier
/pkgs/development/haskell-modules @sternenseemann @maralorn @ncfavier
/pkgs/test/haskell @sternenseemann @maralorn @ncfavier
/pkgs/top-level/release-haskell.nix @sternenseemann @maralorn @ncfavier
/pkgs/top-level/haskell-packages.nix @sternenseemann @maralorn @ncfavier
# Perl
/pkgs/development/interpreters/perl @stigtsp @zakame @dasJ @marcusramberg
/pkgs/top-level/perl-packages.nix @stigtsp @zakame @dasJ @marcusramberg
/pkgs/development/perl-modules @stigtsp @zakame @dasJ @marcusramberg
/pkgs/development/compilers/ghc @peti
/pkgs/development/haskell-modules @peti
/pkgs/development/haskell-modules/default.nix @peti
/pkgs/development/haskell-modules/generic-builder.nix @peti
/pkgs/development/haskell-modules/hoogle.nix @peti
# R
/pkgs/applications/science/math/R @jbedo
/pkgs/development/r-modules @jbedo
/pkgs/applications/science/math/R @peti
/pkgs/development/r-modules @peti
# 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
# Ruby
/pkgs/development/interpreters/ruby @zimbatm
/pkgs/development/ruby-modules @zimbatm
# C compilers
/pkgs/development/compilers/gcc
/pkgs/development/compilers/emscripten @raitobezarius
/doc/languages-frameworks/emscripten.section.md @raitobezarius
# Darwin-related
/pkgs/stdenv/darwin @NixOS/darwin-maintainers
/pkgs/os-specific/darwin @NixOS/darwin-maintainers
# 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
# 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
# Qt
/pkgs/development/libraries/qt-5 @K900 @NickCao @SuperSandro2000 @ttuegel
/pkgs/development/libraries/qt-6 @K900 @NickCao @SuperSandro2000 @ttuegel
# KDE / Plasma 5
/pkgs/applications/kde @K900 @NickCao @SuperSandro2000 @ttuegel
/pkgs/desktops/plasma-5 @K900 @NickCao @SuperSandro2000 @ttuegel
/pkgs/development/libraries/kde-frameworks @K900 @NickCao @SuperSandro2000 @ttuegel
# KDE / Plasma 6
/pkgs/kde @K900 @NickCao @SuperSandro2000 @ttuegel
/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000 @ttuegel
# PostgreSQL and related stuff
/pkgs/servers/sql/postgresql @thoughtpolice
/nixos/modules/services/databases/postgresql.xml @thoughtpolice
/nixos/modules/services/databases/postgresql.nix @thoughtpolice
/nixos/tests/postgresql.nix @thoughtpolice
# Hardened profile & related modules
/nixos/modules/profiles/hardened.nix @joachifm
/nixos/modules/security/hidepid.nix @joachifm
/nixos/modules/security/lock-kernel-modules.nix @joachifm
/nixos/modules/security/misc.nix @joachifm
/nixos/tests/hardened.nix @joachifm
/pkgs/os-specific/linux/kernel/hardened-config.nix @joachifm
# 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/octodns @Janik-Haag
/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/networking/networkmanager.nix @Janik-Haag
/nixos/modules/services/monitoring/prometheus/exporters/kea.nix @mweinelt
/nixos/tests/babeld.nix @mweinelt
/nixos/tests/kea.nix @mweinelt
/nixos/tests/knot.nix @mweinelt
/nixos/tests/networking/* @Janik-Haag
# 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
# 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 @jtojnar @aanderse @drupol @globin @ma27 @talyz
/pkgs/development/php-packages @aanderse @drupol @globin @ma27 @talyz
/pkgs/top-level/php-packages.nix @jtojnar @aanderse @drupol @globin @ma27 @talyz
# Docker tools
/pkgs/build-support/docker @roberth
/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 @jtojnar
/pkgs/desktops/gnome/extensions @jtojnar
/pkgs/build-support/make-hardcode-gsettings-patch @jtojnar
# 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
# Forgejo
nixos/modules/services/misc/forgejo.nix @adamcstephens @bendlas @emilylange
pkgs/by-name/fo/forgejo/package.nix @adamcstephens @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
# environment.noXlibs option aka NoX
/nixos/modules/config/no-x-libs.nix @SuperSandro2000
# 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 @figsoda
/doc/hooks/zig.section.md @figsoda
# Buildbot
nixos/modules/services/continuous-integration/buildbot @Mic92 @zowoq
nixos/tests/buildbot.nix @Mic92 @zowoq
pkgs/development/tools/continuous-integration/buildbot @Mic92 @zowoq
# Pretix
pkgs/by-name/pr/pretix/ @mweinelt
pkgs/by-name/pr/pretalx/ @mweinelt
nixos/modules/services/web-apps/pretix.nix @mweinelt
nixos/modules/services/web-apps/pretalx.nix @mweinelt
nixos/tests/web-apps/pretix.nix @mweinelt
nixos/tests/web-apps/pretalx.nix @mweinelt
# incus/lxc/lxd
nixos/maintainers/scripts/lxd/ @adamcstephens
nixos/modules/virtualisation/incus.nix @adamcstephens
nixos/modules/virtualisation/lxc* @adamcstephens
nixos/modules/virtualisation/lxd* @adamcstephens
nixos/tests/incus/ @adamcstephens
nixos/tests/lxd/ @adamcstephens
pkgs/by-name/in/incus/ @adamcstephens
pkgs/by-name/lx/lxc* @adamcstephens
pkgs/by-name/lx/lxd* @adamcstephens
pkgs/os-specific/linux/lxc/ @adamcstephens
# https://github.com/NixOS/nixpkgs/issues/31401
/lib/maintainers.nix @ghost
/lib/licenses.nix @ghost
# Qt / KDE
/pkgs/applications/kde @ttuegel
/pkgs/desktops/plasma-5 @ttuegel
/pkgs/development/libraries/kde-frameworks @ttuegel
/pkgs/development/libraries/qt-5 @ttuegel

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

@@ -0,0 +1,52 @@
# 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.)
```
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 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
```
---
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
```
---
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
---
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.
---
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, ...
---
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)
---
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,19 @@
## 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 `build-use-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://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [24.05 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2405.section.md) (or backporting [23.05](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2305.section.md) and [23.11](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) Release notes)
- [ ] (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).
<!--
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://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#reviewing-contributions
-->
- [ ] 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/`)
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
---
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"

384
.github/labeler.yml vendored
View File

@@ -1,384 +0,0 @@
"6.topic: agda":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/agda.section.md
- nixos/tests/agda.nix
- pkgs/build-support/agda/**/*
- pkgs/development/libraries/agda/**/*
- pkgs/top-level/agda-packages.nix
"6.topic: cinnamon":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/desktops/cinnamon/**/*
- nixos/modules/services/x11/desktop-managers/cinnamon.nix
- nixos/tests/cinnamon.nix
"6.topic: emacs":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/editors/emacs.nix
- nixos/modules/services/editors/emacs.xml
- nixos/tests/emacs-daemon.nix
- pkgs/applications/editors/emacs/elisp-packages/**/*
- pkgs/applications/editors/emacs/**/*
- pkgs/build-support/emacs/**/*
- pkgs/top-level/emacs-packages.nix
"6.topic: Enlightenment DE":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/enlightenment.nix
- pkgs/desktops/enlightenment/**/*
- pkgs/development/python-modules/python-efl/*
"6.topic: erlang":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/beam.section.md
- pkgs/development/beam-modules/**/*
- pkgs/development/interpreters/elixir/**/*
- pkgs/development/interpreters/erlang/**/*
- pkgs/development/tools/build-managers/rebar/**/*
- pkgs/development/tools/build-managers/rebar3/**/*
- pkgs/development/tools/erlang/**/*
- pkgs/top-level/beam-packages.nix
"6.topic: fetch":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/build-support/fetch*/**/*
"6.topic: flakes":
- any:
- changed-files:
- any-glob-to-any-file:
- '**/flake.nix'
- lib/systems/flake-systems.nix
- nixos/modules/config/nix-flakes.nix
"6.topic: GNOME":
- any:
- changed-files:
- any-glob-to-any-file:
- 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":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/go.section.md
- pkgs/build-support/go/**/*
- pkgs/development/compilers/go/**/*
"6.topic: haskell":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/haskell.section.md
- maintainers/scripts/haskell/**/*
- pkgs/development/compilers/ghc/**/*
- pkgs/development/haskell-modules/**/*
- pkgs/development/tools/haskell/**/*
- pkgs/test/haskell/**/*
- pkgs/top-level/haskell-packages.nix
- pkgs/top-level/release-haskell.nix
"6.topic: julia":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/julia.section.md
- pkgs/development/compilers/julia/**/*
- pkgs/development/julia-modules/**/*
"6.topic: jupyter":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/python-modules/jupyter*/**/*
- pkgs/development/python-modules/mkdocs-jupyter/*
- nixos/modules/services/development/jupyter/**/*
- pkgs/applications/editors/jupyter-kernels/**/*
- pkgs/applications/editors/jupyter/**/*
"6.topic: k3s":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/cluster/k3s/**/*
- nixos/tests/k3s/**/*
- pkgs/applications/networking/cluster/k3s/**/*
"6.topic: kernel":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/build-support/kernel/**/*
- pkgs/os-specific/linux/kernel/**/*
"6.topic: lib":
- any:
- changed-files:
- any-glob-to-any-file:
- lib/**
"6.topic: lua":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/tools/misc/luarocks/*
- pkgs/development/interpreters/lua-5/**/*
- pkgs/development/interpreters/luajit/**/*
- pkgs/development/lua-modules/**/*
- pkgs/top-level/lua-packages.nix
"6.topic: Lumina DE":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/lumina.nix
- pkgs/desktops/lumina/**/*
"6.topic: LXQt":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/lxqt.nix
- pkgs/desktops/lxqt/**/*
"6.topic: mate":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/x11/desktop-managers/mate.nix
- nixos/tests/mate.nix
- pkgs/desktops/mate/**/*
"6.topic: module system":
- any:
- changed-files:
- any-glob-to-any-file:
- lib/modules.nix
- lib/types.nix
- lib/options.nix
- lib/tests/modules.sh
- lib/tests/modules/**
"6.topic: nixos":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/**/*
- pkgs/os-specific/linux/nixos-rebuild/**/*
"6.topic: nim":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/nim.section.md
- pkgs/development/compilers/nim/*
- pkgs/development/nim-packages/**/*
- pkgs/top-level/nim-packages.nix
"6.topic: nodejs":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/javascript.section.md
- pkgs/build-support/node/**/*
- pkgs/development/node-packages/**/*
- pkgs/development/tools/yarn/*
- pkgs/development/tools/yarn2nix-moretea/**/*
- pkgs/development/web/nodejs/*
"6.topic: ocaml":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/ocaml.section.md
- pkgs/development/compilers/ocaml/**/*
- pkgs/development/compilers/reason/**/*
- pkgs/development/ocaml-modules/**/*
- pkgs/development/tools/ocaml/**/*
- pkgs/top-level/ocaml-packages.nix
"6.topic: pantheon":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/desktops/pantheon/**/*
- nixos/modules/services/x11/desktop-managers/pantheon.nix
- nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
- nixos/tests/pantheon.nix
- pkgs/desktops/pantheon/**/*
"6.topic: php":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/php.section.md
- pkgs/build-support/php/**/*
- pkgs/development/interpreters/php/*
- pkgs/development/php-packages/**/*
- pkgs/test/php/default.nix
- pkgs/top-level/php-packages.nix
"6.topic: policy discussion":
- any:
- changed-files:
- any-glob-to-any-file:
- .github/**/*
"6.topic: printing":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/services/printing/cupsd.nix
- pkgs/misc/cups/**/*
"6.topic: python":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/python.section.md
- pkgs/development/interpreters/python/**/*
- pkgs/development/python-modules/**/*
- pkgs/top-level/python-packages.nix
"6.topic: qt/kde":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/qt.section.md
- nixos/modules/services/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":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/ruby.section.md
- pkgs/development/interpreters/ruby/**/*
- pkgs/development/ruby-modules/**/*
"6.topic: rust":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/rust.section.md
- pkgs/build-support/rust/**/*
- pkgs/development/compilers/rust/**/*
"6.topic: stdenv":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/stdenv/**/*
"6.topic: steam":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/games/steam/**/*
"6.topic: systemd":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/os-specific/linux/systemd/**/*
- nixos/modules/system/boot/systemd*/**/*
"6.topic: TeX":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/texlive.section.md
- pkgs/test/texlive/**
- pkgs/tools/typesetting/tex/**/*
"6.topic: testing":
- any:
- changed-files:
- any-glob-to-any-file:
# NOTE: Let's keep the scope limited to test frameworks that are
# *developed in this repo*;
# - not individual tests
# - not packages for test frameworks
- nixos/lib/testing/**
- nixos/lib/test-driver/**
- nixos/tests/nixos-test-driver/**
- nixos/lib/testing-python.nix # legacy
- nixos/tests/make-test-python.nix # legacy
# lib/debug.nix has a test framework (runTests) but it's not the main focus
"6.topic: vim":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/languages-frameworks/vim.section.md
- pkgs/applications/editors/vim/**/*
- pkgs/applications/editors/vim/plugins/**/*
- nixos/modules/programs/neovim.nix
- pkgs/applications/editors/neovim/**/*
"6.topic: vscode":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/applications/editors/vscode/**/*
"6.topic: xfce":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/doc/manual/configuration/xfce.xml
- nixos/modules/services/x11/desktop-managers/xfce.nix
- nixos/tests/xfce.nix
- pkgs/desktops/xfce/**/*
"6.topic: zig":
- any:
- changed-files:
- any-glob-to-any-file:
- pkgs/development/compilers/zig/**/*
- doc/hooks/zig.section.md
"8.has: changelog":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/doc/manual/release-notes/**/*
"8.has: documentation":
- any:
- changed-files:
- any-glob-to-any-file:
- doc/**/*
- nixos/doc/**/*
"8.has: module (update)":
- any:
- changed-files:
- any-glob-to-any-file:
- nixos/modules/**/*
"8.has: maintainer-list (update)":
- any:
- changed-files:
- any-glob-to-any-file:
- maintainers/maintainer-list.nix

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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
uses: korthout/backport-action@ef20d86abccbac3ee3a73cb2efbdc06344c390e5 # v2.5.0
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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
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 release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ]'

View File

@@ -1,123 +0,0 @@
# Checks pkgs/by-name (see pkgs/by-name/README.md)
# using the nixpkgs-check-by-name tool (see https://github.com/NixOS/nixpkgs-check-by-name)
#
# When you make changes to this workflow, also update pkgs/test/check-by-name/run-local.sh adequately
name: Check pkgs/by-name
on:
# Using pull_request_target instead of pull_request avoids having to approve first time contributors
pull_request_target:
# This workflow depends on the base branch of the PR,
# but changing the base branch is not included in the default trigger events,
# which would be `opened`, `synchronize` or `reopened`.
# Instead it causes an `edited` event, so we need to add it explicitly here
# While `edited` is also triggered when the PR title/body is changed,
# this PR action is fairly quick, and PR's don't get edited that often,
# so it shouldn't be a problem
types: [opened, synchronize, reopened, edited]
permissions: {}
# Create a check-by-name concurrency group based on the pull request number. if
# an event triggers a run on the same PR while a previous run is still in
# progress, the previous run will be canceled and the new one will start.
concurrency:
group: check-by-name-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check:
# This needs to be x86_64-linux, because we depend on the tooling being pre-built in the GitHub releases
runs-on: ubuntu-latest
# This should take 1 minute at most, but let's be generous.
# The default of 6 hours is definitely too long
timeout-minutes: 10
steps:
# This step has to be in this file,
# because it's needed to determine which revision of the repository to fetch,
# and we can only use other files from the repository once it's fetched.
- name: Resolving the merge commit
env:
GH_TOKEN: ${{ github.token }}
run: |
# This checks for mergeability of a pull request as recommended in
# https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests
# Retry the API query this many times
retryCount=5
# Start with 5 seconds, but double every retry
retryInterval=5
while true; do
echo "Checking whether the pull request can be merged"
prInfo=$(gh api \
-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
if (( retryCount == 0 )); then
echo "Not retrying anymore, probably GitHub is having internal issues"
exit 1
else
(( retryCount -= 1 )) || true
# null indicates that GitHub is still computing whether it's mergeable
# Wait a couple seconds before trying again
echo "GitHub is still computing whether this PR can be merged, waiting $retryInterval seconds before trying again ($retryCount retries left)"
sleep "$retryInterval"
(( retryInterval *= 2 )) || true
fi
else
break
fi
done
if [[ "$mergeable" == "true" ]]; then
echo "The PR can be merged, checking the merge commit $mergedSha"
echo "mergedSha=$mergedSha" >> "$GITHUB_ENV"
else
echo "The PR cannot be merged, it has a merge conflict, skipping the rest.."
fi
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
if: env.mergedSha
with:
# pull_request_target checks out the base branch by default
ref: ${{ env.mergedSha }}
# Fetches the merge commit and its parents
fetch-depth: 2
- name: Checking out base branch
if: env.mergedSha
run: |
base=$(mktemp -d)
git worktree add "$base" "$(git rev-parse HEAD^1)"
echo "base=$base" >> "$GITHUB_ENV"
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
if: env.mergedSha
- name: Fetching the pinned tool
if: env.mergedSha
# Update the pinned version using pkgs/test/check-by-name/update-pinned-tool.sh
run: |
# The pinned version of the tooling to use
toolVersion=$(<pkgs/test/check-by-name/pinned-version.txt)
# Fetch the x86_64-linux-specific release artifact containing the Gzipped NAR of the pre-built tool
toolPath=$(curl -sSfL https://github.com/NixOS/nixpkgs-check-by-name/releases/download/"$toolVersion"/x86_64-linux.nar.gz \
| gzip -cd | nix-store --import | tail -1)
# Adds a result symlink as a GC root
nix-store --realise "$toolPath" --add-root result
- name: Running nixpkgs-check-by-name
if: env.mergedSha
env:
# Force terminal colors to be enabled. The library that
# nixpkgs-check-by-name uses respects: https://bixense.com/clicolors/
CLICOLOR_FORCE: 1
run: |
if result/bin/nixpkgs-check-by-name --base "$base" .; then
exit 0
else
exitCode=$?
echo "To run locally: ./maintainers/scripts/check-by-name.sh $GITHUB_BASE_REF https://github.com/$GITHUB_REPOSITORY.git"
exit "$exitCode"
fi

View File

@@ -1,24 +0,0 @@
name: "Check cherry-picks"
on:
pull_request_target:
branches:
- 'release-**'
- 'staging-**'
permissions: {}
jobs:
check:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 0
filter: blob:none
- name: Check cherry-picks
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
./maintainers/scripts/check-cherry-picks.sh "$BASE_SHA" "$HEAD_SHA"

View File

@@ -1,28 +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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
# pull_request_target checks out the base branch by default
ref: refs/pull/${{ github.event.pull_request.number }}/merge
# Only these directories to perform the check
sparse-checkout: |
lib
maintainers
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
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,62 +0,0 @@
# This file was copied mostly from check-maintainers-sorted.yaml.
# NOTE: Formatting with the RFC-style nixfmt command is not yet stable. See
# https://github.com/NixOS/rfcs/pull/166.
# Because of this, this action is not yet enabled for all files -- only for
# those who have opted in.
name: Check that Nix files are formatted
on:
pull_request_target:
permissions:
contents: read
jobs:
nixos:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
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@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
# fix a commit from nixpkgs-unstable to avoid e.g. building nixfmt
# from staging
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/4b455dc2048f73a79eb3713f342369ff58f93e0b.tar.gz
- name: Install nixfmt
run: "nix-env -f '<nixpkgs>' -iAP nixfmt-rfc-style"
- name: Check that Nix files are formatted according to the RFC style
# Each environment variable beginning with NIX_FMT_PATHS_ is a list of
# paths to check with nixfmt.
env:
NIX_FMT_PATHS_BSD: pkgs/os-specific/bsd
NIX_FMT_PATHS_MPVSCRIPTS: pkgs/applications/video/mpv/scripts
# Format paths related to the Nixpkgs CUDA ecosystem.
NIX_FMT_PATHS_CUDA: |
pkgs/development/cuda-modules
pkgs/test/cuda
pkgs/top-level/cuda-packages.nix
NIX_FMT_PATHS_K3S: |
nixos/modules/services/cluster/k3s
nixos/tests/k3s
pkgs/applications/networking/cluster/k3s
NIX_FMT_PATHS_VSCODE_EXTS: pkgs/applications/editors/vscode/extensions
NIX_FMT_PATHS_PHP_PACKAGES: pkgs/development/php-packages
NIX_FMT_PATHS_BUILD_SUPPORT_PHP: pkgs/build-support/php
# Iterate over all environment variables beginning with NIX_FMT_PATHS_.
run: |
for env_var in "${!NIX_FMT_PATHS_@}"; do
readarray -t paths <<< "${!env_var}"
if [[ "${paths[*]}" == "" ]]; then
echo "Error: $env_var is empty."
exit 1
fi
echo "Checking paths: ${paths[@]}"
if ! nixfmt --check "${paths[@]}"; then
echo "Error: nixfmt failed."
exit 1
fi
done

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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
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@8887e596b4ee1134dae06b98d573bd674693f47c # v26
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@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
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@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Building NixOS manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true nixos/release.nix -A manual.x86_64-linux

View File

@@ -1,33 +0,0 @@
name: "Build Nixpkgs manual"
permissions: read-all
on:
pull_request_target:
branches:
- master
paths:
- 'doc/**'
- 'lib/**'
- 'pkgs/tools/nix/nixdoc/**'
jobs:
nixpkgs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
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@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@18cf96c7c98e048e10a83abd92116114cd8504be # v14
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Building Nixpkgs manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true pkgs/top-level/release.nix -A manual -A manual.tests

View File

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

View File

@@ -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,60 +0,0 @@
# This action periodically merges base branches into staging branches.
# This is done to
# * prevent conflicts or rather resolve them early
# * make all potential breakage happen on the staging branch
# * and make sure that all major rebuilds happen before the staging
# branch gets merged back into its base branch.
name: "Periodic Merges (24h)"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 24 hours
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
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.11
into: staging-next-23.11
- from: staging-next-23.11
into: staging-23.11
name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 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@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
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,58 +0,0 @@
# This action periodically merges base branches into staging branches.
# This is done to
# * prevent conflicts or rather resolve them early
# * make all potential breakage happen on the staging branch
# * and make sure that all major rebuilds happen before the staging
# branch gets merged back into its base branch.
name: "Periodic Merges (6h)"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Merge every 6 hours
- cron: '0 */6 * * *'
workflow_dispatch:
permissions:
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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: ${{ matrix.pairs.from }} → ${{ matrix.pairs.into }}
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 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@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
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@9153d834b60caba6d51c9b9510b087acf9f33f83 # v6.0.4
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 opentofu.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 }}

23
.gitignore vendored
View File

@@ -2,34 +2,15 @@
,*
.*.swp
.*.swo
.\#*
\#*\#
.idea/
.nixos-test-history
.vscode/
outputs/
result-*
result
repl-result-*
tags
!pkgs/development/python-modules/result
result-*
/doc/NEWS.html
/doc/NEWS.txt
/doc/manual.html
/doc/manual.pdf
/source/
.version-suffix
.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
/pkgs/desktops/kde-5/*/tmp/

View File

@@ -1,16 +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>
Yifei Sun <ysun@hey.com> StepBroBD <Hi@StepBroBD.com>
Yifei Sun <ysun@hey.com> <ysun+git@stepbrobd.com>

View File

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

1
.version Normal file
View File

@@ -0,0 +1 @@
18.03

View File

@@ -1,755 +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 set up an isolated environment for each build process.
It is used to remove further hidden dependencies set by the build environment to improve reproducibility.
This includes access to the network during the build outside of `fetch*` functions and files outside the Nix store.
Depending on the operating system, access to other resources is blocked as well (e.g., 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.
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.
If you are on Linux, sandboxing is enabled by default.
On other platforms, sandboxing is disabled by default due to a small performance hit on each build.
Please enable sandboxing **before** building the package by adding the following to: `/etc/nix/nix.conf`:
```ini
sandbox = true
```
#### Built on platform(s)
Many Nix packages are designed to run on multiple platforms. As such, its important to let the maintainer know which platforms 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](https://github.com/orgs/nixos/teams/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.11`): The NixOS release branches, used for the stable channels such as `nixos-23.11`, `nixos-23.11-small` and `nixpkgs-23.11-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 request](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-next` | `staging` |
| --- | --- | --- | --- |
| 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 | - | `master` | `staging-next` |
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`.
See [Squashing Commits](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_squashing) for additional information.
- For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
- When adding yourself 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 // {
foo = if doCoverageAnalysis then "bla" else "";
})
```
instead of
```nix
args:
args.stdenv.mkDerivation (args // {
foo = if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "";
})
```
- Unnecessary string conversions should be avoided. Do
```nix
{
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)`.

11
COPYING
View File

@@ -1,4 +1,4 @@
Copyright (c) 2003-2024 Eelco Dolstra and the Nixpkgs/NixOS contributors
Copyright (c) 2003-2018 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
@@ -18,3 +18,12 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
======================================================================
Note: the license above does not apply to the packages built by the
Nix Packages collection, merely to the package descriptions (i.e., Nix
expressions, build scripts, 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.

118
README.md
View File

@@ -1,101 +1,41 @@
<p align="center">
<a href="https://nixos.org">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/main/public/logo/nixos-hires.png" width="500px" alt="NixOS logo">
</picture>
</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
100,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 git://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-17.09` for the latest
release and `nixos-unstable` for the latest successful build of master:
# Community
```
% git remote update channels
% git rebase channels/nixos-17.09
```
* [Discourse Forum](https://discourse.nixos.org/)
* [Matrix Chat](https://matrix.to/#/#community:nixos.org)
* [NixOS Weekly](https://weekly.nixos.org/)
* [Official wiki](https://wiki.nixos.org/)
* [Community-maintained list of ways to get in touch](https://wiki.nixos.org/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
For pull-requests, please rebase onto nixpkgs `master`.
# 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/).
[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 the NixOS 23.11 release](https://hydra.nixos.org/jobset/nixos/release-23.11)
* [Continuous package builds for 17.09 release](https://hydra.nixos.org/jobset/nixos/release-17.09)
* [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)
* [Tests for 17.09 release](https://hydra.nixos.org/job/nixos/release-17.09/tested#tabs-constituents)
Artifacts successfully built with Hydra are published to cache at
https://cache.nixos.org/. When successful build and test criteria are
met, the Nixpkgs expressions are distributed via [Nix
channels](https://nixos.org/manual/nix/stable/package-management/channels.html).
Communication:
# 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.
* [Mailing list](https://groups.google.com/forum/#!forum/nix-devel)
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)

View File

@@ -6,21 +6,12 @@ if ! builtins ? nixVersion || builtins.compareVersions requiredVersion builtins.
This version of Nixpkgs requires Nix >= ${requiredVersion}, please upgrade:
- If you are running NixOS, `nixos-rebuild' can be used to upgrade your system.
- Alternatively, with Nix > 2.0 `nix upgrade-nix' can be used to imperatively
upgrade Nix. You may use `nix-env --version' to check which version you have.
- If you are running NixOS, use `nixos-rebuild' to upgrade your system.
- 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
For more information, please see the NixOS release notes at
https://nixos.org/nixos/manual or locally at
${toString ./nixos/doc/manual/release-notes}.
If you need further help, see https://nixos.org/nixos/support.html
curl https://nixos.org/nix/install | sh
''
else

6
doc/.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
*.chapter.xml
*.section.xml
.version
out
manual-full.xml
highlightjs

96
doc/Makefile Normal file
View File

@@ -0,0 +1,96 @@
MD_TARGETS=$(addsuffix .xml, $(basename $(wildcard ./*.md ./**/*.md)))
.PHONY: all
all: validate out/html/index.html out/epub/manual.epub
.PHONY: debug
debug:
nix-shell --run "xmloscopy --docbook5 ./manual.xml ./manual-full.xml"
.PHONY: clean
clean:
rm -f ${MD_TARGETS} .version manual-full.xml
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/
echo "document.onreadystatechange = function () { \
var listings = document.querySelectorAll('.programlisting, .screen'); \
for (i = 0; i < listings.length; ++i) { \
hljs.highlightBlock(listings[i]); \
} \
} " > out/html/highlightjs/loader.js
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/
manual-full.xml: ${MD_TARGETS} .version *.xml
xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml
.version:
nix-instantiate --eval \
-E '(import ../lib).nixpkgsVersion' > .version
%.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,348 +0,0 @@
# Contributing to the Nixpkgs reference manual
This directory houses the sources files for the Nixpkgs reference manual.
Going forward, it should only contain [reference](https://nix.dev/contributing/documentation/diataxis#reference) documentation.
For tutorials, guides and explanations, contribute to <https://nix.dev/> instead.
For documentation only relevant for contributors, use Markdown files and code comments in the source code.
Rendered documentation:
- [Unstable (from master)](https://nixos.org/manual/nixpkgs/unstable/)
- [Stable (from latest release)](https://nixos.org/manual/nixpkgs/stable/)
The rendering tool is [nixos-render-docs](../pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs), sometimes abbreviated `nrd`.
## 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 `wrapGApps*` hook 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).
#### HTML
Inlining HTML is not allowed. Parts of the documentation gets rendered to various non-HTML formats, such as man pages in the case of NixOS manual.
#### 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`
- `important`
- `note`
- `tip`
- `warning`
- `example`
Example admonitions require a title to work.
If you don't provide one, the manual won't be built.
```markdown
::: {.example #ex-showing-an-example}
# Title for this example
Text for the example.
:::
```
#### [Definition lists](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md)
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.
## Documentation conventions
In an effort to keep the Nixpkgs manual in a consistent style, please follow the conventions below, unless they prevent you from properly documenting something.
In that case, please open an issue about the particular documentation convention and tag it with a "needs: documentation" label.
When needed, each convention explain why it exists, so you can make a decision whether to follow it or not based on your particular case.
Note that these conventions are about the **structure** of the manual (and its source files), not about the content that goes in it.
You, as the writer of documentation, are still in charge of its content.
- Put each sentence in its own line.
This makes reviews and suggestions much easier, since GitHub's review system is based on lines.
It also helps identifying long sentences at a glance.
- Use the [admonition syntax](#admonitions) for callouts and examples.
- Provide at least one example per function, and make examples self-contained.
This is easier to understand for beginners.
It also helps with testing that it actually works especially once we introduce automation.
Example code should be such that it can be passed to `pkgs.callPackage`.
Instead of something like:
```nix
pkgs.dockerTools.buildLayeredImage {
name = "hello";
contents = [ pkgs.hello ];
}
```
Write something like:
```nix
{ dockerTools, hello }:
dockerTools.buildLayeredImage {
name = "hello";
contents = [ hello ];
}
```
- When showing inputs/outputs of any [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop), such as a shell or the Nix REPL, use a format as you'd see in the REPL, while trying to visually separate inputs from outputs.
This means that for a shell, you should use a format like the following:
```shell
$ nix-build -A hello '<nixpkgs>' \
--option require-sigs false \
--option trusted-substituters file:///tmp/hello-cache \
--option substituters file:///tmp/hello-cache
/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1
```
Note how the input is preceded by `$` on the first line and indented on subsequent lines, and how the output is provided as you'd see on the shell.
For the Nix REPL, you should use a format like the following:
```shell
nix-repl> builtins.attrNames { a = 1; b = 2; }
[ "a" "b" ]
```
Note how the input is preceded by `nix-repl>` and the output is provided as you'd see on the Nix REPL.
- When documenting functions or anything that has inputs/outputs and example usage, use nested headings to clearly separate inputs, outputs, and examples.
Keep examples as the last nested heading, and link to the examples wherever applicable in the documentation.
The purpose of this convention is to provide a familiar structure for navigating the manual, so any reader can expect to find content related to inputs in an "inputs" heading, examples in an "examples" heading, and so on.
An example:
```
## buildImage
Some explanation about the function here.
Describe a particular scenario, and point to [](#ex-dockerTools-buildImage), which is an example demonstrating it.
### Inputs
Documentation for the inputs of `buildImage`.
Perhaps even point to [](#ex-dockerTools-buildImage) again when talking about something specifically linked to it.
### Passthru outputs
Documentation for any passthru outputs of `buildImage`.
### Examples
Note that this is the last nested heading in the `buildImage` section.
:::{.example #ex-dockerTools-buildImage}
# Using `buildImage`
Example of how to use `buildImage` goes here.
:::
```
- Use [definition lists](#definition-lists) to document function arguments, and the attributes of such arguments as well as their [types](https://nixos.org/manual/nix/stable/language/values).
For example:
```markdown
# pkgs.coolFunction
Description of what `coolFunction` does.
## Inputs
`coolFunction` expects a single argument which should be an attribute set, with the following possible attributes:
`name` (String)
: The name of the resulting image.
`tag` (String; _optional_)
: Tag of the generated image.
_Default:_ the output path's hash.
```
#### Examples
To define a referenceable figure use the following fencing:
```markdown
:::{.example #an-attribute-set-example}
# An attribute set example
You can add text before
```nix
{ a = 1; b = 2;}
```
and after code fencing
:::
```
Defining examples through the `example` fencing class adds them to a "List of Examples" section after the Table of Contents.
Though this is not shown in the rendered documentation on nixos.org.
#### Figures
To define a referencable figure use the following fencing:
```markdown
::: {.figure #nixos-logo}
# NixOS Logo
![NixOS logo](./nixos_logo.png)
:::
```
Defining figures through the `figure` fencing class adds them to a `List of Figures` after the `Table of Contents`.
Though this is not shown in the rendered documentation on nixos.org.
#### Footnotes
To add a foonote explanation, use the following syntax:
```markdown
Sometimes it's better to add context [^context] in a footnote.
[^context]: This explanation will be rendered at the end of the chapter.
```
#### Inline comments
Inline comments are supported with following syntax:
```markdown
<!-- This is an inline comment -->
```
The comments will not be rendered in the rendered HTML.
#### Link reference definitions
Links can reference a label, for example, to make the link target reusable:
```markdown
::: {.note}
Reference links can also be used to [shorten URLs][url-id] and keep the markdown readable.
:::
[url-id]: https://github.com/NixOS/nixpkgs/blob/19d4f7dc485f74109bd66ef74231285ff797a823/doc/README.md
```
This syntax is taken from [CommonMark](https://spec.commonmark.org/0.30/#link-reference-definitions).
#### Typographic replacements
Typographic replacements are enabled. Check the [list of possible replacement patterns check](https://github.com/executablebooks/markdown-it-py/blob/3613e8016ecafe21709471ee0032a90a4157c2d1/markdown_it/rules_core/replacements.py#L1-L15).
## Getting help
If you need documentation-specific help or reviews, ping [@NixOS/documentation-team](https://github.com/orgs/nixos/teams/documentation-team) on your pull request.

View File

@@ -1,3 +0,0 @@
document.addEventListener('DOMContentLoaded', function(event) {
anchors.add('h1[id]:not(div.note h1, div.warning h1, div.tip h1, div.caution h1, div.important h1), h2[id]:not(div.note h2, div.warning h2, div.tip h2, div.caution h2, div.important h2), h3[id]:not(div.note h3, div.warning h3, div.tip h3, div.caution h3, div.important h3), h4[id]:not(div.note h4, div.warning h4, div.tip h4, div.caution h4, div.important h4), h5[id]:not(div.note h5, div.warning h5, div.tip h5, div.caution h5, div.important h5), h6[id]:not(div.note h6, div.warning h6, div.tip h6, div.caution h6, div.important h6)');
});

9
doc/anchor.min.js vendored

File diff suppressed because one or more lines are too long

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,884 +0,0 @@
# Fetchers {#chap-pkgs-fetchers}
Building software with Nix often requires downloading source code and other files from the internet.
To this end, we use functions that we call _fetchers_, which obtain remote sources via various protocols and services.
Nix provides built-in fetchers such as [`builtins.fetchTarball`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchTarball).
Nixpkgs provides its own fetchers, which work differently:
- 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/glossary#gloss-derivation), 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 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 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, Nix's built-in fetchers are not allowed in Nixpkgs.
The following table summarises 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 |
:::{.tip}
`pkgs.fetchFrom*` helpers retrieve _snapshots_ of version-controlled sources, as opposed to the entire version history, which is more efficient.
`pkgs.fetchgit` by default also has the same behaviour, but can be changed through specific attributes given to it.
:::
## Caveats {#chap-pkgs-fetchers-caveats}
Because Nixpkgs fetchers are fixed-output derivations, an [output hash](https://nixos.org/manual/nix/stable/language/advanced-attributes#adv-attr-outputHash) has to be specified, usually indirectly through a `hash` attribute.
This hash refers to the derivation output, which can be different from the remote source itself!
This has the following implications that you should be aware of:
- Use Nix (or Nix-aware) tooling to produce the output hash.
- When changing any fetcher parameters, always update the output hash.
Use one of the methods from [](#sec-pkgs-fetchers-updating-source-hashes).
Otherwise, existing store objects that match the output hash will be re-used rather than fetching new content.
:::{.note}
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.
:::
## Updating source hashes {#sec-pkgs-fetchers-updating-source-hashes}
There are several ways to obtain the hash corresponding to a remote source.
Unless you understand how the fetcher you're using calculates the hash from the downloaded contents, you should use [the fake hash method](#sec-pkgs-fetchers-updating-source-hashes-fakehash-method).
1. []{#sec-pkgs-fetchers-updating-source-hashes-fakehash-method} The fake hash method: In your package recipe, set the hash to one of
- `""`
- `lib.fakeHash`
- `lib.fakeSha256`
- `lib.fakeSha512`
Attempt to build, extract the calculated hashes from error messages, and put them into the recipe.
:::{.warning}
You must use one of these four fake hashes and not some arbitrarily-chosen hash.
See [](#sec-pkgs-fetchers-secure-hashes) for details.
:::
:::{.example #ex-fetchers-update-fod-hash}
# Update source hash with the fake hash method
Consider the following recipe that produces a plain file:
```nix
{ fetchurl }:
fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.05/.version";
hash = "sha256-ZHl1emidXVojm83LCVrwULpwIzKE/mYwfztVkvpruOM=";
}
```
A common mistake is to update a fetcher parameter, such as `url`, without updating the hash:
```nix
{ fetchurl }:
fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version";
hash = "sha256-ZHl1emidXVojm83LCVrwULpwIzKE/mYwfztVkvpruOM=";
}
```
**This will produce the same output as before!**
Set the hash to an empty string:
```nix
{ fetchurl }:
fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version";
hash = "";
}
```
When building the package, use the error message to determine the correct hash:
```shell
$ nix-build
(some output removed for clarity)
error: hash mismatch in fixed-output derivation '/nix/store/7yynn53jpc93l76z9zdjj4xdxgynawcw-version.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-BZqI7r0MNP29yGH5+yW2tjU9OOpOCEvwWKrWCv5CQ0I=
error: build of '/nix/store/bqdjcw5ij5ymfbm41dq230chk9hdhqff-version.drv' failed
```
:::
2. Prefetch the source with [`nix-prefetch-<type> <URL>`](https://search.nixos.org/packages?buckets={%22package_attr_set%22%3A[%22No%20package%20set%22]%2C%22package_license_set%22%3A[]%2C%22package_maintainers_set%22%3A[]%2C%22package_platforms%22%3A[]}&query=nix-prefetch), where `<type>` is one of
- `url`
- `git`
- `hg`
- `cvs`
- `bzr`
- `svn`
The hash is printed to stdout.
3. Prefetch by package source (with `nix-prefetch-url '<nixpkgs>' -A <package>.src`, where `<package>` is package attribute name).
The hash is printed to stdout.
This works well when you've upgraded the existing package version and want to find out new hash, but is useless if the package can't be accessed by attribute or the package has multiple sources (`.srcs`, architecture-dependent sources, etc).
4. Upstream hash: use it when upstream provides `sha256` or `sha512`.
Don't use it when upstream provides `md5`, compute `sha256` instead.
A little nuance is that `nix-prefetch-*` tools produce hashes with the `nix32` encoding (a Nix-specific base32 adaptation), but upstream usually provides hexadecimal (`base16`) encoding.
Fetchers understand both formats.
Nixpkgs does not standardise on any one format.
You can convert between hash formats with [`nix-hash`](https://nixos.org/manual/nix/stable/command-ref/nix-hash).
5. Extract the hash from a local source archive with `sha256sum`.
Use `nix-prefetch-url file:///path/to/archive` if you want the custom Nix `base32` hash.
## Obtaining hashes securely {#sec-pkgs-fetchers-secure-hashes}
It's always a good idea to avoid Man-in-the-Middle (MITM) attacks when downloading source contents.
Otherwise, you could unknowingly download malware instead of the intended source, and instead of the actual source hash, you'll end up using the hash of malware.
Here are security considerations for this scenario:
- `http://` URLs are not secure to prefetch hashes.
- Upstream hashes should be obtained via a secure protocol.
- `https://` URLs give you more protections when using `nix-prefetch-*` or for upstream hashes.
- `https://` URLs are secure when using the [fake hash method](#sec-pkgs-fetchers-updating-source-hashes-fakehash-method) *only if* you use one of the listed fake hashes.
If you use any other hash, the download will be exposed to MITM attacks even if you use HTTPS URLs.
In more concrete terms, if you use any other hash, the [`--insecure` flag](https://curl.se/docs/manpage.html#-k) will be passed to the underlying call to `curl` when downloading content.
[]{#fetchurl}
## `fetchurl` {#sec-pkgs-fetchers-fetchurl}
`fetchurl` returns a [fixed-output derivation](https://nixos.org/manual/nix/stable/glossary.html#gloss-fixed-output-derivation) which downloads content from a given URL and stores the unaltered contents within the Nix store.
It uses {manpage}`curl(1)` internally, and allows its behaviour to be modified by specifying a few attributes in the argument to `fetchurl` (see the documentation for attributes `curlOpts`, `curlOptsList`, and `netrcPhase`).
The resulting [store path](https://nixos.org/manual/nix/stable/store/store-path) is determined by the hash given to `fetchurl`, and also the `name` (or `pname` and `version`) values.
If neither `name` nor `pname` and `version` are specified when calling `fetchurl`, it will default to using the [basename](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-baseNameOf) of `url` or the first element of `urls`.
If `pname` and `version` are specified, `fetchurl` will use those values and will ignore `name`, even if it is also specified.
### Inputs {#sec-pkgs-fetchers-fetchurl-inputs}
`fetchurl` requires an attribute set with the following attributes:
`url` (String; _optional_)
: The URL to download from.
:::{.note}
Either `url` or `urls` must be specified, but not both.
:::
All URLs of the format [specified here](https://curl.se/docs/url-syntax.html#rfc-3986-plus) are supported.
_Default value:_ `""`.
`urls` (List of String; _optional_)
: A list of URLs, specifying download locations for the same content.
Each URL will be tried in order until one of them succeeds with some content or all of them fail.
See [](#ex-fetchers-fetchurl-nixpkgs-version-multiple-urls) to understand how this attribute affects the behaviour of `fetchurl`.
:::{.note}
Either `url` or `urls` must be specified, but not both.
:::
_Default value:_ `[]`.
`hash` (String; _optional_)
: Hash of the derivation output of `fetchurl`, following the format for integrity metadata as defined by [SRI](https://www.w3.org/TR/SRI/).
For more information, see [](#chap-pkgs-fetchers-caveats).
:::{.note}
It is recommended that you use the `hash` attribute instead of the other hash-specific attributes that exist for backwards compatibility.
If `hash` is not specified, you must specify `outputHash` and `outputHashAlgo`, or one of `sha512`, `sha256`, or `sha1`.
:::
_Default value:_ `""`.
`outputHash` (String; _optional_)
: Hash of the derivation output of `fetchurl` in the format expected by Nix.
See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHash) for more information about its format.
:::{.note}
It is recommended that you use the `hash` attribute instead.
If `outputHash` is specified, you must also specify `outputHashAlgo`.
:::
_Default value:_ `""`.
`outputHashAlgo` (String; _optional_)
: Algorithm used to generate the value specified in `outputHash`.
See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHashAlgo) for more information about the values it supports.
:::{.note}
It is recommended that you use the `hash` attribute instead.
The value specified in `outputHashAlgo` will be ignored if `outputHash` isn't also specified.
:::
_Default value:_ `""`.
`sha1` (String; _optional_)
: SHA-1 hash of the derivation output of `fetchurl` in the format expected by Nix.
See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHash) for more information about its format.
:::{.note}
It is recommended that you use the `hash` attribute instead.
:::
_Default value:_ `""`.
`sha256` (String; _optional_)
: SHA-256 hash of the derivation output of `fetchurl` in the format expected by Nix.
See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHash) for more information about its format.
:::{.note}
It is recommended that you use the `hash` attribute instead.
:::
_Default value:_ `""`.
`sha512` (String; _optional_)
: SHA-512 hash of the derivation output of `fetchurl` in the format expected by Nix.
See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHash) for more information about its format.
:::{.note}
It is recommended that you use the `hash` attribute instead.
:::
_Default value:_ `""`.
`name` (String; _optional_)
: The symbolic name of the downloaded file when saved in the Nix store.
See [the `fetchurl` overview](#sec-pkgs-fetchers-fetchurl) for details on how the name of the file is decided.
_Default value:_ `""`.
`pname` (String; _optional_)
: A base name, which will be combined with `version` to form the symbolic name of the downloaded file when saved in the Nix store.
See [the `fetchurl` overview](#sec-pkgs-fetchers-fetchurl) for details on how the name of the file is decided.
:::{.note}
If `pname` is specified, you must also specify `version`, otherwise `fetchurl` will ignore the value of `pname`.
:::
_Default value:_ `""`.
`version` (String; _optional_)
: A version, which will be combined with `pname` to form the symbolic name of the downloaded file when saved in the Nix store.
See [the `fetchurl` overview](#sec-pkgs-fetchers-fetchurl) for details on how the name of the file is decided.
_Default value:_ `""`.
`recursiveHash` (Boolean; _optional_) []{#sec-pkgs-fetchers-fetchurl-inputs-recursiveHash}
: If set to `true`, will signal to Nix that the hash given to `fetchurl` was calculated using the `"recursive"` mode.
See [the documentation on the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-outputHashMode) for more information about the existing modes.
By default, `fetchurl` uses `"recursive"` mode when the `executable` attribute is set to `true`, so you don't need to specify `recursiveHash` in this case.
_Default value:_ `false`.
`executable` (Boolean; _optional_)
: If `true`, sets the executable bit on the downloaded file.
_Default value_: `false`.
`downloadToTemp` (Boolean; _optional_) []{#sec-pkgs-fetchers-fetchurl-inputs-downloadToTemp}
: If `true`, saves the downloaded file to a temporary location instead of the expected Nix store location.
This is useful when used in conjunction with `postFetch` attribute, otherwise `fetchurl` will not produce any meaningful output.
The location of the downloaded file will be set in the `$downloadedFile` variable, which should be used by the script in the `postFetch` attribute.
See [](#ex-fetchers-fetchurl-nixpkgs-version-postfetch) to understand how to work with this attribute.
_Default value:_ `false`.
`postFetch` (String; _optional_)
: Script executed after the file has been downloaded successfully, and before `fetchurl` finishes running.
Useful for post-processing, to check or transform the file in some way.
See [](#ex-fetchers-fetchurl-nixpkgs-version-postfetch) to understand how to work with this attribute.
_Default value:_ `""`.
`netrcPhase` (String or Null; _optional_)
: Script executed to create a {manpage}`netrc(5)` file to be used with {manpage}`curl(1)`.
The script should create the `netrc` file (note that it does not begin with a ".") in the directory it's currently running in (`$PWD`).
The script is executed during the setup done by `fetchurl` before it runs any of its code to download the specified content.
:::{.note}
If specified, `fetchurl` will automatically alter its invocation of {manpage}`curl(1)` to use the `netrc` file, so you don't need to add anything to `curlOpts` or `curlOptsList`.
:::
:::{.caution}
Since `netrcPhase` needs to be specified in your source Nix code, any secrets that you put directly in it will be world-readable by design (both in your source code, and when the derivation gets created in the Nix store).
If you want to avoid this behaviour, see the documentation of `netrcImpureEnvVars` for an alternative way of dealing with these secrets.
:::
_Default value_: `null`.
`netrcImpureEnvVars` (List of String; _optional_)
: If specified, `fetchurl` will add these environment variable names to the list of [impure environment variables](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-impureEnvVars), which will be passed from the environment of the calling user to the builder running the `fetchurl` code.
This is useful when used with `netrcPhase` to hide any secrets that are used in it, because the script in `netrcPhase` only needs to reference the environment variables with the secrets in them instead.
However, note that these are called _impure_ variables for a reason:
the environment that starts the build needs to have these variables declared for everything to work properly, which means that additional setup is required outside what Nix controls.
_Default value:_ `[]`.
`curlOpts` (String; _optional_)
: If specified, this value will be appended to the invocation of {manpage}`curl(1)` when downloading the URL(s) given to `fetchurl`.
Multiple arguments can be separated by spaces normally, but values with whitespaces will be interpreted as multiple arguments (instead of a single value), even if the value is escaped.
See `curlOptsList` for a way to pass values with whitespaces in them.
_Default value:_ `""`.
`curlOptsList` (List of String; _optional_)
: If specified, each element of this list will be passed as an argument to the invocation of {manpage}`curl(1)` when downloading the URL(s) given to `fetchurl`.
This allows passing values that contain spaces, with no escaping needed.
_Default value:_ `[]`.
`showURLs` (Boolean; _optional_)
: If set to `true`, this will stop `fetchurl` from downloading anything at all.
Instead, it will output a list of all the URLs it would've used to download the content (after resolving `mirror://` URLs, for example).
This is useful for debugging.
_Default value:_ `false`.
`meta` (Attribute Set; _optional_)
: Specifies any [meta-attributes](#chap-meta) for the derivation returned by `fetchurl`.
_Default value:_ `{}`.
`passthru` (Attribute Set; _optional_)
: Specifies any extra [passthru](#var-stdenv-passthru) attributes for the derivation returned by `fetchurl`.
Note that `fetchurl` defines [passthru attributes of its own](#ssec-pkgs-fetchers-fetchurl-passthru-outputs).
Attributes specified in `passthru` can override the default attributes returned by `fetchurl`.
_Default value:_ `{}`.
`preferLocalBuild` (Boolean; _optional_)
: This is the same attribute as [defined in the Nix manual](https://nixos.org/manual/nix/stable/language/advanced-attributes.html#adv-attr-preferLocalBuild).
It is `true` by default because making a remote machine download the content just duplicates network traffic (since the local machine might download the results from the derivation anyway), but this could be useful in cases where network access is restricted on local machines.
_Default value:_ `true`.
`nativeBuildInputs` (List of Attribute Set; _optional_)
: Additional packages needed to download the content.
This is useful if you need extra packages for `postFetch` or `netrcPhase`, for example.
Has the same semantics as in [](#var-stdenv-nativeBuildInputs).
See [](#ex-fetchers-fetchurl-nixpkgs-version-postfetch) to understand how this can be used with `postFetch`.
_Default value:_ `[]`.
### Passthru outputs {#ssec-pkgs-fetchers-fetchurl-passthru-outputs}
`fetchurl` also defines its own [`passthru`](#var-stdenv-passthru) attributes:
`url` (String)
: The same `url` attribute passed in the argument to `fetchurl`.
### Examples {#ssec-pkgs-fetchers-fetchurl-examples}
:::{.example #ex-fetchers-fetchurl-nixpkgs-version}
# Using `fetchurl` to download a file
The following package downloads a small file from a URL and shows the most common way to use `fetchurl`:
```nix
{ fetchurl }:
fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version";
hash = "sha256-BZqI7r0MNP29yGH5+yW2tjU9OOpOCEvwWKrWCv5CQ0I=";
}
```
After building the package, the file will be downloaded and place into the Nix store:
```shell
$ nix-build
(output removed for clarity)
/nix/store/4g9y3x851wqrvim4zcz5x2v3zivmsq8n-version
$ cat /nix/store/4g9y3x851wqrvim4zcz5x2v3zivmsq8n-version
23.11
```
:::
:::{.example #ex-fetchers-fetchurl-nixpkgs-version-multiple-urls}
# Using `fetchurl` to download a file with multiple possible URLs
The following package adapts [](#ex-fetchers-fetchurl-nixpkgs-version) to use multiple URLs.
The first URL was crafted to intentionally return an error to illustrate how `fetchurl` will try multiple URLs until it finds one that works (or all URLs fail).
```nix
{ fetchurl }:
fetchurl {
urls = [
"https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/does-not-exist"
"https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version"
];
hash = "sha256-BZqI7r0MNP29yGH5+yW2tjU9OOpOCEvwWKrWCv5CQ0I=";
}
```
After building the package, both URLs will be used to download the file:
```shell
$ nix-build
(some output removed for clarity)
trying https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/does-not-exist
(some output removed for clarity)
curl: (22) The requested URL returned error: 404
trying https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version
(some output removed for clarity)
/nix/store/n9asny31z32q7sdw6a8r1gllrsfy53kl-does-not-exist
$ cat /nix/store/n9asny31z32q7sdw6a8r1gllrsfy53kl-does-not-exist
23.11
```
However, note that the name of the file was derived from the first URL (this is further explained in [the `fetchurl` overview](#sec-pkgs-fetchers-fetchurl)).
To ensure the result will have the same name regardless of which URLs are used, we can modify the package:
```nix
{ fetchurl }:
fetchurl {
name = "nixpkgs-version";
urls = [
"https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/does-not-exist"
"https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version"
];
hash = "sha256-BZqI7r0MNP29yGH5+yW2tjU9OOpOCEvwWKrWCv5CQ0I=";
}
```
After building the package, the result will have the name we specified:
```shell
$ nix-build
(output removed for clarity)
/nix/store/zczb6wl3al6jm9sm5h3pr6nqn0i5ji9z-nixpkgs-version
```
:::
:::{.example #ex-fetchers-fetchurl-nixpkgs-version-postfetch}
# Manipulating the content downloaded by `fetchurl`
It might be useful to manipulate the content downloaded by `fetchurl` directly in its derivation.
In this example, we'll adapt [](#ex-fetchers-fetchurl-nixpkgs-version) to append the result of running the `hello` package to the contents we download, purely to illustrate how to manipulate the content.
```nix
{ fetchurl, hello, lib }:
fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/23.11/.version";
nativeBuildInputs = [ hello ];
downloadToTemp = true;
postFetch = ''
${lib.getExe hello} >> $downloadedFile
mv $downloadedFile $out
'';
hash = "sha256-ceooQQYmDx5+0nfg40uU3NNI2yKrixP7HZ/xLZUNv+w=";
}
```
After building the package, the resulting file will have "Hello, world!" appended to it:
```shell
$ nix-build
(output removed for clarity)
/nix/store/ifi6pp7q0ag5h7c5v9h1c1c7bhd10c7f-version
$ cat /nix/store/ifi6pp7q0ag5h7c5v9h1c1c7bhd10c7f-version
23.11
Hello, world!
```
Note that the `hash` specified in the package is different than the hash specified in [](#ex-fetchers-fetchurl-nixpkgs-version), because the contents of the output have changed (even though the actual file that was downloaded is the same).
See [](#chap-pkgs-fetchers-caveats) for more details on how to work with the `hash` attribute when the output changes.
:::
## `fetchzip` {#sec-pkgs-fetchers-fetchzip}
Returns a [fixed-output derivation](https://nixos.org/manual/nix/stable/glossary.html#gloss-fixed-output-derivation) which downloads an archive from a given URL and decompresses it.
Despite its name, `fetchzip` is not limited to `.zip` files but can also be used with [various compressed tarball formats](#tar-files) by default.
This can extended by specifying additional attributes, see [](#ex-fetchers-fetchzip-rar-archive) to understand how to do that.
### Inputs {#sec-pkgs-fetchers-fetchzip-inputs}
`fetchzip` requires an attribute set, and most attributes are passed to the underlying call to [`fetchurl`](#sec-pkgs-fetchers-fetchurl).
The attributes below are treated differently by `fetchzip` when compared to what `fetchurl` expects:
`name` (String; _optional_)
: Works as defined in `fetchurl`, but has a different default value than `fetchurl`.
_Default value:_ `"source"`.
`nativeBuildInputs` (List of Attribute Set; _optional_)
: Works as defined in `fetchurl`, but it is also augmented by `fetchzip` to include packages to deal with additional archives (such as `.zip`).
_Default value:_ `[]`.
`postFetch` (String; _optional_)
: Works as defined in `fetchurl`, but it is also augmented with the code needed to make `fetchzip` work.
:::{.caution}
It is only safe to modify files in `$out` in `postFetch`.
Consult the implementation of `fetchzip` for anything more involved.
:::
_Default value:_ `""`.
`stripRoot` (Boolean; _optional_)
: If `true`, the decompressed contents are moved one level up the directory tree.
This is useful for archives that decompress into a single directory which commonly includes some values that change with time, such as version numbers.
When this is the case (and `stripRoot` is `true`), `fetchzip` will remove this directory and make the decompressed contents available in the top-level directory.
[](#ex-fetchers-fetchzip-simple-striproot) shows what this attribute does.
This attribute is **not** passed through to `fetchurl`.
_Default value:_ `true`.
`extension` (String or Null; _optional_)
: If set, the archive downloaded by `fetchzip` will be renamed to a filename with the extension specified in this attribute.
This is useful when making `fetchzip` support additional types of archives, because the implementation may use the extension of an archive to determine whether they can decompress it.
If the URL you're using to download the contents doesn't end with the extension associated with the archive, use this attribute to fix the filename of the archive.
This attribute is **not** passed through to `fetchurl`.
_Default value:_ `null`.
`recursiveHash` (Boolean; _optional_)
: Works [as defined in `fetchurl`](#sec-pkgs-fetchers-fetchurl-inputs-recursiveHash), but its default value is different than for `fetchurl`.
_Default value:_ `true`.
`downloadToTemp` (Boolean; _optional_)
: Works [as defined in `fetchurl`](#sec-pkgs-fetchers-fetchurl-inputs-downloadToTemp), but its default value is different than for `fetchurl`.
_Default value:_ `true`.
`extraPostFetch` **DEPRECATED**
: This attribute is deprecated.
Please use `postFetch` instead.
This attribute is **not** passed through to `fetchurl`.
### Examples {#sec-pkgs-fetchers-fetchzip-examples}
::::{.example #ex-fetchers-fetchzip-simple-striproot}
# Using `fetchzip` to output contents directly
The following recipe shows how to use `fetchzip` to decompress a `.tar.gz` archive:
```nix
{ fetchzip }:
fetchzip {
url = "https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.gz";
hash = "sha256-3ABYlME9R8klcpJ7MQpyFEFwHmxDDEzIYBqu/CpDYmg=";
}
```
This archive has all its contents in a directory named `patchelf-0.18.0`.
This means that after decompressing, you'd have to enter this directory to see the contents of the archive.
However, `fetchzip` makes this easier through the attribute `stripRoot` (enabled by default).
After building the recipe, the derivation output will show all the files in the archive at the top level:
```shell
$ nix-build
(output removed for clarity)
/nix/store/1b7h3fvmgrcddvs0m299hnqxlgli1yjw-source
$ ls /nix/store/1b7h3fvmgrcddvs0m299hnqxlgli1yjw-source
aclocal.m4 completions configure.ac m4 Makefile.in patchelf.spec README.md tests
build-aux configure COPYING Makefile.am patchelf.1 patchelf.spec.in src version
```
If `stripRoot` is set to `false`, the derivation output will be the decompressed archive as-is:
```nix
{ fetchzip }:
fetchzip {
url = "https://github.com/NixOS/patchelf/releases/download/0.18.0/patchelf-0.18.0.tar.gz";
hash = "sha256-uv3FuKE4DqpHT3yfE0qcnq0gYjDNQNKZEZt2+PUAneg=";
stripRoot = false;
}
```
:::{.caution}
The hash changed!
Whenever changing attributes of a Nixpkgs fetcher, [remember to invalidate the hash](#chap-pkgs-fetchers-caveats), otherwise you won't get the results you're expecting!
:::
After building the recipe:
```shell
$ nix-build
(output removed for clarity)
/nix/store/2hy5bxw7xgbgxkn0i4x6hjr8w3dbx16c-source
$ ls /nix/store/2hy5bxw7xgbgxkn0i4x6hjr8w3dbx16c-source
patchelf-0.18.0
```
::::
::::{.example #ex-fetchers-fetchzip-rar-archive}
# Using `fetchzip` to decompress a `.rar` file
The `unrar` package provides a [setup hook](#ssec-setup-hooks) to decompress `.rar` archives during the [unpack phase](#ssec-unpack-phase), which can be used with `fetchzip` to decompress those archives:
```nix
{ fetchzip, unrar }:
fetchzip {
url = "https://archive.org/download/SpaceCadet_Plus95/Space_Cadet.rar";
hash = "sha256-fC+zsR8BY6vXpUkVd6i1jF0IZZxVKVvNi6VWCKT+pA4=";
stripRoot = false;
nativeBuildInputs = [ unrar ];
}
```
Since this particular `.rar` file doesn't put its contents in a directory inside the archive, `stripRoot` must be set to `false`.
After building the recipe, the derivation output will show the decompressed files:
```shell
$ nix-build
(output removed for clarity)
/nix/store/zpn7knxfva6rfjja2gbb4p3l9w1f0d36-source
$ ls /nix/store/zpn7knxfva6rfjja2gbb4p3l9w1f0d36-source
FONT.DAT PINBALL.DAT PINBALL.EXE PINBALL2.MID TABLE.BMP WMCONFIG.EXE
MSCREATE.DIR PINBALL.DOC PINBALL.MID Sounds WAVEMIX.INF
```
::::
## `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:
```nix
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
***
```
This function should only be used by non-redistributable software with an unfree license that we need to require the user to download manually.
It produces packages that cannot be built automatically.
## `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)
```nix
{ 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,12 +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/portableservice.section.md
images/makediskimage.section.md
images/binarycache.section.md
```

View File

@@ -1,167 +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 if 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.
:::
## Wrapping {#ssec-pkgs-appimageTools-wrapping}
Use `wrapType2` to wrap any AppImage.
This will create a FHS environment with many packages [expected to exist](https://github.com/AppImage/pkg2appimage/blob/master/excludelist) for the AppImage to work.
`wrapType2` expects an argument with the `src` attribute, and either a `name` attribute or `pname` and `version` attributes.
It will eventually call into [`buildFHSEnv`](#sec-fhs-environments), and any extra attributes in the argument to `wrapType2` will be passed through to it.
This means that you can pass the `extraInstallCommands` attribute, for example, and it will have the same effect as described in [`buildFHSEnv`](#sec-fhs-environments).
::: {.note}
In the past, `appimageTools` provided both `wrapType1` and `wrapType2`, to be used depending on the type of AppImage that was being wrapped.
However, [those were unified early 2020](https://github.com/NixOS/nixpkgs/pull/81833), meaning that both `wrapType1` and `wrapType2` have the same behaviour now.
:::
:::{.example #ex-wrapping-appimage-from-github}
# Wrapping an AppImage from GitHub
```nix
{ appimageTools, fetchurl }:
let
pname = "nuclear";
version = "0.6.30";
src = fetchurl {
url = "https://github.com/nukeop/nuclear/releases/download/v${version}/${pname}-v${version}.AppImage";
hash = "sha256-he1uGC1M/nFcKpMM9JKY4oeexJcnzV0ZRxhTjtJz6xw=";
};
in
appimageTools.wrapType2 {
inherit pname version src;
}
```
:::
The argument passed to `wrapType2` can also contain an `extraPkgs` attribute, which allows you to include additional packages inside the FHS environment your AppImage is going to run in.
`extraPkgs` must be a function that returns a list of packages.
There are a few ways to learn which dependencies an application needs:
- Looking through the extracted AppImage files, reading its scripts and running `patchelf` and `ldd` on its executables.
This can also be done in `appimage-run`, by setting `APPIMAGE_DEBUG_EXEC=bash`.
- Running `strace -vfefile` on the wrapped executable, looking for libraries that can't be found.
:::{.example #ex-wrapping-appimage-with-extrapkgs}
# Wrapping an AppImage with extra packages
```nix
{ appimageTools, fetchurl }:
let
pname = "irccloud";
version = "0.16.0";
src = fetchurl {
url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage";
sha256 = "sha256-/hMPvYdnVB1XjKgU2v47HnVvW4+uC3rhRjbucqin4iI=";
};
in appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.at-spi2-core ];
}
```
:::
## Extracting {#ssec-pkgs-appimageTools-extracting}
Use `extract` if you need to extract the contents of an AppImage.
This is usually used in Nixpkgs to install extra files in addition to [wrapping](#ssec-pkgs-appimageTools-wrapping) the AppImage.
`extract` expects an argument with the `src` attribute, and either a `name` attribute or `pname` and `version` attributes.
::: {.note}
In the past, `appimageTools` provided both `extractType1` and `extractType2`, to be used depending on the type of AppImage that was being extracted.
However, [those were unified early 2020](https://github.com/NixOS/nixpkgs/pull/81572), meaning that both `extractType1` and `extractType2` have the same behaviour as `extract` now.
:::
:::{.example #ex-extracting-appimage}
# Extracting an AppImage to install extra files
This example was adapted from a real package in Nixpkgs to show how `extract` is usually used in combination with `wrapType2`.
Note how `appimageContents` is used in `extraInstallCommands` to install additional files that were extracted from the AppImage.
```nix
{ appimageTools, fetchurl }:
let
pname = "irccloud";
version = "0.16.0";
src = fetchurl {
url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage";
sha256 = "sha256-/hMPvYdnVB1XjKgU2v47HnVvW4+uC3rhRjbucqin4iI=";
};
appimageContents = appimageTools.extract {
inherit pname version src;
};
in appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.at-spi2-core ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/irccloud.desktop $out/share/applications/irccloud.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/irccloud.png \
$out/share/icons/hicolor/512x512/apps/irccloud.png
substituteInPlace $out/share/applications/irccloud.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
}
```
:::
The argument passed to `extract` can also contain a `postExtract` attribute, which allows you to execute additional commands after the files are extracted from the AppImage.
`postExtract` must be a string with commands to run.
:::{.example #ex-extracting-appimage-with-postextract}
# Extracting an AppImage to install extra files, using `postExtract`
This is a rewrite of [](#ex-extracting-appimage) to use `postExtract`.
```nix
{ appimageTools, fetchurl }:
let
pname = "irccloud";
version = "0.16.0";
src = fetchurl {
url = "https://github.com/irccloud/irccloud-desktop/releases/download/v${version}/IRCCloud-${version}-linux-x86_64.AppImage";
sha256 = "sha256-/hMPvYdnVB1XjKgU2v47HnVvW4+uC3rhRjbucqin4iI=";
};
appimageContents = appimageTools.extract {
inherit pname version src;
postExtract = ''
substituteInPlace $out/irccloud.desktop --replace 'Exec=AppRun' 'Exec=${pname}'
'';
};
in appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.at-spi2-core ];
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/irccloud.desktop $out/share/applications/irccloud.desktop
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/irccloud.png \
$out/share/icons/hicolor/512x512/apps/irccloud.png
'';
}
```
:::

View File

@@ -1,58 +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.
`mkBinaryCache` expects an argument with the `rootPaths` attribute.
`rootPaths` must be a list of derivations.
The transitive closure of these derivations' outputs will be copied into the cache.
::: {.note}
This function is meant for advanced use cases.
The more idiomatic way to work with flat-file binary caches is via the [nix-copy-closure](https://nixos.org/manual/nix/stable/command-ref/nix-copy-closure.html) command.
You may also want to consider [dockerTools](#sec-pkgs-dockerTools) for your containerization needs.
:::
[]{#sec-pkgs-binary-cache-example}
:::{.example #ex-mkbinarycache-copying-package-closure}
# Copying a package and its closure to another machine with `mkBinaryCache`
The following derivation will construct a flat-file binary cache containing the closure of `hello`.
```nix
{ mkBinaryCache, hello }:
mkBinaryCache {
rootPaths = [hello];
}
```
Build the cache on a machine.
Note that the command still builds the exact nix package above, but adds some boilerplate to build it directly from an expression.
```shellSession
$ nix-build -E 'let pkgs = import <nixpkgs> {}; in pkgs.callPackage ({ mkBinaryCache, hello }: mkBinaryCache { rootPaths = [hello]; }) {}'
/nix/store/azf7xay5xxdnia4h9fyjiv59wsjdxl0g-binary-cache
```
Copy the resulting directory to another machine, which we'll call `host2`:
```shellSession
$ scp result host2:/tmp/hello-cache
```
At this point, the cache can be used as a substituter when building derivations on `host2`:
```shellSession
$ nix-build -A hello '<nixpkgs>' \
--option require-sigs false \
--option trusted-substituters file:///tmp/hello-cache \
--option substituters file:///tmp/hello-cache
/nix/store/zhl06z4lrfrkw5rp0hnjjfrgsclzvxpm-hello-2.12.1
```
:::

File diff suppressed because it is too large Load Diff

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,104 +0,0 @@
# pkgs.ociTools {#sec-pkgs-ociTools}
`pkgs.ociTools` is a set of functions for creating runtime container bundles according to the [OCI runtime specification v1.0.0](https://github.com/opencontainers/runtime-spec/blob/v1.0.0/spec.md).
It makes no assumptions about the container runner you choose to use to run the created container.
The set of functions in `pkgs.ociTools` currently does not handle the [OCI image specification](https://github.com/opencontainers/image-spec).
At a high-level an OCI implementation would download an OCI Image then unpack that image into an OCI Runtime filesystem bundle.
At this point the OCI Runtime Bundle would be run by an OCI Runtime.
`pkgs.ociTools` provides utilities to create OCI Runtime bundles.
## buildContainer {#ssec-pkgs-ociTools-buildContainer}
This function creates an OCI runtime container (consisting of a `config.json` and a root filesystem directory) that runs a single command inside of it.
The nix store of the container will contain all referenced dependencies of the given command.
This function has an assumption that the container will run on POSIX platforms, and sets configurations (such as the user running the process or certain mounts) according to this assumption.
Because of this, a container built with `buildContainer` will not work on Windows or other non-POSIX platforms without modifications to the container configuration.
These modifications aren't supported by `buildContainer`.
For `linux` platforms, `buildContainer` also configures the following namespaces (see {manpage}`unshare(1)`) to isolate the OCI container from the global namespace:
PID, network, mount, IPC, and UTS.
Note that no user namespace is created, which means that you won't be able to run the container unless you are the `root` user.
### Inputs {#ssec-pkgs-ociTools-buildContainer-inputs}
`buildContainer` expects an argument with the following attributes:
`args` (List of String)
: Specifies a set of arguments to run inside the container.
Any packages referenced by `args` will be made available inside the container.
`mounts` (Attribute Set; _optional_)
: Would specify additional mounts that the runtime must make available to the container.
:::{.warning}
As explained in [issue #290879](https://github.com/NixOS/nixpkgs/issues/290879), this attribute is currently ignored.
:::
:::{.note}
`buildContainer` includes a minimal set of necessary filesystems to be mounted into the container, and this set can't be changed with the `mounts` attribute.
:::
_Default value:_ `{}`.
`readonly` (Boolean; _optional_)
: If `true`, sets the container's root filesystem as read-only.
_Default value:_ `false`.
`os` **DEPRECATED**
: Specifies the operating system on which the container filesystem is based on.
If specified, its value should follow the [OCI Image Configuration Specification](https://github.com/opencontainers/image-spec/blob/main/config.md#properties).
According to the linked specification, all possible values for `$GOOS` in [the Go docs](https://go.dev/doc/install/source#environment) should be valid, but will commonly be one of `darwin` or `linux`.
_Default value:_ `"linux"`.
`arch` **DEPRECATED**
: Used to specify the architecture for which the binaries in the container filesystem have been compiled.
If specified, its value should follow the [OCI Image Configuration Specification](https://github.com/opencontainers/image-spec/blob/main/config.md#properties).
According to the linked specification, all possible values for `$GOARCH` in [the Go docs](https://go.dev/doc/install/source#environment) should be valid, but will commonly be one of `386`, `amd64`, `arm`, or `arm64`.
_Default value:_ `x86_64`.
### Examples {#ssec-pkgs-ociTools-buildContainer-examples}
::: {.example #ex-ociTools-buildContainer-bash}
# Creating an OCI runtime container that runs `bash`
This example uses `ociTools.buildContainer` to create a simple container that runs `bash`.
```nix
{ ociTools, lib, bash }:
ociTools.buildContainer {
args = [
(lib.getExe bash)
];
readonly = false;
}
```
As an example of how to run the container generated by this package, we'll use `runc` to start the container.
Any other tool that supports OCI containers could be used instead.
```shell
$ nix-build
(some output removed for clarity)
/nix/store/7f9hgx0arvhzp2a3qphp28rxbn748l25-join
$ cd /nix/store/7f9hgx0arvhzp2a3qphp28rxbn748l25-join
$ nix-shell -p runc
[nix-shell:/nix/store/7f9hgx0arvhzp2a3qphp28rxbn748l25-join]$ sudo runc run ocitools-example
help
GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu)
(some output removed for clarity)
```
:::

View File

@@ -1,174 +0,0 @@
# pkgs.portableService {#sec-pkgs-portableService}
`pkgs.portableService` is a function to create [Portable Services](https://systemd.io/PORTABLE_SERVICES/) in a read-only, immutable, `squashfs` raw disk image.
This lets you use Nix to build images which can be run on many recent Linux distributions.
::: {.note}
Portable services are supported starting with systemd 239 (released on 2018-06-22).
:::
The generated image will contain the file system structure as required by the Portable Services specification, along with the packages given to `portableService` and all of their dependencies.
When generated, the image will exist in the Nix store with the `.raw` file extension, as required by the specification.
See [](#ex-portableService-hello) to understand how to use the output of `portableService`.
## Inputs {#ssec-pkgs-portableService-inputs}
`portableService` expects one argument with the following attributes:
`pname` (String)
: The name of the portable service.
The generated image will be named according to the template `$pname_$version.raw`, which is supported by the Portable Services specification.
`version` (String)
: The version of the portable service.
The generated image will be named according to the template `$pname_$version.raw`, which is supported by the Portable Services specification.
`units` (List of Attribute Set)
: A list of derivations for systemd unit files.
Each derivation must produce a single file, and must have a name that starts with the value of `pname` and ends with the suffix of the unit type (e.g. ".service", ".socket", ".timer", and so on).
See [](#ex-portableService-hello) to better understand this naming constraint.
`description` (String or Null; _optional_)
: If specified, the value is added as `PORTABLE_PRETTY_NAME` to the `/etc/os-release` file in the generated image.
This could be used to provide more information to anyone inspecting the image.
_Default value:_ `null`.
`homepage` (String or Null; _optional_)
: If specified, the value is added as `HOME_URL` to the `/etc/os-release` file in the generated image.
This could be used to provide more information to anyone inspecting the image.
_Default value:_ `null`.
`symlinks` (List of Attribute Set; _optional_)
: A list of attribute sets in the format `{object, symlink}`.
For each item in the list, `portableService` will create a symlink in the path specified by `symlink` (relative to the root of the image) that points to `object`.
All packages that `object` depends on and their dependencies are automatically copied into the image.
This can be used to create symlinks for applications that assume some files to exist globally (`/etc/ssl` or `/bin/bash`, for example).
See [](#ex-portableService-symlinks) to understand how to do that.
_Default value:_ `[]`.
`contents` (List of Attribute Set; _optional_)
: A list of additional derivations to be included as-is in the image.
These derivations will be included directly in a `/nix/store` directory inside the image.
_Default value:_ `[]`.
`squashfsTools` (Attribute Set; _optional_)
: Allows you to override the package that provides {manpage}`mksquashfs(1)`, which is used internally by `portableService`.
_Default value:_ `pkgs.squashfsTools`.
`squash-compression` (String; _optional_)
: Passed as the compression option to {manpage}`mksquashfs(1)`, which is used internally by `portableService`.
_Default value:_ `"xz -Xdict-size 100%"`.
`squash-block-size` (String; _optional_)
: Passed as the block size option to {manpage}`mksquashfs(1)`, which is used internally by `portableService`.
_Default value:_ `"1M"`.
## Examples {#ssec-pkgs-portableService-examples}
[]{#ex-pkgs-portableService}
:::{.example #ex-portableService-hello}
# Building a Portable Service image
The following example builds a Portable Service image with the `hello` package, along with a service unit that runs it.
```nix
{ lib, writeText, portableService, hello }:
let
hello-service = writeText "hello.service" ''
[Unit]
Description=Hello world service
[Service]
Type=oneshot
ExecStart=${lib.getExe hello}
'';
in
portableService {
pname = "hello";
inherit (hello) version;
units = [ hello-service ];
}
```
After building the package, the generated image can be loaded into a system through {manpage}`portablectl(1)`:
```shell
$ nix-build
(some output removed for clarity)
/nix/store/8c20z1vh7z8w8dwagl8w87b45dn5k6iq-hello-img-2.12.1
$ portablectl attach /nix/store/8c20z1vh7z8w8dwagl8w87b45dn5k6iq-hello-img-2.12.1/hello_2.12.1.raw
Created directory /etc/systemd/system.attached.
Created directory /etc/systemd/system.attached/hello.service.d.
Written /etc/systemd/system.attached/hello.service.d/20-portable.conf.
Created symlink /etc/systemd/system.attached/hello.service.d/10-profile.conf → /usr/lib/systemd/portable/profile/default/service.conf.
Copied /etc/systemd/system.attached/hello.service.
Created symlink /etc/portables/hello_2.12.1.raw → /nix/store/8c20z1vh7z8w8dwagl8w87b45dn5k6iq-hello-img-2.12.1/hello_2.12.1.raw.
$ systemctl start hello
$ journalctl -u hello
Feb 28 22:39:16 hostname systemd[1]: Starting Hello world service...
Feb 28 22:39:16 hostname hello[102887]: Hello, world!
Feb 28 22:39:16 hostname systemd[1]: hello.service: Deactivated successfully.
Feb 28 22:39:16 hostname systemd[1]: Finished Hello world service.
$ portablectl detach hello_2.12.1
Removed /etc/systemd/system.attached/hello.service.
Removed /etc/systemd/system.attached/hello.service.d/10-profile.conf.
Removed /etc/systemd/system.attached/hello.service.d/20-portable.conf.
Removed /etc/systemd/system.attached/hello.service.d.
Removed /etc/portables/hello_2.12.1.raw.
Removed /etc/systemd/system.attached.
```
:::
:::{.example #ex-portableService-symlinks}
# Specifying symlinks when building a Portable Service image
Some services may expect files or directories to be available globally.
An example is a service which expects all trusted SSL certificates to exist in a specific location by default.
To make things available globally, you must specify the `symlinks` attribute when using `portableService`.
The following package builds on the package from [](#ex-portableService-hello) to make `/etc/ssl` available globally (this is only for illustrative purposes, because `hello` doesn't use `/etc/ssl`).
```nix
{ lib, writeText, portableService, hello, cacert }:
let
hello-service = writeText "hello.service" ''
[Unit]
Description=Hello world service
[Service]
Type=oneshot
ExecStart=${lib.getExe hello}
'';
in
portableService {
pname = "hello";
inherit (hello) version;
units = [ hello-service ];
symlinks = [
{ object = "${cacert}/etc/ssl"; symlink = "/etc/ssl"; }
];
}
```
:::

View File

@@ -1,12 +0,0 @@
# Special build helpers {#chap-special}
This chapter describes several special build helpers.
```{=include=} sections
special/fakenss.section.md
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,43 +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,77 +0,0 @@
# fakeNss {#sec-fakeNss}
Provides `/etc/passwd` and `/etc/group` files that contain `root` and `nobody`, allowing user/group lookups to work in binaries that insist on doing those.
This might be a better choice than a custom script running `useradd` and related utilities if you only need those files to exist with some entries.
`fakeNss` also provides `/etc/nsswitch.conf`, configuring NSS host resolution to first check `/etc/hosts` before checking DNS, since the default in the absence of a config file (`dns [!UNAVAIL=return] files`) is quite unexpected.
It also creates an empty directory at `/var/empty` because it uses that as the home directory for the `root` and `nobody` users.
The `/var/empty` directory can also be used as a `chroot` target to prevent file access in processes that do not need to access files, if your container runs such processes.
The user entries created by `fakeNss` use the `/bin/sh` shell, which is not provided by `fakeNss` because in most cases it won't be used.
If you need that to be available, see [`dockerTools.binSh`](#sssec-pkgs-dockerTools-helpers-binSh) or provide your own.
## Inputs {#sec-fakeNss-inputs}
`fakeNss` is made available in Nixpkgs as a package rather than a function, but it has two attributes that can be overridden and might be useful in particular cases.
For more details on how overriding works, see [](#ex-fakeNss-overriding) and [](#sec-pkg-override).
`extraPasswdLines` (List of Strings; _optional_)
: A list of lines that will be added to `/etc/passwd`.
Useful if extra users need to exist in the output of `fakeNss`.
If `extraPasswdLines` is specified, it will **not** override the `root` and `nobody` entries created by `fakeNss`.
Those entries will always exist.
Lines specified here must follow the format in {manpage}`passwd(5)`.
_Default value:_ `[]`.
`extraGroupLines` (List of Strings; _optional_)
: A list of lines that will be added to `/etc/group`.
Useful if extra groups need to exist in the output of `fakeNss`.
If `extraGroupLines` is specified, it will **not** override the `root` and `nobody` entries created by `fakeNss`.
Those entries will always exist.
Lines specified here must follow the format in {manpage}`group(5)`.
_Default value:_ `[]`.
## Examples {#sec-fakeNss-examples}
:::{.example #ex-fakeNss-dockerTools-buildImage}
# Using `fakeNss` with `dockerTools.buildImage`
This example shows how to use `fakeNss` as-is.
It is useful with functions in `dockerTools` to allow building Docker images that have the `/etc/passwd` and `/etc/group` files.
This example includes the `hello` binary in the image so it can do something besides just have the extra files.
```nix
{ dockerTools, fakeNss, hello }:
dockerTools.buildImage {
name = "image-with-passwd";
tag = "latest";
copyToRoot = [ fakeNss hello ];
config = {
Cmd = [ "/bin/hello" ];
};
}
```
:::
:::{.example #ex-fakeNss-overriding}
# Using `fakeNss` with an override to add extra lines
The following code uses `override` to add extra lines to `/etc/passwd` and `/etc/group` to create another user and group entry.
```nix
{ fakeNss }:
fakeNss.override {
extraPasswdLines = ["newuser:x:9001:9001:new user:/var/empty:/bin/sh"];
extraGroupLines = ["newuser:x:9001:"];
}
```
:::

View File

@@ -1,60 +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 if `pname` is unset.
- `pname`
The pname of the environment and the wrapper executable.
- `version`
The version of the environment.
- `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 `wrapGApps*` hook.

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,41 +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`.
## Variants {#sec-pkgs-mkShell-variants}
`pkgs.mkShellNoCC` is a variant that uses `stdenvNoCC` instead of `stdenv` as base environment. This is useful if no C compiler is needed in the shell environment.
## Building the shell {#sec-pkgs-mkShell-building}
This derivation output will contain a text file that contains a reference to
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,280 +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 #ex-haspkgconfigmodules-defaultvalues}
# Check that `pkg-config` modules are exposed using default values
```nix
{
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
meta.pkgConfigModules = [ "libfoo" ];
}
```
:::
:::{.example #ex-haspkgconfigmodules-explicitmodules}
# Check that `pkg-config` modules are exposed using explicit module names
```nix
{
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "libfoo" ];
};
}
```
:::
## `testVersion` {#tester-testVersion}
Checks that the output from running a command contains the specified version string in it as a whole word.
Although simplistic, this test assures that the main program can run.
While there's no substitute for a real test case, it does catch dynamic linking errors and such.
It also provides some protection against accidentally building the wrong version, for example when using an "old" hash in a fixed-output derivation.
By default, the command to be run will be inferred from the given `package` attribute:
it will check `meta.mainProgram` first, and fall back to `pname` or `name`.
The default argument to the command is `--version`, and the version to be checked will be inferred from the given `package` attribute as well.
:::{.example #ex-testversion-hello}
# Check a program version using all the default values
This example will run the command `hello --version`, and then check that the version of the `hello` package is in the output of the command.
```nix
{
passthru.tests.version = testers.testVersion { package = hello; };
}
```
:::
:::{.example #ex-testversion-different-commandversion}
# Check the program version using a specified command and expected version string
This example will run the command `leetcode -V`, and then check that `leetcode 0.4.2` is in the output of the command as a whole word (separated by whitespaces).
This means that an output like "leetcode 0.4.21" would fail the tests, and an output like "You're running leetcode 0.4.2" would pass the tests.
A common usage of the `version` attribute is to specify `version = "v${version}"`.
```nix
{
version = "0.4.2";
passthru.tests.version = testers.testVersion {
package = leetcode-cli;
command = "leetcode -V";
version = "leetcode ${version}";
};
}
```
:::
## `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)
While `testBuildFailure` is designed to keep changes to the original builder's environment to a minimum, some small changes are inevitable:
- The file `$TMPDIR/testBuildFailure.log` is present. It should not be deleted.
- `stdout` and `stderr` are a pipe instead of a tty. This could be improved.
- One or two extra processes are present in the sandbox during the original builder's execution.
- The derivation and output hashes are different, but not unusual.
- The derivation includes a dependency on `buildPackages.bash` and `expect-failure.sh`, which is built to include a transitive dependency on `buildPackages.coreutils` and possibly more.
These are not added to `PATH` or any other environment variable, so they should be hard to observe.
:::{.example #ex-testBuildFailure-showingenvironmentchanges}
# Check that a build fails, and verify the changes made during build
```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
''
```
:::
## `testEqualContents` {#tester-equalContents}
Check that two paths have the same contents.
:::{.example #ex-testEqualContents-toyexample}
# Check that two paths have the same contents
```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 #ex-testEqualDerivation-hello}
# Check that two packages produce the same derivation
```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 #ex-invalidateFetcherByDrvHash-nix}
# Prevent nix from reusing the output of a fetcher
```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 #ex-runNixOSTest-hello}
# Run a NixOS test using `runNixOSTest`
```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,710 +0,0 @@
# Trivial build helpers {#chap-trivial-builders}
Nixpkgs provides a variety of wrapper functions that help build commonly useful derivations.
Like [`stdenv.mkDerivation`](#sec-using-stdenv), each of these build helpers creates a derivation, but the arguments passed are different (usually simpler) from those required by `stdenv.mkDerivation`.
## `runCommand` {#trivial-builder-runCommand}
`runCommand :: String -> AttrSet -> String -> Derivation`
The result of `runCommand name drvAttrs buildCommand` is a derivation that is built by running the specified shell commands.
By default `runCommand` runs in a stdenv with no compiler environment, whereas [`runCommandCC`](#trivial-builder-runCommandCC) uses the default stdenv, `pkgs.stdenv`.
`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`.
:::
## Writing text files {#trivial-builder-text-writing}
Nixpkgs provides the following functions for producing derivations which write text files or executable scripts into the Nix store.
They are useful for creating files from Nix expression, and are all implemented as convenience wrappers around `writeTextFile`.
Each of these functions will cause a derivation to be produced.
When you coerce the result of each of these functions to a string with [string interpolation](https://nixos.org/manual/nix/stable/language/string-interpolation) or [`builtins.toString`](https://nixos.org/manual/nix/stable/language/builtins#builtins-toString), it will evaluate to the [store path](https://nixos.org/manual/nix/stable/store/store-path) of this derivation.
:::: {.note}
Some of these functions will put the resulting files within a directory inside the [derivation output](https://nixos.org/manual/nix/stable/language/derivations#attr-outputs).
If you need to refer to the resulting files somewhere else in a Nix expression, append their path to the derivation's store path.
For example, if the file destination is a directory:
```nix
{
my-file = writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
destination = "/share/my-file";
};
}
```
Remember to append "/share/my-file" to the resulting store path when using it elsewhere:
```nix
writeShellScript "evaluate-my-file.sh" ''
cat ${my-file}/share/my-file
''
```
::::
### `makeDesktopItem` {#trivial-builder-makeDesktopItem}
Write an [XDG desktop file](https://specifications.freedesktop.org/desktop-entry-spec/1.4/) to the Nix store.
This function is usually used to add desktop items to a package through the `copyDesktopItems` hook.
`makeDesktopItem` adheres to version 1.4 of the specification.
#### Inputs {#trivial-builder-makeDesktopItem-inputs}
`makeDesktopItem` takes an attribute set that accepts most values from the [XDG specification](https://specifications.freedesktop.org/desktop-entry-spec/1.4/ar01s06.html).
All recognised keys from the specification are supported with the exception of the "Hidden" field. The keys are converted into camelCase format, but correspond 1:1 to their equivalent in the specification: `genericName`, `noDisplay`, `comment`, `icon`, `onlyShowIn`, `notShowIn`, `dbusActivatable`, `tryExec`, `exec`, `path`, `terminal`, `mimeTypes`, `categories`, `implements`, `keywords`, `startupNotify`, `startupWMClass`, `url`, `prefersNonDefaultGPU`.
The "Version" field is hardcoded to the version `makeDesktopItem` currently adheres to.
The following fields are either required, are of a different type than in the specification, carry specific default values, or are additional fields supported by `makeDesktopItem`:
`name` (String)
: The name of the desktop file in the Nix store.
`type` (String; _optional_)
: Default value: `"Application"`
`desktopName` (String)
: Corresponds to the "Name" field of the specification.
`actions` (List of Attribute set; _optional_)
: A list of attribute sets {name, exec?, icon?}
`extraConfig` (Attribute set; _optional_)
: Additional key/value pairs to be added verbatim to the desktop file. Attributes need to be prefixed with 'X-'.
#### Examples {#trivial-builder-makeDesktopItem-examples}
::: {.example #ex-makeDesktopItem}
# Usage 1 of `makeDesktopItem`
Write a desktop file `/nix/store/<store path>/my-program.desktop` to the Nix store.
```nix
{makeDesktopItem}:
makeDesktopItem {
name = "my-program";
desktopName = "My Program";
genericName = "Video Player";
noDisplay = false;
comment = "Cool video player";
icon = "/path/to/icon";
onlyShowIn = [ "KDE" ];
dbusActivatable = true;
tryExec = "my-program";
exec = "my-program --someflag";
path = "/some/working/path";
terminal = false;
actions.example = {
name = "New Window";
exec = "my-program --new-window";
icon = "/some/icon";
};
mimeTypes = [ "video/mp4" ];
categories = [ "Utility" ];
implements = [ "org.my-program" ];
keywords = [ "Video" "Player" ];
startupNotify = false;
startupWMClass = "MyProgram";
prefersNonDefaultGPU = false;
extraConfig.X-SomeExtension = "somevalue";
}
```
:::
::: {.example #ex2-makeDesktopItem}
# Usage 2 of `makeDesktopItem`
Override the `hello` package to add a desktop item.
```nix
{ copyDesktopItems
, hello
, makeDesktopItem }:
hello.overrideAttrs {
nativeBuildInputs = [ copyDesktopItems ];
desktopItems = [(makeDesktopItem {
name = "hello";
desktopName = "Hello";
exec = "hello";
})];
}
```
:::
### `writeTextFile` {#trivial-builder-writeTextFile}
Write a text file to the Nix store.
`writeTextFile` takes an attribute set with the following possible attributes:
`name` (String)
: Corresponds to the name used in the Nix store path identifier.
`text` (String)
: The contents of the file.
`executable` (Bool, _optional_)
: Make this file have the executable bit set.
Default: `false`
`destination` (String, _optional_)
: A subpath under the derivation's output path into which to put the file.
Subdirectories are created automatically when the derivation is realised.
By default, the store path itself will be a file containing the text contents.
Default: `""`
`checkPhase` (String, _optional_)
: Commands to run after generating the file.
Default: `""`
`meta` (Attribute set, _optional_)
: Additional metadata for the derivation.
Default: `{}`
`allowSubstitutes` (Bool, _optional_)
: Whether to allow substituting from a binary cache.
Passed through to [`allowSubsitutes`](https://nixos.org/manual/nix/stable/language/advanced-attributes#adv-attr-allowSubstitutes) of the underlying call to `builtins.derivation`.
It defaults to `false`, as running the derivation's simple `builder` executable locally is assumed to be faster than network operations.
Set it to true if the `checkPhase` step is expensive.
Default: `false`
`preferLocalBuild` (Bool, _optional_)
: Whether to prefer building locally, even if faster [remote build machines](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-substituters) are available.
Passed through to [`preferLocalBuild`](https://nixos.org/manual/nix/stable/language/advanced-attributes#adv-attr-preferLocalBuild) of the underlying call to `builtins.derivation`.
It defaults to `true` for the same reason `allowSubstitutes` defaults to `false`.
Default: `true`
`derivationArgs` (Attribute set, _optional_)
: Extra arguments to pass to the underlying call to `stdenv.mkDerivation`.
Default: `{}`
The resulting store path will include some variation of the name, and it will be a file unless `destination` is used, in which case it will be a directory.
::: {.example #ex-writeTextFile}
# Usage 1 of `writeTextFile`
Write `my-file` to `/nix/store/<store path>/some/subpath/my-cool-script`, making it executable.
Also run a check on the resulting file in a `checkPhase`, and supply values for the less-used options.
```nix
writeTextFile {
name = "my-cool-script";
text = ''
#!/bin/sh
echo "This is my cool script!"
'';
executable = true;
destination = "/some/subpath/my-cool-script";
checkPhase = ''
${pkgs.shellcheck}/bin/shellcheck $out/some/subpath/my-cool-script
'';
meta = {
license = pkgs.lib.licenses.cc0;
};
allowSubstitutes = true;
preferLocalBuild = false;
}
```
:::
::: {.example #ex2-writeTextFile}
# Usage 2 of `writeTextFile`
Write the string `Contents of File` to `/nix/store/<store path>`.
See also the [](#trivial-builder-writeText) helper function.
```nix
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
}
```
:::
::: {.example #ex3-writeTextFile}
# Usage 3 of `writeTextFile`
Write an executable script `my-script` to `/nix/store/<store path>/bin/my-script`.
See also the [](#trivial-builder-writeScriptBin) helper function.
```nix
writeTextFile {
name = "my-script";
text = ''
echo "hi"
'';
executable = true;
destination = "/bin/my-script";
}
```
:::
### `writeText` {#trivial-builder-writeText}
Write a text file to the Nix store
`writeText` takes the following arguments:
a string.
`name` (String)
: The name used in the Nix store path.
`text` (String)
: The contents of the file.
The store path will include the name, and it will be a file.
::: {.example #ex-writeText}
# Usage of `writeText`
Write the string `Contents of File` to `/nix/store/<store path>`:
```nix
writeText "my-file"
''
Contents of File
''
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
}
```
### `writeTextDir` {#trivial-builder-writeTextDir}
Write a text file within a subdirectory of the Nix store.
`writeTextDir` takes the following arguments:
`path` (String)
: The destination within the Nix store path under which to create the file.
`text` (String)
: The contents of the file.
The store path will be a directory.
::: {.example #ex-writeTextDir}
# Usage of `writeTextDir`
Write the string `Contents of File` to `/nix/store/<store path>/share/my-file`:
```nix
writeTextDir "share/my-file"
''
Contents of File
''
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
destination = "share/my-file";
}
```
### `writeScript` {#trivial-builder-writeScript}
Write an executable script file to the Nix store.
`writeScript` takes the following arguments:
`name` (String)
: The name used in the Nix store path.
`text` (String)
: The contents of the file.
The created file is marked as executable.
The store path will include the name, and it will be a file.
::: {.example #ex-writeScript}
# Usage of `writeScript`
Write the string `Contents of File` to `/nix/store/<store path>` and make the file executable.
```nix
writeScript "my-file"
''
Contents of File
''
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
executable = true;
}
```
### `writeScriptBin` {#trivial-builder-writeScriptBin}
Write a script within a `bin` subirectory of a directory in the Nix store.
This is for consistency with the convention of software packages placing executables under `bin`.
`writeScriptBin` takes the following arguments:
`name` (String)
: The name used in the Nix store path and within the file created under the store path.
`text` (String)
: The contents of the file.
The created file is marked as executable.
The file's contents will be put into `/nix/store/<store path>/bin/<name>`.
The store path will include the the name, and it will be a directory.
::: {.example #ex-writeScriptBin}
# Usage of `writeScriptBin`
```nix
writeScriptBin "my-script"
''
echo "hi"
''
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-script";
text = ''
echo "hi"
'';
executable = true;
destination = "bin/my-script";
}
```
### `writeShellScript` {#trivial-builder-writeShellScript}
Write a Bash script to the store.
`writeShellScript` takes the following arguments:
`name` (String)
: The name used in the Nix store path.
`text` (String)
: The contents of the file.
The created file is marked as executable.
The store path will include the name, and it will be a file.
This function is almost exactly like [](#trivial-builder-writeScript), except that it prepends to the file a [shebang](https://en.wikipedia.org/wiki/Shebang_%28Unix%29) line that points to the version of Bash used in Nixpkgs.
<!-- this cannot be changed in practice, so there is no point pretending it's somehow generic -->
::: {.example #ex-writeShellScript}
# Usage of `writeShellScript`
```nix
writeShellScript "my-script"
''
echo "hi"
''
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-script";
text = ''
#! ${pkgs.runtimeShell}
echo "hi"
'';
executable = true;
}
```
### `writeShellScriptBin` {#trivial-builder-writeShellScriptBin}
Write a Bash script to a "bin" subdirectory of a directory in the Nix store.
`writeShellScriptBin` takes the following arguments:
`name` (String)
: The name used in the Nix store path and within the file generated under the store path.
`text` (String)
: The contents of the file.
The file's contents will be put into `/nix/store/<store path>/bin/<name>`.
The store path will include the the name, and it will be a directory.
This function is a combination of [](#trivial-builder-writeShellScript) and [](#trivial-builder-writeScriptBin).
::: {.example #ex-writeShellScriptBin}
# Usage of `writeShellScriptBin`
```nix
writeShellScriptBin "my-script"
''
echo "hi"
''
```
:::
This is equivalent to:
```nix
writeTextFile {
name = "my-script";
text = ''
#! ${pkgs.runtimeShell}
echo "hi"
'';
executable = true;
destination = "bin/my-script";
}
```
## `concatTextFile`, `concatText`, `concatScript` {#trivial-builder-concatText}
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}
`writeShellApplication` is similar to `writeShellScriptBin` and `writeScriptBin` but supports runtime dependencies with `runtimeInputs`.
Writes an executable shell script to `/nix/store/<store path>/bin/<name>` and checks its syntax with [`shellcheck`](https://github.com/koalaman/shellcheck) and the `bash`'s `-n` option.
Some basic Bash options are set by default (`errexit`, `nounset`, and `pipefail`), but can be overridden with `bashOptions`.
Extra arguments may be passed to `stdenv.mkDerivation` by setting `derivationArgs`; note that variables set in this manner will be set when the shell script is _built,_ not when it's run.
Runtime environment variables can be set with the `runtimeEnv` argument.
For example, the following shell application can refer to `curl` directly, rather than needing to write `${curl}/bin/curl`:
```nix
writeShellApplication {
name = "show-nixos-org";
runtimeInputs = [ curl w3m ];
text = ''
curl -s 'https://nixos.org' | w3m -dump -T text/html
'';
}
```
## `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}
Deprecated. Use [`writeClosure`](#trivial-builder-writeClosure) instead.
## `writeClosure` {#trivial-builder-writeClosure}
Given a list of [store paths](https://nixos.org/manual/nix/stable/glossary#gloss-store-path) (or string-like expressions coercible to store paths), write their collective [closure](https://nixos.org/manual/nix/stable/glossary#gloss-closure) to a text file.
The result is equivalent to the output of `nix-store -q --requisites`.
For example,
```nix
writeClosure [ (writeScriptBin "hi" ''${hello}/bin/hello'') ]
```
produces an output path `/nix/store/<hash>-runtime-deps` containing
```
/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/store/<hash>-hello-2.10
```
but none of `hello`'s dependencies because those are not referenced directly
by `hi`'s output.

704
doc/coding-conventions.xml Normal file
View File

@@ -0,0 +1,704 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-conventions">
<title>Coding conventions</title>
<section xml:id="sec-syntax"><title>Syntax</title>
<itemizedlist>
<listitem><para>Use 2 spaces of indentation per indentation level in
Nix expressions, 4 spaces in shell scripts.</para></listitem>
<listitem><para>Do not use tab characters, i.e. configure your
editor to use soft tabs. For instance, use <literal>(setq-default
indent-tabs-mode nil)</literal> in Emacs. Everybody has different
tab settings so its asking for trouble.</para></listitem>
<listitem><para>Use <literal>lowerCamelCase</literal> for variable
names, not <literal>UpperCamelCase</literal>. Note, this rule does
not apply to package attribute names, which instead follow the rules
in <xref linkend="sec-package-naming"/>.</para></listitem>
<listitem><para>Function calls with attribute set arguments are
written as
<programlisting>
foo {
arg = ...;
}
</programlisting>
not
<programlisting>
foo
{
arg = ...;
}
</programlisting>
Also fine is
<programlisting>
foo { arg = ...; }
</programlisting>
if it's a short call.</para></listitem>
<listitem><para>In attribute sets or lists that span multiple lines,
the attribute names or list elements should be aligned:
<programlisting>
# A long list.
list =
[ elem1
elem2
elem3
];
# A long attribute set.
attrs =
{ attr1 = short_expr;
attr2 =
if true then big_expr else big_expr;
};
# Alternatively:
attrs = {
attr1 = short_expr;
attr2 =
if true then big_expr else big_expr;
};
</programlisting>
</para></listitem>
<listitem><para>Short lists or attribute sets can be written on one
line:
<programlisting>
# A short list.
list = [ elem1 elem2 elem3 ];
# A short set.
attrs = { x = 1280; y = 1024; };
</programlisting>
</para></listitem>
<listitem><para>Breaking in the middle of a function argument can
give hard-to-read code, like
<programlisting>
someFunction { x = 1280;
y = 1024; } otherArg
yetAnotherArg
</programlisting>
(especially if the argument is very large, spanning multiple
lines).</para>
<para>Better:
<programlisting>
someFunction
{ x = 1280; y = 1024; }
otherArg
yetAnotherArg
</programlisting>
or
<programlisting>
let res = { x = 1280; y = 1024; };
in someFunction res otherArg yetAnotherArg
</programlisting>
</para></listitem>
<listitem><para>The bodies of functions, asserts, and withs are not
indented to prevent a lot of superfluous indentation levels, i.e.
<programlisting>
{ arg1, arg2 }:
assert system == "i686-linux";
stdenv.mkDerivation { ...
</programlisting>
not
<programlisting>
{ arg1, arg2 }:
assert system == "i686-linux";
stdenv.mkDerivation { ...
</programlisting>
</para></listitem>
<listitem><para>Function formal arguments are written as:
<programlisting>
{ arg1, arg2, arg3 }:
</programlisting>
but if they don't fit on one line they're written as:
<programlisting>
{ arg1, arg2, arg3
, arg4, ...
, # Some comment...
argN
}:
</programlisting>
</para></listitem>
<listitem><para>Functions should list their expected arguments as
precisely as possible. That is, write
<programlisting>
{ stdenv, fetchurl, perl }: <replaceable>...</replaceable>
</programlisting>
instead of
<programlisting>
args: with args; <replaceable>...</replaceable>
</programlisting>
or
<programlisting>
{ stdenv, fetchurl, perl, ... }: <replaceable>...</replaceable>
</programlisting>
</para>
<para>For functions that are truly generic in the number of
arguments (such as wrappers around <varname>mkDerivation</varname>)
that have some required arguments, you should write them using an
<literal>@</literal>-pattern:
<programlisting>
{ stdenv, doCoverageAnalysis ? false, ... } @ args:
stdenv.mkDerivation (args // {
<replaceable>...</replaceable> if doCoverageAnalysis then "bla" else "" <replaceable>...</replaceable>
})
</programlisting>
instead of
<programlisting>
args:
args.stdenv.mkDerivation (args // {
<replaceable>...</replaceable> if args ? doCoverageAnalysis &amp;&amp; args.doCoverageAnalysis then "bla" else "" <replaceable>...</replaceable>
})
</programlisting>
</para></listitem>
</itemizedlist>
</section>
<section xml:id="sec-package-naming"><title>Package naming</title>
<para>In Nixpkgs, there are generally three different names associated with a package:
<itemizedlist>
<listitem><para>The <varname>name</varname> attribute of the
derivation (excluding the version part). This is what most users
see, in particular when using
<command>nix-env</command>.</para></listitem>
<listitem><para>The variable name used for the instantiated package
in <filename>all-packages.nix</filename>, and when passing it as a
dependency to other functions. Typically this is called the
<emphasis>package attribute name</emphasis>. This is what Nix
expression authors see. It can also be used when installing using
<command>nix-env -iA</command>.</para></listitem>
<listitem><para>The filename for (the directory containing) the Nix
expression.</para></listitem>
</itemizedlist>
Most of the time, these are the same. For instance, the package
<literal>e2fsprogs</literal> has a <varname>name</varname> attribute
<literal>"e2fsprogs-<replaceable>version</replaceable>"</literal>, is
bound to the variable name <varname>e2fsprogs</varname> in
<filename>all-packages.nix</filename>, and the Nix expression is in
<filename>pkgs/os-specific/linux/e2fsprogs/default.nix</filename>.
</para>
<para>There are a few naming guidelines:
<itemizedlist>
<listitem><para>Generally, try to stick to the upstream package
name.</para></listitem>
<listitem><para>Dont use uppercase letters in the
<literal>name</literal> attribute — e.g.,
<literal>"mplayer-1.0rc2"</literal> instead of
<literal>"MPlayer-1.0rc2"</literal>.</para></listitem>
<listitem><para>The version part of the <literal>name</literal>
attribute <emphasis>must</emphasis> start with a digit (following a
dash) — e.g., <literal>"hello-0.3.1rc2"</literal>.</para></listitem>
<listitem><para>If a package is not a release but a commit from a repository, then
the version part of the name <emphasis>must</emphasis> be the date of that
(fetched) commit. The date must be in <literal>"YYYY-MM-DD"</literal> format.
Also append <literal>"unstable"</literal> to the name - e.g.,
<literal>"pkgname-unstable-2014-09-23"</literal>.</para></listitem>
<listitem><para>Dashes in the package name should be preserved in
new variable names, rather than converted to underscores or camel
cased — e.g., <varname>http-parser</varname> instead of
<varname>http_parser</varname> or <varname>httpParser</varname>. The
hyphenated style is preferred in all three package
names.</para></listitem>
<listitem><para>If there are multiple versions of a package, this
should be reflected in the variable names in
<filename>all-packages.nix</filename>,
e.g. <varname>json-c-0-9</varname> and <varname>json-c-0-11</varname>.
If there is an obvious “default” version, make an attribute like
<literal>json-c = json-c-0-9;</literal>.
See also <xref linkend="sec-versioning" /></para></listitem>
</itemizedlist>
</para>
</section>
<section xml:id="sec-organisation"><title>File naming and organisation</title>
<para>Names of files and directories should be in lowercase, with
dashes between words — not in camel case. For instance, it should be
<filename>all-packages.nix</filename>, not
<filename>allPackages.nix</filename> or
<filename>AllPackages.nix</filename>.</para>
<section xml:id="sec-hierarchy"><title>Hierarchy</title>
<para>Each package should be stored in its own directory somewhere in
the <filename>pkgs/</filename> tree, i.e. in
<filename>pkgs/<replaceable>category</replaceable>/<replaceable>subcategory</replaceable>/<replaceable>...</replaceable>/<replaceable>pkgname</replaceable></filename>.
Below are some rules for picking the right category for a package.
Many packages fall under several categories; what matters is the
<emphasis>primary</emphasis> purpose of a package. For example, the
<literal>libxml2</literal> package builds both a library and some
tools; but its a library foremost, so it goes under
<filename>pkgs/development/libraries</filename>.</para>
<para>When in doubt, consider refactoring the
<filename>pkgs/</filename> tree, e.g. creating new categories or
splitting up an existing category.</para>
<variablelist>
<varlistentry>
<term>If its used to support <emphasis>software development</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a <emphasis>library</emphasis> used by other packages:</term>
<listitem>
<para><filename>development/libraries</filename> (e.g. <filename>libxml2</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>compiler</emphasis>:</term>
<listitem>
<para><filename>development/compilers</filename> (e.g. <filename>gcc</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its an <emphasis>interpreter</emphasis>:</term>
<listitem>
<para><filename>development/interpreters</filename> (e.g. <filename>guile</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a (set of) development <emphasis>tool(s)</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a <emphasis>parser generator</emphasis> (including lexers):</term>
<listitem>
<para><filename>development/tools/parsing</filename> (e.g. <filename>bison</filename>, <filename>flex</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>build manager</emphasis>:</term>
<listitem>
<para><filename>development/tools/build-managers</filename> (e.g. <filename>gnumake</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>development/tools/misc</filename> (e.g. <filename>binutils</filename>)</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>development/misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a (set of) <emphasis>tool(s)</emphasis>:</term>
<listitem>
<para>(A tool is a relatively small program, especially one intended
to be used non-interactively.)</para>
<variablelist>
<varlistentry>
<term>If its for <emphasis>networking</emphasis>:</term>
<listitem>
<para><filename>tools/networking</filename> (e.g. <filename>wget</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its for <emphasis>text processing</emphasis>:</term>
<listitem>
<para><filename>tools/text</filename> (e.g. <filename>diffutils</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>system utility</emphasis>, i.e.,
something related or essential to the operation of a
system:</term>
<listitem>
<para><filename>tools/system</filename> (e.g. <filename>cron</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its an <emphasis>archiver</emphasis> (which may
include a compression function):</term>
<listitem>
<para><filename>tools/archivers</filename> (e.g. <filename>zip</filename>, <filename>tar</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>compression</emphasis> program:</term>
<listitem>
<para><filename>tools/compression</filename> (e.g. <filename>gzip</filename>, <filename>bzip2</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>security</emphasis>-related program:</term>
<listitem>
<para><filename>tools/security</filename> (e.g. <filename>nmap</filename>, <filename>gnupg</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>tools/misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>shell</emphasis>:</term>
<listitem>
<para><filename>shells</filename> (e.g. <filename>bash</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>server</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a web server:</term>
<listitem>
<para><filename>servers/http</filename> (e.g. <filename>apache-httpd</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its an implementation of the X Windowing System:</term>
<listitem>
<para><filename>servers/x11</filename> (e.g. <filename>xorg</filename> — this includes the client libraries and programs)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>servers/misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>desktop environment</emphasis>:</term>
<listitem>
<para><filename>desktops</filename> (e.g. <filename>kde</filename>, <filename>gnome</filename>, <filename>enlightenment</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>window manager</emphasis>:</term>
<listitem>
<para><filename>applications/window-managers</filename> (e.g. <filename>awesome</filename>, <filename>stumpwm</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its an <emphasis>application</emphasis>:</term>
<listitem>
<para>A (typically large) program with a distinct user
interface, primarily used interactively.</para>
<variablelist>
<varlistentry>
<term>If its a <emphasis>version management system</emphasis>:</term>
<listitem>
<para><filename>applications/version-management</filename> (e.g. <filename>subversion</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its for <emphasis>video playback / editing</emphasis>:</term>
<listitem>
<para><filename>applications/video</filename> (e.g. <filename>vlc</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its for <emphasis>graphics viewing / editing</emphasis>:</term>
<listitem>
<para><filename>applications/graphics</filename> (e.g. <filename>gimp</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its for <emphasis>networking</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a <emphasis>mailreader</emphasis>:</term>
<listitem>
<para><filename>applications/networking/mailreaders</filename> (e.g. <filename>thunderbird</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>newsreader</emphasis>:</term>
<listitem>
<para><filename>applications/networking/newsreaders</filename> (e.g. <filename>pan</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>web browser</emphasis>:</term>
<listitem>
<para><filename>applications/networking/browsers</filename> (e.g. <filename>firefox</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>applications/networking/misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>applications/misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>If its <emphasis>data</emphasis> (i.e., does not have a
straight-forward executable semantics):</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a <emphasis>font</emphasis>:</term>
<listitem>
<para><filename>data/fonts</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its related to <emphasis>SGML/XML processing</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its an <emphasis>XML DTD</emphasis>:</term>
<listitem>
<para><filename>data/sgml+xml/schemas/xml-dtd</filename> (e.g. <filename>docbook</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its an <emphasis>XSLT stylesheet</emphasis>:</term>
<listitem>
<para>(Okay, these are executable...)</para>
<para><filename>data/sgml+xml/stylesheets/xslt</filename> (e.g. <filename>docbook-xsl</filename>)</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>game</emphasis>:</term>
<listitem>
<para><filename>games</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="sec-versioning"><title>Versioning</title>
<para>Because every version of a package in Nixpkgs creates a
potential maintenance burden, old versions of a package should not be
kept unless there is a good reason to do so. For instance, Nixpkgs
contains several versions of GCC because other packages dont build
with the latest version of GCC. Other examples are having both the
latest stable and latest pre-release version of a package, or to keep
several major releases of an application that differ significantly in
functionality.</para>
<para>If there is only one version of a package, its Nix expression
should be named <filename>e2fsprogs/default.nix</filename>. If there
are multiple versions, this should be reflected in the filename,
e.g. <filename>e2fsprogs/1.41.8.nix</filename> and
<filename>e2fsprogs/1.41.9.nix</filename>. The version in the
filename should leave out unnecessary detail. For instance, if we
keep the latest Firefox 2.0.x and 3.5.x versions in Nixpkgs, they
should be named <filename>firefox/2.0.nix</filename> and
<filename>firefox/3.5.nix</filename>, respectively (which, at a given
point, might contain versions <literal>2.0.0.20</literal> and
<literal>3.5.4</literal>). If a version requires many auxiliary
files, you can use a subdirectory for each version,
e.g. <filename>firefox/2.0/default.nix</filename> and
<filename>firefox/3.5/default.nix</filename>.</para>
<para>All versions of a package <emphasis>must</emphasis> be included
in <filename>all-packages.nix</filename> to make sure that they
evaluate correctly.</para>
</section>
</section>
<section xml:id="sec-sources"><title>Fetching Sources</title>
<para>There are multiple ways to fetch a package source in nixpkgs. The
general guideline is that you should package sources with a high degree of
availability. Right now there is only one fetcher which has mirroring
support and that is <literal>fetchurl</literal>. Note that you should also
prefer protocols which have a corresponding proxy environment variable.
</para>
<para>You can find many source fetch helpers in <literal>pkgs/build-support/fetch*</literal>.
</para>
<para>In the file <literal>pkgs/top-level/all-packages.nix</literal> you can
find fetch helpers, these have names on the form
<literal>fetchFrom*</literal>. The intention of these are to provide
snapshot fetches but using the same api as some of the version controlled
fetchers from <literal>pkgs/build-support/</literal>. As an example going
from bad to good:
<itemizedlist>
<listitem>
<para>Bad: Uses <literal>git://</literal> which won't be proxied.
<programlisting>
src = fetchgit {
url = "git://github.com/NixOS/nix.git";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
}
</programlisting>
</para>
</listitem>
<listitem>
<para>Better: This is ok, but an archive fetch will still be faster.
<programlisting>
src = fetchgit {
url = "https://github.com/NixOS/nix.git";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
}
</programlisting>
</para>
</listitem>
<listitem>
<para>Best: Fetches a snapshot archive and you get the rev you want.
<programlisting>
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "04yri911rj9j19qqqn6m82266fl05pz98inasni0vxr1cf1gdgv9";
}
</programlisting>
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="sec-patches"><title>Patches</title>
<para>Patches available online should be retrieved using
<literal>fetchpatch</literal>.</para>
<para>
<programlisting>
patches = [
(fetchpatch {
name = "fix-check-for-using-shared-freetype-lib.patch";
url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285";
sha256 = "1f0k043rng7f0rfl9hhb89qzvvksqmkrikmm38p61yfx51l325xr";
})
];
</programlisting>
</para>
<para>Otherwise, you can add a <literal>.patch</literal> file to the
<literal>nixpkgs</literal> repository. In the interest of keeping our
maintenance burden to a minimum, only patches that are unique
to <literal>nixpkgs</literal> should be added in this way.</para>
<para><programlisting>
patches = [ ./0001-changes.patch ];
</programlisting></para>
<para>If you do need to do create this sort of patch file,
one way to do so is with git:
<orderedlist>
<listitem><para>Move to the root directory of the source code
you're patching.<screen>
$ cd the/program/source</screen></para></listitem>
<listitem><para>If a git repository is not already present,
create one and stage all of the source files.<screen>
$ git init
$ git add .</screen></para></listitem>
<listitem><para>Edit some files to make whatever changes need
to be included in the patch.</para></listitem>
<listitem><para>Use git to create a diff, and pipe the output
to a patch file:<screen>
$ git diff > nixpkgs/pkgs/the/package/0001-changes.patch</screen>
</para></listitem>
</orderedlist></para>
</section>
</chapter>

View File

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

464
doc/configuration.xml Normal file
View File

@@ -0,0 +1,464 @@
<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'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-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>A more useful example, the following configuration allows
only allows flash player and visual studio code:
<programlisting>
{
allowUnfreePredicate = (pkg: 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 return 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).

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

@@ -0,0 +1,308 @@
<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, but there are advantages to being rigorous about distinguishing build-time vs run-time environments 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>
<title>Platform parameters</title>
<para>
Nixpkgs follows the <link xlink:href="https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html">common historical convention of GNU autoconf</link> of distinguishing between 3 types of platform: <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 is to 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>.
All three are always defined as attributes in the standard environment, and at the top level. That means one can get at them just like a dependency in a function that is imported with <literal>callPackage</literal>:
<programlisting>{ stdenv, buildPlatform, hostPlatform, fooDep, barDep, .. }: ...buildPlatform...</programlisting>, or just off <varname>stdenv</varname>:
<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 be safe to ignore.
</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 specifying this single "target platform" is thus pushed to build time of the compiler.
The root cause of this mistake is often that the compiler (which will be run on the host) and the 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 existance 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.
This format isn't very standard, but 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 "x86_64-unknown-linux-gnu" and "aarch64-apple-darwin14".
This is a standard format called the "LLVM target triple", as they are pioneered by LLVM and traditionally just used for the <varname>targetPlatform</varname>.
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>.
[Technically, only one need be specified and the others can be inferred, though the precision of inference may not be very good.]
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 on 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>
<title>Specifying Dependencies</title>
<para>
In this section we explore the relationship between both runtime and buildtime 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 probably 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 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>
<title>Cross packagaing cookbook</title>
<para>
Some frequently problems when packaging for cross compilation are good to just spell and answer.
Ideally the information above is exhaustive, so this section cannot provide any new information,
but its 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>
<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>
<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>
<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>
<note><para>
More information needs to moved from the old wiki, especially <link xlink:href="https://nixos.org/wiki/CrossCompiling" />, for this section.
</para></note>
<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 then is <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,176 +1,47 @@
{ 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"; }
{ name = "derivations"; description = "miscellaneous derivation-specific functions"; }
];
};
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;
};
};
in pkgs.stdenv.mkDerivation {
pkgs = import ./.. { };
lib = pkgs.lib;
sources = lib.sourceFilesBySuffices ./. [".xml"];
sources-langs = ./languages-frameworks;
in
pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual";
nativeBuildInputs = with pkgs; [
nixos-render-docs
];
buildInputs = with pkgs; [ pandoc libxml2 libxslt zip jing ];
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.docbook5_xsl}/xml/xsl";
RNG = "${pkgs.docbook5}/xml/rng/docbook/docbook.rng";
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-fail '@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 ./style.css ./anchor.min.js ./anchor-use.js
nixos-render-docs manual html \
--manpage-urls ./manpage-urls.json \
--revision ${pkgs.lib.trivial.revisionWithDefault (pkgs.rev or "master")} \
--stylesheet style.css \
--stylesheet highlightjs/mono-blue.css \
--script ./highlightjs/highlight.pack.js \
--script ./highlightjs/loader.js \
--script ./anchor.min.js \
--script ./anchor-use.js \
--toc-depth 1 \
--section-toc-depth 1 \
manual.md \
out/index.html
echo ${lib.nixpkgsVersion} > .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 nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products
'';
passthru.tests.manpage-urls = with pkgs; testers.invalidateFetcherByDrvHash
({ name ? "manual_check-manpage-urls"
, script
, urlsFile
}: runCommand name {
nativeBuildInputs = [
cacert
(python3.withPackages (p: with p; [
aiohttp
rich
structlog
]))
];
outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="; # Empty output
} ''
python3 ${script} ${urlsFile}
touch $out
'') {
script = ./tests/manpage-urls.py;
urlsFile = ./manpage-urls.json;
};
}

View File

@@ -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 auto-id-prefix=auto-generated
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
```

706
doc/functions.xml Normal file
View File

@@ -0,0 +1,706 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-functions">
<title>Functions reference</title>
<para>
The nixpkgs repository has several utility functions to manipulate Nix expressions.
</para>
<section 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 or even the whole package set.
</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>
<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>sdenv.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 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>
<section 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 a
set of user-defined functions that format variable 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 gets the name
of a section and returns a sanitized name. The default
<literal>mkSectionName</literal> escapes <literal>[</literal> and
<literal>]</literal> with a backslash.
</para>
<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>
<section 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>
<section 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 can 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' />
#!${stdenv.shell}
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>latest</literal>.
</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>
</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 can be used to fetch a Docker image from a Docker registry.
Currently only registry <literal>v1</literal> is supported.
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 = "debian"; <co xml:id='ex-dockerTools-pullImage-1' />
imageTag = "jessie"; <co xml:id='ex-dockerTools-pullImage-2' />
imageId = null; <co xml:id='ex-dockerTools-pullImage-3' />
sha256 = "1bhw5hkz6chrnrih0ymjbmn69hyfriza2lr550xyvpdrnbzr4gk2"; <co xml:id='ex-dockerTools-pullImage-4' />
indexUrl = "https://index.docker.io"; <co xml:id='ex-dockerTools-pullImage-5' />
registryVersion = "v1";
}
</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>library/debian</literal>).
This argument is required.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-2'>
<para>
<varname>imageTag</varname> specifies the tag of the image to be downloaded.
By default it's <literal>latest</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-3'>
<para>
<varname>imageId</varname>, if specified this exact image will be fetched, instead
of <varname>imageName/imageTag</varname>. However, the resulting repository
will still be named <varname>imageName/imageTag</varname>.
By default it's <literal>null</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>
<note>
<para>The checksum is computed on the unpacked directory, not on the final tarball.</para>
</note>
</callout>
<callout arearefs='ex-dockerTools-pullImage-5'>
<para>
In the above example the default values are shown for the variables
<varname>indexUrl</varname> and <varname>registryVersion</varname>.
Hence by default the Docker.io registry is used to pull the images.
</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 can 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 = ''
#!${stdenv.shell}
${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> are necessary for shadow-utils to
manipulate users and groups.
</para>
</section>
</section>
</chapter>

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.

View File

@@ -1,57 +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
let
inherit (lib) generators isString;
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

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

View File

@@ -1,56 +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> {} }: {
src = nix-gitignore.gitignoreSource [] ./source;
# Simplest version
src = nix-gitignore.gitignoreSource "supplemental-ignores\n" ./source;
# This one reads the ./source/.gitignore and concats the auxiliary ignores
src = nix-gitignore.gitignoreSourcePure "ignore-this\nignore-that\n" ./source;
# Use this string as gitignore, don't read ./source/.gitignore.
src = 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

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,35 +0,0 @@
# Hooks reference {#chap-hooks}
Nixpkgs has several hook packages that augment the stdenv phases.
The stdenv built-in hooks are documented in [](#ssec-setup-hooks).
```{=include=} sections
autoconf.section.md
automake.section.md
autopatchelf.section.md
bmake.section.md
breakpoint.section.md
cmake.section.md
gdk-pixbuf.section.md
ghc.section.md
gnome.section.md
installShellFiles.section.md
libiconv.section.md
libxml2.section.md
meson.section.md
mpi-check-hook.section.md
ninja.section.md
patch-rc-path-hooks.section.md
perl.section.md
pkg-config.section.md
postgresql-test-hook.section.md
python.section.md
scons.section.md
tetex-tex-live.section.md
unzip.section.md
validatePkgConfig.section.md
waf.section.md
zig.section.md
xcbuild.section.md
```

View File

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

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