Compare commits

..

631 Commits

Author SHA1 Message Date
James Cook
ca323ed1bb expat: patch for CVE-2015-1283 from Mozilla
(Cherry-picked from commit fba4a950685023bc792422665b2dbe9934ebc9c6.)
2015-07-27 22:44:07 -07:00
Domen Kožar
8a3eea0548 Merge pull request #6287 from eborden/release-14.04
Update flash version
2015-02-16 12:08:28 +01:00
Evan Rutledge Borden
e4ee5c797c updated SHA on flash player. 2015-02-10 17:34:03 -05:00
Evan Rutledge Borden
92dd442e43 update flash version. 2015-02-10 11:50:00 -05:00
Vladimír Čunát
ed574b950a linux_3_{10,12,14}: fix upstream regression, fixes #6231
Some modules wouldn't load crc32c dependency due to module renaming.

(cherry picked from commit 57f2d329ac)

Conflicts (simple):
	pkgs/top-level/all-packages.nix
2015-02-10 13:54:43 +01:00
Vladimír Čunát
d16b0e3ae5 xdg-utils: update from git to fix CVE-2014-9622
Fixes #6193.
Disabling docs generation might be another alternative
to the build-time dependency blowup.

(cherry picked from commit 346c8d7a98)

Conflicts (simple):
	pkgs/tools/X11/xdg-utils/default.nix
2015-02-07 07:39:33 +01:00
Vladimír Čunát
592b4f7a3e kernel-*: updates from master
This probably breaks grsecurity build,
but I don't think anyone with that is still using this half-dead branch.
2015-02-04 21:33:02 +01:00
Eelco Dolstra
11ba869ae7 Paranoia
(cherry picked from commit efa8fc2b0a)

Conflicts:
	nixos/modules/virtualisation/ec2-data.nix
	nixos/modules/virtualisation/google-compute-image.nix
2015-01-15 21:18:50 +01:00
Eelco Dolstra
cf3d27a6e9 nixos-install: Create /root with 700 permission
(cherry picked from commit b9c4569b6b)

Conflicts:
	nixos/modules/installer/tools/nixos-install.sh
2015-01-15 21:18:50 +01:00
Eelco Dolstra
924fe493df NixOS containers: Create /root with 700 permission
Systemd-nspawn creates /root with 755 permission if it doesn't exist,
which is bad. So we have to create it ourselves before calling
systemd-nspawn.

(cherry picked from commit 3ca275d7ba)

Conflicts:
	nixos/modules/virtualisation/containers.nix
2015-01-15 21:18:50 +01:00
Lluís Batlle i Rossell
9be183955d Adding scantailor.
(cherry picked from commit 7eda68709e)
(cherry picked from commit b985a9e0a1)
2015-01-14 20:32:05 +01:00
Rob Vermaas
a4e0357cae Use callPackage for nodePackages, to allow easier overriding of node-packages set.
(cherry picked from commit 65a89fcce7)
2015-01-12 10:05:56 +01:00
Domen Kožar
92466a8454 openssl: 1.0.1j -> 1.0.1k
(cherry picked from commit 70a7d4bd16)
Signed-off-by: Domen Kožar <domen@dev.si>
(cherry picked from commit dbbd849ce8)
Signed-off-by: Domen Kožar <domen@dev.si>
2015-01-09 20:22:22 +01:00
Rob Vermaas
c343d80490 Ugly hack until we can update openjdk. Without this openjdk fails with:
Error: time is more than 10 years from present: 1104530400000

See also:
   http://permalink.gmane.org/gmane.os.netbsd.devel.pkgsrc.user/20888
2015-01-08 22:11:24 +01:00
James Cook
3fa379d9a3 unzip: Patch for CVE-2014-81{39,40,41}.
(Cherry-picked from 173f41cf0bc618f0b2c313b1915fee8d8a6d0ee2.)
2015-01-08 11:36:54 -08:00
Rob Vermaas
b9d5e14d1b Update dd-agent to 5.1.1
(cherry picked from commit 7f02b1f350)
2015-01-05 13:08:55 +01:00
Rob Vermaas
7c238fbd59 Add pythonPackages.ntplib, needed for dd-agent update. 2015-01-05 13:08:50 +01:00
Marco Maggesi
0e04ba396e Bumb BLCR 2014-12-27 14:54:24 +01:00
James Cook
f83b2c4178 jasper: Patch for CVE-2014-8138 via RedHat.
(Cherry-picked from commit 1b5c9c24dea9d5241f4a46a471d77d185b31b524.)
2014-12-25 02:12:25 -08:00
James Cook
e501adfb64 jasper: Patch for CVE-2014-8137 via RedHat.
(Cherry-picked from commit 951ac10ae15bf53ea919802a8c3570518f34d86b.)
2014-12-25 02:12:11 -08:00
James Cook
6173acfd98 jasper: Patch for CVE-2014-9029 via RedHat.
Also update homepage.

(Cherry-picked from commit 90162e7dbd5b96f04e277e6d208c9a9940d818a9.)
2014-12-25 02:11:53 -08:00
Vladimír Čunát
71c13be184 libssh: security+maintenance to fix CVE-2014-8132
Also switched to openssl instead of libgcrypt (wouldn't compile otherwise),
and fixed meta.license.

(cherry picked from commit 7357f0ae24)
2014-12-20 14:52:02 +01:00
Vladimír Čunát
f4bc92fb99 kde4.kmplayer: use gentoo mirror (fixes #5407)
The upstream server is down.

(cherry picked from commit ca850deb9e)
2014-12-20 10:35:07 +01:00
Vladimír Čunát
d91bffeb13 kernel: 3.14.17 -> 3.14.27
This most likely solves some vulnerabilities.
The grsecurity stuff were out of sync before this commit,
and maybe didn't get fixed by this.
CC #5386.

(cherry-picked from 7e8c5b578a)
2014-12-18 14:14:22 +01:00
Rob Vermaas
0efa789071 cron: fix location 2014-12-16 11:31:36 +01:00
Rob Vermaas
3365f39da4 cron: make into systemd.service and make it depend on /etc/localtime
so that changes in timezone will trigger a restart of cron service.

(cherry picked from commit b48e41b8d7)
2014-12-15 14:52:57 +01:00
Vladimír Čunát
9ff4738e5f kde: move patch to the correct location
I see git detects file moves well but not "directory moves".
Thanks to Travis for fast notification.
2014-12-11 11:30:12 +01:00
Vladimír Čunát
20fb57a528 kde: fix CVE-2014-8600 by upstream patches
https://www.kde.org/info/security/advisory-20141113-1.txt
I couldn't find kio-extras, so I hope we don't have it disguised somewhere.

(cherry picked from commit 15b9626a3d)
2014-12-10 21:09:51 +01:00
Vladimír Čunát
a3b3205179 libyaml: fix CVE-2014-9130 by upstream patch
(cherry picked from commit c8a53923fc)
2014-12-10 21:09:50 +01:00
Vladimír Čunát
3b43da9fa5 cpio: fix CVE-2014-9112 by Fedora patch
(cherry picked from commit 225ddcda9a)
2014-12-10 21:09:50 +01:00
Eelco Dolstra
7e7f00c898 php: Really update to 5.4.34
75738437a4 only updated the version string...

(cherry picked from commit 55d59eefb3)
2014-12-10 17:19:34 +01:00
William A. Kennington III
1f2d6a022e kernel: 3.12.33 -> 3.12.34
(cherry picked from commit 845f647b86)
2014-12-10 13:26:45 +01:00
Ricardo M. Correia
e7a8157372 flashplayer: Update from 11.2.202.424 -> 11.2.202.425
(cherry picked from commit e660a70872)
2014-12-10 13:26:44 +01:00
Vladimír Čunát
dbbe29e095 root: fix build by upstream patch
Also refactor the expression a little.

(cherry picked from commit 7ce485ff0f)
2014-12-10 13:03:19 +01:00
Lluís Batlle i Rossell
167dcce8ff Enable parallel building in octave.
Let's wait for problems.
2014-12-09 15:03:10 +01:00
Rüdiger Sonderfeld
55170645ef octave: Update to 3.8.2.
Also change "," placement to be consistent and remove unnecessary let.

(cherry picked from commit 05b83fe6a2)
2014-12-09 15:03:10 +01:00
Lluís Batlle i Rossell
2253aa9b75 Updating octave to 3.8.1
(cherry picked from commit 43ed6b8f62)
2014-12-09 15:03:10 +01:00
Lluís Batlle i Rossell
0420a025e3 Updating xpdf to 3.04 2014-12-09 14:35:54 +01:00
Vladimír Čunát
b2cb57e1c3 nss: security update fixing CVE-2014-1569
(cherry picked from commit 2e1bb14b93)
2014-12-05 11:36:41 +01:00
Eelco Dolstra
58c9322244 firefox: Update to 34.0.5
(cherry picked from commit d6c3b564c4)
2014-12-05 11:36:28 +01:00
Rob Vermaas
aa61c12112 Update dd-agent to 4.4.0 2014-12-03 16:11:40 +01:00
Domen Kožar
1ed7214396 openvpn: fix build 2014-12-02 15:30:38 +01:00
Domen Kožar
bcd78d6564 openvpn: 2.3.4 -> 2.3.6 (CVE-2014-8104)
Conflicts:
	pkgs/tools/networking/openvpn/default.nix
2014-12-02 13:12:32 +01:00
Shea Levy
7fcafc09a5 nixUnstable: bump
Bug fixed in b0c5c2a was giving me segfaults...

(cherry picked from commit 97f35cf29a)

Conflicts:
	pkgs/tools/package-management/nix/unstable.nix
2014-12-02 11:51:57 +01:00
William A. Kennington III
f77806acdf kernel: 3.12.32 -> 3.12.33
(cherry picked from commit 30597a9c7a)
2014-12-02 11:48:29 +01:00
Rob Vermaas
0521f9d125 sysklogd: update from 1.5 to 1.5.1, potentially fixes CVE-2014-3634, CVE-2014-3683
(cherry picked from commit c4ab4ce59b)
2014-12-02 11:46:17 +01:00
Pascal Wittmann
fa0adad077 php: update from 5.4.34 to 5.4.35 (fixes CVE-2014-3710)
(cherry picked from commit 75738437a4)
2014-12-02 11:45:50 +01:00
aszlig
4290f2c74b nixos: Use vendor zones instead of N.pool.ntp.org.
Closes #4824, thanks to @abh for processing my stupidity.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit c37611f3e5)
2014-11-28 19:40:34 +01:00
Lluís Batlle i Rossell
410a4ea663 Updating pcl to 1.7.2, making it build. 2014-11-27 16:16:32 +01:00
Ricardo M. Correia
8183166846 flashplayer: Update from 11.2.202.418 -> 11.2.202.424
It's a critical security fix.
http://helpx.adobe.com/security/products/flash-player/apsb14-26.html
(cherry picked from commit a4beb6a2b6)
2014-11-27 01:26:45 +01:00
Eelco Dolstra
cd261645fa okular: Add mobi support 2014-11-19 23:24:42 +01:00
Vladimír Čunát
1901da5bbd fontconfig: stop using xml:space; vital for nixos+2.11
This is a proper fix for problems described in ec985c8ffa .
The code is from @lethalman.

(cherry picked from commit b16994f7ce)
2014-11-19 23:19:17 +01:00
Eelco Dolstra
59ce92eb62 checkinstall: Fix RPM builds
https://bugzilla.novell.com/show_bug.cgi?id=561317
(cherry picked from commit 9073d554a5)
2014-11-18 15:32:07 +01:00
Eelco Dolstra
c3a8624ac2 firefox: Use regular linker
It builds on Nix >= 1.8pre3890 due to the removal of the
ADDR_LIMIT_3GB personality flag.

(cherry picked from commit bf17f43fe9)
2014-11-18 15:31:54 +01:00
Eelco Dolstra
969090442b firefox: Update to 33.1.1
(cherry picked from commit c4364d5914)
2014-11-18 15:31:27 +01:00
Eelco Dolstra
a34c0c58d3 Manual: Remove some option defaults that refer to store paths
Option defaults should not refer to store paths, because they cause
the manual to be rebuilt gratuitously. It's especially bad to refer to
a highly variable path like a computed configuration file.

(cherry picked from commit ec4f38c56f)
2014-11-17 15:32:08 +01:00
Eelco Dolstra
ef67865e5d Backport generation of options.json 2014-11-17 15:31:45 +01:00
Ricardo M. Correia
fbd732860a flashplayer: Update from 11.2.202.411 -> 11.2.202.418
(cherry picked from commit ace49e400c)
2014-11-14 19:15:59 +01:00
Ricardo M. Correia
6a9e7582b4 flashplayer: Update from 11.2.202.406 -> 11.2.202.411
(cherry picked from commit 2838c2a7bc)
2014-11-14 19:15:59 +01:00
Eelco Dolstra
2b0caccb7b imagemagick: Use --with-gcc-arch
Without this, ImageMagick's configure script will generate code
specific to the machine building the package. This code may then fail
on other CPU types.

http://hydra.nixos.org/build/16564129
Signed-off-by: Domen Kožar <domen@dev.si>
(cherry picked from commit 6f53886360)
2014-11-11 13:12:52 +01:00
Justin Bedo
5b1015578c Update ImageMagick version
(cherry picked from commit cd1bacb03d)
2014-11-11 13:12:47 +01:00
Vladimír Čunát
0a24b3da2d firefox: update to 33.1
(cherry picked from commit fb3e83d091)
2014-11-11 13:11:02 +01:00
Michael Raskin
a40ea27684 Update firefox source build, too
(cherry picked from commit 0934ddf3e0)
2014-11-11 13:10:55 +01:00
Eelco Dolstra
6b704bcdcc httpd-2.2: Enable building of mod_cache and friends
(cherry picked from commit db4053fb59)
2014-11-11 13:09:44 +01:00
Rob Vermaas
37edf304b8 Fix hash for linux 3.12.32 2014-11-06 20:50:00 +01:00
Eelco Dolstra
910364a0af linux: Update to 3.12.32
(cherry picked from commit 1d5147dd17)
2014-11-06 15:16:56 +01:00
Rob Vermaas
89dda7a106 php: update from 5.4.33 to 5.4.34, potentially fixes CVE-2014-3668, CVE-2014-3669, CVE-2014-3670
(cherry picked from commit 6d79132553)
2014-11-06 15:09:58 +01:00
Vladimír Čunát
c9de7b93c0 subversion+serf: security update to fix CVE-2014-3504
Thanks to nixpkgs monitor again.

(cherry picked from commit 3775fa9ea2)
2014-11-06 15:05:21 +01:00
Eelco Dolstra
2b022ca153 serf: Update to 1.3.6
(cherry picked from commit 542373f305)
2014-11-06 15:05:10 +01:00
Eelco Dolstra
c19dd1e04a subversion: Update to 1.8.9
(cherry picked from commit b4c4e2d28d)
2014-11-06 14:59:15 +01:00
Eelco Dolstra
975f36b68a apr-util: Update to 1.5.4
(cherry picked from commit 64982966dc)
2014-11-06 13:13:54 +01:00
Eelco Dolstra
a640ee54b2 apache-httpd: Update to 2.2.29
CVE-2014-0118, CVE-2014-0231, CVE-2014-0226, CVE-2013-5704.

(cherry picked from commit 8e40703f6c)
2014-11-06 13:13:02 +01:00
Eelco Dolstra
ffb3ead6c5 firefox: Don't use system sqlite
I don't want to upgrade SQLite in the stable branch, but Firefox 33
requires a more recent version.
2014-11-05 15:01:32 +01:00
Eelco Dolstra
dbb8603c5d nss: Update to 3.17.2
(cherry picked from commit f445fb8240)
2014-11-05 14:08:35 +01:00
Michael Raskin
0c9dad3bde Update firefox
(cherry picked from commit ed6babd391)
2014-11-05 14:07:43 +01:00
Eelco Dolstra
e6e9bdf846 firefox: Update to 33.0.1
(cherry picked from commit 240665d906)
2014-11-05 14:07:32 +01:00
Eelco Dolstra
211914a4a6 firefox: Fix evaluation on non-Linux
Actually we only support Firefox on Linux, but we hit the “attribute
‘gcc.override’ missing” error before the platform check.

(cherry picked from commit a5262a9000)
2014-11-05 14:07:18 +01:00
Eelco Dolstra
cbacb16cee firefox: Fix build on 32-bit by using the gold linker
(cherry picked from commit f4b5671b0d)
2014-11-05 14:07:05 +01:00
Eelco Dolstra
3a6555c18a firefox: Update to 33.0
(cherry picked from commit fc964fa924)
2014-11-05 14:06:23 +01:00
Pascal Wittmann
d7ceaf4f4e wget: Update to 1.16 (fix CVE-2014-4877) (#4728)
(cherry picked from commit c7e4290fcc)

Picker deleted the maintainer, as (s)he is missing in this brang

Conflicts (auto-solved):
	pkgs/tools/networking/wget/default.nix
2014-11-01 21:42:30 +01:00
Domen Kožar
c3ddfef8f6 python: 3.3.5 -> 3.3.6 2014-11-01 04:54:30 +01:00
Domen Kožar
d7d593b57f python: 3.2.5 -> 3.2.6 2014-11-01 04:54:30 +01:00
Longrin Wischnewski
8fc1927e2d rdesktop: update to version 1.8.2
rdesktop: add meta fields
(cherry picked from commit 6ad299460c)

Conflicts:
	pkgs/applications/networking/remote/rdesktop/default.nix
2014-10-29 14:44:19 +01:00
Eelco Dolstra
ae1c5b8783 linux: Update to 3.12.31
(cherry picked from commit bac50c5c1f)
2014-10-27 11:22:06 +01:00
Eelco Dolstra
1fc25b90dd sqlite: Enable optimization
Commit a28940d9d5 changed the SQLite
build to use CFLAGS instead of NIX_CFLAGS_COMPILE, but that's really
bad because it clobbers the default -O2 flag. So all this time we had
an unoptimized SQLite build. (This is one of the reasons why
NIX_CFLAGS_COMPILE exists - messing with CFLAGS is almost never a good
idea.)

(cherry picked from commit 2b5ccf8a53)
2014-10-27 10:50:40 +01:00
Eelco Dolstra
997e1ebb2c Remove obsolete Hydra package
(cherry picked from commit d4d0e449d7)
2014-10-27 10:50:40 +01:00
Eelco Dolstra
6f91248649 Add openjdk to the small channel
(cherry picked from commit 4ecb762ee5)
2014-10-27 10:50:40 +01:00
Eelco Dolstra
d0ccb711a0 chatzilla: Update to 0.9.91
(cherry picked from commit 71c34a45e1)
2014-10-27 10:50:40 +01:00
Eelco Dolstra
ba886d92ae chatzilla: Use firefox instead of xulrunner
Thanks to @nbp for pointing out that we don't need xulrunner anymore.

(cherry picked from commit 4de72baf03)
2014-10-27 10:50:39 +01:00
Vladimír Čunát
4c9ef9f75c pidgin: maintenance+security update
Fixes CVE-2014-3694..3698

Added a note to clean the expression, CC #4602.

(cherry picked from commit e63d9554b4)

Conflicts:
	pkgs/applications/networking/instant-messengers/pidgin/default.nix
2014-10-23 13:05:06 +02:00
Lluís Batlle i Rossell
71b2df28fc Adding a patch that brings the windows key to rdesktop
Taken from upstream, will be on next release.

(cherry picked from commit 8997cac785)
2014-10-23 09:47:53 +02:00
Lluís Batlle i Rossell
15efb9ccf9 Making hydra build ddd. 2014-10-23 09:47:48 +02:00
Shea Levy
6982c7ccf8 Debain 7.6-amd64 tarball was updated in place
(cherry picked from commit 3fe41ca763)
2014-10-20 15:26:59 -04:00
Shea Levy
af217bae29 debian packages tarball was updated in place
(cherry picked from commit 652030e85d)
2014-10-20 15:24:17 -04:00
Eelco Dolstra
29b8c6a4e6 Fix semicolon 2014-10-20 12:00:23 +02:00
William A. Kennington III
6aa0a568ab kernel: 3.12.29 -> 3.12.30
(cherry picked from commit 8c138fd489)
2014-10-20 12:00:23 +02:00
William A. Kennington III
054d9939b5 kernel: 3.12.28 -> 3.12.29
(cherry picked from commit 4a2ecb2c62)
2014-10-20 12:00:23 +02:00
Wout Mertens
66af731b14 Travis build: update script from master 2014-10-15 21:53:51 +02:00
Domen Kožar
fec11dcecb openssl: 1.0.1i -> 1.0.1j (CVE-2014-3513, CVE-2014-3567, CVE-2014-3568) 2014-10-15 16:13:16 +02:00
wmertens
852cecdd39 Travis build: source environment before build
💩
(cherry picked from commit 5e6b6df33e)
2014-10-15 12:01:18 +02:00
Wout Mertens
26b37474e7 Travis: Set up for release-14.04 2014-10-15 11:25:20 +02:00
Lluís Batlle i Rossell
3f0360927e nixos nfs: allow setting the lockd ports.
This helps in setting a fixed firewall open port for NFS lockd.

Based on:
http://rlworkman.net/howtos/NFS_Firewall_HOWTO
2014-10-15 10:59:51 +02:00
Rob Vermaas
b7451d91e8 Dohh 2014-10-14 11:43:42 +02:00
Rob Vermaas
654eaeb2ca amazon-image.nix: Pass --option build-users-group '' to nix tools to make Amazon generation work with nix-1.8+ 2014-10-14 11:38:59 +02:00
Shea Levy
0e935f1eb2 Update nixUnstable
(cherry picked from commit aa847f4772)
2014-10-07 15:53:26 +02:00
Peter Simons
dbadfad0a2 orc: disable test suite to fix spurious failures
Example: http://hydra.nixos.org/build/15550338/nixlog/2/raw
2014-10-03 21:32:12 +02:00
Emery Hemingway
3d86e80ef3 cjdns: update from 20140919 20140922
package installs to .../bin
fix service module to look in .../bin

Closes #4240

(cherry picked from commit 61f0d9b251)
2014-10-01 23:29:13 +02:00
Emery Hemingway
e903ad0fa5 cjdns: update 20140829 to 20140919
Closes #4186

(cherry picked from commit 95c72a5f60)
2014-10-01 23:29:12 +02:00
Emery Hemingway
8aa0157de9 cjdns: package update from 20140303 to 20140829
(cherry picked from commit fc6ccd1080)
2014-10-01 23:29:12 +02:00
Emery Hemingway
964d18d89e cjdns: new declarative service expression
systemd service wants network-interfaces.target rather than network.target
assertion on config.networking.enableIPv6

(cherry picked from commit f60ac82cac)
2014-10-01 23:29:12 +02:00
Peter Simons
41d3d1b306 bash: drop obsolete cve-2014-7169.patch to fix the build 2014-10-01 23:15:25 +02:00
Peter Simons
56b7e164eb bash: add patch sets 49, 50, and 51 to fix http://lcamtuf.blogspot.de/2014/10/bash-bug-how-we-finally-cracked.html 2014-10-01 23:07:40 +02:00
Eelco Dolstra
b9bde98161 tests/kde4.nix: Don't build kdeedu
This prevents a dependency on liblapack (which randomly fails) and
TeXlive (which is huge).

http://hydra.nixos.org/build/14897240
2014-09-29 13:31:37 +02:00
Lluís Batlle i Rossell
01dfd5a44a Updating toxic to 0.5.1 2014-09-29 10:40:09 +02:00
Lluís Batlle i Rossell
562ff9c1e1 Updating utox/libtoxcore to the latest, to fix utox build.
There was a test failing. I also renamed the attr uTox to utox, for the more
common lowercase in all-packages.

Conflicts:
	pkgs/top-level/all-packages.nix

(cherry pick of 93fd8fb3a5 )
2014-09-29 10:39:44 +02:00
Lluís Batlle i Rossell
fece51a8a6 Fixing libtoxcore libvpx propagate. 2014-09-29 10:38:53 +02:00
Lluís Batlle i Rossell
9a66026234 Fix toxic install for DHTnodes and other share files. 2014-09-29 10:38:52 +02:00
Lluís Batlle i Rossell
c294fe0f53 Making tox/toxic A/V libs disabled in ARM. 2014-09-29 10:38:51 +02:00
Lluís Batlle i Rossell
4f85481ce0 Adding qtox. Making libtoxcore propagate libvpx. 2014-09-29 10:38:50 +02:00
Domen Kožar
9766bd2f4e libtoxcore: disable tests for now
(cherry picked from commit 4742c886dd)
2014-09-29 10:38:36 +02:00
Lluís Batlle i Rossell
9eb8f47666 Updating utox (fixing PREFIX too)
(cherry picked from commit 1b6101775d)
2014-09-29 10:38:11 +02:00
Lluís Batlle i Rossell
77cda0aa83 Updating toxic/libtoxcore/libsodium
(cherry picked from commit 1955da1b8c)
2014-09-29 10:38:04 +02:00
Domen Kožar
3baef65dc6 toxic: git -> 0.4.7
(cherry picked from commit 13ca3624a7)
2014-09-29 10:35:30 +02:00
aszlig
d530f889ed toxic: Update to latest upstream Git master.
Unfortunately they've changed their build system to be makefile-only and
they don't seem to include test cases in the CLI anymore, so we needed
to adapt accordingly. Also added freealut and openal to the buildInputs,
in order to allow audio support.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 9edfad2717)
2014-09-29 10:35:27 +02:00
Domen Kožar
6e1a74d284 uTox: downgrade to work with current libtoxcore
(cherry picked from commit 2099db4d00)
2014-09-29 10:34:44 +02:00
Domen Kožar
eb02ca8c03 add uTox
(cherry picked from commit e07c2c2cfd)
2014-09-29 10:34:29 +02:00
Domen Kožar
d2739c17ef libtoxcore: upgrade for a few rev to get i686-linux build working
(cherry picked from commit be6ae818dc)
2014-09-29 10:33:35 +02:00
aszlig
4438e5d9d8 libtoxcore: Enable and fix up running test suite.
We not only require libcheck but also needed to disable a few tests,
without providing the former, test cases were signalled as being run
successfully but weren't actually run.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit e542ff7288)
2014-09-29 10:33:27 +02:00
aszlig
847ec71960 libtoxcore: Add libopus and libvpx to buildInputs.
Those are necessary to do audio/video calls, which I guess is the whole
point of the Tox project.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 40548fce62)
2014-09-29 10:33:22 +02:00
aszlig
a0f9aa8184 libtoxcore: Update to latest Git master.
The GitHub repository has changed the name to "toxcore".
Also indented buildInputs/configureFlags a bit less messy.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 2aa89519a0)
2014-09-29 10:33:17 +02:00
Lluís Batlle i Rossell
0115853aa9 Updating lesstif to 0.95.2 (2009).
Some patches can be removed.
I updated it because the scroll wheel was going the oposite direction in ddd.
https://bugs.launchpad.net/ubuntu/+source/ddd/+bug/37664
2014-09-29 10:23:17 +02:00
Vladimír Čunát
8da96f6b0e lyx: maintenance update
This is supposed to be the last version of the 2.0.x branch
2014-09-27 13:19:10 +02:00
Vladimír Čunát
5f2f1b05e3 lib/platforms: add "armv6l-linux" to all platforms
It was only in mesaPlatforms, which caused nix appear unsupported in there.

(cherry picked from commit 7323d5e128)
2014-09-27 11:24:55 +02:00
Eelco Dolstra
8cf5281744 Add some more stuff to the small channel 2014-09-25 17:52:25 +02:00
Eelco Dolstra
4dfca8e14a Add an entire NixOS build to the channel
This causes some cruft to be uploaded (such as unit files) but it
ensures that every package used by the base system ends up in the
channel, not just environment.systemPackages.
2014-09-25 17:51:09 +02:00
Eelco Dolstra
7185fc1054 bash: Fix for CVE-2014-7169
(cherry picked from commit 0a0ebd8c44)
2014-09-25 14:41:20 +02:00
Eelco Dolstra
d927ce03e4 Add nodejs to the small channel 2014-09-25 12:50:36 +02:00
Rob Vermaas
095d42101c nixUnstable: Update to nix-1.8pre3823_53b044c 2014-09-25 11:57:21 +02:00
Eelco Dolstra
caeba6f22a nss: Update to 3.16.5
CVE-2014-1568

(cherry picked from commit 711d67263a)
2014-09-25 11:46:25 +02:00
Eelco Dolstra
f1ce80f98e firefox: Update to 32.0.3
CVE-2014-1568

(cherry picked from commit d265c213b4)
2014-09-25 11:46:25 +02:00
Eelco Dolstra
f963f57b62 Remove missing attribute 2014-09-25 01:01:54 +02:00
Eelco Dolstra
2c7acc6731 Add a jobset for a "nixos-small" channel
This channel only builds a small subset of Nixpkgs, mostly suitable
for servers. Since the channel update doesn't require thousands of
packages to be built first, it should provide much faster turnaround
in case of security updates.
2014-09-25 00:28:18 +02:00
Eelco Dolstra
360b0a7b70 Add all default NixOS packages to the channel
The job ‘dummy’ depends on the default contents of
‘environment.systemPackages’, thus ensuring that those packages all
end up in the channel.

(cherry picked from commit 1cd727180e)
2014-09-25 00:27:45 +02:00
Eelco Dolstra
a296abde48 Installer test: Use the minimal ISO
So we don't depend on KDE etc. (which we don't even test here).

(cherry picked from commit 0a967b9268)
2014-09-25 00:27:03 +02:00
Eelco Dolstra
ebacaf95f9 test-driver: Use netpbm instead of imagemagick
Imagemagick pulls in 100s of megabytes of dependencies.

(cherry picked from commit 51c349d0cc)
2014-09-25 00:27:03 +02:00
Eelco Dolstra
6bee20d12f netpbm: Update to 10.66.00
Also, borrow a tarball from Gentoo so we don't have to use
fetchsvn. And don't depend on libX11 by default.

(cherry picked from commit 08732891e1)
2014-09-25 00:27:03 +02:00
Shell Turner
eda84cb2fd Update bash patchset to fix CVE-2014-6271 2014-09-24 17:36:25 +02:00
James Cook
4e5c8b34f8 firefox: Update to 32.0.2.
(cherry picked from commit 27f3301650)
2014-09-23 10:44:29 +02:00
Mathijs Kwik
1361e2f97e xulrunner: stick to firefox's src attribute
(cherry picked from commit 04369b6819)
2014-09-23 10:44:15 +02:00
Eelco Dolstra
ef2f94c6fe systemd: Fix uninitialised memory issue in veth setup
This caused containers to randomly fail, in particular if the machine
name was 8 characters.

(cherry picked from commit 97d6afafaa)
2014-09-22 19:21:09 +02:00
Eelco Dolstra
0a3dc55ffc systemd: Apply backport fixes
In particular, added a few patches that improve systemd-nspawn
container behaviour.

(cherry picked from commit 38567ddc80)
2014-09-22 19:20:43 +02:00
Vladimír Čunát
4962edc4d0 gcc: bugfix update 4.8.2 -> .3
It's supposed to fix over 140 problems from upstream bugzilla.
https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.8.3

A previously separate patch got included in the release.

I tested that stdenv still builds.

(cherry picked from commit 610370f844)
2014-09-22 19:14:27 +02:00
Eelco Dolstra
f446555c23 nixos-rebuild: Don't pass -K by default
(cherry picked from commit 05163e99db)
2014-09-22 19:12:38 +02:00
Eelco Dolstra
83f7e4689b smem: Add package
This is a memory reporting tool that accounts for shared memory.

(cherry picked from commit 9a6484b255)
2014-09-22 19:12:18 +02:00
Eelco Dolstra
9e580c1944 boehm-gc: Support --enable-large-config
(cherry picked from commit 8e2e4216ba)
2014-09-22 19:11:54 +02:00
Eelco Dolstra
c0d4ce3e5b httpd: Add option for specifying robots.txt
(cherry picked from commit 0de982d75b)
2014-09-22 19:11:31 +02:00
Eelco Dolstra
0569cc408a httpd: Don't emit robots.txt if there are no robots entries
(cherry picked from commit 837a0c05e5)
2014-09-22 19:11:13 +02:00
Eelco Dolstra
5900bfb4ee valgrind: Update to 3.10.0
(cherry picked from commit 9f12c8bde8)
2014-09-22 19:11:07 +02:00
Eelco Dolstra
6797cb5c3b Net::Amazon::S3: Add to channel
(cherry picked from commit d49991e40a)
2014-09-22 19:10:59 +02:00
Michael Raskin
953433939b nixos-iso: Use a simpler disk label (#2838)
(cherry picked from commit 8ec5d0fd0f)
2014-09-20 08:21:30 +02:00
Marco Maggesi
494b315d3a Update OpenAFS client to version 1.6.9 2014-09-19 23:19:25 +02:00
Marco Maggesi
b951b618e8 Merge pull request #4123 from falsifian/krb5
krb5: Update to 12.2.2.  (Please test before merging.)
2014-09-19 16:59:59 +02:00
Marco Maggesi
7d8cffa31a Update hol_light to r198. Add myself as a maintainer 2014-09-17 13:52:57 +02:00
Eelco Dolstra
8954ea814e firefox: Update to 32.0.1
(cherry picked from commit 0c152324d2)
2014-09-15 20:09:35 +02:00
Vladimír Čunát
a617e80aa4 liferea: maintenance update
(cherry picked from commit 4031707138)

Conflicts (one update skipped):
	pkgs/applications/networking/newsreaders/liferea/default.nix
2014-09-13 19:47:39 +02:00
Vladimír Čunát
4800bbbe57 flashplayer-11: update, including security fixes
(cherry picked from commit 0047db47bd)
2014-09-13 16:16:31 +02:00
aszlig
300e25cfaa python-hetzner: Update to bugfix version 0.7.2.
From version 0.7.1 this fixes encoding problems with some DELL servers
while running the CLI.

And more importantly in version 0.7.2, it fixes the SSL certificate
error (Hetzner changed CA) which renders the library pretty much
useless.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 415c31372c)
2014-09-11 14:16:08 +02:00
Blaz Bratanic
9e170188ee Fixed download path
(cherry picked from commit 1ecfba4391)
2014-09-09 20:29:32 +02:00
Eelco Dolstra
8d9f9d5b87 linux: Update to 3.12.28
(cherry picked from commit 19b1fafe5f)
2014-09-08 15:49:48 +02:00
Eelco Dolstra
72162706a7 firefox: Workaround for building on i686-linux
http://hydra.nixos.org/build/13992569
(cherry picked from commit 4ead67b785)
2014-09-08 15:46:27 +02:00
Eelco Dolstra
03bec38123 Remove reference to icecat
(cherry picked from commit d2539605e1)
2014-09-05 15:42:07 +02:00
Eelco Dolstra
f9c24179f1 /dev/sda1 -> "/dev/sda1"
Otherwise Nix might try to copy /dev/sda1 under certain circumstances
:-)

(cherry picked from commit f6b4214567)
2014-09-05 15:41:50 +02:00
Eelco Dolstra
c0182b6b07 lttng-modules: Mark as broken
These do not build for any kernel:

  http://hydra.nixos.org/eval/1149989?filter=lttng&compare=1149981

(cherry picked from commit 4b7f1a9be3)
2014-09-05 15:40:31 +02:00
Eelco Dolstra
ec17cf89cc Cache::Cache: Disable tests
(cherry picked from commit aa8a728b04)
2014-09-05 15:40:18 +02:00
Eelco Dolstra
9203f22238 firefox: Update to 32.0
(cherry picked from commit 88964f37a0)
2014-09-05 15:40:06 +02:00
Eelco Dolstra
a5e7f0831c nss: Update to 3.16.4
(cherry picked from commit b3b06af89a)
2014-09-05 15:40:05 +02:00
Eelco Dolstra
0aeed5baa6 nspr: Update to 4.10.7
(cherry picked from commit 0dbdc857d7)
2014-09-05 15:40:05 +02:00
Eelco Dolstra
c5d63cb35e linux: Update to 3.12.27
CVE-2014-3534
2014-09-03 19:44:00 +02:00
Eelco Dolstra
e4805e3d34 Bump the amount of memory for the installer test
It randomly OOMs.

http://hydra.nixos.org/build/13587153
(cherry picked from commit 619f18956d)
2014-09-03 19:43:09 +02:00
Ricardo M. Correia
41f8b13fa1 flashplayer: Update from 11.2.202.394 -> 11.2.202.400
Signed-off-by: Domen Kožar <domen@dev.si>
2014-09-01 21:15:58 +02:00
Ricardo M. Correia
5a6541ec28 flashplayer: Update from 11.2.202.378 -> 11.2.202.394
Signed-off-by: Domen Kožar <domen@dev.si>
2014-09-01 21:15:09 +02:00
Ricardo M. Correia
3b9fceab24 flashplayer: Update from 11.2.202.359 -> 11.2.202.378
Signed-off-by: Domen Kožar <domen@dev.si>
2014-09-01 21:15:02 +02:00
Rüdiger Sonderfeld
e64237cdb4 man-pages: Update to 3.71.
(cherry picked from commit f61fb466eb)
2014-08-25 10:06:59 +02:00
Eelco Dolstra
2bc3109460 Don't barf if /var/log doesn't support ACLs
http://hydra.nixos.org/build/13462892
(cherry picked from commit 7c4591d010)
2014-08-25 10:06:18 +02:00
Eelco Dolstra
521399f5cd linux: Enable ACLs in ext3
http://hydra.nixos.org/build/13462892
(cherry picked from commit e4752d7877)
2014-08-25 10:06:13 +02:00
Eelco Dolstra
2a6fee4c06 man-pages: Update to 3.70
(cherry picked from commit c37057240f)
2014-08-25 10:05:55 +02:00
Eelco Dolstra
41df91401e types.nix: Add ‘either’ type
(cherry picked from commit f932910323)
2014-08-25 10:03:38 +02:00
Eelco Dolstra
1e42f0625a lockfreeQueue: Don't build on Hydra
It times out: http://hydra.nixos.org/job/nixos/release-14.04/nixpkgs.haskellPackages_ghc763_profiling.lockfreeQueue.x86_64-linux
2014-08-21 17:23:00 +02:00
Eelco Dolstra
3e8072659a cedet: Mark as broken
It has been timing out since forever:

  http://hydra.nixos.org/job/nixos/release-14.04/nixpkgs.emacs23Packages.cedet.x86_64-linux
2014-08-21 14:51:21 +02:00
Rob Vermaas
1aa1cb700b Update node-packages-generated. Remove packages from node-packages.json that use an npm package that has a cyclic dependency. See also npm2nix#3 2014-08-21 11:37:55 +02:00
Vladimír Čunát
77fcd5fc23 twinkle eval: fix the typo
(cherry picked from commit 2d03fbf752)
2014-08-20 23:39:16 +02:00
Vladimír Čunát
2a173d70c2 twinkle: fix build (fixes #3673)
Pulled patches from Debian and hacked around linking errors.
I'm able to ring my mobile phone now.
However, on exit the process is stuck and needs kill -9.

CC: maintainer @MarcWeber.
(cherry picked from commit c198a36898)

Conflicts (trivial):
	pkgs/applications/networking/instant-messengers/twinkle/default.nix
2014-08-20 21:43:31 +02:00
Vladimír Čunát
2b27053695 thrift: disable parallel building, as it fails on hydra
(cherry picked from commit 45371d380c)
2014-08-20 01:38:48 +02:00
Rickard Nilsson
233a5db368 obnam: Update from 1.6.1 to 1.8
(cherry picked from commit bdea35d98b)
2014-08-19 16:12:25 +02:00
Vladimír Čunát
75fb186f50 Re-revert the previous and fix tarball
This reverts commit 155996ebde.

I'm sorry for the problems. Now I checked the tarball does build locally.
2014-08-18 21:12:47 +02:00
Eelco Dolstra
155996ebde Revert "Turn some license strings into lib.licenses values"
This reverts commit f9f5be6113 because
it breaks Nixpkgs evaluation.

http://hydra.nixos.org/build/13476850
2014-08-18 14:52:56 +02:00
Eelco Dolstra
1c9afeed07 nixos-container destroy: Make idempotent
(cherry picked from commit e6c00e60c3)
2014-08-17 23:33:31 +02:00
Eelco Dolstra
4d8f020912 nixos-container destroy: Remove gcroots
(cherry picked from commit 883fa4f920)
2014-08-17 23:33:21 +02:00
Vladimír Čunát
e8b62a519a xorg: revert larger updates from master
I'll better be more conservative.
2014-08-15 02:08:17 +02:00
Vladimír Čunát
a0e7caac60 llvm: fixup the paxmark phase (not here yet) 2014-08-15 00:04:52 +02:00
Vladimír Čunát
bd5036c890 ffmpeg: fix forgotten hash 2014-08-14 23:46:51 +02:00
Eelco Dolstra
5a06477a3d Merge pull request #3595 from wkennington/master.kernel
Kernel Updates
(cherry picked from commit 08b8eaae1c)

Conflicts (skipping some intermediate bump commits):
	pkgs/os-specific/linux/kernel/linux-3.10.nix
	pkgs/os-specific/linux/kernel/linux-3.14.nix
	pkgs/os-specific/linux/kernel/linux-3.15.nix
	pkgs/os-specific/linux/kernel/linux-3.16.nix
	pkgs/os-specific/linux/kernel/linux-3.4.nix
2014-08-14 23:13:41 +02:00
Marc Weber
b7f86f56d1 apache 2_4 update, fixes some CVE's
See http://www.apache.org/dist/httpd/Announcement2.4.html It compiles,
didn't run it. I guess minor update doesn't cause much trouble even
though there are some new features

(cherry picked from commit ba154ec9d4)
2014-08-14 23:11:51 +02:00
Cillian de Róiste
7d031e5a2c kde4_next.kde_wacomtablet: update from 2.0 to 2.0.2, potentially fixes CVE-2012-4514, CVE-2012-4514
(cherry picked from commit d4fb2e83db)
2014-08-14 23:11:37 +02:00
Vladimír Čunát
9cc04de7eb sync from master: xorg 2014-08-14 23:08:42 +02:00
Vladimír Čunát
f0a363c910 sync from master: llvm-3.4 maintenance update 2014-08-14 23:08:32 +02:00
Vladimír Čunát
2048460bdf sync from master: xfce minor updates 2014-08-14 23:01:48 +02:00
Vladimír Čunát
aed21bd6d5 sync from master: doc/* 2014-08-14 22:56:50 +02:00
Vladimír Čunát
48a10fc66e sync from master: pkgs/development/libraries/*
Picked what looked like non-intrusive changes to relatively used libs.
2014-08-14 22:51:27 +02:00
Gergely Risko
b79e3ce6a7 Get rid of bootstrap-tools dependency from xz (and therefore stdenv)
0769fc5b77 broke this by setting CONFIG_SHELL.

(cherry picked from commit 59291fdbf4)
2014-08-14 22:37:19 +02:00
Gergely Risko
1c0068a0c9 Enable parallel building for GCC.
Even if using profiledbootstrap.  This was unsafe before 4.8, and
then the documentation was not fixed on time.

The documentation got fixed here:
  c763997f34

But the actual code was already fixed here:
  5d2fca09d5

So this is safe both for GCC 4.8 and GCC 4.9.

(cherry picked from commit f199e115d2)
2014-08-14 22:37:18 +02:00
Vladimír Čunát
23789cc23e SDL: minor sync from master 2014-08-14 22:16:55 +02:00
Peter Simons
217724b340 Partially revert 7a45996 some more.
Removing more references to the non-existent license "stdenv.lib.licenses.perl5".
Thanks to @FlashKorten for catching those.

(cherry picked from commit 5cc55e9523)
2014-08-14 22:02:44 +02:00
Peter Simons
0d133f7c62 perl-packages.nix: partially revert 7a45996233
The commit referred to non-existent license "stdenv.lib.licenses.perl5".

(cherry picked from commit 4895ace127)

Conflicts:
	pkgs/top-level/perl-packages.nix
2014-08-14 22:02:25 +02:00
Mateusz Kowalczyk
f9f5be6113 Turn some license strings into lib.licenses values
(cherry picked from commit 7a45996233)

Conflicts:
	pkgs/applications/audio/espeak/default.nix
	pkgs/applications/audio/espeak/edit.nix
	pkgs/applications/editors/emacs-modes/metaweblog/default.nix
	pkgs/applications/editors/emacs-modes/proofgeneral/default.nix
	pkgs/applications/editors/sublime3/default.nix
	pkgs/applications/graphics/potrace/default.nix
	pkgs/applications/science/electronics/tkgate/2.x.nix
	pkgs/desktops/gnome-3/3.10/core/folks/default.nix
	pkgs/desktops/gnome-3/3.10/misc/goffice/default.nix
	pkgs/desktops/gnome-3/3.12/core/evince/default.nix
	pkgs/desktops/gnome-3/3.12/core/vte/default.nix
	pkgs/development/compilers/jdk/jdk7-linux.nix
	pkgs/development/compilers/opendylan/bin.nix
	pkgs/development/compilers/opendylan/default.nix
	pkgs/development/libraries/clutter/1.18.nix
	pkgs/development/libraries/gsl/default.nix
	pkgs/development/libraries/gstreamer/legacy/gstreamermm/default.nix
	pkgs/development/libraries/science/math/liblbfgs/default.nix
	pkgs/development/libraries/sword/default.nix
	pkgs/development/libraries/tbb/default.nix
	pkgs/development/ocaml-modules/lablgl/default.nix
	pkgs/games/crrcsim/default.nix
	pkgs/games/openxcom/default.nix
	pkgs/games/tibia/default.nix
	pkgs/os-specific/linux/disk-indicator/default.nix
	pkgs/os-specific/linux/keyutils/default.nix
	pkgs/os-specific/linux/usermount/default.nix
	pkgs/servers/mpd/clientlib.nix
	pkgs/servers/search/elasticsearch/default.nix
	pkgs/tools/misc/t1utils/default.nix
	pkgs/top-level/perl-packages.nix
	pkgs/top-level/python-packages-generated.nix
	pkgs/top-level/python-packages.nix
2014-08-14 22:00:30 +02:00
Austin Seipp
2abcf20f7b Merge pull request #2924 from doublec/tor_0_2_4_22
Update tor to 0.2.4.22 and tor browser to 3.6.2 (close #3136)
(cherry picked from commit cf4b0a1222)
2014-08-14 21:31:29 +02:00
Vladimír Čunát
8d413eb4a7 glibc: fix CVE-2014-0475 by upstream patches (close #3445)
https://sourceware.org/bugzilla/show_bug.cgi?id=17137
(cherry picked from commit 9253a95f6b)
2014-08-12 19:03:55 +02:00
Eelco Dolstra
351aec7002 Add a bunch of Hydra dependencies to the channel
(cherry picked from commit 688824cc60)
2014-08-11 20:33:07 +02:00
robberer
48c543c32f add nvidia-uvm module which is necessary for blender GPU support
(cherry picked from commit 9683c6e806)
2014-08-11 14:08:32 +02:00
Eelco Dolstra
1b117a59d2 nvidia-x11: Update to 340.24
(cherry picked from commit 6c0002ec8d)
2014-08-11 14:07:08 +02:00
Nikita Mikhailov
1ec17b2585 skype: 4.2.0.13 -> 4.3.0.37 2014-08-11 11:55:06 +02:00
Eelco Dolstra
f4eaaee52a debian: Update to 6.0.10
(cherry picked from commit 05e81e0d9f)
2014-08-10 15:17:19 +02:00
Eelco Dolstra
71e68bb52c tests/ipv6.nix: Fix race
http://hydra.nixos.org/build/13119647
(cherry picked from commit c7ca46904f)
2014-08-10 14:56:08 +02:00
Eelco Dolstra
e592a0e94b test-instrumentation.nix: Set an empty root password
This makes it easier to log in during interactive sessions.

(cherry picked from commit 2b9ea7fd90)
2014-08-10 14:38:30 +02:00
Eelco Dolstra
526be644a8 test-instrumentation.nix: Improve logging
In particular, don't clobber the serial console with duplicate output
from systemd and the journal, and increase the log level.

(cherry picked from commit eab25b104a)
2014-08-10 14:38:27 +02:00
Eelco Dolstra
11e57b88ee systemd: Use the default log target ("journal-or-kmsg")
This ensures that early systemd messages end up in the journal (via
the kmsg buffer).

(cherry picked from commit 0d3b3bd01b)
2014-08-10 14:38:17 +02:00
Cillian de Róiste
e6da853ad1 inkscape: add python to the PATH, fixes #3449
(cherry picked from commit d597651949)
2014-08-09 17:09:12 +02:00
Eelco Dolstra
9425114fbd debBuild: Allow setting the package name and overriding the install command
(cherry picked from commit 940eb8bfc1)
2014-08-08 14:17:12 +02:00
Peter Simons
dd1e64444d openssl: update to version 1.0.1i
See https://www.openssl.org/news/secadv_20140806.txt for a long list of CVE numbers.
Fixes <https://github.com/NixOS/nixpkgs/issues/3485>.

(cherry picked from commit 5c276c4f68)
2014-08-08 09:53:12 +02:00
Eelco Dolstra
857d14dbba openjdk: Update to 7u65-b32
(cherry picked from commit b4c971b14a)
2014-08-05 20:16:30 +02:00
Eelco Dolstra
71dce79daa openjdk: Set more informative version string
Also, disable full debug symbols. Don't know if this matters because
we're already stripping everything.

(cherry picked from commit 1b391e6bf9)
2014-08-05 20:16:30 +02:00
Eelco Dolstra
c3cce5d11f openjdk: Update to 7u60-b30
(cherry picked from commit 639f117ec4)
2014-08-05 20:16:30 +02:00
Eelco Dolstra
a8df3f1166 openjdk: Drop dependency on CUPS
We only need the CUPS headers, not the whole package.

(cherry picked from commit c4877df388)
2014-08-05 20:16:30 +02:00
Eelco Dolstra
3e4e106674 cacert: Update to 20140715
This is generated with a more recent version of mk-ca-bundle.pl. The
previous version mistakenly dropped some certificates, like "Verisign
Class 3 Public Primary Certification Authority".

(cherry picked from commit 6b67028383)
2014-08-05 10:45:59 +02:00
Eelco Dolstra
7f5d30572d nixUnstable: Update to 1.8pre3718_51485dc
(cherry picked from commit a9a4cdd3d0)
2014-08-04 14:09:25 +02:00
William A. Kennington III
a6cdb424ba kernel: 3.12.25 -> 3.12.26
(cherry picked from commit eb9ee180d9)
2014-08-04 14:02:42 +02:00
Lluís Batlle i Rossell
379116980f Update mumble to 1.2.7. 2014-08-01 16:56:44 +02:00
Lluís Batlle i Rossell
2def4e4b64 freecad: updating to 0.14
I had to update all the pyside programs, or freecad failed to build.  I picked
the versions advertised in http://qt-project.org/wiki/PySideDownloads . The
rest I took for github latest releases.
2014-08-01 16:56:44 +02:00
Eelco Dolstra
6593a986a9 Shut up a warning in stage 2
(cherry picked from commit 39a6750362)
2014-07-31 16:27:39 +02:00
Eelco Dolstra
8e338e3a0b Remove Subversion from the installation CD
(cherry picked from commit 5e96158234)
2014-07-31 16:27:34 +02:00
Eelco Dolstra
de12367e89 postgresql: Update to 9.0.18, 9.1.14, 9.2.9, 9.3.5
(cherry picked from commit e4e5502966)
2014-07-31 16:27:08 +02:00
Eelco Dolstra
937ee6c191 nixos/tests/containers.nix: Don't ping
This randomly fails with "Destination Host Unreachable". That
shouldn't happen, since all interfaces/routes should be up after
"nixos-container start" returns. Need more investigation...

(cherry picked from commit 19fc92a8ed)
2014-07-31 16:26:38 +02:00
Lluís Batlle i Rossell
3f95644a28 Setting retroshare 0.6 as lowPrio, it's unstable. 2014-07-31 10:14:23 +02:00
Vladimír Čunát
6077ef462e Merge #3400: kernel updates
(cherry picked from commit 33e4a7f623)
2014-07-30 20:47:59 +02:00
Eelco Dolstra
ca377078b2 Check for systemd environment variables that are too long
Issue #3403. For the case of $PATH being too long, we could call
buildEnv automatically.

(cherry picked from commit 9956b97b2f)
2014-07-30 10:52:43 +02:00
Eelco Dolstra
33afc8161e cacert: Update to 20140704
(cherry picked from commit b9c457ba12)
2014-07-30 10:52:43 +02:00
Eelco Dolstra
6de89bfa66 Fix evaluation
http://hydra.nixos.org/build/12958569
2014-07-30 10:19:13 +02:00
Petr Rockai
bee9b9c2d1 gnu: Fix (evaluation of the) call to forceSystem.
(cherry picked from commit 559f423417)
2014-07-29 15:30:25 +02:00
Petr Rockai
94e0149a18 pkgsi686Linux: Use 32b kernels (x86_64 kernels can't be built with 32b gcc).
(cherry picked from commit bde992bbbc)
2014-07-29 15:30:19 +02:00
Eelco Dolstra
e3cf157d15 firefox: Build without xulrunner
Fixes #2950.

(cherry picked from commit 5c5f115603)

Conflicts:
	pkgs/applications/networking/browsers/firefox/default.nix
	pkgs/top-level/all-packages.nix
	pkgs/top-level/release.nix
2014-07-29 15:16:59 +02:00
Eelco Dolstra
85a15ddfd7 Remove unused function
(cherry picked from commit ee3db692e6)
2014-07-28 20:32:39 +02:00
Eelco Dolstra
d1fddb2698 firefox: Update to 31.0
Also boldly re-enable parallel building.

(cherry picked from commit 21c7ed54e3)
2014-07-28 20:29:41 +02:00
Eelco Dolstra
2227e07345 nss: Update to 3.16.3
(cherry picked from commit ea0013a0d9)
2014-07-28 20:28:02 +02:00
Eelco Dolstra
085ef8f1b4 linux: Update to 3.12.25
(cherry picked from commit 0852d9e364)
2014-07-28 20:27:55 +02:00
Sebastian Korten
1d480b97ba at: upgrade to 3.1.14 - seems to solve problem with kernel 3.6
(cherry picked from commit e57249ab20)
2014-07-27 23:07:30 +02:00
Vladimir Kirillov
f6ad69a9d8 rsync: sha256 for the patch was updated
(cherry picked from commit 2dfb036a30)
2014-07-20 20:25:51 +02:00
Emery Hemingway
57f53ed84e rsyncd: default read/write permissions should be nobody:nogroup
(cherry picked from commit 265c489391)
2014-07-20 20:25:41 +02:00
Eelco Dolstra
6c4b4c146f Revert "go 1.3 and darwin support"
This reverts commit 6a89670576. It
breaks evaluation:

http://hydra.nixos.org/build/12580541
2014-07-18 00:25:40 +02:00
Eelco Dolstra
6ec5022ac6 Don't restart systemd-journal-flush
It only needs to be started during boot. Starting it at other times
shouldn't hurt, except that if systemd-journald is restarting at the
same time, the latter might not have a SIGUSR1 signal handler
installed yet, so it might be killed by systemd-journal-flush. (At
least that's my theory about the dead systemd-journald instances in
the build farm...)

(cherry picked from commit 1a1442db74)
2014-07-17 21:06:59 +02:00
Charles Strahan
6a89670576 go 1.3 and darwin support 2014-07-17 15:52:36 +02:00
Eelco Dolstra
735bfb9847 Don't mount /sys/fs/fuse/connections and /sys/kernel/config
These fail to mount if you don't have the appropriate kernel support,
and this confuses NixOps' ‘check’ command. We should teach NixOps not
to complain about non-essential mount points, but in the meantime it's
better to turn them off.

(cherry picked from commit 6eaced3582)
2014-07-14 22:48:33 +02:00
Eelco Dolstra
e5fe68dd34 Don't restart systemd-remount-fs
It's only needed during early boot (in fact, it's probably not needed
at all on NixOS). Restarting it is expensive because it does a sync()
of the root file system.

(cherry picked from commit 3b2609deec)
2014-07-14 14:40:15 +02:00
Eelco Dolstra
87d2fbb50a debian: Update to 7.6
(cherry picked from commit 1245ca3ff7)
2014-07-14 14:39:35 +02:00
Eelco Dolstra
6756ec27dd Fix info command
The "info" command has been broken on NixOS since
457fdb3842 (proving that nobody uses
info).

(cherry picked from commit 973c9abdbe)
2014-07-11 22:48:13 +02:00
Eelco Dolstra
7b19f22bb4 tzdata: Update to 2014e
(cherry picked from commit 0a11e40596)
2014-07-11 22:48:05 +02:00
Vladimír Čunát
a351ad3edd linux_*: update, including CVE-2014-4699 (most likely)
CC #3196. No updates yet on 3.2 and 3.12 branches.

(cherry picked from commit eb659e89b4)

Conflicts (some updates previously not backported before):
	pkgs/os-specific/linux/kernel/linux-3.10.nix
	pkgs/os-specific/linux/kernel/linux-3.14.nix
	pkgs/os-specific/linux/kernel/linux-3.15.nix
	pkgs/os-specific/linux/kernel/linux-3.4.nix
2014-07-09 22:58:45 +02:00
Lluís Batlle i Rossell
0f6f98755e Adding retroshare 0.6 (unstable) 2014-07-09 22:23:57 +02:00
aszlig
971b92057a nixos/log2html: Remove schema from jQuery URLs.
This allows viewing test logs for example when using a Hydra running
with HTTPS.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 622673495b)
2014-07-08 00:39:17 +02:00
Moritz Maxeiner
235cceac93 eclipse: add Eclipse Standard 4.4 Luna 2014-07-08 00:37:57 +02:00
Vladimír Čunát
99a7a9cd34 libxklavier: fix not finding xkbcomp (fixes #3173)
Also refactor the expression a bit,
and add description+license.

(cherry picked from commit 45ad922763)
2014-07-07 19:05:00 +02:00
Eelco Dolstra
ea433712c2 gperftools: Support Darwin
(cherry picked from commit 63aff93c9b)
2014-07-07 18:24:52 +02:00
Eelco Dolstra
93160b855e Manual: html -> xhtml
(cherry picked from commit 2737291b5d)
2014-07-07 18:23:41 +02:00
Eelco Dolstra
c920b9f9f7 linux: Update to 3.12.24
CVE-2014-4508, CVE-2014-0206.

(cherry picked from commit 1596c3a012)
2014-07-07 18:23:33 +02:00
Rob Vermaas
9c4ea0631e Upgrade rsyslog to latest (v7) stable release. Added liblogging (new dependency of rsyslog).
(cherry picked from commit 83e1ff846c)
2014-07-07 16:24:46 +02:00
Vladimír Čunát
67b4e3ff73 mariadb: switch to a working download URL
(cherry picked from commit 114b75ce97)
2014-07-04 13:35:58 +02:00
Domen Kožar
6c47697e72 Revert "Revert "python: 2.7.7 -> 2.7.8""
This reverts commit 7bd5fb33ee.

Fixed in next commit
2014-07-02 19:56:24 +02:00
Domen Kožar
a94ce55ddb python: link gcc_s 2014-07-02 19:55:57 +02:00
Rob Vermaas
7bd5fb33ee Revert "python: 2.7.7 -> 2.7.8"
This reverts commit 7bb5592d59.
2014-07-02 19:46:25 +02:00
Domen Kožar
7bb5592d59 python: 2.7.7 -> 2.7.8
Signed-off-by: Domen Kožar <domen@dev.si>
2014-07-02 18:46:00 +02:00
Lluís Batlle i Rossell
5179b515da sqlcipher: missing semicolon on nix syntax 2014-07-02 11:27:54 +02:00
Lluís Batlle i Rossell
d2cc427e6d Adding sqlcipher. 2014-07-02 11:21:19 +02:00
Rob Vermaas
a8f6601fc6 Merge pull request #3099 from Calrama/release-14.04
Fix network-manager-applet startup issue
2014-06-27 10:23:20 +02:00
Austin Seipp
713e7482f3 php: 5.4.27 -> 5.4.30
CVE-2014-3981, CVE-2014-0207, CVE-2014-3478, CVE-2014-3479,
CVE-2014-3480, CVE-2014-3487, CVE-2014-4049, CVE-2014-3515

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-06-27 00:26:49 -05:00
Vladimír Čunát
d0bd55da53 samba: security-only updates 2.6.22 -> .24
Fixes CVE-2014-{0244,3493} and CVE-2013-4496

(cherry picked from commit db1afc01d2)
2014-06-26 22:34:37 +02:00
Moritz Maxeiner
51dc1ddb7c Fix network-manager-applet startup issue 'GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.' 2014-06-26 19:41:43 +02:00
Vladimír Čunát
1c5a92c530 linux-3.13: remove, as it's vulnerable
CC #3090.

(cherry picked from commit 7998a598b6)
2014-06-26 13:10:26 +02:00
Vladimír Čunát
79b206e63f linux-*: pull version updates from master 2014-06-26 13:10:26 +02:00
Eelco Dolstra
9093b344ae Handle <nixpkgs> being a symlink
Fixes #1898.

(cherry picked from commit a7d31fe449)
2014-06-26 12:44:28 +02:00
Eelco Dolstra
c0121397f8 Fix generation of synergy-{client,server} when disabled
(cherry picked from commit 9ae3654fd6)
2014-06-26 12:44:15 +02:00
Eelco Dolstra
d62d4704de Don't suggest using --arg config '{ allowUnfree = true; }'
This doesn't work when using the Nixpkgs/NixOS channel.

Issue #2998.

(cherry picked from commit e5d63646a0)
2014-06-26 12:44:03 +02:00
Eelco Dolstra
a4060bbb98 winetricks: Update to 1199
(cherry picked from commit 429bdef9bd)
2014-06-26 12:44:03 +02:00
Vladimír Čunát
4076129dcb gnupg: security update 2.0.22 -> .24, CVE-2014-4617
Close #3091.

(cherry picked from commit 99da7b85cb)
2014-06-26 11:06:24 +02:00
Peter Simons
5ccfe62082 gnupg1: security update to version 1.4.17 (CVE-2014-4617)
(cherry picked from commit fd73d2b13b)
2014-06-26 11:00:29 +02:00
Rob Vermaas
03f1e336c7 Make openjre default jre on darwin, just like jdk.
(cherry picked from commit 00d9b5dfeb)
2014-06-25 14:19:21 +02:00
Rob Vermaas
73c4148685 Fix toolset argument to boost > 1.55 2014-06-25 12:50:13 +02:00
Daniel Zinn
3106853c1b Added cuda6 compiler as package cudatoolkit6.
(cherry picked from commit ca0de0f1f7)
(cherry picked from commit 01bbc61364)
2014-06-23 15:30:10 +02:00
Lluís Batlle i Rossell
231d76abe0 Making retroshare bootstrap the DHT fine. 2014-06-23 15:03:25 +02:00
Vladimír Čunát
c7e73e8436 xorg: add xkbprint
Suggested by @KoviRobi on ML.

(cherry picked from commit 3f15312b44)
2014-06-22 10:04:33 +02:00
Lluís Batlle i Rossell
c4245c8e7b retroshare: place plugins at proper place
Now they can be used.
2014-06-21 15:54:44 +02:00
Rob Vermaas
05543ef6e0 Change size of Amazon EC2 S3-backed images to 8GB (was 4GB). 2014-06-19 11:27:49 +02:00
Rob Vermaas
e007559e95 EC2: allow building S3-backed HVM ami's 2014-06-19 10:56:52 +02:00
Austin Seipp
5591fb606c duo-unix: upgrade, fix full name + version
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit fd4c2d893f)
2014-06-17 17:06:58 -05:00
Eelco Dolstra
e66d3953ae Revert "firefox: bump to 30.0."
This reverts commit 69852b1c64. Firefox
30.0 breaks restoring sessions (#2950).
2014-06-16 10:27:55 -04:00
Eelco Dolstra
acc00a7ee1 linux: Update to 3.12.22
Fixes CVE-2014-3153 (local privilege escalation via futex()).

(cherry picked from commit 27c72f337b)
2014-06-13 17:45:42 +02:00
James Cook
a4ad3b8127 nspr: update to 4.10.6
Required for Firefox 30.0.

(cherry picked from commit 4b55530bd2)
2014-06-13 17:37:46 +02:00
James Cook
69852b1c64 firefox: bump to 30.0.
(cherry picked from commit 2fec892959)
2014-06-13 17:37:32 +02:00
Rob Vermaas
dfcb042f67 elasticsearch: run preStart as root, to allow creating the necessary directories.
(cherry picked from commit 40566790d3)
2014-06-13 13:43:07 +02:00
Sönke Hahn
74859a88e5 better error message in case of missing uids
(cherry picked from commit 089b293019)
2014-06-12 22:23:01 +02:00
Vladimír Čunát
d22d14f878 fix licenCe typos 2014-06-12 09:09:39 +02:00
Vladimír Čunát
e6fe1e0e86 Revert "Update node packages." to fix tarball evaluation
The same was done on master in 8d8c761
This reverts commit 96d1ffd082.
2014-06-12 09:02:00 +02:00
Peter Simons
aedffc6b62 esniper: update to version 2.31.0
(cherry picked from commit 9b899d8600)
2014-06-11 12:05:29 +02:00
Rob Vermaas
9024912a53 Fix configuring httpd with custom user/group.
(cherry picked from commit 08f9da2e8e)
2014-06-11 10:21:45 +02:00
Rob Vermaas
764d0effa4 filezilla: update from 3.8.0 to 3.8.1, potentially fixes CVE-2013-4668
(cherry picked from commit 3d2091b9fa)

Conflicts:
	pkgs/applications/networking/ftp/filezilla/default.nix
2014-06-10 13:38:49 +02:00
Eelco Dolstra
368e66cd0b Revert "Merge #2692: Use pam_env to properly setup system-wide env"
This reverts commit b9c312fe27.
2014-06-10 13:07:57 +02:00
Vladimír Čunát
b9c312fe27 Merge #2692: Use pam_env to properly setup system-wide env
(cherry picked from commit 18a0cdd864)
2014-06-10 12:00:13 +02:00
Georges Dubus
f6f9e85e25 fish: Fixed tab completion with sudo (close #2705)
We don't have /sbin and /usr/sbin, so fish complains.

(cherry picked from commit 927c41e258)
2014-06-10 11:37:12 +02:00
Domen Kožar
b22f28b0e3 Merge pull request #2764 from nbp/rr
libpfm & rr: Add packages.
2014-06-09 23:15:54 +02:00
Rob Vermaas
96d1ffd082 Update node packages. 2014-06-09 19:55:34 +02:00
Peter Simons
b84584f5dc haskell-download-curl: jailbreak to fix build with recent versions of tagsoup
(cherry picked from commit 7c06d93c0f)
2014-06-09 10:09:15 +02:00
William A. Kennington III
276a5e3b88 kernel: 3.14.5 -> 3.14.6 (close #2868)
(cherry picked from commit d91eacd720)
2014-06-08 09:12:40 +02:00
Peter Simons
c0867734e4 spamassassin: download from any Apache mirror
(cherry picked from commit 5303c9077653e2cf897a93283915adffcada02ac)
2014-06-06 14:08:59 +02:00
Eelco Dolstra
0a8c8839df Stick to libav 9
Libav is generally not great about backwards compatibility, so it
should never get major updates on the release branch.

http://hydra.nixos.org/build/11732064
2014-06-06 13:38:05 +02:00
Domen Kožar
136d6771b5 openssl: 1.0.1g -> 1.0.1h
CVE-2014-0224
CVE-2014-0221
CVE-2014-0195
CVE-2014-0198
CVE-2010-5298
CVE-2014-3470
2014-06-05 14:33:39 +02:00
Eelco Dolstra
56cfab3831 Make pseudo-filesystems show up as "tmpfs" etc. rather than "none" in df
(cherry picked from commit 4269582078265c87b146012e83bdf5bba466d997)
2014-06-05 13:15:40 +02:00
Eelco Dolstra
2d3a73ae5c Remove illegal meta.src attributes
(cherry picked from commit 1da6a7d4a9)
2014-06-05 13:15:40 +02:00
Shea Levy
93c0f4a5f1 Fix /run/keys permissions
(cherry picked from commit 57ed344917)
2014-06-05 13:15:40 +02:00
Austin Seipp
2e8ce570e7 kernel/grsec: updates; add mainline package for brave souls
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit b43421221f)

Conflicts:
	pkgs/top-level/all-packages.nix
2014-06-05 06:14:33 -05:00
Austin Seipp
06d781bea3 mariadb: 10.0.10 -> 10.0.11
Also, enable the TokuDB plugin, as it now builds (there were some bugs
in the non-GA release that prevented that).

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 463ed1bb64)
2014-06-05 06:07:51 -05:00
Eelco Dolstra
0276eb144c linux: Update to 3.12.21
(cherry picked from commit 246edc3df2)
2014-06-05 06:07:42 -05:00
Vladimír Čunát
b3d9172470 libav: update 0.8.11 -> .12, 9.12 -> .13, introduce 10.1
(cherry picked from commit 77abe5e464)
2014-06-05 11:05:57 +02:00
William A. Kennington III
08b679e732 kernel: 3.14.4 -> 3.14.5 (close #2831)
(cherry picked from commit 3a0b265af9)
2014-06-05 10:46:06 +02:00
Domen Kožar
9fa93015c0 mailutils: disable tests 2014-06-04 16:19:09 +02:00
Domen Kožar
a088ed9fe5 python: 2.7.6 -> 2.7.7 2014-06-04 16:19:09 +02:00
Matej Cotman
cc492d6d0a pythonPackages.pyramid_tm: set doCheck to false
Signed-off-by: Domen Kožar <domen@dev.si>
2014-06-04 16:14:29 +02:00
Lennart Kats
d5e50145de Update Node.js to 0.10.28
(cherry picked from commit 3e3e9daafe)
2014-06-04 16:11:29 +02:00
Eelco Dolstra
802d2a8e54 qt-5: Don't build tests
Building the tests (which as far as I can tell we don't even run)
makes the build take > 19 GiB of disk space, which is a bit
excessive. Without the tests, it takes 2.6 GiB.

(cherry picked from commit 1cfea9bd1a)
2014-06-03 11:43:58 +02:00
Eelco Dolstra
b49d853a18 Manual: Note about using a local branch
(cherry picked from commit a8c9c11f9e)
2014-06-03 11:43:58 +02:00
Eelco Dolstra
94b3b435ca git: Update to 1.9.4
(cherry picked from commit 61befa0451)
2014-06-03 11:43:58 +02:00
Vladimír Čunát
45413771e8 gnutls: security + maintenance update for both branches
Fixes #2813 CVE-2014-3466. No API/ABI changes in the updates.

Tests start to fail for gnutls31, so they get disabled,
but the 3.1 branch is already unused on master.

(cherry picked from commit 191dbc234f)
2014-06-03 10:51:22 +02:00
Peter Simons
a4ac76b895 haskell-xmonad-contrib: update to version 0.11.3, fix CVE-2013-1436
The problem was for users of DynamicLog with status bars
like xmobar/dzen2, and allowed *websites* to inject commands into them.

(cherry picked from commit f9f19ee938)
2014-06-01 10:20:23 +02:00
Rob Vermaas
c029464778 Re-introduce (marked as obsolete) mkStrict function, to allow old nixops deployments to keep working.
(cherry picked from commit 90a7711e08)
2014-05-31 08:05:27 +02:00
Austin Seipp
80661f4dc2 Merge #2632: add biosdevname
(cherry picked from commit 832c1abc91)
2014-05-30 10:33:35 +02:00
Nicolas Pierron
67a5cd73a4 libpfm & rr: Add packages. 2014-05-26 14:35:10 -07:00
Luca Bruno
d8a6402373 Fix passing extra qemu opts when using boot loader
(cherry picked from commit b0234f216c)
2014-05-26 22:20:01 +02:00
宋文武
4e74129777 gst-plugins-base: update from 1.2.3 to 1.2.4 (in #2440)
(cherry picked from commit fead8862d6)
2014-05-26 19:34:20 +02:00
宋文武
798a989145 gst-plugins-bad: build with wildmidi and fluidsynth
remove timidity, the plugin does not build at all

(cherry picked from commit 388d32d966)
2014-05-26 19:34:20 +02:00
宋文武
3214a5f293 gstreamer: update from 1.2.3 to 1.2.4
(cherry picked from commit b57c9ed9d5)
2014-05-26 19:34:20 +02:00
宋文武
ba23a02094 gst-plugins-ugly: update from 1.2.3 to 1.2.4
(cherry picked from commit 69c4dae379)
2014-05-26 19:34:20 +02:00
宋文武
65f5c730df gst-plugins-good: update from 1.2.3 to 1.2.4
(cherry picked from commit cd5702da47)
2014-05-26 19:34:20 +02:00
宋文武
ca5061b125 gst-plugins-bad: update from 1.2.3 to 1.2.4
(cherry picked from commit 98dd37afad)
2014-05-26 19:34:20 +02:00
宋文武
a89bac9e4d gst-libav: update from 1.2.3 to 1.2.4
(cherry picked from commit 6324296900)
2014-05-26 19:34:19 +02:00
Linquize
979adb866c lvtk: Upgrade to 1.2.0 and switch to github tarball
(cherry picked from commit e6359b4048)
2014-05-26 16:56:01 +02:00
Charles Strahan
dc71acb8cd fix -G delimiter in call to useradd
Signed-off-by: Domen Kožar <domen@dev.si>
2014-05-26 09:27:35 +02:00
Bjørn Forsman
00312d90b9 nixos: add 'gvfs' when using GNOME3 desktop
One reason for adding this is to make Chromium able to open files it has
downloaded.

Currently this happens:
  /run/current-system/sw/bin/xdg-open: line 364: gnome-open: command not found

(And nothing happens in the GUI when clicking a downloaded file.)

Looking into xdg-open, one can see that it first tries to run gvfs-open
and then falls back to gnome-open. Adding 'gvfs' makes the first command
succeed.

(cherry picked from commit 15beb4054d)
2014-05-25 20:36:59 +02:00
Jaka Hudoklin
24edc80145 xca: fix package
For some reason library paths are not set at all for some libraries during
the build. Wrapper with LD_LIBRARY_PATH set for relevant libraries is currently
solution.

(cherry picked from commit 115b7313c5)
2014-05-25 14:35:01 +02:00
Bjørn Forsman
239043c826 munin: update 2.0.20 -> 2.0.21 (bug fix)
(cherry picked from commit 5e460b2dee)
2014-05-25 13:57:09 +02:00
Bjørn Forsman
e478101a9b srecord: update 1.62 -> 1.63
(cherry picked from commit e1d2e0d380)
2014-05-25 13:51:18 +02:00
Bjørn Forsman
8a29cd0b33 bcache-tools: update 1.0.5 -> 1.0.7
(cherry picked from commit ef66088ae1)
2014-05-25 13:18:39 +02:00
Cillian de Róiste
ea1952bff2 qtractor: update from 0.6.0 to 0.6.1
(cherry picked from commit b924959648)
2014-05-24 21:26:19 +02:00
Cillian de Róiste
01d67b7d59 ardour3: 3.5.357 -> 3.5.380 Critical bug fix release
(cherry picked from commit 94fd1a83bd)
2014-05-24 20:45:30 +02:00
Cillian de Róiste
d5a98173b4 synthv1: update from 0.4.1 to 0.4.2
(cherry picked from commit 056bd4fdba)
2014-05-24 20:45:15 +02:00
Cillian de Róiste
6045631acf samplv1: update from 0.4.1 to 0.4.2
(cherry picked from commit 2dc6eb3941)
2014-05-24 20:45:02 +02:00
Cillian de Róiste
9c4a974b5a drumkv1: update from 0.4.1 to 0.4.2
(cherry picked from commit 18df371fe3)
2014-05-24 20:44:54 +02:00
Vladimír Čunát
dfb9cc2d4c update lib/maintainers.nix from master 2014-05-24 13:46:07 +02:00
Charles Strahan
501c32aaf8 fix mkpasswd: use the git repository
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit e5eed8f664)
Note recently this was picked and reverted because of missing dependencies.
2014-05-24 13:42:18 +02:00
Vladimír Čunát
2937a30a32 mupdf: fix patch hash by fetchpatch
Thanks to @kirelagin for reporting on IRC.

(cherry picked from commit f77e2dcb38)
2014-05-24 13:42:18 +02:00
Vladimír Čunát
31f9fcf420 Merge #2630: add and use fetchpatch
fetchpatch is fetchurl that determinizes the patch.
Some parts of generated patches change from time to time, e.g. see #1983 and
http://comments.gmane.org/gmane.linux.distributions.nixos/12815
Using fetchpatch should prevent the hash from changing.

(cherry picked from commit 137eae0b55)

Conflicts (simple, patchutils version from master):
	pkgs/development/libraries/haskell/gitit/default.nix
	pkgs/tools/text/patchutils/default.nix
2014-05-24 13:42:18 +02:00
Vladimír Čunát
154e06c178 Add a utility function "fetchFromGitHub"
This is a small wrapper around fetchzip. It allows you to say:

  src = fetchFromGitHub {
    owner = "NixOS";
    repo = "nix";
    rev = "924e19341a5ee488634bc9ce1ea9758ac496afc3"; # or a tag
    sha256 = "1ld1jc26wy0smkg63chvdzsppfw6zy1ykf3mmc50hkx397wcbl09";
  };

Conflicts (simple):
    pkgs/tools/networking/dd-agent/default.nix

This is a squashed cherry jam:
    ebd8573046
    6aeb59bbe0
    ea36f3b868
2014-05-24 13:39:45 +02:00
Eelco Dolstra
39e7705f50 Add a function "fetchzip"
This function downloads and unpacks a file in one fixed-output
derivation. This is primarily useful for dynamically generated zip
files, such as GitHub's /archive URLs, where the unpacked content of
the zip file doesn't change, but the zip file itself may (e.g. due to
minor changes in the compression algorithm, or changes in timestamps).

Fetchzip is implemented by extending fetchurl with a "postFetch" hook
that is executed after the file has been downloaded. This hook can
thus perform arbitrary checks or transformations on the downloaded
file.

(cherry picked from commit c8df888858)

Conflicts (using fetchzip now):
	pkgs/tools/networking/dd-agent/default.nix
2014-05-24 13:11:02 +02:00
Peter Simons
dc1a196287 esniper: update to version 2.30.0
(cherry picked from commit 95aa6a9afa)
2014-05-23 21:57:07 +02:00
Eelco Dolstra
aa19ce936b Add type for fonts.fonts option
(cherry picked from commit 58226a7b06)
2014-05-23 10:56:54 +02:00
Eelco Dolstra
6fe0fead28 nvidia-x11: Update to 331.79
(cherry picked from commit 5ec3a63fcb)
2014-05-23 10:56:54 +02:00
Ricardo M. Correia
fecc667e90 flashplayer: Update from 11.2.202.356 -> 11.2.202.359 2014-05-22 20:16:36 +02:00
Ricardo M. Correia
e07b9938d0 chromium: Update stable channel from 34.0.1847.116 -> 35.0.1916.114 2014-05-22 20:13:50 +02:00
Eelco Dolstra
d98716ded4 copy-tarballs.pl: Create base-32 symlinks
(cherry picked from commit b6569c8497)
2014-05-22 12:15:17 +02:00
Eelco Dolstra
acae580f9a gimp: Fix download URL
(cherry picked from commit 1e6c82825a)
2014-05-22 12:15:16 +02:00
Eelco Dolstra
f5de056bc8 openssh: Fix broken URL
(cherry picked from commit 9b6eeecbde)
2014-05-22 12:15:16 +02:00
Domen Kožar
51d3efed02 python: 3.4.0 -> 3.4.1 2014-05-22 09:06:13 +02:00
Rob Vermaas
044a24e58b Better support for HVM instances. Now the NixOS images can
be used on HVM instances without needing nixops. Previously
the grub setup was incorrect, so a plain 'nixos-rebuild switch'
and a reboot would result in a broken system.

Also added growing of the partition of the root disk in the initrd,
so you can run resize2fs after initial boot, without needing an
extra reboot. This is useful especially for nixops'
deployment.ec2.ebsInitialRootDiskSize option.
2014-05-21 16:31:52 +02:00
Rob Vermaas
c9763e20e5 Use HVM instance for EBS creator, guarantees everything is created in the correct zone. 2014-05-21 13:40:19 +02:00
Rob Vermaas
35c76d9173 Add option ec2.hvm, to set some boot configuration specific for EC2 HVM instances. 2014-05-21 10:55:49 +02:00
Eelco Dolstra
97d9d26a7b Revert "fix mkpasswd: use the git repository"
This reverts commit ce13d17856 since it
breaks evaluation:

in job ‘nixpkgs’:
anonymous function at /nix/store/f73d4b03nsmccb1w5b1qfgc7dpvx35gw-git-export/pkgs/tools/security/mkpasswd/default.nix:1:1 called without required argument `fetchFromGitHub', at /nix/store/f73d4b03nsmccb1w5b1qfgc7dpvx35gw-git-export/lib/customisation.nix:58:12
2014-05-21 10:46:48 +02:00
Charles Strahan
ce13d17856 fix mkpasswd: use the git repository
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit e5eed8f664)
2014-05-20 23:07:55 -05:00
Eelco Dolstra
9819094b89 Update Ubuntu Packages.bz2 hashes
(cherry picked from commit 139608dd34)
2014-05-20 13:39:37 +02:00
Eelco Dolstra
3abf903a5a Fix udev rule required by gpm
Backport: 14.04
(cherry picked from commit 097f9c7e57)
2014-05-20 13:11:03 +02:00
Eelco Dolstra
82ab2f6363 switch-to-configuration: Don't restart instances of user@.service
Restarting user@ instances is bad because it causes all user services
(such as ssh-agent.service) to be restarted. Maybe one day we can have
switch-to-configuration restart user units in a fine-grained way, but
for now we should just ignore user systemd instances.

Backport: 14.04
(cherry picked from commit bddd10d75c)
2014-05-20 11:14:37 +02:00
Eelco Dolstra
58312cab7c firefox: Update to 29.0.1
(cherry picked from commit 8b89cba9c6)
2014-05-19 21:50:16 +02:00
Eelco Dolstra
c071a4573c nss: Update to 3.16.1
(cherry picked from commit ec332f520c)
2014-05-19 21:50:16 +02:00
Eelco Dolstra
14695233ea nspr: Update to 4.10.5
(cherry picked from commit 0a3a90ed01)
2014-05-19 21:50:16 +02:00
Eelco Dolstra
eb6309c87f linux: Update to 3.12.20
(cherry picked from commit 2ee6c0c63e)
2014-05-19 21:50:15 +02:00
Rob Vermaas
06d38cd60a Fix slim evaluation. 2014-05-19 13:58:43 +02:00
Michael Raskin
ef3c59c5ec On my system OpenGL with bumblebee seems to require libudev in LD_LIBRARY_PATH. Fix that, fix bumblebee module loading and make the socket group configurable
(cherry picked from commit eef9a8ac2a)
2014-05-19 12:57:29 +02:00
Austin Seipp
1d24df4063 btsync: fix my stupidity
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-18 16:34:07 -05:00
Luis G. Torres
4dc6e22c21 eigen: upgrading version to 3.2.1
(cherry picked from commit ad1ce14a68)
2014-05-18 15:41:52 -05:00
Austin Seipp
bfff5e4475 fmod: 4.44.33 -> 4.44.34
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit d08395713b)
2014-05-18 15:41:29 -05:00
Austin Seipp
0884ff51ea btsync: 1.3.93 -> 1.3.94
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 7fbe238a49)
2014-05-18 15:41:25 -05:00
Austin Seipp
6de37e68e0 lockdep: 3.14.2 -> 3.14.4
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 0781563b46)
2014-05-18 15:41:21 -05:00
Austin Seipp
b3747fc9d5 jhc: Fix license
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit c166bd3e07)
2014-05-18 15:41:12 -05:00
Austin Seipp
2e22c13a35 jhc: 0.8.0 -> 0.8.1
Also, bootstrap the compiler with GHC 7.6.3 instead of 6.12.3.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 1651871250)
2014-05-18 15:41:06 -05:00
Benno Fünfstück
c739957979 virtualbox: update 4.3.10 -> 4.3.12
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 8b6300822b)
2014-05-18 15:40:57 -05:00
Vladimír Čunát
054eae1cc3 berlios.de probably shut down, replace it
The shutdown was announced years ago, only now it stopped working.

(cherry picked from commit 8e9ead8656)
2014-05-18 15:40:34 -05:00
Austin Seipp
e06e9e1105 cryptol: add a convenient clang/lss wrapper
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit f1dc681538)
2014-05-18 15:39:40 -05:00
John Wiegley
c49f640ed8 Add -Wno-error=deprecated-declarations for nginx, required to build on Darwin
(cherry picked from commit 622aa834b7)
2014-05-18 15:39:24 -05:00
Austin Seipp
d50ce3a21f grsec: updates
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit cb894d4fc3)
2014-05-18 15:38:49 -05:00
Austin Seipp
1b4a5c52b0 linux-3.{4,10}: update
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 3efdeef6a3)
2014-05-18 15:38:40 -05:00
Austin Seipp
e774419033 apparmor: 2.8.2 -> 2.8.3
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit f7123982c2)
2014-05-18 15:38:32 -05:00
Rob Vermaas
ecdb0f7867 Fix dogstatsd, needs procps in path. 2014-05-18 13:00:33 +02:00
Vladimír Čunát
18602b0656 Revert "mupdf: fix patch hash by fetchpatch"
We don't have fetchpatch on release yet,
and it depends on fetchurl changes not there yet...
I'll leave the patch unfixed ATM,
as people on release mostly get binaries anyway.

This reverts commit f73e7d33c2.
2014-05-18 12:11:08 +02:00
Vladimír Čunát
f73e7d33c2 mupdf: fix patch hash by fetchpatch
Thanks to @kirelagin for reporting on IRC.

(cherry picked from commit f77e2dcb38)
2014-05-17 12:24:07 +02:00
Vladimír Čunát
dad7523db2 xorg.libXfont: security update, CVE-2014-{0209,0210,0211}
For details see http://lists.x.org/archives/xorg-announce/2014-May/002431.html

(cherry picked from commit 832c661822)
2014-05-17 07:23:33 +02:00
Jordan Patterson
fab8b036f3 rxvt-unicode: update to 9.20, fixing CVE-2014-3121 (close #2649)
(cherry picked from commit 4b668bb554)
2014-05-15 20:58:07 +02:00
Vladimír Čunát
5b26870e18 Merge pull request #2634 from doublec/tor
Update Tor to 0.2.4.21 and tor-browser to 3.6.1
(cherry picked from commit cc9b8a8b6f)

Fixes #2657.
2014-05-15 20:49:57 +02:00
Linquize
1e02e79a16 git: Update to 1.9.3
(cherry picked from commit 10fa1bcf66)
2014-05-15 16:15:34 +02:00
Eelco Dolstra
028d2479dd linux-3.12: Apply patch for CVE-2014-0196
(cherry picked from commit 3d1d9bb7dd)
2014-05-15 15:28:30 +02:00
Lengyel Balázs
1a5ce29795 Changed URL to upstream, as the old URL was dead
(cherry picked from commit 5f025b6505)
2014-05-15 13:22:44 +02:00
Bjørn Forsman
530ad13c26 python-usbtmc: new package
This Python package supports the USBTMC instrument control protocol for
controlling instruments over USB.

http://alexforencich.com/wiki/en/python-usbtmc/start
(cherry picked from commit 77000f7af0)
2014-05-14 21:57:59 +02:00
Bjørn Forsman
106ff6fb37 python-pyusb: new package
PyUSB is a Python module that wraps libusb 1.0. (It can wrap other USB
libraries too, but I've hardcoded it for libusb as it seems the most
appropriate.)

(cherry picked from commit bc847600a9)
2014-05-14 21:57:59 +02:00
Rob Vermaas
feab8c784d Revert "Set console=ttyS0 for Amazon EC2 instances, as suggested by Amazon."
This reverts commit 78916e0257.
2014-05-14 11:12:55 +02:00
Vladimír Čunát
4d36234940 mesa: bugfix update 10.0.4 -> .5
Master is using 10.1.* already.
2014-05-13 21:09:32 +02:00
Linquize
4e87d1b90e codeblocks: new package 13.12 (close #2533)
@vcunat: minor refactoring.

(cherry picked from commits 977248ba15
  and 93e65a4d53)
2014-05-13 21:01:48 +02:00
Eelco Dolstra
a58455c024 linux: Update to 3.12.19
Backport: 14.04
(cherry picked from commit abbf643ae2)
2014-05-13 21:00:08 +02:00
Vladimír Čunát
7c5691ba70 linux: minor updates, probably often fixing CVE-2014-0196
(cherry picked from commit 9c8ee7a7e5)
2014-05-13 20:59:31 +02:00
Luca Bruno
2c3184a0ce shadow: Fix lastlog and faillog to find logs in /var/log
Fixes #2575 and closes #2586.

(cherry picked from commit 9e7e3978f9)
2014-05-13 20:59:10 +02:00
Vladimír Čunát
6acb503cba pidgin-sipe: fix build by updating
Also add platforms (linux).

(cherry picked from commit 08834b061c)
2014-05-13 20:57:22 +02:00
Vladimír Čunát
243fe226f5 nixos-generate-config.pl: add new PCI IDs for broadcom_sta
The last ID wasn't in official README,
but it was reported by third3ye on IRC.

(cherry picked from commit 2aa3580a5e)
2014-05-13 20:56:57 +02:00
Vladimír Čunát
c23360496c pam: upstream patch to fix CVE-2014-2583
(cherry picked from commit 07aaea85d4)
2014-05-13 20:56:40 +02:00
Vladimír Čunát
77cf3a8a70 json-c: update to 0.12, fixing CVE-2013-{6370,6371}
(cherry picked from commit d96f262166)
2014-05-13 20:56:33 +02:00
Vladimír Čunát
4e61a2ae87 libmms: bugfix update, including CVE-2014-2892
(cherry picked from commit 6faa50e11d)
2014-05-13 20:56:26 +02:00
Vladimír Čunát
2fd0d5bffb rsync: fix CVE-2014-2855 by upstream patch
(cherry picked from commit 8c918bdc2c)
2014-05-13 20:56:17 +02:00
Vladimír Čunát
5aad39e6da curl: minor update 7.35.0 -> 7.36.0, including CVE fixes
(cherry picked from commit 062e2567c9)
2014-05-13 20:56:08 +02:00
Eelco Dolstra
2c8f6e0679 Add nifskope
(cherry picked from commit 535de5e45a)
2014-05-13 13:30:21 +02:00
Eelco Dolstra
b2d29943fa nixos-generator-config: Don't emit a double / in bind mounts
(cherry picked from commit 4b7c606589)
2014-05-13 13:29:42 +02:00
Eelco Dolstra
5c3f2c1087 nixos-generate-config: Don't include /var/setuid-wrappers
(cherry picked from commit dc78ae327c)
2014-05-13 13:29:27 +02:00
Eelco Dolstra
7fba471dc2 Don't enable the NVIDIA driver by default because it's unfree
(cherry picked from commit 1bd8ced9c0)
2014-05-13 13:29:17 +02:00
Eelco Dolstra
9d0d374bd8 nixos-container: Ensure umask 022
Fixes #2585.

(cherry picked from commit 253bbb8e2b)
2014-05-13 13:28:51 +02:00
aszlig
9baa033f8d chromium: Allow config.chromium for PPAPI plugins.
This should make it easier to enable proprietary pepper API plugins
though nixpkgs config, so it can be easily installed using something
like:

nix-env -i chromium-stable

With something like:

{ chromium.enablePepperFlash = true; }

In ~/.nixpkgs/config.nix to enable pepper API based Flash and to avoid
the browser wrapper from Firefox entirely.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit c833d7ce16)
2014-05-12 23:35:05 +02:00
Austin Seipp
8d6688d866 nixos: overhaul datadog module
This overhauls the Datadog module a bit to be much more useful. In
particular, it adds support for nginx and postgresql monitoring
integrations to dd-agent. These have to exist in separate files under
/etc/dd-agent, so the module just exposes then as separate options. In
the future, more integrations could be added this way.

In the process of doing this, I also had to rename the dd-agent user to
datadog. Note the UIDs did not change, so this is strictly backwards
compatible. The reason for this is to make it easier to create a
'datadog' postgres user with access to pg_stats, as 'dd-agent' typically
isn't a valid username. This allows the out of the box configurations to
be used.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 368a677c97)
2014-05-12 16:59:58 +02:00
Vladimir Kirillov
4497554833 sysdig: support builds without the kernel module, add pkgs.sysdig attr
(cherry picked from commit 96903d5e48)
2014-05-12 09:37:31 -04:00
Vladimir Kirillov
e77c1cf891 luajit: support Darwin builds
(cherry picked from commit e5f7e4ec3c)
2014-05-12 09:37:21 -04:00
Vladimir Kirillov
8d3f066bc4 sysdig: update to 0.1.82
(cherry picked from commit 96373a4041)
2014-05-12 09:37:12 -04:00
Rob Vermaas
78916e0257 Set console=ttyS0 for Amazon EC2 instances, as suggested by Amazon.
(cherry picked from commit 7d3dcd9a8c)
2014-05-12 12:29:49 +02:00
Bjørn Forsman
2c176a2a6e virt-manager: add missing gsettings schema
Without this it'll complain and abort when clicking "Take Screenshot" or
"Browse Local" when creating a new VM and looking for an CD-ROM image to boot
from:

GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed

(cherry picked from commit cb7c920e24)
2014-05-11 01:04:16 +02:00
Rickard Nilsson
888af166ca When auto-formatting ext devices, use the -F flag to make it work with unpartioned disks
(cherry picked from commit b87b6870f8)
2014-05-09 11:05:50 -04:00
Vladimir Kirillov
7bc02074b1 sysdig: update to 0.1.81
(cherry picked from commit bf9612e797)
2014-05-09 11:05:44 -04:00
Rob Vermaas
9bb943b14d Upgrade rtmpdump and get_iplayer
(cherry picked from commit a76350337894f7f8d8945da1f35341a6bc2fd81a)
2014-05-07 20:57:15 +02:00
Rob Vermaas
a5a5a87f2e USe maven.test.skip in stead of maven.test.skip.exec in mvn assembly, to prevent unnecessary compilation.
(cherry picked from commit 7cd55c7744)
2014-05-07 16:37:59 +02:00
Shea Levy
17d074d0b5 Add phpPackages.xdebug
Partial backport of 16e7ae3b10
2014-05-07 09:35:07 -04:00
Eelco Dolstra
53f82b134b libav: Disable tests
These appear to fail randomly sometimes:

http://hydra.nixos.org/build/10854615
(cherry picked from commit 255a6a9da8)
2014-05-07 14:03:55 +02:00
aszlig
62f157e5f4 vm/windows: Wait for migration to finish.
This ensures that the intermediate machine is shut down only after the
migration has finished writing the memory dump to disk, to ensure we
don't end up with empty state files depending on how fast the migration
finished before we actually shut down the VM.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 97dc8a88e5)
2014-05-07 07:22:49 +02:00
aszlig
648edae309 vm/windows: Exit if VM has dropped out.
This ensures that the builder isn't waiting forever if the Windows VM
drops dead while we're waiting for the controller VM to signal that a
particular command has been executed on the Windows VM. It won't ever
happen in such cases so it doesn't make sense to wait for the timeout.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit bd78e674c5)
2014-05-07 07:22:49 +02:00
aszlig
82d96b5a18 Revert "vm/windows: Exit if VM has dropped out".
This reverts commit 457f2c2835.

Damn, this commit wasn't supposed to hit the stable branch yet, and I
accidentally pushed this because I was in the wrong working dir. It
doesn't break anything but fixes nothing, that's why I'm reverting until
the proper fix is ready and tested.

Sorry everyone for the noise X-/

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-05-07 03:55:49 +02:00
aszlig
457f2c2835 vm/windows: Exit if VM has dropped out.
This ensures that the builder isn't waiting forever if the Windows VM
drops dead while we're waiting for the controller VM to signal that a
particular command has been executed on the Windows VM. It won't ever
happen in such cases so it doesn't make sense to wait for the timeout.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-05-07 03:29:02 +02:00
Austin Seipp
314952cdc8 build-support/vm: add Ubuntu 14.04 Trusty Tahir
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 2be1b4c034)
2014-05-06 17:02:10 +02:00
Vladimir Kirillov
d719c77dd0 buildLocalCabal: allow cabalDrvArgs in buildLocalCabalWithArgs
allows to write neat expressions like (as we're still generating an
expression string):

```
{
  build = haskellPackages.buildLocalCabalWithArgs {
    inherit src name;
    cabalDrvArgs = {
      jailbreak = false;
      doCheck = false;
    };
  };
}
```

without resorting to weird kung-fu like darcs does:

```
darcs = haskellPackages.darcs.override {
  # A variant of the Darcs derivation that containts only the
  # executable and
  # thus has no dependencies on other Haskell packages.
  cabal = { mkDerivation = x: rec { final = haskellPackages.cabal.mkDerivation (self: (x final) // {
            isLibrary = false;
            configureFlags = "-f-library"; }); }.final;
          };
};
```

While here, move the `jailbreak = true;` as the default `cabalDrvArgs`
option.

(cherry picked from commit 7eff825487)
2014-05-06 09:28:54 -04:00
Rob Vermaas
3d992546f9 Force --no-same-owner for unpacking node sources.
(cherry picked from commit b116679b24)
2014-05-06 14:58:26 +02:00
Bjørn Forsman
03cc78bbde eclipse: add Eclipse IDE for C/C++ Developers 4.3.2
(cherry picked from commit d2587a014f)
2014-05-05 22:43:09 +02:00
aszlig
3a76854aad chromium/source: Propagate system attribute.
The system attribute was already there in the function head of the
shared update helper but it actually wasn't used and thus later the
import of <nixpkgs> was done using builtins.currentSystem instead of the
system attribute inherited from the source derivation.

Now we correctly propagate the attribute, so that even when running a
64bit kernel you can run a 32bit Chromium with binary plugins.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 4f3085d5f8)
2014-05-05 20:47:43 +02:00
aszlig
00af817900 chromium: Link against pulse instead of dlopen().
This fixes the issue of Chromium not being able to load the pulseaudio
librarp

We could also propagate the build inputs, but it would end up being the
same as just directoly linking against the library.

Thanks to @aristidb for noticing this in #2421:

https://github.com/NixOS/nixpkgs/pull/2421#issuecomment-42113656

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 17807c8b6c)
2014-05-05 20:47:43 +02:00
Eelco Dolstra
c3bc254628 Don't run hwclock if /dev/rtc doesn't exist
E.g. on EC2 instances.

Backport: 14.04
(cherry picked from commit 5bfe944907)
2014-05-05 16:52:12 +02:00
Eelco Dolstra
1f07b94d39 systemd-journal-flush: Require /var/log/journal rather than all filesystems
Backport: 14.04
(cherry picked from commit 24cbe874d6)
2014-05-05 16:52:12 +02:00
Eelco Dolstra
ccf34c6d99 Don't start getty@tty1 on headless machines (like EC2)
Backport: 14.04
(cherry picked from commit 4a08f37206)
2014-05-05 16:52:12 +02:00
Eelco Dolstra
9642d4158b sysinit.target: Don't depend on systemd-tmpfiles-setup.service
systemd-tmpfiles-setup.service pulls in local-fs.target, which
interferes with NixOps' send-keys feature (since sshd.service depends
indirectly on sysinit.target). Since in NixOS we don't use
systemd-tmpfiles for creating files (that's done by activation scripts
and preStart scripts), it's not a problem to start it a bit later.

Backport: 14.04
(cherry picked from commit 014fe1a3c3)
2014-05-05 16:52:12 +02:00
Eelco Dolstra
a8d06d2ea1 switch-to-configuration: Honour RefuseManualStop
This prevents spurious errors about systemd-tmpfiles-setup.service.

Backport: 14.04
(cherry picked from commit bac68f9747)
2014-05-05 16:52:12 +02:00
Rob Vermaas
eb22292305 Fix users.*.extraGroups for users.mutableUsers = true. 2014-05-05 15:34:50 +02:00
Vladimir Kirillov
ccd3b3397e buildLocalCabal: include cabalInstall to buildDepends to preserve developer experience
(cherry picked from commit 9aa231abfa)
2014-05-05 09:13:13 -04:00
Eelco Dolstra
41895eabb9 systemd: Look for fsck.* in the right place
Fixes #2464.

(cherry picked from commit cb45ecad34)
2014-05-05 14:01:50 +02:00
Bjørn Forsman
6db3164d1f qwt: add version 6.x (we already have 5.x)
'qgis', one of the few 'qwt' dependees in nixpkgs, fails to build with
qwt 6. So I'm not moving the default version away from 5.x. Also, not
changing the default allows easy/safe cherry-picking to the stable
branch.

(cherry picked from commit 70b39119c3)
2014-05-04 00:12:42 +02:00
Cillian de Róiste
5250ce3e89 aubio: update from 0.4.0 to 0.4.1
(cherry picked from commit f3e0a29338)
2014-05-03 17:13:45 +02:00
Cillian de Róiste
0a18a7b5b7 darktable: update from 1.4.1 to 1.4.2
(cherry picked from commit 849f6788ac)
2014-05-03 16:59:42 +02:00
Austin Seipp
430a2bf52f clang-analyzer: respect $NIX_CFLAGS_COMPILE
When using scan-build, you're often going to want to use it in the
context of a Nix expression with buildInputs, and the default wrapper
scripts will put things like include locations for those inputs
$NIX_CFLAGS_COMPILE. Thus, scan-build also needs to pass them to the
analyzer - while the link flags aren't relevant, the include flags are.

This is because the analyzer executable that gets run by scan-build is
*not* clang-wrapper, but the actual clang executable, so it doesn't
implicitly add such arguments. The build is two-stage - it runs the real
clang wrapper once, and then the analyzer once.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 59528d9f0e)
2014-05-03 09:56:48 -05:00
Austin Seipp
5de4e94028 btsync: Default to no login/password for the Web UI
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit b553d11616)
2014-05-03 09:56:27 -05:00
Benno Fünfstück
75441a5abb Fix whitespace
(cherry picked from commit 9d15c568d8)
2014-05-03 16:02:24 +02:00
Benno Fünfstück
33587cd7ba jdk7: update patchversion 51 -> 55.
(cherry picked from commit a2de61e2b6)
2014-05-03 16:02:24 +02:00
Domen Kožar
6a0c87ccfe s/config.allowUnfree = true/allowUnfree = true/ 2014-05-03 15:13:26 +02:00
taku0
2764a05d4e Update thunderbird-bin to version 24.5.0 2014-05-02 21:25:15 +02:00
Eelco Dolstra
02b056c5b1 debian: Update to 7.5
(cherry picked from commit 1ab9f0a1c1f66a6d92b1a244192bae96c7afc0f0)
2014-05-02 15:14:25 +02:00
Luca Bruno
e6f4bdb1bb Added gnome 3.10 to the release notes
(cherry picked from commit ea1a9445bb)
2014-05-02 15:14:25 +02:00
Austin Seipp
6f8ee84cc9 btsync: remove unneeded assertion
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 8946e91fad)
2014-05-01 17:02:13 -05:00
Domen Kožar
b89c5378d0 pypy: disable sqlite3 tests (failing due to sqlite bump) 2014-05-01 18:38:28 +02:00
Shea Levy
84308245e8 Fix description to match convention
(cherry picked from commit da4adc2a4f)
2014-05-01 11:46:52 -04:00
Shea Levy
c476f4a237 Add enum option type
(cherry picked from commit ab2cd34076)
2014-05-01 11:30:28 -04:00
Shea Levy
ccea12cba2 grub: Allow setting the boot root explicitly
If /boot is a btrfs subvolume, it will be on a different device than /
but not be at the root from grub's perspective. This should be fixed in
a nicer way by #2449, but that can't go into 14.04.

(cherry picked from commit e4630c1d41)
2014-05-01 10:58:03 -04:00
Emery Hemingway
4cbc48f236 qtbitcointrader: initial expression 2014-05-01 15:54:54 +02:00
Eelco Dolstra
21e8cfac80 Shorten the version string
As suggested by Bjørn Forsman, use the number of commits in the
release branch.
2014-05-01 15:27:30 +02:00
Eelco Dolstra
b8564f7bb0 Mark builds from git explicitly
(cherry picked from commit 0b091e1286)
2014-05-01 15:27:30 +02:00
Eelco Dolstra
ff8ce29764 release.nix: Drop officialRelease flag
(cherry picked from commit 3b616e378a)
2014-05-01 15:27:30 +02:00
Eelco Dolstra
0711574c29 postgresql: Update to latest versions
(cherry picked from commit a986bbf4ba)
2014-05-01 15:27:30 +02:00
Rob Vermaas
9d9c797d75 Add RHEL7 to vm functions.
(cherry picked from commit cecd000fdb0c37b38e8b9fdfaed9eddb33b813cf)
2014-05-01 15:14:03 +02:00
Peter Simons
fcdf7e80ab gtk-gnutella: mark as "broken"
The current version doesn't compile with the latest GCC any more.

(cherry picked from commit 3c08cdce48)
2014-05-01 11:51:45 +02:00
Eelco Dolstra
5ceef8d2b1 httpd: Update to 2.2.27
CVE-2013-6438, CVE-2014-0098

(cherry picked from commit 65a78e16f1)
2014-05-01 11:51:26 +02:00
Eelco Dolstra
3cc279966d php: Update to 5.4.27
CVE-2013-7345, CVE-2014-1943, CVE-2014-2270, CVE-2013-6712

(cherry picked from commit ba332accc2)
2014-05-01 11:51:26 +02:00
Eelco Dolstra
faf51667ea Fix meta.license attribute
(cherry picked from commit 6c69ad3a97)
2014-05-01 11:51:26 +02:00
Eelco Dolstra
6d27026353 Remove mysterious line
(cherry picked from commit 4de6357776)
2014-05-01 11:51:26 +02:00
Eelco Dolstra
54a7d1d23e Disable the rabbitmq test
It frequently gets stuck in an infinite loop, delaying releases for
many hours.

(cherry picked from commit c9ebb42573)
2014-04-30 23:26:11 +02:00
Eelco Dolstra
9f4d06adae Set release date
(cherry picked from commit 0ea20bef3c)
2014-04-30 23:26:07 +02:00
Eelco Dolstra
24214d8517 chatzilla: Update to 0.9.90.1
Also, make it work with recent Firefoxes.

(cherry picked from commit 8f5ebe495c)
2014-04-30 17:03:45 +02:00
Linquize
42b9f99db1 chatzilla: Use latest firefox's xulrunner
(cherry picked from commit 20c395d8aa)
2014-04-30 16:49:22 +02:00
Eelco Dolstra
42bf7ca3e1 Don't make the EFI tests release-critical
They're failing on i686: http://hydra.nixos.org/build/10712961

(cherry picked from commit a96f4920d5)
2014-04-30 16:49:08 +02:00
Eelco Dolstra
48f3bb944e Punctuation
(cherry picked from commit 1d8f7e63b0)
2014-04-30 16:45:08 +02:00
Eelco Dolstra
e3be224207 Handle Zabbix agent and server both being enabled
This gave an error about the zabbix user uid being defined multiple
times.

(cherry picked from commit 05decd49ff)
2014-04-30 16:45:05 +02:00
Eelco Dolstra
13ce9bc60f flashplayer: Update to 11.2.202.356
CVE-2014-0515

(cherry picked from commit 0ac20f0726)
2014-04-30 16:45:03 +02:00
Eelco Dolstra
568930ca3e Fix the simple installer test
http://hydra.nixos.org/build/10712818
(cherry picked from commit 27d47f3983)
2014-04-30 16:44:59 +02:00
Eelco Dolstra
ff2bd64a4c Installer test: Unmount filesystems after installation
Hopefully fixes failures like:

  http://hydra.nixos.org/build/10712833

This shouldn't be necessary, but it might be that the use of unionfs
is interfering with a clean shutdown.

(cherry picked from commit 437962ebb2)
2014-04-30 16:44:54 +02:00
Eelco Dolstra
f9cb9a67ab systemd: Require some more kernel features
(cherry picked from commit 728d3476ba)
2014-04-30 16:44:51 +02:00
Eelco Dolstra
7b1401ba29 gummiboot: Automatically disable GRUB
(cherry picked from commit 9bb209a3bd)
2014-04-30 16:44:47 +02:00
Eelco Dolstra
958fc5076f Merge the EFI test into tests/installer.nix
(cherry picked from commit e9be441b62)
2014-04-30 16:44:44 +02:00
Eelco Dolstra
9cafa3c615 nixos-generate-config: Use systemd-detect-virt instead of dmidecode
Dmidecode fails in our EFI test with the error "SMBIOS entry point
missing". But we don't need dmidecode because we have already have
systemd-detect-virt.

(cherry picked from commit 8c75ae3838)
2014-04-30 16:44:40 +02:00
Eelco Dolstra
a21155609e Remove obsolete zsh help text
(cherry picked from commit 956f464fff)
2014-04-30 16:44:37 +02:00
Eelco Dolstra
5a6090529f Installer test: Remove fileSystems argument
The config function unintentionally ignored its fileSystems
argument. However, things still worked thanks to the magic of
nixos-generate-config. Yay!

(cherry picked from commit 077ecf43e5)
2014-04-30 16:44:32 +02:00
Mihaly Barasz
4df0681dfe tzdata: use symlinks instead of hardlinks
Hard links are not handled by nar, so installing from binary cache
unnecessarily duplicates data. Also, it's more common to use symlinks for the
tzdata package in other distributions.

(cherry picked from commit 1f2228cdc1)
2014-04-30 16:43:58 +02:00
Eelco Dolstra
5619db6872 tzdata: Update to 2014b
(cherry picked from commit dc224baba1)
2014-04-30 16:43:58 +02:00
Mihaly Barasz
4829a4d14c tzdata: fix 'posix' symlink
(cherry picked from commit c2c90bf2bb)
2014-04-30 16:43:58 +02:00
Domen Kozar
65aed4c96f modernize nixos-generate-config
(cherry picked from commit 88a8ec37d3)
2014-04-30 10:25:17 -04:00
Shea Levy
b8d1205fdc Actually use services.mysql.port
Fixes #1315

(cherry picked from commit 26d03000c2)
2014-04-30 10:23:30 -04:00
Rob Vermaas
b20e64b32b Update nixops 1.1.1 to 1.2.
(cherry picked from commit fed7a43020)
2014-04-30 11:15:59 +02:00
Eelco Dolstra
387237fcb8 Remove the option ‘programs.bash.enable’
NixOS has a pervasive dependency on bash. For instance, the X11
session script sources /etc/profile to get a reasonable
environment. Thus we should not provide an option to disable bash.

Also, enabling zsh no longer sets ‘users.defaultUserShell’ to zsh, to
prevent a collision with bash's definition of the same
option. (Changing the default shell is also something that should be
left to the user.)

(cherry picked from commit 90dac235bb)
2014-04-30 08:45:40 +02:00
Eelco Dolstra
6bb78819c0 firefox: Update to 29.0
(cherry picked from commit 1235f693ee)
2014-04-30 08:45:40 +02:00
Austin Seipp
84ab83d261 nixpkgs: clang-analyzer 3.4
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 3c3256e4a8)
2014-04-29 19:37:07 -05:00
Austin Seipp
31bf76e3e2 cryptol: Replace URLs with something meaningful
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 52514efb16)
2014-04-29 17:54:53 -05:00
Austin Seipp
094fc34810 cryptol: add 1.8.x expression
This also includes support for the verification tools I'm using. Cryptol
2 is still the default obviously.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit d9d76f1a3a)
2014-04-29 17:51:46 -05:00
Austin Seipp
68744afca3 nixpkgs: cov-build 7.0.2
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 1d3b5874ad)
2014-04-29 16:01:40 -05:00
Jaka Hudoklin
066855bc88 nodejs: fix on i686-linux
Fixes this:

  creating  ./config.gypi
  creating  ./config.mk
  building
  make flags: SHELL=/nix/store/fp0nwhj932kscakw1gbnlmmk8pdfv9sq-bash-4.2-p45/bin/bash
  building out/Makefile
  /nix/store/vh2zy8l2797yl3mri35y8jnhc81w9hm1-python-2.7.6/bin/python tools/gyp_node.py -f make
  /bin/sh: which: command not found
  gyp: Call to '(echo | $(echo ${CXX_host:-$(which g++)}) -m32 -E - > /dev/null 2>&1) && echo "-m32" || true' returned exit status 0.
  make: *** [out/Makefile] Error 1

[Bjørn: add build error to commit message.]

(cherry picked from commit cbfbd01cd7)
2014-04-29 22:33:29 +02:00
Thomas Tuegel
ba3b38d73f qvim: add lua support
(cherry picked from commit 7896a84849)
2014-04-29 22:25:37 +02:00
Jaka Hudoklin
20f79ee906 rabbitmq_server: enable builds on darwin
(cherry picked from commit ca3c2b7b2a)
2014-04-29 22:09:50 +02:00
Jaka Hudoklin
d9e69e3136 erlang: enable and fix builds on darwin
(cherry picked from commit ab53d469f8)
2014-04-29 22:09:47 +02:00
Bjørn Forsman
a2ebf3a767 xfce: fix typo introduced in recent commit (s/gtk/gtk3/)
Fix typo introduced in commit 0b2dd3a12f
(Xfce: Don't depend on GTK+ 3 by default).

(cherry picked from commit b802924af1)
2014-04-29 19:16:01 +02:00
Austin Seipp
10ef32c08d spark: 0.9.0 -> 0.9.1
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit c8f82b4ee8)
2014-04-29 10:34:51 -05:00
Eelco Dolstra
86e1778409 Disable autofs module
It appears to be unmaintained and untested. Also, systemd provides
automount functionality so it's probably not needed anymore.

(cherry picked from commit bfc524664a)
2014-04-29 16:04:35 +02:00
Eelco Dolstra
f7cdc5d5fe Add a test for automounting
(cherry picked from commit 501d532188)
2014-04-29 16:04:32 +02:00
Eelco Dolstra
64fd7e5757 Xfce: Don't depend on GTK+ 3 by default
Given that Xfce is intended as a light-weight desktop environment,
pulling in two versions of GTK+ by default is not ideal.

(cherry picked from commit 0b2dd3a12f)
2014-04-29 16:04:27 +02:00
Eelco Dolstra
7392915ddc Move the NVIDIA support into its own module
Previously all card-specific stuff was scattered across xserver.nix
and opengl.nix, which is ugly. Now it can be kept together in a single
card-specific module. This required the addition of a few internal
options:

- services.xserver.drivers: A list of { name, driverName, modules,
  libPath } sets.

- hardware.opengl.package: The OpenGL implementation. Note that there
  can be only one OpenGL implementation at a time in a system
  configuration (i.e. no dynamic detection).

- hardware.opengl.package32: The 32-bit OpenGL implementation.

(cherry picked from commit 02cef04c81)
2014-04-29 16:04:23 +02:00
Eelco Dolstra
11c5154b47 Rename hardware.opengl.videoDrivers back to services.xserver.videoDrivers
Fixes #2379.
The new name was a misnomer because the values really are X11 video
drivers (e.g. ‘cirrus’ or ‘nvidia’), not OpenGL implementations. That
it's also used to set an OpenGL implementation for kmscon is just
confusing overloading.

(cherry picked from commit 3fe96bcca1)
2014-04-29 16:04:18 +02:00
Eelco Dolstra
ca0d0f83ca Obsolete fonts.extraFonts
You can now just set fonts.fonts, which will be merged with the
default value unless you use mkOverride.

(cherry picked from commit e6b5c0121f)
2014-04-29 16:04:14 +02:00
Eelco Dolstra
b72398906f Shut up warning about missing fonts.dtd
(cherry picked from commit 5ae8ed381c)
2014-04-29 16:04:10 +02:00
Eelco Dolstra
00c45fb8ba Remove redundant ~/.fonts element from the font search path
(cherry picked from commit d6c2dcd98c)
2014-04-29 16:04:05 +02:00
Kirill Elagin
a2d659a4e6 Let users install fonts to their HOME directory
(cherry picked from commit 8dc287b88c)
2014-04-29 16:04:01 +02:00
William A. Kennington III
fcc00bd0b5 nixos: Add support for changing supported systems
release.nix and release-combined.nix current hardcode the systems which
they are built for. This change introduces an argument to the
expressions called supportedSystems, which allows the builder to choose
which architectures he wants to build. By default, this uses the same
linux x86_64 and i686 architectures.

(cherry picked from commit 936481a12e)
2014-04-29 16:03:55 +02:00
Eelco Dolstra
3f4e115444 Fix some uid/gid attributes to match the actual user/group name
(cherry picked from commit a142d68b43)
2014-04-29 16:03:50 +02:00
Eelco Dolstra
ef4d792827 Allocate system uids/gids between 400 and 500
Previously it was between 100 and 500, but this can already collide
with the static uids/guid in misc/ids.nix.

(cherry picked from commit 0e23a175de)
2014-04-29 16:03:45 +02:00
Eelco Dolstra
6f5fff79a8 Bring back the isSystemUser option
(cherry picked from commit 05468f9b78)
2014-04-29 16:03:41 +02:00
Eelco Dolstra
795de7faf5 Remove use of obsolete flags
(cherry picked from commit 2dfbe55421)
2014-04-29 16:03:37 +02:00
Vladimír Čunát
a88b0e4bc2 qt48: bugfix update 4.8.5 -> .6
Some patches dropped, as they seemed included.

(cherry picked from commit 920a734a15)
2014-04-29 16:03:29 +02:00
Eelco Dolstra
718faf3116 Add some packages to the channel
(cherry picked from commit 2ca913c509)
2014-04-29 16:03:18 +02:00
Eelco Dolstra
26e8a18ce7 polkit: Remove unnecessary restart
There already is a restart trigger that takes care of this.

(cherry picked from commit 4353220202)
2014-04-29 16:03:10 +02:00
Eelco Dolstra
97cb3ea472 wpa_supplicant: Restart when wlan devices (dis)appear
(cherry picked from commit cbfba813fe)
2014-04-29 10:09:10 +02:00
Eelco Dolstra
48234a5f3d cpufreq: Don't fail if the CPU doesn't support frequency setting
(cherry picked from commit f5cd4eef11)
2014-04-29 10:09:10 +02:00
Eelco Dolstra
08efdc72e6 gpm: Depend on /dev/input/mice
(cherry picked from commit 685ca50650)
2014-04-29 10:09:10 +02:00
Austin Seipp
abd636291f nixos: refactor tarsnap module
The Tarsnap module is now far more flexible, allowing individual
archives with individual options to be specified at will, allowing
granular backup schedules, etc.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 9242ed1fe2)
2014-04-28 18:17:56 -05:00
Austin Seipp
5b3a2abaa0 lockdep: 3.14 -> 3.14.2
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 7faaa9e6da)
2014-04-28 18:17:52 -05:00
Austin Seipp
63c27b367a minecraft-server: 1.7.5 -> 1.7.9
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit ec13d61cbf)
2014-04-28 18:17:48 -05:00
Austin Seipp
27261cc765 fmod: 4.44.32 -> 4.44.33
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit fec91fd092)
2014-04-28 15:28:29 -05:00
Austin Seipp
02d920f3c4 nixpkgs: verifast 13.11.14
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit aaa0304a45)
2014-04-28 15:28:29 -05:00
Rob Vermaas
9131402036 Fix EC2 creation script for latest nixops
(cherry picked from commit 361eb3a5f5)
(cherry picked from commit de1c182b0a)
2014-04-28 15:51:39 +02:00
Eelco Dolstra
aec0d8b0f5 apr: Update to 1.5.1
(cherry picked from commit 17336efdd8)
2014-04-28 15:51:39 +02:00
Eelco Dolstra
e874b13935 qemu: Apply patch for CVE-2014-0150, CVE-2014-2894
(cherry picked from commit 39faed1f2f)
2014-04-28 15:51:38 +02:00
Eelco Dolstra
b030f2bd8f Set the channel for this release 2014-04-28 15:50:36 +02:00
Eelco Dolstra
e1f2ba1f54 Bump some mentions of 13.10 2014-04-28 12:37:19 +02:00
Eelco Dolstra
e59a864a18 Update release notes 2014-04-28 12:13:16 +02:00
Eelco Dolstra
44e3b9e808 polkit: Restart using systemctl
The use of pkill is now particularly bad due to containers (it might
kill processes in containers).
2014-04-28 12:13:16 +02:00
Simon Hengel
e237476d64 Update haskell-base-compat to version 0.5.0
Closes #2431

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 62b883070b)
2014-04-28 04:58:42 -05:00
Simon Hengel
9dfbab0b52 Update haskell-http-kit to version 0.2.1
Closes #2430

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 692fc6fdc1)
2014-04-28 04:58:38 -05:00
Eelco Dolstra
673b2d1650 switch-to-configuration: Use old systemctl to stop units
Otherwise, when switching from systemd 203 to 212, you get errors like:

  Failed to stop remote-fs.target: Bad message
  Failed to stop systemd-udevd-control.socket: Bad message
  ...

(cherry picked from commit 56b4b841ae)
2014-04-28 09:20:50 +02:00
Eelco Dolstra
1417d2226f switch-to-configuration: Use systemctl's --no-legend flag
(cherry picked from commit 37e6e08cde)
2014-04-28 09:20:50 +02:00
Eelco Dolstra
b725dc2ed9 Give the KDE test more memory
(cherry picked from commit 7ddcd7b6b6)
2014-04-28 09:20:50 +02:00
Eelco Dolstra
b09da697d3 Make some tests release-critical
(cherry picked from commit 537c034e8f)
2014-04-28 09:20:49 +02:00
Eelco Dolstra
85c8b16fd4 Fix ‘nixos-container run’
By default, socat only waits 0.5s for the remote side to finish after
getting EOF on the local side. So don't close the local side, instead
wait for socat to exit when the remote side finishes.

http://hydra.nixos.org/build/10663282
(cherry picked from commit fec3b75e4b)
2014-04-28 09:20:49 +02:00
Austin Seipp
7644e30eb2 nixpkgs: remove cb1cat
Brice Minaud reported a simple attack on the CBEAM Pi permutation
function, resulting in it being withdrawn from CAESAR. :(

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 111e1536e5)
2014-04-27 13:52:51 -05:00
Austin Seipp
3c4ee44079 hol_light: fix script, upgrade to r189
This also tweaks the version number to just use the SVN revision (rather
than date), since it's unambiguous and increasing anyway.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 0f1f2115e9)
2014-04-27 13:32:02 -05:00
Bjørn Forsman
d9e02c1df3 psmisc: (from upstream) Typo in fuser makes -M on all the time
(cherry picked from commit 6859853045)
2014-04-27 20:20:17 +02:00
Austin Seipp
3bd9a1ae03 nixpkgs: yices 2.2.1
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit da0c8f33ef)
2014-04-27 13:06:44 -05:00
aszlig
7109965cd5 chromium: Fix desktop icon and duplicate entry.
This should fix the desktop icon location for both desktop entries (the
one from the Chromium derivation itself and the wrapper) and renames the
name of the file so that it gets overridden by the wrappers desktop item
so we don't end up having two of them.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit d8f8f31726)
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-04-27 18:53:36 +02:00
Austin Seipp
bea158d89c ats/ats2: clean-up, adopt, add Hydra packages
This also bumps ATS2 to version 0.0.7

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit e590c0a867)
2014-04-27 11:26:40 -05:00
Austin Seipp
a0b81c40a2 kernel/grsecurity: stable/longterm/testing updates
kernels:

  - longterm: 3.4.87  -> 3.4.88
  - longterm: 3.10.37 -> 3.10.38
  - stable:   3.13.10 -> 3.13.11
  - stable:   3.14.1  -> 3.14.2

grsecurity:

  - test: 3.0-3.14.1-201404241722 -> 3.0-3.14.2-201404270907

NOTE: technically the 3.13 stable kernel is now EOL. However, it will
become the long-term grsecurity stable kernel, and will have ongoing
support from Canonical.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 92f7781f00)
2014-04-27 08:46:06 -05:00
Linquize
cc614c0d4c DisnixWebService: Fix broken build by exposing jdk as buildInputs
(cherry picked from commit 9cacabd5bb)
2014-04-27 06:01:33 -05:00
Domen Kožar
56285c17db pythonPackages.chameleon: 2.11 -> 2.15 2014-04-27 12:21:49 +02:00
Austin Seipp
a37635ee56 cryptol-mode: 0.1.0
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 9ef104cbad)
2014-04-26 12:51:35 -05:00
Domen Kožar
47def457a1 Make gnome3 test as release critical 2014-04-26 13:31:47 +02:00
Domen Kožar
6a9d230040 pythonPackages.pyramid: 1.4.5 -> 1.5 2014-04-26 12:15:32 +02:00
Austin Seipp
3073e062d6 btsync: 1.3.87 -> 1.3.93
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 4e15dbe34c)
2014-04-26 00:15:16 -05:00
宋文武
9a10937f32 love: update 0.9.0 -> 0.9.1
Changelog:
  https://www.love2d.org/wiki/0.9.1

(cherry picked from commit 0b99e20a3c)
2014-04-26 00:03:55 -05:00
Ricardo M. Correia
770cd1cd32 grsecurity: Update all patches
stable:  3.0-3.2.57-201404182109            -> 3.0-3.2.57-201404241714
test:    3.0-3.14.1-201404201132            -> 3.0-3.14.1-201404241722
vserver: 3.0-3.2.57-vs2.3.2.16-201404182110 -> 3.0-3.2.57-vs2.3.2.16-201404241715
(cherry picked from commit efae8ce543)
2014-04-25 14:25:57 -05:00
Austin Seipp
1062181037 nixpkgs: Add cryptol2 expression
This is just a convenient shorthand so people don't have to spell out
haskellPackages.cryptol

Note that the top-level expression is named 'cryptol2' but the package
isn't. That's because Cryptol is a library and other things could depend
on it (hence the vanilla name), but also the full name will be
disambiguated as 'haskell-cryptol-ghc7.6.3' anyway.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit e146a02d14)
2014-04-25 14:25:50 -05:00
Austin Seipp
5546e5b5a4 cryptol v2.0.0
This comes with several extra libraries, including GraphSCC, monadLib,
presburger, process and smtLib, all required as build dependencies. But
otherwise totally automated via cabal2nix.

Next up is CVC4 (a total pain in the ass to package) for proving/SAT
support.

I have another WIP branch for the unfree 1.x series which I may (or may
not) add later as it has external verification tech at the moment.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit 5401849e3a)
2014-04-25 14:25:30 -05:00
Austin Seipp
689d7e048d nixos: only enable spipe when user specifies
Signed-off-by: Austin Seipp <aseipp@pobox.com>
(cherry picked from commit b470c93c1e)
2014-04-25 14:25:23 -05:00
Eelco Dolstra
8851990313 debian: Update to 6.0.9
(cherry picked from commit 1bae93cb82)
2014-04-25 14:44:59 +02:00
Eelco Dolstra
dddbcae845 Urgh
Can't figure out why "hostname -s" keeps failing randomly :-(

http://hydra.nixos.org/build/10662142
(cherry picked from commit c52fb449f4)
2014-04-25 14:44:59 +02:00
Eelco Dolstra
1ddbdcdc2d cups: Add a listenAddresses option
(cherry picked from commit b8d59765e1)
2014-04-25 14:44:59 +02:00
Eelco Dolstra
c6d2739d4b Manual: Don't include the platform type of the host system
This causes unnecessary rebuilds of the manual.

http://hydra.nixos.org/build/10662170
(cherry picked from commit cd05320716)
2014-04-25 14:44:58 +02:00
Eelco Dolstra
8c65992314 Make nscd startup synchronous
Nscd forks into the background before it's ready to accept
connections. So explicitly wait until it's ready.

http://hydra.nixos.org/build/10661767
(cherry picked from commit 23297b0edd)
2014-04-25 14:44:58 +02:00
Eelco Dolstra
a58e004778 cups: Start after network.target
http://hydra.nixos.org/build/10661709
(cherry picked from commit d7a7f80aff)
2014-04-25 14:44:58 +02:00
Eelco Dolstra
109a2bee28 Remove outdated remark
(cherry picked from commit 2c70276d96)
2014-04-25 14:44:58 +02:00
Vladimír Čunát
4001f85b0c linux-3.12: bump .17 -> .18
(cherry picked from commit 116d52c6df)
2014-04-25 14:44:57 +02:00
Eelco Dolstra
c3917f4d84 Try again
(cherry picked from commit af817ae0d8)
2014-04-25 14:44:57 +02:00
Eelco Dolstra
feecc6067a Fix simpleTest function
(cherry picked from commit 019e9d8a3d)
2014-04-25 14:44:57 +02:00
Eelco Dolstra
0d5e3df9d9 Silence some Hydra evaluation warnings
(cherry picked from commit d304b277bd)
2014-04-25 14:44:37 +02:00
Shea Levy
ef618678b8 Add php 5.3 variant with fpm support
(cherry picked from commit e85b164df8)
2014-04-25 08:20:02 -04:00
aszlig
4a0c468043 python-django: Update to 1.4.11, 1.5.6 and 1.6.3.
This fixes CVE-2014-0472, details can be found at:

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0472
https://www.djangoproject.com/weblog/2014/apr/21/security/

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-04-25 12:24:58 +02:00
Shea Levy
18d2284d15 sproxy: bump
(cherry picked from commit d4cb80eaf4)
2014-04-24 13:29:03 -04:00
Shea Levy
7e375e9aa2 Add haskell-http-kit
(cherry picked from commit c7f2d87a56)
2014-04-24 13:28:54 -04:00
Mathijs Kwik
efd39af1f4 neoload: upgrade to 4.1.4 and fix mem issues
(cherry picked from commit d2edc329e1)
2014-04-24 15:29:14 +02:00
Mathijs Kwik
4e15c2ecc0 node.js - use bundled v8 :14.04-bugfix:
node needs v8 3.14, which is no longer maintained.
They bundle an in-tree version which does receive backports.

(cherry picked from commit 925c75c68d)
2014-04-24 15:28:35 +02:00
robberer
14fd47651a kde: “kdnssd” package is now called “zeroconf-ioslave”
Close #2358.

(cherry picked from commit a2fad89723)
2014-04-24 15:28:20 +02:00
Eelco Dolstra
c46e466c40 Make the misc test a bit more robust
(cherry picked from commit 2b7e746c02)
2014-04-24 15:25:36 +02:00
Eelco Dolstra
f171ed481b dhcpcd: Fix segfaults
This fixes several problems in the dhcpcd service:

* A segfault during startup, due to a race with udev (dhcpcd would get
  an ADD event from udev, causing it to re-add an interface that it
  already had, leading to a segfault later on).

* A hang/segfault processing "dhcpcd rebind" (which NixOS calls after
  waking up from suspend).

Also, add "lo" to the list of ignored interfaces. It usually ignores
"lo", but apparently not when it gets an ADD event from udev.

(cherry picked from commit 2d8c0d24f2)
2014-04-24 15:25:36 +02:00
Eelco Dolstra
242eadeb48 Remove some dead code
(cherry picked from commit 25af3671f9)
2014-04-24 15:25:35 +02:00
Eelco Dolstra
9cdf29589c Don't create world-readable swapfiles
(cherry picked from commit d4986b5fd3)
2014-04-24 15:25:35 +02:00
Luca Bruno
46c3c741b0 accountsservice: fix creating data under /var/lib
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:58 +02:00
Luca Bruno
0cb2766511 gnome-documents: new package
Document manager application designed to work with GNOME 3

https://wiki.gnome.org/Apps/Documents
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:58 +02:00
Luca Bruno
827c9be4e3 gnome-online-miners: new package
A set of crawlers that go through your online content and index them locally in Tracker

https://wiki.gnome.org/Projects/GnomeOnlineMiners
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:58 +02:00
Luca Bruno
36d73c923c gfbgraph: new package
GLib/GObject wrapper for the Facebook Graph API

Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:58 +02:00
Luca Bruno
86a3024dc2 tracker: downgrade to 0.16
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:57 +02:00
Luca Bruno
14090a2fe3 glade: new package
User interface designer for GTK+ applications

https://wiki.gnome.org/Apps/Glade
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:57 +02:00
Luca Bruno
1c38eb71e6 gnome-music: new package
Music player and management application for the GNOME desktop environment

https://wiki.gnome.org/Apps/Music
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:56 +02:00
Luca Bruno
f1faa45bdb file-roller: delete hicolor icon cache
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:56 +02:00
Luca Bruno
b226e4af87 transmission-remote-gtk: delete hicolor icon cache
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:56 +02:00
Luca Bruno
372647f6ab totem: use grilo plugins
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:55 +02:00
Luca Bruno
18ced7db7b grilo-plugins: new package
A collection of plugins for the Grilo framework

https://wiki.gnome.org/action/show/Projects/Grilo
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:55 +02:00
Luca Bruno
7e5a05ce9b grilo: enable grl-net
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:54 +02:00
Luca Bruno
0c84492519 seahorse: new package
Application for managing encryption keys and passwords in the GnomeKeyring

https://wiki.gnome.org/Apps/Seahorse
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:54 +02:00
Luca Bruno
ae7ea8dc06 gnome3: prioritize nautilus when opening inode/directory
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:54 +02:00
Luca Bruno
5ca1f24a96 grilo: enable gobject introspection
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:53 +02:00
Luca Bruno
973f83d91a xdg-user-dirs: fix finding default directory names
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:53 +02:00
Luca Bruno
2f9b9de73c libmediaart: new library used by gnome-music
Library tasked with managing, extracting and handling media art caches

Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:53 +02:00
Luca Bruno
afbe2b6720 gnome3: moved gnome-desktop from desktop/ to core/
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:52 +02:00
Luca Bruno
85f8efc834 gnome3: moved gtksourceview from desktop/ to core/
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:52 +02:00
Luca Bruno
b845776a90 gnome3: moved file-roller from desktop/ to apps/
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:52 +02:00
Luca Bruno
7043225be2 gedit: new package
Official text editor of the GNOME desktop environment

https://wiki.gnome.org/Apps/Gedit
Signed-off-by: Domen Kožar <domen@dev.si>
2014-04-24 01:25:51 +02:00
Bjørn Forsman
e46e9fe4ac thrift: unbreak build
Add a tiny patch (already upstream) that fixes this build error:

  <flex>/lib/libfl.so: undefined reference to `yylex'

(cherry picked from commit 83d0fd3078)
2014-04-23 21:53:42 +02:00
Shea Levy
4dda8b76fe Add gcc-4.9.0
(cherry picked from commit a3b1f48c5d)
2014-04-23 10:47:53 -04:00
Lluís Batlle i Rossell
bc4361ee29 Making nvidia build with linux 3.14. Patch not needed anymore. 2014-04-23 16:04:02 +02:00
Eelco Dolstra
e001ac6a9e Fix meta.maintainer -> meta.maintainers
(cherry picked from commit dbd332d147)
2014-04-23 15:17:14 +02:00
37541 changed files with 315788 additions and 3441527 deletions

View File

@@ -1,97 +0,0 @@
# EditorConfig configuration for nixpkgs
# https://EditorConfig.org
# Top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file, utf-8 charset
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
# Ignore diffs/patches
[*.{diff,patch}]
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
# see https://nixos.org/nixpkgs/manual/#chap-conventions
# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces
[*.{json,lock,md,nix,pl,pm,py,rb,sh,xml}]
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}]
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/servers/dict/wordnet_structures.py]
trim_trailing_whitespace = unset
[pkgs/tools/misc/timidity/timidity.cfg]
trim_trailing_whitespace = unset

View File

@@ -1,41 +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

17
.gitattributes vendored
View File

@@ -1,17 +0,0 @@
**/deps.nix linguist-generated
**/deps.json 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

313
.github/CODEOWNERS vendored
View File

@@ -1,313 +0,0 @@
# CODEOWNERS file
#
# This file is used to describe who owns what in this repository. This file does not
# replace `meta.maintainers` but is instead used for other things than derivations
# and modules, like documentation, package sets, and other assets.
#
# For documentation on this file, see https://help.github.com/articles/about-codeowners/
# Mentioned users will get code review requests.
#
# 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.
# This file
/.github/CODEOWNERS @edolstra
# GitHub actions
/.github/workflows @NixOS/Security @Mic92 @zowoq
/.github/workflows/merge-staging @FRidh
# EditorConfig
/.editorconfig @Mic92 @zowoq
# Libraries
/lib @edolstra @nbp @infinisil
/lib/systems @alyssais @nbp @ericson2314 @matthewbauer
/lib/generators.nix @edolstra @nbp @Profpatsch
/lib/cli.nix @edolstra @nbp @Profpatsch
/lib/debug.nix @edolstra @nbp @Profpatsch
/lib/asserts.nix @edolstra @nbp @Profpatsch
/lib/path.* @infinisil @fricklerhandwerk
# Nixpkgs Internals
/default.nix @nbp
/pkgs/top-level/default.nix @nbp @Ericson2314
/pkgs/top-level/impure.nix @nbp @Ericson2314
/pkgs/top-level/stage.nix @nbp @Ericson2314 @matthewbauer
/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
/pkgs/stdenv/generic @Ericson2314 @matthewbauer
/pkgs/stdenv/generic/check-meta.nix @Ericson2314 @matthewbauer @piegamesde
/pkgs/stdenv/cross @Ericson2314 @matthewbauer
/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
# Nixpkgs build-support
/pkgs/build-support/writers @lassulus @Profpatsch
# Nixpkgs make-disk-image
/doc/builders/images/makediskimage.section.md @raitobezarius
/nixos/lib/make-disk-image.nix @raitobezarius
# Nixpkgs documentation
/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
/maintainers/scripts/doc @jtojnar @ryantm
/doc/* @fricklerhandwerk
/doc/build-aux/pandoc-filters @jtojnar
/doc/builders/trivial-builders.chapter.md @fricklerhandwerk
/doc/contributing/ @fricklerhandwerk
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @fricklerhandwerk
/doc/stdenv @fricklerhandwerk
/doc/using @fricklerhandwerk
# NixOS Internals
/nixos/default.nix @nbp @infinisil
/nixos/lib/from-env.nix @nbp @infinisil
/nixos/lib/eval-config.nix @nbp @infinisil
/nixos/doc/manual/configuration/abstractions.xml @nbp
/nixos/doc/manual/configuration/config-file.xml @nbp
/nixos/doc/manual/configuration/config-syntax.xml @nbp
/nixos/doc/manual/configuration/modularity.xml @nbp
/nixos/doc/manual/development/assertions.xml @nbp
/nixos/doc/manual/development/meta-attributes.xml @nbp
/nixos/doc/manual/development/option-declarations.xml @nbp
/nixos/doc/manual/development/option-def.xml @nbp
/nixos/doc/manual/development/option-types.xml @nbp
/nixos/doc/manual/development/replace-modules.xml @nbp
/nixos/doc/manual/development/writing-modules.xml @nbp
/nixos/doc/manual/man-nixos-option.xml @nbp
/nixos/modules/installer/tools/nixos-option.sh @nbp
/nixos/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
# 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
# Updaters
## update.nix
/maintainers/scripts/update.nix @jtojnar
/maintainers/scripts/update.py @jtojnar
## common-updater-scripts
/pkgs/common-updater/scripts/update-source-version @jtojnar
# Python-related code and docs
/maintainers/scripts/update-python-libraries @FRidh
/pkgs/top-level/python-packages.nix @FRidh @jonringer
/pkgs/development/interpreters/python @FRidh
/pkgs/development/python-modules @FRidh @jonringer
/doc/languages-frameworks/python.section.md @FRidh @mweinelt
/pkgs/development/tools/poetry2nix @adisbladis
/pkgs/development/interpreters/python/hooks @FRidh @jonringer
# Haskell
/doc/languages-frameworks/haskell.section.md @cdepillabout @sternenseemann @maralorn
/maintainers/scripts/haskell @cdepillabout @sternenseemann @maralorn
/pkgs/development/compilers/ghc @cdepillabout @sternenseemann @maralorn
/pkgs/development/haskell-modules @cdepillabout @sternenseemann @maralorn
/pkgs/test/haskell @cdepillabout @sternenseemann @maralorn
/pkgs/top-level/release-haskell.nix @cdepillabout @sternenseemann @maralorn
/pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn
# Perl
/pkgs/development/interpreters/perl @stigtsp @zakame @dasJ
/pkgs/top-level/perl-packages.nix @stigtsp @zakame @dasJ
/pkgs/development/perl-modules @stigtsp @zakame @dasJ
# R
/pkgs/applications/science/math/R @jbedo
/pkgs/development/r-modules @jbedo
# Ruby
/pkgs/development/interpreters/ruby @marsam
/pkgs/development/ruby-modules @marsam
# Rust
/pkgs/development/compilers/rust @Mic92 @LnL7 @zowoq @winterqt @figsoda
/pkgs/build-support/rust @zowoq @winterqt @figsoda
/doc/languages-frameworks/rust.section.md @zowoq @winterqt @figsoda
# C compilers
/pkgs/development/compilers/gcc @matthewbauer
/pkgs/development/compilers/llvm @matthewbauer
# Compatibility stuff
/pkgs/top-level/unix-tools.nix @matthewbauer
/pkgs/development/tools/xcbuild @matthewbauer
# 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
# Certificate Authorities
pkgs/data/misc/cacert/ @ajs124 @lukegb @mweinelt
pkgs/development/libraries/nss/ @ajs124 @lukegb @mweinelt
pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
# Jetbrains
/pkgs/applications/editors/jetbrains @edwtjo
# Licenses
/lib/licenses.nix @alyssais
# Qt / KDE
/pkgs/applications/kde @ttuegel
/pkgs/desktops/plasma-5 @ttuegel
/pkgs/development/libraries/kde-frameworks @ttuegel
/pkgs/development/libraries/qt-5 @ttuegel
# PostgreSQL and related stuff
/pkgs/servers/sql/postgresql @thoughtpolice @marsam
/nixos/modules/services/databases/postgresql.xml @thoughtpolice
/nixos/modules/services/databases/postgresql.nix @thoughtpolice
/nixos/tests/postgresql.nix @thoughtpolice
# Hardened profile & related modules
/nixos/modules/profiles/hardened.nix @joachifm
/nixos/modules/security/hidepid.nix @joachifm
/nixos/modules/security/lock-kernel-modules.nix @joachifm
/nixos/modules/security/misc.nix @joachifm
/nixos/tests/hardened.nix @joachifm
/pkgs/os-specific/linux/kernel/hardened-config.nix @joachifm
# Home Automation
/nixos/modules/services/misc/home-assistant.nix @mweinelt
/nixos/modules/services/misc/zigbee2mqtt.nix @mweinelt
/nixos/tests/home-assistant.nix @mweinelt
/nixos/tests/zigbee2mqtt.nix @mweinelt
/pkgs/servers/home-assistant @mweinelt
/pkgs/tools/misc/esphome @mweinelt
# Network Time Daemons
/pkgs/tools/networking/chrony @thoughtpolice
/pkgs/tools/networking/ntp @thoughtpolice
/pkgs/tools/networking/openntpd @thoughtpolice
/nixos/modules/services/networking/ntp @thoughtpolice
# Network
/pkgs/tools/networking/kea/default.nix @mweinelt
/pkgs/tools/networking/babeld/default.nix @mweinelt
/nixos/modules/services/networking/babeld.nix @mweinelt
/nixos/modules/services/networking/kea.nix @mweinelt
/nixos/modules/services/networking/knot.nix @mweinelt
/nixos/modules/services/monitoring/prometheus/exporters/kea.nix @mweinelt
/nixos/tests/babeld.nix @mweinelt
/nixos/tests/kea.nix @mweinelt
/nixos/tests/knot.nix @mweinelt
# 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
# Prometheus exporter modules and tests
/nixos/modules/services/monitoring/prometheus/exporters.nix @WilliButz
/nixos/modules/services/monitoring/prometheus/exporters.xml @WilliButz
/nixos/tests/prometheus-exporters.nix @WilliButz
# PHP interpreter, packages, extensions, tests and documentation
/doc/languages-frameworks/php.section.md @aanderse @etu @globin @ma27 @talyz
/nixos/tests/php @aanderse @etu @globin @ma27 @talyz
/pkgs/build-support/build-pecl.nix @aanderse @etu @globin @ma27 @talyz
/pkgs/development/interpreters/php @jtojnar @aanderse @etu @globin @ma27 @talyz
/pkgs/development/php-packages @aanderse @etu @globin @ma27 @talyz
/pkgs/top-level/php-packages.nix @jtojnar @aanderse @etu @globin @ma27 @talyz
# Podman, CRI-O modules and related
/nixos/modules/virtualisation/containers.nix @zowoq @adisbladis
/nixos/modules/virtualisation/cri-o.nix @zowoq @adisbladis
/nixos/modules/virtualisation/podman @zowoq @adisbladis
/nixos/tests/cri-o.nix @zowoq @adisbladis
/nixos/tests/podman @zowoq @adisbladis
# Docker tools
/pkgs/build-support/docker @roberth
/nixos/tests/docker-tools* @roberth
/doc/builders/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 @piegamesde @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
# kubernetes
/nixos/doc/manual/configuration/kubernetes.chapter.md @zowoq
/nixos/modules/services/cluster/kubernetes @zowoq
/nixos/tests/kubernetes @zowoq
/pkgs/applications/networking/cluster/kubernetes @zowoq
# Matrix
/pkgs/servers/heisenbridge @piegamesde
/pkgs/servers/matrix-conduit @piegamesde
/nixos/modules/services/misc/heisenbridge.nix @piegamesde
/nixos/modules/services/misc/matrix-conduit.nix @piegamesde
/nixos/tests/matrix-conduit.nix @piegamesde
# Dotnet
/pkgs/build-support/dotnet @IvarWithoutBones
/pkgs/development/compilers/dotnet @IvarWithoutBones
# Node.js
/pkgs/build-support/node/build-npm-package @winterqt
/pkgs/build-support/node/fetch-npm-deps @winterqt
/doc/languages-frameworks/javascript.section.md @winterqt

View File

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

View File

@@ -1,41 +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
```

View File

@@ -1,39 +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
```

View File

@@ -1,32 +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

View File

@@ -1,28 +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.

View File

@@ -1,19 +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, ...

View File

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

View File

@@ -1,40 +0,0 @@
###### Description of changes
<!--
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
<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
- Built on platform(s)
- [ ] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- [ ] For non-Linux: Is `sandbox = true` set in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [23.05 Release Notes (or backporting 22.11 Release notes)](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#generating-2305-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://nixos.org/manual/nixpkgs/unstable/#chap-reviewing-contributions
-->

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"

181
.github/labeler.yml vendored
View File

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

9
.github/stale.yml vendored
View File

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

View File

@@ -1,34 +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@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
uses: korthout/backport-action@v1.1.0
with:
# Config README: https://github.com/korthout/backport-action#backport-action
pull_description: |-
Bot-based backport to `${target_branch}`, triggered by a label in #${pull_number}.
* [ ] Before merging, ensure that this backport complies with the [Criteria for Backporting](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#criteria-for-backporting-changes).
* Even as a non-commiter, if you find that it does not comply, 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@v3
- uses: cachix/install-nix-action@v19
- uses: cachix/cachix-action@v12
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# explicit list of supportedSystems is needed until aarch64-darwin becomes part of the trunk jobset
- run: nix-build pkgs/top-level/release.nix -A tarball.nixpkgs-basic-release-checks --arg supportedSystems '[ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ]'

View File

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

View File

@@ -1,37 +0,0 @@
name: "Direct Push Warning"
on:
push:
branches:
- master
- release-**
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for peter-evans/commit-comment to comment on commit
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
env:
GITHUB_SHA: ${{ github.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
steps:
- name: Check if commit is a merge commit
id: ismerge
run: |
ISMERGE=$(curl -H 'Accept: application/vnd.github.groot-preview+json' -H "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ env.GITHUB_REPOSITORY }}/commits/${{ env.GITHUB_SHA }}/pulls | jq -r '.[] | select(.merge_commit_sha == "${{ env.GITHUB_SHA }}") | any')
echo "ismerge=$ISMERGE" >> $GITHUB_OUTPUT
# github events are eventually consistent, so wait until changes propagate to thier DB
- run: sleep 60
if: steps.ismerge.outputs.ismerge != 'true'
- name: Warn if the commit was a direct push
if: steps.ismerge.outputs.ismerge != 'true'
uses: peter-evans/commit-comment@v2
with:
body: |
@${{ github.actor }}, you pushed a commit directly to master/release branch
instead of going through a Pull Request.
That's highly discouraged beyond the few exceptions listed
on https://github.com/NixOS/nixpkgs/issues/118661

View File

@@ -1,43 +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@v3
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@v19
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: install editorconfig-checker
run: nix-env -iA editorconfig-checker -f '<nixpkgs>'
- name: Checking EditorConfig
run: |
cat "$HOME/changed_files" | xargs -r editorconfig-checker -disable-indent-size
- if: ${{ failure() }}
run: |
echo "::error :: Hey! It looks like your changes don't follow our editorconfig settings. Read https://editorconfig.org/#download to configure your editor so you never see this error again."

View File

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

View File

@@ -1,39 +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@v3
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@v19
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@v12
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Building NixOS manual with DocBook options
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true nixos/release.nix -A manual.x86_64-linux
- name: Building NixOS manual with Markdown options
run: |
export NIX_PATH=nixpkgs=$(pwd)
nix-build \
--option restrict-eval true \
--arg configuration '{ documentation.nixos.options.allowDocBook = false; }' \
nixos/release.nix \
-A manual.x86_64-linux

View File

@@ -1,31 +0,0 @@
name: "Build Nixpkgs manual"
permissions: read-all
on:
pull_request_target:
branches:
- master
paths:
- 'doc/**'
jobs:
nixpkgs:
runs-on: ubuntu-latest
if: github.repository_owner == 'NixOS'
steps:
- uses: actions/checkout@v3
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@v19
with:
# explicitly enable sandbox
extra_nix_config: sandbox = true
- uses: cachix/cachix-action@v12
with:
# This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere.
name: nixpkgs-ci
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Building Nixpkgs manual
run: NIX_PATH=nixpkgs=$(pwd) nix-build --option restrict-eval true pkgs/top-level/release.nix -A manual

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,57 +0,0 @@
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, for peter-evans/create-or-update-comment to create or update comment
if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v19
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: clean repo
run: |
git clean -f
- name: create PR
uses: peter-evans/create-pull-request@v4
with:
body: |
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}
Check that all providers build with:
```
@ofborg build terraform.full
```
branch: terraform-providers-update
delete-branch: false
title: ${{ steps.setup.outputs.title }}
token: ${{ secrets.GITHUB_TOKEN }}

31
.gitignore vendored
View File

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

View File

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

5
.travis.yml Normal file
View File

@@ -0,0 +1,5 @@
language: python
python: "3.4"
before_install: ./maintainers/scripts/travis-nox-review-pr.sh nix
install: ./maintainers/scripts/travis-nox-review-pr.sh nox
script: ./maintainers/scripts/travis-nox-review-pr.sh build

View File

@@ -1 +1 @@
23.05
14.04

View File

@@ -1,145 +0,0 @@
# 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)
* 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
## Submitting changes
Read the ["Submitting changes"](https://nixos.org/nixpkgs/manual/#chap-submitting-changes) section of the nixpkgs manual. It explains how to write, test, and iterate on your change, and which branch to base your pull request against.
Below is a short excerpt of some points in there:
* Format the commit messages in the following way:
```
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
(Motivation for change. Link to release notes. Additional information.)
```
For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
Examples:
* nginx: init at 2.0.1
* firefox: 54.0.1 -> 55.0
https://www.mozilla.org/en-US/firefox/55.0/releasenotes/
* 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 short, just one sentence.
* Be capitalized.
* Not start with the package name.
* More generally, it should not refer to the package name.
* Not end with a period (or any punctuation for that matter).
* `meta.license` must be set and fit the upstream license.
* If there is no upstream license, `meta.license` should default to `lib.licenses.unfree`.
* If in doubt, try to contact the upstream developers for clarification.
* `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).
## 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.
This means that, when addressing review comments in order to keep the pull request in an always mergeable status, you will sometimes need to rewrite your branch's history and then force-push it with `git push --force-with-lease`.
Useful git commands that can help a lot with this are `git commit --patch --amend` and `git rebase --interactive`. For more details consult the git man pages or online resources like [git-rebase.io](https://git-rebase.io/) or [The Pro Git Book](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
## Rebasing between branches (i.e. 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.
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
```
## Backporting changes
Follow these steps to backport a change into a release branch in compliance with the [commit policy](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches).
You can add a label such as `backport release-22.11` to a PR, so that merging it will
automatically create a backport (via [a GitHub Action](.github/workflows/backport.yml)).
This also works for PR's that have already been merged, and might take a couple of minutes to trigger.
You can also create the backport manually:
1. Take note of the commits in which the change was introduced into `master` branch.
2. Check out the target _release branch_, e.g. `release-22.11`. Do not use a _channel branch_ like `nixos-22.11` or `nixpkgs-22.11-darwin`.
3. Create a branch for your change, e.g. `git checkout -b backport`.
4. When the reason to backport is not obvious from the original commit message, use `git cherry-pick -xe <original commit>` and add a reason. Otherwise use `git cherry-pick -x <original commit>`. That's fine for minor version updates that only include security and bug fixes, commits that fixes an otherwise broken package or similar. Please also ensure the commits exists on the master branch; in the case of squashed or rebased merges, the commit hash will change and the new commits can be found in the merge message at the bottom of the master pull request.
5. Push to GitHub and open a backport pull request. Make sure to select the release branch (e.g. `release-22.11`) as the target branch of the pull request, and link to the pull request in which the original change was committed to `master`. The pull request title should be the commit title with the release version as prefix, e.g. `[22.11]`.
6. When the backport pull request is merged and you have the necessary privileges you can also replace the label `9.needs: port to stable` with `8.has: port to stable` on the original pull request. This way maintainers can keep track of missing backports easier.
## Criteria for Backporting changes
Anything that does not cause user or downstream dependency regressions can be backported. This includes:
- New Packages / Modules
- Security / Patch updates
- Version updates which include new functionality (but no breaking changes)
- Services which require a client to be up-to-date regardless. (E.g. `spotify`, `steam`, or `discord`)
- Security critical applications (E.g. `firefox`)
## Generating 23.05 Release Notes
<!--
note: title unchanged even though we don't need regeneration because extant
PRs will link here. definitely change the title for 23.11 though.
-->
Documentation in nixpkgs is transitioning to a markdown-centric workflow. In the past release notes required a translation step to convert from markdown to a compatible docbook document, but this is no longer necessary.
Steps for updating 23.05 Release notes:
1. Edit `nixos/doc/manual/release-notes/rl-2305.section.md` with the desired changes
2. Commit changes to `rl-2305.section.md`.
## Reviewing contributions
See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#chap-reviewing-contributions).

13
COPYING
View File

@@ -1,4 +1,4 @@
Copyright (c) 2003-2023 Eelco Dolstra and the Nixpkgs/NixOS contributors
Copyright (c) 2003-2006 Eelco Dolstra
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -18,3 +18,14 @@ 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.). Also, the license does not apply
to some of the binaries used for bootstrapping Nixpkgs (e.g.,
pkgs/stdenv/linux/tools/bash). 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.

127
README.md
View File

@@ -1,119 +1,10 @@
<p align="center">
<a href="https://nixos.org#gh-light-mode-only">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/master/logo/nixos-hires.png" width="500px" alt="NixOS logo"/>
</a>
<a href="https://nixos.org#gh-dark-mode-only">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png" width="500px" alt="NixOS logo"/>
</a>
</p>
Nixpkgs is a collection of packages for [Nix](http://nixos.org/nix/) package
manager. Nixpkgs also includes [NixOS](http://nixos.org/nixos/) linux distribution source code.
<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>
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over
80,000 software packages that can be installed with the
[Nix](https://nixos.org/nix/) package manager. It also implements
[NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
# Manuals
* [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution
* [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions
* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expressions (programs), and how to use Nix command line tools
# Community
* [Discourse Forum](https://discourse.nixos.org/)
* [Matrix Chat](https://matrix.to/#/#community:nixos.org)
* [NixOS Weekly](https://weekly.nixos.org/)
* [Community-maintained wiki](https://nixos.wiki/)
* [Community-maintained list of ways to get in touch](https://nixos.wiki/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
# Other Project Repositories
The sources of all official Nix-related projects are in the [NixOS
organization on GitHub](https://github.com/NixOS/). Here are some of
the main ones:
* [Nix](https://github.com/NixOS/nix) - the purely functional package manager
* [NixOps](https://github.com/NixOS/nixops) - the tool to remotely deploy NixOS machines
* [nixos-hardware](https://github.com/NixOS/nixos-hardware) - NixOS profiles to optimize settings for different hardware
* [Nix RFCs](https://github.com/NixOS/rfcs) - the formal process for making substantial changes to the community
* [NixOS homepage](https://github.com/NixOS/nixos-homepage) - the [NixOS.org](https://nixos.org) website
* [hydra](https://github.com/NixOS/hydra) - our continuous integration system
* [NixOS Artwork](https://github.com/NixOS/nixos-artwork) - NixOS artwork
# Continuous Integration and Distribution
Nixpkgs and NixOS are built and tested by our continuous integration
system, [Hydra](https://hydra.nixos.org/).
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for the NixOS 22.11 release](https://hydra.nixos.org/jobset/nixos/release-22.11)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for the NixOS 22.11 release](https://hydra.nixos.org/job/nixos/release-22.11/tested#tabs-constituents)
Artifacts successfully built with Hydra are published to cache at
https://cache.nixos.org/. When successful build and test criteria are
met, the Nixpkgs expressions are distributed via [Nix
channels](https://nixos.org/manual/nix/stable/package-management/channels.html).
# Contributing
Nixpkgs is among the most active projects on GitHub. While thousands
of open issues and pull requests might seem a lot at first, it helps
consider it in the context of the scope of the project. Nixpkgs
describes how to build tens of thousands of pieces of software and implements a
Linux distribution. The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse)
page gives a sense of the project activity.
Community contributions are always welcome through GitHub Issues and
Pull Requests. When pull requests are made, our tooling automation bot,
[OfBorg](https://github.com/NixOS/ofborg) will perform various checks
to help ensure expression quality.
The *Nixpkgs maintainers* are people who have assigned themselves to
maintain specific individual packages. We encourage people who care
about a package to assign themselves as a maintainer. When a pull
request is made against a package, OfBorg will notify the appropriate
maintainer(s). The *Nixpkgs committers* are people who have been given
permission to merge.
Most contributions are based on and merged into these branches:
* `master` is the main branch where all small contributions go
* `staging` is branched from master, changes that have a big impact on
Hydra builds go to this branch
* `staging-next` is branched from staging and only fixes to stabilize
and security fixes with a big impact on Hydra builds should be
contributed to this branch. This branch is merged into master when
deemed of sufficiently high quality
For more information about contributing to the project, please visit
the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/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.
* [NixOS installation instructions](http://nixos.org/nixos/manual/#installing-nixos)
* [Manual (How to write packages for Nix)](http://nixos.org/nixpkgs/manual/)
* [Manual (NixOS)](http://nixos.org/nixos/manual/)
* [Continuous build](http://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Tests](http://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Mailing list](http://lists.science.uu.nl/mailman/listinfo/nix-dev)
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)

View File

@@ -1,28 +1,7 @@
let requiredVersion = import ./lib/minver.nix; in
if ! builtins ? nixVersion || builtins.compareVersions "1.6" builtins.nixVersion == 1 then
if ! builtins ? nixVersion || builtins.compareVersions requiredVersion builtins.nixVersion == 1 then
abort ''
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 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
''
abort "This version of Nixpkgs requires Nix >= 1.6, please upgrade!"
else
import ./pkgs/top-level/impure.nix
import ./pkgs/top-level/all-packages.nix

8
doc/.gitignore vendored
View File

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

View File

@@ -1,116 +1,41 @@
MD_TARGETS=$(addsuffix .xml, $(basename $(shell find . -type f -regex '.*\.md$$' -not -name README.md)))
# You may need to override this.
docbookxsl = $(HOME)/.nix-profile/xml/xsl/docbook
dblatex = dblatex
PANDOC ?= pandoc
XMLLINT = xmllint --catalogs
XSLTPROC = xsltproc --catalogs \
--param section.autolabel 1 \
--param section.label.includes.component.label 1 \
--param html.stylesheet \'style.css\' \
--param xref.with.number.and.title 1 \
--param toc.section.depth 3 \
--param admon.style \'\' \
--param callout.graphics.extension \'.gif\'
pandoc_media_dir = media
# NOTE: Keep in sync with conversion script (/maintainers/scripts/db-to-md.sh).
# TODO: Remove raw-attribute when we can get rid of DocBook altogether.
pandoc_commonmark_enabled_extensions = +attributes+fenced_divs+footnotes+bracketed_spans+definition_lists+pipe_tables+raw_attribute
# Not needed:
# - docbook-reader/citerefentry-to-rst-role.lua (only relevant for DocBook → MarkDown/rST/MyST)
pandoc_flags = --extract-media=$(pandoc_media_dir) \
--lua-filter=$(PANDOC_LUA_FILTERS_DIR)/diagram-generator.lua \
--lua-filter=build-aux/pandoc-filters/myst-reader/roles.lua \
--lua-filter=$(PANDOC_LINK_MANPAGES_FILTER) \
--lua-filter=build-aux/pandoc-filters/docbook-writer/rst-roles.lua \
--lua-filter=build-aux/pandoc-filters/docbook-writer/labelless-link-is-xref.lua \
-f commonmark$(pandoc_commonmark_enabled_extensions)+smart
NEWS_OPTS = \
--stringparam generate.toc "article nop" \
--stringparam section.autolabel.max.depth 0 \
--stringparam header.rule 0
.PHONY: all
all: validate format out/html/index.html out/epub/manual.epub
all: NEWS.html NEWS.txt manual.html manual.pdf
.PHONY: debug
debug:
nix-shell --run "xmloscopy --docbook5 ./manual.xml ./manual-full.xml"
NEWS.html: release-notes.xml
$(XSLTPROC) --nonet --xinclude --output $@ $(NEWS_OPTS) \
$(docbookxsl)/xhtml/docbook.xsl release-notes.xml
.PHONY: format
format: doc-support/result
find . -iname '*.xml' -type f | while read f; do \
echo $$f ;\
xmlformat --config-file "doc-support/result/xmlformat.conf" -i $$f ;\
done
NEWS.txt: release-notes.xml
$(XSLTPROC) --nonet --xinclude quote-literals.xsl release-notes.xml | \
$(XSLTPROC) --nonet --output $@.tmp.html $(NEWS_OPTS) \
$(docbookxsl)/xhtml/docbook.xsl -
LANG=en_US w3m -dump $@.tmp.html > $@
rm $@.tmp.html
.PHONY: fix-misc-xml
fix-misc-xml:
find . -iname '*.xml' -type f \
-exec ../nixos/doc/varlistentry-fixer.rb {} ';'
manual.html: *.xml
$(XSLTPROC) --nonet --xinclude --output manual.html \
$(docbookxsl)/xhtml/docbook.xsl manual.xml
.PHONY: clean
clean:
rm -f ${MD_TARGETS} doc-support/result .version manual-full.xml functions/library/locations.xml functions/library/generated
rm -rf ./out/ ./highlightjs ./media
.PHONY: validate
validate: manual-full.xml doc-support/result
jing doc-support/result/docbook.rng manual-full.xml
out/html/index.html: doc-support/result manual-full.xml style.css highlightjs
mkdir -p out/html
xsltproc \
--nonet --xinclude \
--output $@ \
doc-support/result/xhtml.xsl \
./manual-full.xml
mkdir -p out/html/highlightjs/
cp -r highlightjs out/html/
cp -r $(pandoc_media_dir) out/html/
cp ./overrides.css out/html/
cp ./style.css out/html/style.css
mkdir -p out/html/images/callouts
cp doc-support/result/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 --nonet \
--output out/epub/scratch/ \
doc-support/result/epub.xsl \
./manual-full.xml
cp -r $(pandoc_media_dir) out/epub/scratch/OEBPS
cp ./overrides.css out/epub/scratch/OEBPS
cp ./style.css out/epub/scratch/OEBPS
mkdir -p out/epub/scratch/OEBPS/images/callouts/
cp doc-support/result/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: doc-support/result
mkdir -p highlightjs
cp -r doc-support/result/highlightjs/highlight.pack.js highlightjs/
cp -r doc-support/result/highlightjs/LICENSE highlightjs/
cp -r doc-support/result/highlightjs/mono-blue.css highlightjs/
cp -r doc-support/result/highlightjs/loader.js highlightjs/
manual-full.xml: ${MD_TARGETS} .version functions/library/locations.xml functions/library/generated *.xml **/*.xml **/**/*.xml
xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml
.version: doc-support/result
ln -rfs ./doc-support/result/version .version
doc-support/result: doc-support/default.nix
(cd doc-support; nix-build)
functions/library/locations.xml: doc-support/result
ln -rfs ./doc-support/result/function-locations.xml functions/library/locations.xml
functions/library/generated: doc-support/result
ln -rfs ./doc-support/result/function-docs functions/library/generated
%.section.xml: %.section.md
$(PANDOC) $^ -t docbook \
$(pandoc_flags) \
-o $@
%.chapter.xml: %.chapter.md
$(PANDOC) $^ -t docbook \
--top-level-division=chapter \
$(pandoc_flags) \
-o $@
manual.pdf: *.xml
$(dblatex) \
-P doc.collab.show=0 \
-P latex.output.revhistory=0 \
manual.xml

View File

@@ -1,12 +0,0 @@
# Nixpkgs/doc
This directory houses the sources files for the Nixpkgs manual.
You can find the [rendered documentation for Nixpkgs `unstable` on nixos.org](https://nixos.org/manual/nixpkgs/unstable/).
[Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available.
If you want to contribute to the documentation, [here's how to do it](https://nixos.org/manual/nixpkgs/unstable/#chap-contributing).
If you're only getting started with Nix, go to [nixos.org/learn](https://nixos.org/learn).

View File

@@ -1,23 +0,0 @@
--[[
Converts Code AST nodes produced by pandocs DocBook reader
from citerefentry elements into AST for corresponding role
for reStructuredText.
We use subset of MyST syntax (CommonMark with features from rST)
so lets use the rST AST for rST features.
Reference: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage
]]
function Code(elem)
elem.classes = elem.classes:map(function (x)
if x == 'citerefentry' then
elem.attributes['role'] = 'manpage'
return 'interpreted-text'
else
return x
end
end)
return elem
end

View File

@@ -1,34 +0,0 @@
--[[
Converts Link AST nodes with empty label to DocBook xref elements.
This is a temporary script to be able use cross-references conveniently
using syntax taken from MyST, while we still use docbook-xsl
for generating the documentation.
Reference: https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing
]]
local function starts_with(start, str)
return str:sub(1, #start) == start
end
local function escape_xml_arg(arg)
amps = arg:gsub('&', '&amp;')
amps_quotes = amps:gsub('"', '&quot;')
amps_quotes_lt = amps_quotes:gsub('<', '&lt;')
return amps_quotes_lt
end
function Link(elem)
has_no_content = #elem.content == 0
targets_anchor = starts_with('#', elem.target)
has_no_attributes = elem.title == '' and elem.identifier == '' and #elem.classes == 0 and #elem.attributes == 0
if has_no_content and targets_anchor and has_no_attributes then
-- xref expects idref without the pound-sign
target_without_hash = elem.target:sub(2, #elem.target)
return pandoc.RawInline('docbook', '<xref linkend="' .. escape_xml_arg(target_without_hash) .. '" />')
end
end

View File

@@ -1,44 +0,0 @@
--[[
Converts AST for reStructuredText roles into corresponding
DocBook elements.
Currently, only a subset of roles is supported.
Reference:
List of roles:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html
manpage:
https://tdg.docbook.org/tdg/5.1/citerefentry.html
file:
https://tdg.docbook.org/tdg/5.1/filename.html
]]
function Code(elem)
if elem.classes:includes('interpreted-text') then
local tag = nil
local content = elem.text
if elem.attributes['role'] == 'manpage' then
tag = 'citerefentry'
local title, volnum = content:match('^(.+)%((%w+)%)$')
if title == nil then
-- No volnum in parentheses.
title = content
end
content = '<refentrytitle>' .. title .. '</refentrytitle>' .. (volnum ~= nil and ('<manvolnum>' .. volnum .. '</manvolnum>') or '')
elseif elem.attributes['role'] == 'file' then
tag = 'filename'
elseif elem.attributes['role'] == 'command' then
tag = 'command'
elseif elem.attributes['role'] == 'option' then
tag = 'option'
elseif elem.attributes['role'] == 'var' then
tag = 'varname'
elseif elem.attributes['role'] == 'env' then
tag = 'envar'
end
if tag ~= nil then
return pandoc.RawInline('docbook', '<' .. tag .. '>' .. content .. '</' .. tag .. '>')
end
end
end

View File

@@ -1,28 +0,0 @@
{ pkgs ? import ../../.. {} }:
let
inherit (pkgs) lib;
manpageURLs = builtins.fromJSON (builtins.readFile (pkgs.path + "/doc/manpage-urls.json"));
in pkgs.writeText "link-manpages.lua" ''
--[[
Adds links to known man pages that aren't already in a link.
]]
local manpage_urls = {
${lib.concatStringsSep "\n" (lib.mapAttrsToList (man: url:
" [${builtins.toJSON man}] = ${builtins.toJSON url},") manpageURLs)}
}
traverse = 'topdown'
-- Returning false as the second value aborts processing of child elements.
function Link(elem)
return elem, false
end
function Code(elem)
local is_man_role = elem.classes:includes('interpreted-text') and elem.attributes['role'] == 'manpage'
if is_man_role and manpage_urls[elem.text] ~= nil then
return pandoc.Link(elem, manpage_urls[elem.text]), false
end
end
''

View File

@@ -1,36 +0,0 @@
--[[
Replaces Str AST nodes containing {role}, followed by a Code node
by a Code node with attrs that would be produced by rST reader
from the role syntax.
This is to emulate MyST syntax in Pandoc.
(MyST is a CommonMark flavour with rST features mixed in.)
Reference: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point
]]
function Inlines(inlines)
for i = #inlines-1,1,-1 do
local first = inlines[i]
local second = inlines[i+1]
local correct_tags = first.tag == 'Str' and second.tag == 'Code'
if correct_tags then
-- docutils supports alphanumeric strings separated by [-._:]
-- We are slightly more liberal for simplicity.
-- Allow preceding punctuation (eg '('), otherwise '({file}`...`)'
-- does not match. Also allow anything followed by a non-breaking space
-- since pandoc emits those after certain abbreviations (e.g. e.g.).
local prefix, role = first.text:match('^(.*){([-._+:%w]+)}$')
if role ~= nil and (prefix == '' or prefix:match("^.*[%p ]$") ~= nil) then
if prefix == '' then
inlines:remove(i)
else
first.text = prefix
end
second.attributes['role'] = role
second.classes:insert('interpreted-text')
end
end
end
return inlines
end

View File

@@ -1,25 +0,0 @@
--[[
Replaces Code nodes with attrs that would be produced by rST reader
from the role syntax by a Str AST node containing {role}, followed by a Code node.
This is to emulate MyST syntax in Pandoc.
(MyST is a CommonMark flavour with rST features mixed in.)
Reference: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point
]]
function Code(elem)
local role = elem.attributes['role']
if elem.classes:includes('interpreted-text') and role ~= nil then
elem.classes = elem.classes:filter(function (c)
return c ~= 'interpreted-text'
end)
elem.attributes['role'] = nil
return {
pandoc.Str('{' .. role .. '}'),
elem,
}
end
end

View File

@@ -1,192 +0,0 @@
# Fetchers {#chap-pkgs-fetchers}
Building software with Nix often requires downloading source code and other files from the internet.
`nixpkgs` provides *fetchers* for different protocols and services. Fetchers are functions that simplify downloading files.
## Caveats
Fetchers create [fixed output derivations](https://nixos.org/manual/nix/stable/#fixed-output-drvs) from downloaded files.
Nix can reuse the downloaded files via the hash of the resulting derivation.
The fact that the hash belongs to the Nix derivation output and not the file itself can lead to confusion.
For example, consider the following fetcher:
```nix
fetchurl {
url = "http://www.example.org/hello-1.0.tar.gz";
hash = "sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=";
};
```
A common mistake is to update a fetchers URL, or a version parameter, without updating the hash.
```nix
fetchurl {
url = "http://www.example.org/hello-1.1.tar.gz";
hash = "sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=";
};
```
**This will reuse the old contents**.
Remember to invalidate the hash argument, in this case by setting the `hash` attribute to an empty string.
```nix
fetchurl {
url = "http://www.example.org/hello-1.1.tar.gz";
hash = "";
};
```
Use the resulting error message to determine the correct hash.
```
error: hash mismatch in fixed-output derivation '/path/to/my.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=
```
A similar problem arises while testing changes to a fetcher's implementation. If the output of the derivation already exists in the Nix store, test failures can go undetected. The [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function helps prevent reusing cached derivations.
## `fetchurl` and `fetchzip` {#fetchurl}
Two basic fetchers are `fetchurl` and `fetchzip`. Both of these have two required arguments, a URL and a hash. The hash is typically `hash`, although many more hash algorithms are supported. Nixpkgs contributors are currently recommended to use `hash`. This hash will be used by Nix to identify your source. A typical usage of `fetchurl` is provided below.
```nix
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "hello";
src = fetchurl {
url = "http://www.example.org/hello.tar.gz";
hash = "sha256-BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=";
};
}
```
The main difference between `fetchurl` and `fetchzip` is in how they store the contents. `fetchurl` will store the unaltered contents of the URL within the Nix store. `fetchzip` on the other hand, will decompress the archive for you, making files and directories directly accessible in the future. `fetchzip` can only be used with archives. Despite the name, `fetchzip` is not limited to .zip files and can also be used with any tarball.
## `fetchpatch` {#fetchpatch}
`fetchpatch` works very similarly to `fetchurl` with the same arguments expected. It expects patch files as a source and performs normalization on them before computing the checksum. For example, it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
- `relative`: Similar to using `git-diff`'s `--relative` flag, only keep changes inside the specified directory, making paths relative to it.
- `stripLen`: Remove the first `stripLen` components of pathnames in the patch.
- `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.
## `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.
`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. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromGitiles` {#fetchfromgitiles}
This is used with Gitiles repositories. The arguments expected are similar to `fetchgit`.
## `fetchFromBitbucket` {#fetchfrombitbucket}
This is used with BitBucket repositories. The arguments expected are very similar to fetchFromGitHub above.
## `fetchFromSavannah` {#fetchfromsavannah}
This is used with Savannah repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromRepoOrCz` {#fetchfromrepoorcz}
This is used with repo.or.cz repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromSourcehut` {#fetchfromsourcehut}
This is used with sourcehut repositories. Similar to `fetchFromGitHub` above,
it expects `owner`, `repo`, `rev` and `hash`, but don't forget the tilde (~)
in front of the username! Expected arguments also include `vc` ("git" (default)
or "hg"), `domain` and `fetchSubmodules`.
If `fetchSubmodules` is `true`, `fetchFromSourcehut` uses `fetchgit`
or `fetchhg` with `fetchSubmodules` or `fetchSubrepos` set to `true`,
respectively. Otherwise, the fetcher uses `fetchzip`.
## `requireFile` {#requirefile}
`requireFile` allows requesting files that cannot be fetched automatically, but whose content is known.
This is a useful last-resort workaround for license restrictions that prohibit redistribution, or for downloads that are only accessible after authenticating interactively in a browser.
If the requested file is present in the Nix store, the resulting derivation will not be built, because its expected output is already available.
Otherwise, the builder will run, but fail with a message explaining to the user how to provide the file. The following code, for example:
```
requireFile {
name = "jdk-${version}_linux-x64_bin.tar.gz";
url = "https://www.oracle.com/java/technologies/javase-jdk11-downloads.html";
sha256 = "94bd34f85ee38d3ef59e5289ec7450b9443b924c55625661fffe66b03f2c8de2";
}
```
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
***
```

View File

@@ -1,15 +0,0 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="chap-images">
<title>Images</title>
<para>
This chapter describes tools for creating various types of images.
</para>
<xi:include href="images/appimagetools.section.xml" />
<xi:include href="images/dockertools.section.xml" />
<xi:include href="images/ocitools.section.xml" />
<xi:include href="images/snaptools.section.xml" />
<xi:include href="images/portableservice.section.xml" />
<xi:include href="images/makediskimage.section.xml" />
<xi:include href="images/binarycache.section.xml" />
</chapter>

View File

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

View File

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

View File

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

View File

@@ -1,107 +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
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
- 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
- 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
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
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;
}
```

View File

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

View File

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

View File

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

View File

@@ -1,129 +0,0 @@
# Cataclysm: Dark Days Ahead {#cataclysm-dark-days-ahead}
## How to install Cataclysm DDA {#how-to-install-cataclysm-dda}
To install the latest stable release of Cataclysm DDA to your profile, execute
`nix-env -f "<nixpkgs>" -iA cataclysm-dda`. For the curses build (build
without tiles), install `cataclysmDDA.stable.curses`. Note: `cataclysm-dda` is
an alias to `cataclysmDDA.stable.tiles`.
If you like access to a development build of your favorite git revision,
override `cataclysm-dda-git` (or `cataclysmDDA.git.curses` if you like curses
build):
```nix
cataclysm-dda-git.override {
version = "YYYY-MM-DD";
rev = "YOUR_FAVORITE_REVISION";
sha256 = "CHECKSUM_OF_THE_REVISION";
}
```
The sha256 checksum can be obtained by
```sh
nix-prefetch-url --unpack "https://github.com/CleverRaven/Cataclysm-DDA/archive/${YOUR_FAVORITE_REVISION}.tar.gz"
```
The default configuration directory is `~/.cataclysm-dda`. If you prefer
`$XDG_CONFIG_HOME/cataclysm-dda`, override the derivation:
```nix
cataclysm-dda.override {
useXdgDir = true;
}
```
## Important note for overriding packages {#important-note-for-overriding-packages}
After applying `overrideAttrs`, you need to fix `passthru.pkgs` and
`passthru.withMods` attributes either manually or by using `attachPkgs`:
```nix
let
# You enabled parallel building.
myCDDA = cataclysm-dda-git.overrideAttrs (_: {
enableParallelBuilding = true;
});
# Unfortunately, this refers to the package before overriding and
# parallel building is still disabled.
badExample = myCDDA.withMods (_: []);
inherit (cataclysmDDA) attachPkgs pkgs wrapCDDA;
# You can fix it by hand
goodExample1 = myCDDA.overrideAttrs (old: {
passthru = old.passthru // {
pkgs = pkgs.override { build = goodExample1; };
withMods = wrapCDDA goodExample1;
};
});
# or by using a helper function `attachPkgs`.
goodExample2 = attachPkgs pkgs myCDDA;
in
# badExample # parallel building disabled
# goodExample1.withMods (_: []) # parallel building enabled
goodExample2.withMods (_: []) # parallel building enabled
```
## Customizing with mods {#customizing-with-mods}
To install Cataclysm DDA with mods of your choice, you can use `withMods`
attribute:
```nix
cataclysm-dda.withMods (mods: with mods; [
tileset.UndeadPeople
])
```
All mods, soundpacks, and tilesets available in nixpkgs are found in
`cataclysmDDA.pkgs`.
Here is an example to modify existing mods and/or add more mods not available
in nixpkgs:
```nix
let
customMods = self: super: lib.recursiveUpdate super {
# Modify existing mod
tileset.UndeadPeople = super.tileset.UndeadPeople.overrideAttrs (old: {
# If you like to apply a patch to the tileset for example
patches = [ ./path/to/your.patch ];
});
# Add another mod
mod.Awesome = cataclysmDDA.buildMod {
modName = "Awesome";
version = "0.x";
src = fetchFromGitHub {
owner = "Someone";
repo = "AwesomeMod";
rev = "...";
hash = "...";
};
# Path to be installed in the unpacked source (default: ".")
modRoot = "contents/under/this/path/will/be/installed";
};
# Add another soundpack
soundpack.Fantastic = cataclysmDDA.buildSoundPack {
# ditto
};
# Add another tileset
tileset.SuperDuper = cataclysmDDA.buildTileSet {
# ditto
};
};
in
cataclysm-dda.withMods (mods: with mods.extend customMods; [
tileset.UndeadPeople
mod.Awesome
soundpack.Fantastic
tileset.SuperDuper
])
```

View File

@@ -1,32 +0,0 @@
# Citrix Workspace {#sec-citrix}
The [Citrix Workspace App](https://www.citrix.com/products/workspace-app/) is a remote desktop viewer which provides access to [XenDesktop](https://www.citrix.com/products/xenapp-xendesktop/) installations.
## Basic usage {#sec-citrix-base}
The tarball archive needs to be downloaded manually, as the license agreements of the vendor for [Citrix Workspace](https://www.citrix.com/downloads/workspace-app/linux/workspace-app-for-linux-latest.html) needs to be accepted first. Then run `nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz`. With the archive available in the store, the package can be built and installed with Nix.
## Citrix Self-service {#sec-citrix-selfservice}
The [self-service](https://support.citrix.com/article/CTX200337) is an application managing Citrix desktops and applications. Please note that this feature only works with at least citrix_workspace_20_06_0 and later versions.
In order to set this up, you first have to [download the `.cr` file from the Netscaler Gateway](https://its.uiowa.edu/support/article/102186). After that, you can configure the `selfservice` like this:
```ShellSession
$ storebrowse -C ~/Downloads/receiverconfig.cr
$ selfservice
```
## Custom certificates {#sec-citrix-custom-certs}
The `Citrix Workspace App` in `nixpkgs` trusts several certificates [from the Mozilla database](https://curl.haxx.se/docs/caextract.html) by default. However, several companies using Citrix might require their own corporate certificate. On distros with imperative packaging, these certs can be stored easily in [`$ICAROOT`](https://citrix.github.io/receiver-for-linux-command-reference/), however this directory is a store path in `nixpkgs`. In order to work around this issue, the package provides a simple mechanism to add custom certificates without rebuilding the entire package using `symlinkJoin`:
```nix
with import <nixpkgs> { config.allowUnfree = true; };
let
extraCerts = [
./custom-cert-1.pem
./custom-cert-2.pem # ...
];
in citrix_workspace.override { inherit extraCerts; }
```

View File

@@ -1,13 +0,0 @@
# DLib {#dlib}
[DLib](http://dlib.net/) is a modern, C++-based toolkit which provides several machine learning algorithms.
## Compiling without AVX support {#compiling-without-avx-support}
Especially older CPUs don't support [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) (Advanced Vector Extensions) instructions that are used by DLib to optimize their algorithms.
On the affected hardware errors like `Illegal instruction` will occur. In those cases AVX support needs to be disabled:
```nix
self: super: { dlib = super.dlib.override { avxSupport = false; }; }
```

View File

@@ -1,64 +0,0 @@
# Eclipse {#sec-eclipse}
The Nix expressions related to the Eclipse platform and IDE are in [`pkgs/applications/editors/eclipse`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse).
Nixpkgs provides a number of packages that will install Eclipse in its various forms. These range from the bare-bones Eclipse Platform to the more fully featured Eclipse SDK or Scala-IDE packages and multiple version are often available. It is possible to list available Eclipse packages by issuing the command:
```ShellSession
$ nix-env -f '<nixpkgs>' -qaP -A eclipses --description
```
Once an Eclipse variant is installed, it can be run using the `eclipse` command, as expected. From within Eclipse, it is then possible to install plugins in the usual manner by either manually specifying an Eclipse update site or by installing the Marketplace Client plugin and using it to discover and install other plugins. This installation method provides an Eclipse installation that closely resemble a manually installed Eclipse.
If you prefer to install plugins in a more declarative manner, then Nixpkgs also offer a number of Eclipse plugins that can be installed in an _Eclipse environment_. This type of environment is created using the function `eclipseWithPlugins` found inside the `nixpkgs.eclipses` attribute set. This function takes as argument `{ eclipse, plugins ? [], jvmArgs ? [] }` where `eclipse` is a one of the Eclipse packages described above, `plugins` is a list of plugin derivations, and `jvmArgs` is a list of arguments given to the JVM running the Eclipse. For example, say you wish to install the latest Eclipse Platform with the popular Eclipse Color Theme plugin and also allow Eclipse to use more RAM. You could then add:
```nix
packageOverrides = pkgs: {
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
eclipse = eclipse-platform;
jvmArgs = [ "-Xmx2048m" ];
plugins = [ plugins.color-theme ];
};
}
```
to your Nixpkgs configuration (`~/.config/nixpkgs/config.nix`) and install it by running `nix-env -f '<nixpkgs>' -iA myEclipse` and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using `eclipseWithPlugins` by running:
```ShellSession
$ nix-env -f '<nixpkgs>' -qaP -A eclipses.plugins --description
```
If there is a need to install plugins that are not available in Nixpkgs then it may be possible to define these plugins outside Nixpkgs using the `buildEclipseUpdateSite` and `buildEclipsePlugin` functions found in the `nixpkgs.eclipses.plugins` attribute set. Use the `buildEclipseUpdateSite` function to install a plugin distributed as an Eclipse update site. This function takes `{ name, src }` as argument, where `src` indicates the Eclipse update site archive. All Eclipse features and plugins within the downloaded update site will be installed. When an update site archive is not available, then the `buildEclipsePlugin` function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument `{ name, srcFeature, srcPlugin }` where `srcFeature` and `srcPlugin` are the feature and plugin JARs, respectively.
Expanding the previous example with two plugins using the above functions, we have:
```nix
packageOverrides = pkgs: {
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
eclipse = eclipse-platform;
jvmArgs = [ "-Xmx2048m" ];
plugins = [
plugins.color-theme
(plugins.buildEclipsePlugin {
name = "myplugin1-1.0";
srcFeature = fetchurl {
url = "http:///features/myplugin1.jar";
hash = "sha256-123";
};
srcPlugin = fetchurl {
url = "http:///plugins/myplugin1.jar";
hash = "sha256-123";
};
});
(plugins.buildEclipseUpdateSite {
name = "myplugin2-1.0";
src = fetchurl {
stripRoot = false;
url = "http:///myplugin2.zip";
hash = "sha256-123";
};
});
];
};
}
```

View File

@@ -1,11 +0,0 @@
# Elm {#sec-elm}
To start a development environment, run:
```ShellSession
nix-shell -p elmPackages.elm elmPackages.elm-format
```
To update the Elm compiler, see `nixpkgs/pkgs/development/compilers/elm/README.md`.
To package Elm applications, [read about elm2nix](https://github.com/hercules-ci/elm2nix#elm2nix).

View File

@@ -1,119 +0,0 @@
# Emacs {#sec-emacs}
## Configuring Emacs {#sec-emacs-config}
The Emacs package comes with some extra helpers to make it easier to configure. `emacs.pkgs.withPackages` allows you to manage packages from ELPA. This means that you will not have to install that packages from within Emacs. For instance, if you wanted to use `company` `counsel`, `flycheck`, `ivy`, `magit`, `projectile`, and `use-package` you could use this as a `~/.config/nixpkgs/config.nix` override:
```nix
{
packageOverrides = pkgs: with pkgs; {
myEmacs = emacs.pkgs.withPackages (epkgs: (with epkgs.melpaStablePackages; [
company
counsel
flycheck
ivy
magit
projectile
use-package
]));
}
}
```
You can install it like any other packages via `nix-env -iA myEmacs`. However, this will only install those packages. It will not `configure` them for us. To do this, we need to provide a configuration file. Luckily, it is possible to do this from within Nix! By modifying the above example, we can make Emacs load a custom config file. The key is to create a package that provides a `default.el` file in `/share/emacs/site-start/`. Emacs knows to load this file automatically when it starts.
```nix
{
packageOverrides = pkgs: with pkgs; rec {
myEmacsConfig = writeText "default.el" ''
;; initialize package
(require 'package)
(package-initialize 'noactivate)
(eval-when-compile
(require 'use-package))
;; load some packages
(use-package company
:bind ("<C-tab>" . company-complete)
:diminish company-mode
:commands (company-mode global-company-mode)
:defer 1
:config
(global-company-mode))
(use-package counsel
:commands (counsel-descbinds)
:bind (([remap execute-extended-command] . counsel-M-x)
("C-x C-f" . counsel-find-file)
("C-c g" . counsel-git)
("C-c j" . counsel-git-grep)
("C-c k" . counsel-ag)
("C-x l" . counsel-locate)
("M-y" . counsel-yank-pop)))
(use-package flycheck
:defer 2
:config (global-flycheck-mode))
(use-package ivy
:defer 1
:bind (("C-c C-r" . ivy-resume)
("C-x C-b" . ivy-switch-buffer)
:map ivy-minibuffer-map
("C-j" . ivy-call))
:diminish ivy-mode
:commands ivy-mode
:config
(ivy-mode 1))
(use-package magit
:defer
:if (executable-find "git")
:bind (("C-x g" . magit-status)
("C-x G" . magit-dispatch-popup))
:init
(setq magit-completing-read-function 'ivy-completing-read))
(use-package projectile
:commands projectile-mode
:bind-keymap ("C-c p" . projectile-command-map)
:defer 5
:config
(projectile-global-mode))
'';
myEmacs = emacs.pkgs.withPackages (epkgs: (with epkgs.melpaStablePackages; [
(runCommand "default.el" {} ''
mkdir -p $out/share/emacs/site-lisp
cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el
'')
company
counsel
flycheck
ivy
magit
projectile
use-package
]));
};
}
```
This provides a fairly full Emacs start file. It will load in addition to the user's personal config. You can always disable it by passing `-q` to the Emacs command.
Sometimes `emacs.pkgs.withPackages` is not enough, as this package set has some priorities imposed on packages (with the lowest priority assigned to Melpa Unstable, and the highest for packages manually defined in `pkgs/top-level/emacs-packages.nix`). But you can't control these priorities when some package is installed as a dependency. You can override it on a per-package-basis, providing all the required dependencies manually, but it's tedious and there is always a possibility that an unwanted dependency will sneak in through some other package. To completely override such a package, you can use `overrideScope'`.
```nix
overrides = self: super: rec {
haskell-mode = self.melpaPackages.haskell-mode;
...
};
((emacsPackagesFor emacs).overrideScope' overrides).withPackages
(p: with p; [
# here both these package will use haskell-mode of our own choice
ghc-mod
dante
])
```

View File

@@ -1,18 +0,0 @@
# /etc files {#etc}
Certain calls in glibc require access to runtime files found in `/etc` such as `/etc/protocols` or `/etc/services` -- [getprotobyname](https://linux.die.net/man/3/getprotobyname) is one such function.
On non-NixOS distributions these files are typically provided by packages (i.e., [netbase](https://packages.debian.org/sid/netbase)) if not already pre-installed in your distribution. This can cause non-reproducibility for code if they rely on these files being present.
If [iana-etc](https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.iana-etc.x86_64-linux) is part of your `buildInputs`, then it will set the environment variables `NIX_ETC_PROTOCOLS` and `NIX_ETC_SERVICES` to the corresponding files in the package through a setup hook.
```bash
> nix-shell -p iana-etc
[nix-shell:~]$ env | grep NIX_ETC
NIX_ETC_SERVICES=/nix/store/aj866hr8fad8flnggwdhrldm0g799ccz-iana-etc-20210225/etc/services
NIX_ETC_PROTOCOLS=/nix/store/aj866hr8fad8flnggwdhrldm0g799ccz-iana-etc-20210225/etc/protocols
```
Nixpkg's version of [glibc](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/glibc/default.nix) has been patched to check for the existence of these environment variables. If the environment variables are *not* set, then it will attempt to find the files at the default location within `/etc`.

View File

@@ -1,55 +0,0 @@
# Firefox {#sec-firefox}
## Build wrapped Firefox with extensions and policies {#build-wrapped-firefox-with-extensions-and-policies}
The `wrapFirefox` function allows to pass policies, preferences and extensions that are available to Firefox. With the help of `fetchFirefoxAddon` this allows to build a Firefox version that already comes with add-ons pre-installed:
```nix
{
# Nix firefox addons only work with the firefox-esr package.
myFirefox = wrapFirefox firefox-esr-unwrapped {
nixExtensions = [
(fetchFirefoxAddon {
name = "ublock"; # Has to be unique!
url = "https://addons.mozilla.org/firefox/downloads/file/3679754/ublock_origin-1.31.0-an+fx.xpi";
hash = "sha256-2e73AbmYZlZXCP5ptYVcFjQYdjDp4iPoEPEOSCVF5sA=";
})
];
extraPolicies = {
CaptivePortal = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DisableFirefoxAccounts = true;
FirefoxHome = {
Pocket = false;
Snippets = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
SecurityDevices = {
# Use a proxy module rather than `nixpkgs.config.firefox.smartcardSupport = true`
"PKCS#11 Proxy Module" = "${pkgs.p11-kit}/lib/p11-kit-proxy.so";
};
};
extraPrefs = ''
// Show more ssl cert infos
lockPref("security.identityblock.show_extended_validation", true);
'';
};
}
```
If `nixExtensions != null`, then all manually installed add-ons will be uninstalled from your browser profile.
To view available enterprise policies, visit [enterprise policies](https://github.com/mozilla/policy-templates#enterprisepoliciesenabled)
or type into the Firefox URL bar: `about:policies#documentation`.
Nix installed add-ons do not have a valid signature, which is why signature verification is disabled. This does not compromise security because downloaded add-ons are checksummed and manual add-ons can't be installed. Also, make sure that the `name` field of `fetchFirefoxAddon` is unique. If you remove an add-on from the `nixExtensions` array, rebuild and start Firefox: the removed add-on will be completely removed with all of its settings.
## Troubleshooting {#sec-firefox-troubleshooting}
If add-ons are marked as broken or the signature is invalid, make sure you have Firefox ESR installed. Normal Firefox does not provide the ability anymore to disable signature verification for add-ons thus nix add-ons get disabled by the normal Firefox binary.
If add-ons do not appear installed despite being defined in your nix configuration file, reset the local add-on state of your Firefox profile by clicking `Help -> More Troubleshooting Information -> Refresh Firefox`. This can happen if you switch from manual add-on mode to nix add-on mode and then back to manual mode and then again to nix add-on mode.

View File

@@ -1,50 +0,0 @@
# Fish {#sec-fish}
Fish is a "smart and user-friendly command line shell" with support for plugins.
## Vendor Fish scripts {#sec-fish-vendor}
Any package may ship its own Fish completions, configuration snippets, and
functions. Those should be installed to
`$out/share/fish/vendor_{completions,conf,functions}.d` respectively.
When the `programs.fish.enable` and
`programs.fish.vendor.{completions,config,functions}.enable` options from the
NixOS Fish module are set to true, those paths are symlinked in the current
system environment and automatically loaded by Fish.
## Packaging Fish plugins {#sec-fish-plugins-pkg}
While packages providing standalone executables belong to the top level,
packages which have the sole purpose of extending Fish belong to the
`fishPlugins` scope and should be registered in
`pkgs/shells/fish/plugins/default.nix`.
The `buildFishPlugin` utility function can be used to automatically copy Fish
scripts from `$src/{completions,conf,conf.d,functions}` to the standard vendor
installation paths. It also sets up the test environment so that the optional
`checkPhase` is executed in a Fish shell with other already packaged plugins
and package-local Fish functions specified in `checkPlugins` and
`checkFunctionDirs` respectively.
See `pkgs/shells/fish/plugins/pure.nix` for an example of Fish plugin package
using `buildFishPlugin` and running unit tests with the `fishtape` test runner.
## Fish wrapper {#sec-fish-wrapper}
The `wrapFish` package is a wrapper around Fish which can be used to create
Fish shells initialized with some plugins as well as completions, configuration
snippets and functions sourced from the given paths. This provides a convenient
way to test Fish plugins and scripts without having to alter the environment.
```nix
wrapFish {
pluginPkgs = with fishPlugins; [ pure foreign-env ];
completionDirs = [];
functionDirs = [];
confDirs = [ "/path/to/some/fish/init/dir/" ];
}
```

View File

@@ -1,45 +0,0 @@
# FUSE {#sec-fuse}
Some packages rely on
[FUSE](https://www.kernel.org/doc/html/latest/filesystems/fuse.html) to provide
support for additional filesystems not supported by the kernel.
In general, FUSE software are primarily developed for Linux but many of them can
also run on macOS. Nixpkgs supports FUSE packages on macOS, but it requires
[macFUSE](https://osxfuse.github.io) to be installed outside of Nix. macFUSE
currently isn't packaged in Nixpkgs mainly because it includes a kernel
extension, which isn't supported by Nix outside of NixOS.
If a package fails to run on macOS with an error message similar to the
following, it's a likely sign that you need to have macFUSE installed.
dyld: Library not loaded: /usr/local/lib/libfuse.2.dylib
Referenced from: /nix/store/w8bi72bssv0bnxhwfw3xr1mvn7myf37x-sshfs-fuse-2.10/bin/sshfs
Reason: image not found
[1] 92299 abort /nix/store/w8bi72bssv0bnxhwfw3xr1mvn7myf37x-sshfs-fuse-2.10/bin/sshfs
Package maintainers may often encounter the following error when building FUSE
packages on macOS:
checking for fuse.h... no
configure: error: No fuse.h found.
This happens on autoconf based projects that use `AC_CHECK_HEADERS` or
`AC_CHECK_LIBS` to detect libfuse, and will occur even when the `fuse` package
is included in `buildInputs`. It happens because libfuse headers throw an error
on macOS if the `FUSE_USE_VERSION` macro is undefined. Many projects do define
`FUSE_USE_VERSION`, but only inside C source files. This results in the above
error at configure time because the configure script would attempt to compile
sample FUSE programs without defining `FUSE_USE_VERSION`.
There are two possible solutions for this problem in Nixpkgs:
1. Pass `FUSE_USE_VERSION` to the configure script by adding
`CFLAGS=-DFUSE_USE_VERSION=25` in `configureFlags`. The actual value would
have to match the definition used in the upstream source code.
2. Remove `AC_CHECK_HEADERS` / `AC_CHECK_LIBS` for libfuse.
However, a better solution might be to fix the build script upstream to use
`PKG_CHECK_MODULES` instead. This approach wouldn't suffer from the problem that
`AC_CHECK_HEADERS`/`AC_CHECK_LIBS` has at the price of introducing a dependency
on pkg-config.

View File

@@ -1,38 +0,0 @@
# ibus-engines.typing-booster {#sec-ibus-typing-booster}
This package is an ibus-based completion method to speed up typing.
## Activating the engine {#sec-ibus-typing-booster-activate}
IBus needs to be configured accordingly to activate `typing-booster`. The configuration depends on the desktop manager in use. For detailed instructions, please refer to the [upstream docs](https://mike-fabian.github.io/ibus-typing-booster/).
On NixOS, you need to explicitly enable `ibus` with given engines before customizing your desktop to use `typing-booster`. This can be achieved using the `ibus` module:
```nix
{ pkgs, ... }: {
i18n.inputMethod = {
enabled = "ibus";
ibus.engines = with pkgs.ibus-engines; [ typing-booster ];
};
}
```
## Using custom hunspell dictionaries {#sec-ibus-typing-booster-customize-hunspell}
The IBus engine is based on `hunspell` to support completion in many languages. By default, the dictionaries `de-de`, `en-us`, `fr-moderne` `es-es`, `it-it`, `sv-se` and `sv-fi` are in use. To add another dictionary, the package can be overridden like this:
```nix
ibus-engines.typing-booster.override { langs = [ "de-at" "en-gb" ]; }
```
_Note: each language passed to `langs` must be an attribute name in `pkgs.hunspellDicts`._
## Built-in emoji picker {#sec-ibus-typing-booster-emoji-picker}
The `ibus-engines.typing-booster` package contains a program named `emoji-picker`. To display all emojis correctly, a special font such as `noto-fonts-emoji` is needed:
On NixOS, it can be installed using the following expression:
```nix
{ pkgs, ... }: { fonts.fonts = with pkgs; [ noto-fonts-emoji ]; }
```

View File

@@ -1,29 +0,0 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="chap-packages">
<title>Packages</title>
<para>
This chapter contains information about how to use and maintain the Nix expressions for a number of specific packages, such as the Linux kernel or X.org.
</para>
<xi:include href="citrix.section.xml" />
<xi:include href="dlib.section.xml" />
<xi:include href="eclipse.section.xml" />
<xi:include href="elm.section.xml" />
<xi:include href="emacs.section.xml" />
<xi:include href="firefox.section.xml" />
<xi:include href="fish.section.xml" />
<xi:include href="fuse.section.xml" />
<xi:include href="ibus.section.xml" />
<xi:include href="kakoune.section.xml" />
<xi:include href="linux.section.xml" />
<xi:include href="locales.section.xml" />
<xi:include href="etc-files.section.xml" />
<xi:include href="nginx.section.xml" />
<xi:include href="opengl.section.xml" />
<xi:include href="shell-helpers.section.xml" />
<xi:include href="steam.section.xml" />
<xi:include href="cataclysm-dda.section.xml" />
<xi:include href="urxvt.section.xml" />
<xi:include href="weechat.section.xml" />
<xi:include href="xorg.section.xml" />
</chapter>

View File

@@ -1,9 +0,0 @@
# Kakoune {#sec-kakoune}
Kakoune can be built to autoload plugins:
```nix
(kakoune.override {
plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
})
```

View File

@@ -1,41 +0,0 @@
# Linux kernel {#sec-linux-kernel}
The Nix expressions to build the Linux kernel are in [`pkgs/os-specific/linux/kernel`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel).
The function that builds the kernel has an argument `kernelPatches` which should be a list of `{name, patch, extraConfig}` attribute sets, where `name` is the name of the patch (which is included in the kernels `meta.description` attribute), `patch` is the patch itself (possibly compressed), and `extraConfig` (optional) is a string specifying extra options to be concatenated to the kernel configuration file (`.config`).
The kernel derivation exports an attribute `features` specifying whether optional functionality is or isnt enabled. This is used in NixOS to implement kernel-specific behaviour. For instance, if the kernel has the `iwlwifi` feature (i.e., has built-in support for Intel wireless chipsets), then NixOS doesnt have to build the external `iwlwifi` package:
```nix
modulesTree = [kernel]
++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
++ ...;
```
How to add a new (major) version of the Linux kernel to Nixpkgs:
1. Copy the old Nix expression (e.g., `linux-2.6.21.nix`) to the new one (e.g., `linux-2.6.22.nix`) and update it.
2. Add the new kernel to the `kernels` attribute set in `linux-kernels.nix` (e.g., create an attribute `kernel_2_6_22`).
3. Now were going to update the kernel configuration. First unpack the kernel. Then for each supported platform (`i686`, `x86_64`, `uml`) do the following:
1. Make a copy from the old config (e.g., `config-2.6.21-i686-smp`) to the new one (e.g., `config-2.6.22-i686-smp`).
2. Copy the config file for this platform (e.g., `config-2.6.22-i686-smp`) to `.config` in the kernel source tree.
3. Run `make oldconfig ARCH={i386,x86_64,um}` and answer all questions. (For the uml configuration, also add `SHELL=bash`.) Make sure to keep the configuration consistent between platforms (i.e., dont enable some feature on `i686` and disable it on `x86_64`).
4. If needed, you can also run `make menuconfig`:
```ShellSession
$ nix-env -f "<nixpkgs>" -iA ncurses
$ export NIX_CFLAGS_LINK=-lncurses
$ make menuconfig ARCH=arch
```
5. Copy `.config` over the new config file (e.g., `config-2.6.22-i686-smp`).
4. Test building the kernel: `nix-build -A linuxKernel.kernels.kernel_2_6_22`. If it compiles, ship it! For extra credit, try booting NixOS with it.
5. It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the `linuxPackagesFor` function in `linux-kernels.nix` (such as the NVIDIA drivers, AUFS, etc.). If the updated packages arent backwards compatible with older kernels, you may need to keep the older versions around.

View File

@@ -1,5 +0,0 @@
# Locales {#locales}
To allow simultaneous use of packages linked against different versions of `glibc` with different locale archive formats, Nixpkgs patches `glibc` to rely on `LOCALE_ARCHIVE` environment variable.
On non-NixOS distributions, this variable is obviously not set. This can cause regressions in language support or even crashes in some Nixpkgs-provided programs. The simplest way to mitigate this problem is exporting the `LOCALE_ARCHIVE` variable pointing to `${glibcLocales}/lib/locale/locale-archive`. The drawback (and the reason this is not the default) is the relatively large (a hundred MiB) size of the full set of locales. It is possible to build a custom set of locales by overriding parameters `allLocales` and `locales` of the package.

View File

@@ -1,11 +0,0 @@
# Nginx {#sec-nginx}
[Nginx](https://nginx.org) is a reverse proxy and lightweight webserver.
## ETags on static files served from the Nix store {#sec-nginx-etag}
HTTP has a couple of different mechanisms for caching to prevent clients from having to download the same content repeatedly if a resource has not changed since the last time it was requested. When nginx is used as a server for static files, it implements the caching mechanism based on the [`Last-Modified`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the `Last-Modified` header. This doesn't give the desired behavior when the file is in the Nix store because all file timestamps are set to 0 (for reasons related to build reproducibility).
Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the [`ETag`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) response header. The value of the `ETag` header specifies some identifier for the particular content that the server is sending (e.g., a hash). When a client makes a second request for the same resource, it sends that value back in an `If-None-Match` header. If the ETag value is unchanged, then the server does not need to resend the content.
As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of `/nix/store`, the hash in the store path is used as the `ETag` header in the HTTP response, thus providing proper caching functionality. This happens automatically; you do not need to do modify any configuration to get this behavior.

View File

@@ -1,15 +0,0 @@
# OpenGL {#sec-opengl}
OpenGL support varies depending on which hardware is used and which drivers are available and loaded.
Broadly, we support both GL vendors: Mesa and NVIDIA.
## NixOS Desktop {#nixos-desktop}
The NixOS desktop or other non-headless configurations are the primary target for OpenGL libraries and applications. The current solution for discovering which drivers are available is based on [libglvnd](https://gitlab.freedesktop.org/glvnd/libglvnd). `libglvnd` performs "vendor-neutral dispatch", trying a variety of techniques to find the system's GL implementation. In practice, this will be either via standard GLX for X11 users or EGL for Wayland users, and supporting either NVIDIA or Mesa extensions.
## Nix on GNU/Linux {#nix-on-gnulinux}
If you are using a non-NixOS GNU/Linux/X11 desktop with free software video drivers, consider launching OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of `libglvnd` and `mesa.drivers` in `LD_LIBRARY_PATH`. For Mesa drivers, the Linux kernel version doesn't have to match nixpkgs.
For proprietary video drivers, you might have luck with also adding the corresponding video driver package.

View File

@@ -1,12 +0,0 @@
# Interactive shell helpers {#sec-shell-helpers}
Some packages provide the shell integration to be more useful. But unlike other systems, nix doesn't have a standard `share` directory location. This is why a bunch `PACKAGE-share` scripts are shipped that print the location of the corresponding shared folder. Current list of such packages is as following:
- `fzf` : `fzf-share`
E.g. `fzf` can then be used in the `.bashrc` like this:
```bash
source "$(fzf-share)/completion.bash"
source "$(fzf-share)/key-bindings.bash"
```

View File

@@ -1,63 +0,0 @@
# Steam {#sec-steam}
## Steam in Nix {#sec-steam-nix}
Steam is distributed as a `.deb` file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called `steam` that in Ubuntu (their target distro) would go to `/usr/bin`. When run for the first time, this script copies some files to the user's home, which include another script that is the ultimate responsible for launching the steam binary, which is also in `$HOME`.
Nix problems and constraints:
- We don't have `/bin/bash` and many scripts point there. Same thing for `/usr/bin/python`.
- We don't have the dynamic loader in `/lib`.
- The `steam.sh` script in `$HOME` cannot be patched, as it is checked and rewritten by steam.
- The steam binary cannot be patched, it's also checked.
The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented [here](http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html). This allows us to have binaries in the expected paths without disrupting the system, and to avoid patching them to work in a non FHS environment.
## How to play {#sec-steam-play}
Use `programs.steam.enable = true;` if you want to add steam to `systemPackages` and also enable a few workarounds as well as Steam controller support or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro Controller.
## Troubleshooting {#sec-steam-troub}
- **Steam fails to start. What do I do?**
Try to run
```ShellSession
strace steam
```
to see what is causing steam to fail.
- **Using the FOSS Radeon or nouveau (nvidia) drivers**
- The `newStdcpp` parameter was removed since NixOS 17.09 and should not be needed anymore.
- Steam ships statically linked with a version of `libcrypto` that conflicts with the one dynamically loaded by radeonsi_dri.so. If you get the error:
```
steam.sh: line 713: 7842 Segmentation fault (core dumped)
```
have a look at [this pull request](https://github.com/NixOS/nixpkgs/pull/20269).
- **Java**
1. There is no java in steam chrootenv by default. If you get a message like:
```
/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found
```
you need to add:
```nix
steam.override { withJava = true; };
```
## steam-run {#sec-steam-run}
The FHS-compatible chroot used for Steam can also be used to run other Linux games that expect a FHS environment. To use it, install the `steam-run` package and run the game with:
```
steam-run ./foo
```

View File

@@ -1,71 +0,0 @@
# Urxvt {#sec-urxvt}
Urxvt, also known as rxvt-unicode, is a highly customizable terminal emulator.
## Configuring urxvt {#sec-urxvt-conf}
In `nixpkgs`, urxvt is provided by the package `rxvt-unicode`. It can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, use an overlay or directly install an expression that overrides its configuration, such as:
```nix
rxvt-unicode.override {
configure = { availablePlugins, ... }: {
plugins = with availablePlugins; [ perls resize-font vtwheel ];
};
}
```
If the `configure` function returns an attrset without the `plugins` attribute, `availablePlugins` will be used automatically.
In order to add plugins but also keep all default plugins installed, it is possible to use the following method:
```nix
rxvt-unicode.override {
configure = { availablePlugins, ... }: {
plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
};
}
```
To get a list of all the plugins available, open the Nix REPL and run
```ShellSession
$ nix repl
:l <nixpkgs>
map (p: p.name) pkgs.rxvt-unicode.plugins
```
Alternatively, if your shell is bash or zsh and have completion enabled, simply type `nixpkgs.rxvt-unicode.plugins.<tab>`.
In addition to `plugins` the options `extraDeps` and `perlDeps` can be used to install extra packages. `extraDeps` can be used, for example, to provide `xsel` (a clipboard manager) to the clipboard plugin, without installing it globally:
```nix
rxvt-unicode.override {
configure = { availablePlugins, ... }: {
pluginsDeps = [ xsel ];
};
}
```
`perlDeps` is a handy way to provide Perl packages to your custom plugins (in `$HOME/.urxvt/ext`). For example, if you need `AnyEvent` you can do:
```nix
rxvt-unicode.override {
configure = { availablePlugins, ... }: {
perlDeps = with perlPackages; [ AnyEvent ];
};
}
```
## Packaging urxvt plugins {#sec-urxvt-pkg}
Urxvt plugins resides in `pkgs/applications/misc/rxvt-unicode-plugins`. To add a new plugin, create an expression in a subdirectory and add the package to the set in `pkgs/applications/misc/rxvt-unicode-plugins/default.nix`.
A plugin can be any kind of derivation, the only requirement is that it should always install perl scripts in `$out/lib/urxvt/perl`. Look for existing plugins for examples.
If the plugin is itself a Perl package that needs to be imported from other plugins or scripts, add the following passthrough:
```nix
passthru.perlPackages = [ "self" ];
```
This will make the urxvt wrapper pick up the dependency and set up the Perl path accordingly.

View File

@@ -1,85 +0,0 @@
# WeeChat {#sec-weechat}
WeeChat can be configured to include your choice of plugins, reducing its closure size from the default configuration which includes all available plugins. To make use of this functionality, install an expression that overrides its configuration, such as:
```nix
weechat.override {configure = {availablePlugins, ...}: {
plugins = with availablePlugins; [ python perl ];
}
}
```
If the `configure` function returns an attrset without the `plugins` attribute, `availablePlugins` will be used automatically.
The plugins currently available are `python`, `perl`, `ruby`, `guile`, `tcl` and `lua`.
The Python and Perl plugins allows the addition of extra libraries. For instance, the `inotify.py` script in `weechat-scripts` requires D-Bus or libnotify, and the `fish.py` script requires `pycrypto`. To use these scripts, use the plugin's `withPackages` attribute:
```nix
weechat.override { configure = {availablePlugins, ...}: {
plugins = with availablePlugins; [
(python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
];
};
}
```
In order to also keep all default plugins installed, it is possible to use the following method:
```nix
weechat.override { configure = { availablePlugins, ... }: {
plugins = builtins.attrValues (availablePlugins // {
python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]);
});
}; }
```
WeeChat allows to set defaults on startup using the `--run-command`. The `configure` method can be used to pass commands to the program:
```nix
weechat.override {
configure = { availablePlugins, ... }: {
init = ''
/set foo bar
/server add libera irc.libera.chat
'';
};
}
```
Further values can be added to the list of commands when running `weechat --run-command "your-commands"`.
Additionally, it's possible to specify scripts to be loaded when starting `weechat`. These will be loaded before the commands from `init`:
```nix
weechat.override {
configure = { availablePlugins, ... }: {
scripts = with pkgs.weechatScripts; [
weechat-xmpp weechat-matrix-bridge wee-slack
];
init = ''
/set plugins.var.python.jabber.key "val"
'':
};
}
```
In `nixpkgs` there's a subpackage which contains derivations for WeeChat scripts. Such derivations expect a `passthru.scripts` attribute, which contains a list of all scripts inside the store path. Furthermore, all scripts have to live in `$out/share`. An exemplary derivation looks like this:
```nix
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "exemplary-weechat-script";
src = fetchurl {
url = "https://scripts.tld/your-scripts.tar.gz";
hash = "...";
};
passthru.scripts = [ "foo.py" "bar.lua" ];
installPhase = ''
mkdir $out/share
cp foo.py $out/share
cp bar.lua $out/share
'';
}
```

View File

@@ -1,34 +0,0 @@
# X.org {#sec-xorg}
The Nix expressions for the X.org packages reside in `pkgs/servers/x11/xorg/default.nix`. This file is automatically generated from lists of tarballs in an X.org release. As such it should not be modified directly; rather, you should modify the lists, the generator script or the file `pkgs/servers/x11/xorg/overrides.nix`, in which you can override or add to the derivations produced by the generator.
## Katamari Tarballs {#katamari-tarballs}
X.org upstream releases used to include [katamari](https://en.wiktionary.org/wiki/%E3%81%8B%E3%81%9F%E3%81%BE%E3%82%8A) releases, which included a holistic recommended version for each tarball, up until 7.7. To create a list of tarballs in a katamari release:
```ShellSession
export release="X11R7.7"
export url="mirror://xorg/$release/src/everything/"
cat $(PRINT_PATH=1 nix-prefetch-url $url | tail -n 1) \
| perl -e 'while (<>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'url'}$2\n"; }; }' \
| sort > "tarballs-$release.list"
```
## Individual Tarballs {#individual-tarballs}
The upstream release process for [X11R7.8](https://x.org/wiki/Releases/7.8/) does not include a planned katamari. Instead, each component of X.org is released as its own tarball. We maintain `pkgs/servers/x11/xorg/tarballs.list` as a list of tarballs for each individual package. This list includes X.org core libraries and protocol descriptions, extra newer X11 interface libraries, like `xorg.libxcb`, and classic utilities which are largely unused but still available if needed, like `xorg.imake`.
## Generating Nix Expressions {#generating-nix-expressions}
The generator is invoked as follows:
```ShellSession
cd pkgs/servers/x11/xorg
<tarballs.list perl ./generate-expr-from-tarballs.pl
```
For each of the tarballs in the `.list` files, the script downloads it, unpacks it, and searches its `configure.ac` and `*.pc.in` files for dependencies. This information is used to generate `default.nix`. The generator caches downloaded tarballs between runs. Pay close attention to the `NOT FOUND: $NAME` messages at the end of the run, since they may indicate missing dependencies. (Some might be optional dependencies, however.)
## Overriding the Generator {#overriding-the-generator}
If the expression for a package requires derivation attributes that the generator cannot figure out automatically (say, `patches` or a `postInstall` hook), you should modify `pkgs/servers/x11/xorg/overrides.nix`.

View File

@@ -1,11 +0,0 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="chap-special">
<title>Special builders</title>
<para>
This chapter describes several special builders.
</para>
<xi:include href="special/fhs-environments.section.xml" />
<xi:include href="special/mkshell.section.xml" />
<xi:include href="special/darwin-builder.section.xml" />
</chapter>

View File

@@ -1,63 +0,0 @@
# darwin.builder {#sec-darwin-builder}
`darwin.builder` provides a way to bootstrap a Linux builder on a macOS machine.
This requires macOS version 12.4 or later.
This also requires that port 22 on your machine is free (since Nix does not
permit specifying a non-default SSH port for builders).
You will also need to be a trusted user for your Nix installation. In other
words, your `/etc/nix/nix.conf` should have something like:
```
extra-trusted-users = <your username goes here>
```
To launch the builder, run the following flake:
```ShellSession
$ nix run nixpkgs#darwin.builder
```
That will prompt you to enter your `sudo` password:
```
+ sudo --reset-timestamp /nix/store/…-install-credentials.sh ./keys
Password:
```
… so that it can install a private key used to `ssh` into the build server.
After that the script will launch the virtual machine and automatically log you
in as the `builder` user:
```
<<< Welcome to NixOS 22.11.20220901.1bd8d11 (aarch64) - ttyAMA0 >>>
Run 'nixos-help' for the NixOS manual.
nixos login: builder (automatic login)
[builder@nixos:~]$
```
> Note: When you need to stop the VM, run `shutdown now` as the `builder` user.
To delegate builds to the remote builder, add the following options to your
`nix.conf` file:
```
# - Replace ${ARCH} with either aarch64 or x86_64 to match your host machine
# - Replace ${MAX_JOBS} with the maximum number of builds (pick 4 if you're not sure)
builders = ssh-ng://builder@localhost ${ARCH}-linux /etc/nix/builder_ed25519 ${MAX_JOBS} - - - c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUpCV2N4Yi9CbGFxdDFhdU90RStGOFFVV3JVb3RpQzVxQkorVXVFV2RWQ2Igcm9vdEBuaXhvcwo=
# Not strictly necessary, but this will reduce your disk utilization
builders-use-substitutes = true
```
… and then restart your Nix daemon to apply the change:
```ShellSession
$ sudo launchctl kickstart -k system/org.nixos.nix-daemon
```

View File

@@ -1,49 +0,0 @@
# buildFHSUserEnv {#sec-fhs-environments}
`buildFHSUserEnv` provides a way to build and run FHS-compatible lightweight sandboxes. It creates an isolated root with bound `/nix/store`, 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:
- `name`
Environment name.
- `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.
- `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 command that would be executed inside the sandbox and passed all the command line arguments. It defaults to `bash`.
- `profile`
Optional script for `/etc/profile` within the sandbox.
One can create a simple environment using a `shell.nix` like that:
```nix
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
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` 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 `runScript` to the application path, e.g. `./bin/start.sh` -- relative paths are supported.
Additionally, the FHS builder links all relocated gsettings-schemas (the glib setup-hook moves them to `share/gsettings-schemas/${name}/glib-2.0/schemas`) to their standard FHS location. This means you don't need to wrap binaries with `wrapGAppsHook`.

View File

@@ -1,37 +0,0 @@
# pkgs.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
* `name` (default: `nix-shell`). Set the name of the derivation.
* `packages` (default: `[]`). Add executable packages to the `nix-shell` environment.
* `inputsFrom` (default: `[]`). Add build dependencies of the listed derivations to the `nix-shell` environment.
* `shellHook` (default: `""`). Bash statements that are executed by `nix-shell`.
... all the attributes of `stdenv.mkDerivation`.
## Building the shell
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,211 +0,0 @@
# Testers {#chap-testers}
This chapter describes several testing builders which are available in the <literal>testers</literal> namespace.
## `hasPkgConfigModule` {#tester-hasPkgConfigModule}
Checks whether a package exposes a certain `pkg-config` module.
Example:
```nix
passthru.tests.pkg-config = testers.hasPkgConfigModule {
package = finalAttrs.finalPackage;
moduleName = "libfoo";
}
```
## `testVersion` {#tester-testVersion}
Checks the command output contains the specified version
Although simplistic, this test assures that the main program
can run. While there's no substitute for a real test case,
it does catch dynamic linking errors and such. It also provides
some protection against accidentally building the wrong version,
for example when using an 'old' hash in a fixed-output derivation.
Examples:
```nix
passthru.tests.version = testers.testVersion { package = hello; };
passthru.tests.version = testers.testVersion {
package = seaweedfs;
command = "weed version";
};
passthru.tests.version = testers.testVersion {
package = key;
command = "KeY --help";
# Wrong '2.5' version in the code. Drop on next version.
version = "2.5";
};
passthru.tests.version = testers.testVersion {
package = ghr;
# The output needs to contain the 'version' string without any prefix or suffix.
version = "v${version}";
};
```
## `testBuildFailure` {#tester-testBuildFailure}
Make sure that a build does not succeed. This is useful for testing testers.
This returns a derivation with an override on the builder, with the following effects:
- Fail the build when the original builder succeeds
- Move `$out` to `$out/result`, if it exists (assuming `out` is the default output)
- Save the build log to `$out/testBuildFailure.log` (same)
Example:
```nix
runCommand "example" {
failed = testers.testBuildFailure (runCommand "fail" {} ''
echo ok-ish >$out
echo failing though
exit 3
'');
} ''
grep -F 'ok-ish' $failed/result
grep -F 'failing though' $failed/testBuildFailure.log
[[ 3 = $(cat $failed/testBuildFailure.exit) ]]
touch $out
'';
```
While `testBuildFailure` is designed to keep changes to the original builder's
environment to a minimum, some small changes are inevitable.
- The file `$TMPDIR/testBuildFailure.log` is present. It should not be deleted.
- `stdout` and `stderr` are a pipe instead of a tty. This could be improved.
- One or two extra processes are present in the sandbox during the original
builder's execution.
- The derivation and output hashes are different, but not unusual.
- The derivation includes a dependency on `buildPackages.bash` and
`expect-failure.sh`, which is built to include a transitive dependency on
`buildPackages.coreutils` and possibly more. These are not added to `PATH`
or any other environment variable, so they should be hard to observe.
## `testEqualContents` {#tester-equalContents}
Check that two paths have the same contents.
Example:
```nix
testers.testEqualContents {
assertion = "sed -e performs replacement";
expected = writeText "expected" ''
foo baz baz
'';
actual = runCommand "actual" {
# not really necessary for a package that's in stdenv
nativeBuildInputs = [ gnused ];
base = writeText "base" ''
foo bar baz
'';
} ''
sed -e 's/bar/baz/g' $base >$out
'';
}
```
## `testEqualDerivation` {#tester-testEqualDerivation}
Checks that two packages produce the exact same build instructions.
This can be used to make sure that a certain difference of configuration,
such as the presence of an overlay does not cause a cache miss.
When the derivations are equal, the return value is an empty file.
Otherwise, the build log explains the difference via `nix-diff`.
Example:
```nix
testers.testEqualDerivation
"The hello package must stay the same when enabling checks."
hello
(hello.overrideAttrs(o: { doCheck = true; }))
```
## `invalidateFetcherByDrvHash` {#tester-invalidateFetcherByDrvHash}
Use the derivation hash to invalidate the output via name, for testing.
Type: `(a@{ name, ... } -> Derivation) -> a -> Derivation`
Normally, fixed output derivations can and should be cached by their output
hash only, but for testing we want to re-fetch everytime the fetcher changes.
Changes to the fetcher become apparent in the drvPath, which is a hash of
how to fetch, rather than a fixed store path.
By inserting this hash into the name, we can make sure to re-run the fetcher
every time the fetcher changes.
This relies on the assumption that Nix isn't clever enough to reuse its
database of local store contents to optimize fetching.
You might notice that the "salted" name derives from the normal invocation,
not the final derivation. `invalidateFetcherByDrvHash` has to invoke the fetcher
function twice: once to get a derivation hash, and again to produce the final
fixed output derivation.
Example:
```nix
tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
name = "nix-source";
url = "https://github.com/NixOS/nix";
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
hash = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
};
```
## `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
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
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,223 +0,0 @@
# Trivial builders {#chap-trivial-builders}
Nixpkgs provides a couple of functions that help with building derivations. The most important one, `stdenv.mkDerivation`, has already been documented above. The following functions wrap `stdenv.mkDerivation`, making it easier to use in certain cases.
## `runCommand` {#trivial-builder-runCommand}
This takes three arguments, `name`, `env`, and `buildCommand`. `name` is just the name that Nix will append to the store path in the same way that `stdenv.mkDerivation` uses its `name` attribute. `env` is an attribute set specifying environment variables that will be set for this derivation. These attributes are then passed to the wrapped `stdenv.mkDerivation`. `buildCommand` specifies the commands that will be run to create this derivation. Note that you will need to create `$out` for Nix to register the command as successful.
An example of using `runCommand` is provided below.
```nix
(import <nixpkgs> {}).runCommand "my-example" {} ''
echo My example command is running
mkdir $out
echo I can write data to the Nix store > $out/message
echo I can also run basic commands like:
echo ls
ls
echo whoami
whoami
echo date
date
''
```
## `runCommandCC` {#trivial-builder-runCommandCC}
This works just like `runCommand`. The only difference is that it also provides a C compiler in `buildCommand`'s environment. To minimize your dependencies, you should only use this if you are sure you will need a C compiler as part of running your command.
## `runCommandLocal` {#trivial-builder-runCommandLocal}
Variant of `runCommand` that forces the derivation to be built locally, it is not substituted. This is intended for very cheap commands (<1s execution time). It saves on the network round-trip and can speed up a build.
::: {.note}
This sets [`allowSubstitutes` to `false`](https://nixos.org/nix/manual/#adv-attr-allowSubstitutes), so only use `runCommandLocal` if you are certain the user will always have a builder for the `system` of the derivation. This should be true for most trivial use cases (e.g., just copying some files to a different location or adding symlinks) because there the `system` is usually the same as `builtins.currentSystem`.
:::
## `writeTextFile`, `writeText`, `writeTextDir`, `writeScript`, `writeScriptBin` {#trivial-builder-writeText}
These functions write `text` to the Nix store. This is useful for creating scripts from Nix expressions. `writeTextFile` takes an attribute set and expects two arguments, `name` and `text`. `name` corresponds to the name used in the Nix store path. `text` will be the contents of the file. You can also set `executable` to true to make this file have the executable bit set.
Many more commands wrap `writeTextFile` including `writeText`, `writeTextDir`, `writeScript`, and `writeScriptBin`. These are convenience functions over `writeTextFile`.
Here are a few examples:
```nix
# Writes my-file to /nix/store/<store path>
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
}
# See also the `writeText` helper function below.
# Writes executable my-file to /nix/store/<store path>/bin/my-file
writeTextFile {
name = "my-file";
text = ''
Contents of File
'';
executable = true;
destination = "/bin/my-file";
}
# Writes contents of file to /nix/store/<store path>
writeText "my-file"
''
Contents of File
'';
# Writes contents of file to /nix/store/<store path>/share/my-file
writeTextDir "share/my-file"
''
Contents of File
'';
# Writes my-file to /nix/store/<store path> and makes executable
writeScript "my-file"
''
Contents of File
'';
# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.
writeScriptBin "my-file"
''
Contents of File
'';
# Writes my-file to /nix/store/<store path> and makes executable.
writeShellScript "my-file"
''
Contents of File
'';
# Writes my-file to /nix/store/<store path>/bin/my-file and makes executable.
writeShellScriptBin "my-file"
''
Contents of File
'';
```
## `concatTextFile`, `concatText`, `concatScript` {#trivial-builder-concatText}
These functions concatenate `files` to the Nix store in a single file. This is useful for configuration files structured in lines of text. `concatTextFile` takes an attribute set and expects two arguments, `name` and `files`. `name` corresponds to the name used in the Nix store path. `files` will be the files to be concatenated. You can also set `executable` to true to make this file have the executable bit set.
`concatText` and`concatScript` are simple wrappers over `concatTextFile`.
Here are a few examples:
```nix
# Writes my-file to /nix/store/<store path>
concatTextFile {
name = "my-file";
files = [ drv1 "${drv2}/path/to/file" ];
}
# See also the `concatText` helper function below.
# Writes executable my-file to /nix/store/<store path>/bin/my-file
concatTextFile {
name = "my-file";
files = [ drv1 "${drv2}/path/to/file" ];
executable = true;
destination = "/bin/my-file";
}
# Writes contents of files to /nix/store/<store path>
concatText "my-file" [ file1 file2 ]
# Writes contents of files to /nix/store/<store path>
concatScript "my-file" [ file1 file2 ]
```
## `writeShellApplication` {#trivial-builder-writeShellApplication}
This can be used to easily produce a shell script that has some dependencies (`runtimeInputs`). It automatically sets the `PATH` of the script to contain all of the listed inputs, sets some sanity shellopts (`errexit`, `nounset`, `pipefail`), and checks the resulting script with [`shellcheck`](https://github.com/koalaman/shellcheck).
For example, look at the following code:
```nix
writeShellApplication {
name = "show-nixos-org";
runtimeInputs = [ curl w3m ];
text = ''
curl -s 'https://nixos.org' | w3m -dump -T text/html
'';
}
```
Unlike with normal `writeShellScriptBin`, there is no need to manually write out `${curl}/bin/curl`, setting the PATH
was handled by `writeShellApplication`. Moreover, the script is being checked with `shellcheck` for more strict
validation.
## `symlinkJoin` {#trivial-builder-symlinkJoin}
This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, `name`, and `paths`. `name` is the name used in the Nix store path for the created derivation. `paths` is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within.
Here is an example:
```nix
# adds symlinks of hello and stack to current build and prints "links added"
symlinkJoin { name = "myexample"; paths = [ pkgs.hello pkgs.stack ]; postBuild = "echo links added"; }
```
This creates a derivation with a directory structure like the following:
```
/nix/store/sglsr5g079a5235hy29da3mq3hv8sjmm-myexample
|-- bin
| |-- hello -> /nix/store/qy93dp4a3rqyn2mz63fbxjg228hffwyw-hello-2.10/bin/hello
| `-- stack -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/bin/stack
`-- share
|-- bash-completion
| `-- completions
| `-- stack -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/share/bash-completion/completions/stack
|-- fish
| `-- vendor_completions.d
| `-- stack.fish -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1/share/fish/vendor_completions.d/stack.fish
...
```
## `writeReferencesToFile` {#trivial-builder-writeReferencesToFile}
Writes the closure of transitive dependencies to a file.
This produces the equivalent of `nix-store -q --requisites`.
For example,
```nix
writeReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
```
produces an output path `/nix/store/<hash>-runtime-deps` containing
```nix
/nix/store/<hash>-hello-2.10
/nix/store/<hash>-hi
/nix/store/<hash>-libidn2-2.3.0
/nix/store/<hash>-libunistring-0.9.10
/nix/store/<hash>-glibc-2.32-40
```
You can see that this includes `hi`, the original input path,
`hello`, which is a direct reference, but also
the other paths that are indirectly required to run `hello`.
## `writeDirectReferencesToFile` {#trivial-builder-writeDirectReferencesToFile}
Writes the set of references to the output file, that is, their immediate dependencies.
This produces the equivalent of `nix-store -q --references`.
For example,
```nix
writeDirectReferencesToFile (writeScriptBin "hi" ''${hello}/bin/hello'')
```
produces an output path `/nix/store/<hash>-runtime-references` containing
```nix
/nix/store/<hash>-hello-2.10
```
but none of `hello`'s dependencies because those are not referenced directly
by `hi`'s output.

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

@@ -0,0 +1,603 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-conventions">
<title>Coding conventions</title>
<section><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>. TODO: naming of
attributes in
<filename>all-packages.nix</filename>?</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><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. 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-pre-r3910"</literal> instead of
<literal>"hello-svn-r3910"</literal>, as the latter would be seen as
a package named <literal>hello-svn</literal> by
<command>nix-env</command>.</para></listitem>
<listitem><para>Dashes in the package name should be preserved
in new variable names, rather than converted to underscores
(which was convention up to around 2013 and most names
still have underscores instead of dashes) — e.g.,
<varname>http-parser</varname> instead of
<varname>http_parser</varname>.</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><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 intented
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>
(including <emphasis>window managers</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 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>
</chapter>

21
doc/contributing.xml Normal file
View File

@@ -0,0 +1,21 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-contributing">
<title>Contributing</title>
<para>If you make modifications to the manual, it's important to build the manual before contributing:</para>
<orderedlist>
<listitem><para><command>$ git clone git://github.com/NixOS/nixpkgs.git</command></para></listitem>
<listitem><para><command>$ cd nixpkgs/pkgs/top-level</command></para></listitem>
<listitem><para><command>$ nix-build -A tarball release.nix</command></para></listitem>
<listitem><para>Inside the built derivation you shall see <literal>manual/index.html</literal> file.</para></listitem>
</orderedlist>
</chapter>

View File

@@ -1,691 +0,0 @@
# Coding conventions {#chap-conventions}
## Syntax {#sec-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 [](#sec-package-naming).
- Function calls with attribute set arguments are written as
```nix
foo {
arg = ...;
}
```
not
```nix
foo
{
arg = ...;
}
```
Also fine is
```nix
foo { arg = ...; }
```
if it's a short call.
- In attribute sets or lists that span multiple lines, the attribute names or list elements should be aligned:
```nix
# A long list.
list = [
elem1
elem2
elem3
];
# A long attribute set.
attrs = {
attr1 = short_expr;
attr2 =
if true then big_expr else big_expr;
};
# Combined
listOfAttrs = [
{
attr1 = 3;
attr2 = "fff";
}
{
attr1 = 5;
attr2 = "ggg";
}
];
```
- Short lists or attribute sets can be written on one line:
```nix
# A short list.
list = [ elem1 elem2 elem3 ];
# A short set.
attrs = { x = 1280; y = 1024; };
```
- Breaking in the middle of a function argument can give hard-to-read code, like
```nix
someFunction { x = 1280;
y = 1024; } otherArg
yetAnotherArg
```
(especially if the argument is very large, spanning multiple lines).
Better:
```nix
someFunction
{ x = 1280; y = 1024; }
otherArg
yetAnotherArg
```
or
```nix
let res = { x = 1280; y = 1024; };
in someFunction res otherArg yetAnotherArg
```
- The bodies of functions, asserts, and withs are not indented to prevent a lot of superfluous indentation levels, i.e.
```nix
{ arg1, arg2 }:
assert system == "i686-linux";
stdenv.mkDerivation { ...
```
not
```nix
{ arg1, arg2 }:
assert system == "i686-linux";
stdenv.mkDerivation { ...
```
- Function formal arguments are written as:
```nix
{ arg1, arg2, arg3 }:
```
but if they don't fit on one line they're written as:
```nix
{ arg1, arg2, arg3
, arg4, ...
, # Some comment...
argN
}:
```
- Functions should list their expected arguments as precisely as possible. That is, write
```nix
{ stdenv, fetchurl, perl }: ...
```
instead of
```nix
args: with args; ...
```
or
```nix
{ stdenv, fetchurl, perl, ... }: ...
```
For functions that are truly generic in the number of arguments (such as wrappers around `mkDerivation`) that have some required arguments, you should write them using an `@`-pattern:
```nix
{ stdenv, doCoverageAnalysis ? false, ... } @ args:
stdenv.mkDerivation (args // {
... if doCoverageAnalysis then "bla" else "" ...
})
```
instead of
```nix
args:
args.stdenv.mkDerivation (args // {
... if args ? doCoverageAnalysis && args.doCoverageAnalysis then "bla" else "" ...
})
```
- Unnecessary string conversions should be avoided. Do
```nix
rev = version;
```
instead of
```nix
rev = "${version}";
```
- Building lists conditionally _should_ be done with `lib.optional(s)` instead of using `if cond then [ ... ] else null` or `if cond then [ ... ] else [ ]`.
```nix
buildInputs = lib.optional stdenv.isDarwin iconv;
```
instead of
```nix
buildInputs = if stdenv.isDarwin then [ iconv ] else null;
```
As an exception, an explicit conditional expression with null can be used when fixing a important bug without triggering a mass rebuild.
If this is done a follow up pull request _should_ be created to change the code to `lib.optional(s)`.
- Arguments should be listed in the order they are used, with the exception of `lib`, which always goes first.
## Package naming {#sec-package-naming}
The key words _must_, _must not_, _required_, _shall_, _shall not_, _should_, _should not_, _recommended_, _may_, and _optional_ in this section are to be interpreted as described in [RFC 2119](https://tools.ietf.org/html/rfc2119). Only _emphasized_ words are to be interpreted in this way.
In Nixpkgs, there are generally three different names associated with a package:
- The `pname` attribute of the derivation. This is what most users see, in particular when using `nix-env`.
- The variable name used for the instantiated package in `all-packages.nix`, and when passing it as a dependency to other functions. Typically this is called the _package attribute name_. This is what Nix expression authors see. It can also be used when installing using `nix-env -iA`.
- The filename for (the directory containing) the Nix expression.
Most of the time, these are the same. For instance, the package `e2fsprogs` has a `pname` attribute `"e2fsprogs"`, is bound to the variable name `e2fsprogs` in `all-packages.nix`, and the Nix expression is in `pkgs/os-specific/linux/e2fsprogs/default.nix`.
There are a few naming guidelines:
- The `pname` attribute _should_ be identical to the upstream package name.
- The `pname` and the `version` attribute _must not_ contain uppercase letters — e.g., `"mplayer" instead of `"MPlayer"`.
- The `version` attribute _must_ start with a digit e.g`"0.3.1rc2".
- If a package is not a release but a commit from a repository, then the `version` attribute _must_ be the date of that (fetched) commit. The date _must_ be in `"unstable-YYYY-MM-DD"` format.
- Dashes in the package `pname` _should_ be preserved in new variable names, rather than converted to underscores or camel cased — e.g., `http-parser` instead of `http_parser` or `httpParser`. The hyphenated style is preferred in all three package names.
- If there are multiple versions of a package, this _should_ be reflected in the variable names in `all-packages.nix`, e.g. `json-c_0_9` and `json-c_0_11`. If there is an obvious “default” version, make an attribute like `json-c = json-c_0_9;`. See also [](#sec-versioning)
## File naming and organisation {#sec-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`.
### Hierarchy {#sec-hierarchy}
Each package should be stored in its own directory somewhere in the `pkgs/` tree, i.e. in `pkgs/category/subcategory/.../pkgname`. Below are some rules for picking the right category for a package. Many packages fall under several categories; what matters is the _primary_ purpose of a package. For example, the `libxml2` package builds both a library and some tools; but its a library foremost, so it goes under `pkgs/development/libraries`.
When in doubt, consider refactoring the `pkgs/` tree, e.g. creating new categories or splitting up an existing category.
**If its used to support _software development_:**
- **If its a _library_ used by other packages:**
- `development/libraries` (e.g. `libxml2`)
- **If its a _compiler_:**
- `development/compilers` (e.g. `gcc`)
- **If its an _interpreter_:**
- `development/interpreters` (e.g. `guile`)
- **If its a (set of) development _tool(s)_:**
- **If its a _parser generator_ (including lexers):**
- `development/tools/parsing` (e.g. `bison`, `flex`)
- **If its a _build manager_:**
- `development/tools/build-managers` (e.g. `gnumake`)
- **If its a _language server_:**
- `development/tools/language-servers` (e.g. `ccls` or `rnix-lsp`)
- **Else:**
- `development/tools/misc` (e.g. `binutils`)
- **Else:**
- `development/misc`
**If its a (set of) _tool(s)_:**
(A tool is a relatively small program, especially one intended to be used non-interactively.)
- **If its for _networking_:**
- `tools/networking` (e.g. `wget`)
- **If its for _text processing_:**
- `tools/text` (e.g. `diffutils`)
- **If its a _system utility_, i.e., something related or essential to the operation of a system:**
- `tools/system` (e.g. `cron`)
- **If its an _archiver_ (which may include a compression function):**
- `tools/archivers` (e.g. `zip`, `tar`)
- **If its a _compression_ program:**
- `tools/compression` (e.g. `gzip`, `bzip2`)
- **If its a _security_-related program:**
- `tools/security` (e.g. `nmap`, `gnupg`)
- **Else:**
- `tools/misc`
**If its a _shell_:**
- `shells` (e.g. `bash`)
**If its a _server_:**
- **If its a web server:**
- `servers/http` (e.g. `apache-httpd`)
- **If its an implementation of the X Windowing System:**
- `servers/x11` (e.g. `xorg` — this includes the client libraries and programs)
- **Else:**
- `servers/misc`
**If its a _desktop environment_:**
- `desktops` (e.g. `kde`, `gnome`, `enlightenment`)
**If its a _window manager_:**
- `applications/window-managers` (e.g. `awesome`, `stumpwm`)
**If its an _application_:**
A (typically large) program with a distinct user interface, primarily used interactively.
- **If its a _version management system_:**
- `applications/version-management` (e.g. `subversion`)
- **If its a _terminal emulator_:**
- `applications/terminal-emulators` (e.g. `alacritty` or `rxvt` or `termite`)
- **If its a _file manager_:**
- `applications/file-managers` (e.g. `mc` or `ranger` or `pcmanfm`)
- **If its for _video playback / editing_:**
- `applications/video` (e.g. `vlc`)
- **If its for _graphics viewing / editing_:**
- `applications/graphics` (e.g. `gimp`)
- **If its for _networking_:**
- **If its a _mailreader_:**
- `applications/networking/mailreaders` (e.g. `thunderbird`)
- **If its a _newsreader_:**
- `applications/networking/newsreaders` (e.g. `pan`)
- **If its a _web browser_:**
- `applications/networking/browsers` (e.g. `firefox`)
- **Else:**
- `applications/networking/misc`
- **Else:**
- `applications/misc`
**If its _data_ (i.e., does not have a straight-forward executable semantics):**
- **If its a _font_:**
- `data/fonts`
- **If its an _icon theme_:**
- `data/icons`
- **If its related to _SGML/XML processing_:**
- **If its an _XML DTD_:**
- `data/sgml+xml/schemas/xml-dtd` (e.g. `docbook`)
- **If its an _XSLT stylesheet_:**
(Okay, these are executable...)
- `data/sgml+xml/stylesheets/xslt` (e.g. `docbook-xsl`)
- **If its a _theme_ for a _desktop environment_, a _window manager_ or a _display manager_:**
- `data/themes`
**If its a _game_:**
- `games`
**Else:**
- `misc`
### Versioning {#sec-versioning}
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.
If there is only one version of a package, its Nix expression should be named `e2fsprogs/default.nix`. If there are multiple versions, this should be reflected in the filename, e.g. `e2fsprogs/1.41.8.nix` and `e2fsprogs/1.41.9.nix`. 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 `firefox/2.0.nix` and `firefox/3.5.nix`, respectively (which, at a given point, might contain versions `2.0.0.20` and `3.5.4`). If a version requires many auxiliary files, you can use a subdirectory for each version, e.g. `firefox/2.0/default.nix` and `firefox/3.5/default.nix`.
All versions of a package _must_ be included in `all-packages.nix` to make sure that they evaluate correctly.
## Fetching Sources {#sec-sources}
There are multiple ways to fetch a package source in nixpkgs. The general guideline is that you should package reproducible sources with a high degree of availability. Right now there is only one fetcher which has mirroring support and that is `fetchurl`. Note that you should also prefer protocols which have a corresponding proxy environment variable.
You can find many source fetch helpers in `pkgs/build-support/fetch*`.
In the file `pkgs/top-level/all-packages.nix` you can find fetch helpers, these have names on the form `fetchFrom*`. The intention of these are to provide snapshot fetches but using the same api as some of the version controlled fetchers from `pkgs/build-support/`. As an example going from bad to good:
- Bad: Uses `git://` which won't be proxied.
```nix
src = fetchgit {
url = "git@github.com:NixOS/nix.git"
url = "git://github.com/NixOS/nix.git";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
hash = "sha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=";
}
```
- Better: This is ok, but an archive fetch will still be faster.
```nix
src = fetchgit {
url = "https://github.com/NixOS/nix.git";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
hash = "sha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=";
}
```
- Best: Fetches a snapshot archive and you get the rev you want.
```nix
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
hash = "ha256-7D4m+saJjbSFP5hOwpQq2FGR2rr+psQMTcyb1ZvtXsQ=;
}
```
When fetching from GitHub, commits must always be referenced by their full commit hash. This is because GitHub shares commit hashes among all forks and returns `404 Not Found` when a short commit hash is ambiguous. It already happens for some short, 6-character commit hashes in `nixpkgs`.
It is a practical vector for a denial-of-service attack by pushing large amounts of auto generated commits into forks and was already [demonstrated against GitHub Actions Beta](https://blog.teddykatz.com/2019/11/12/github-actions-dos.html).
Find the value to put as `hash` by running `nix-shell -p nix-prefetch-github --run "nix-prefetch-github --rev 1f795f9f44607cc5bec70d1300150bfefcef2aae NixOS nix"`.
## Obtaining source hash {#sec-source-hashes}
Preferred source hash type is sha256. There are several ways to get it.
1. Prefetch URL (with `nix-prefetch-XXX URL`, where `XXX` is one of `url`, `git`, `hg`, `cvs`, `bzr`, `svn`). Hash is printed to stdout.
2. Prefetch by package source (with `nix-prefetch-url '<nixpkgs>' -A PACKAGE.src`, where `PACKAGE` is package attribute name). Hash is printed to stdout.
This works well when you've upgraded existing package version and want to find out new hash, but is useless if package can't be accessed by attribute or package has multiple sources (`.srcs`, architecture-dependent sources, etc).
3. Upstream provided hash: use it when upstream provides `sha256` or `sha512` (when upstream provides `md5`, don't use it, compute `sha256` instead).
A little nuance is that `nix-prefetch-*` tools produce hash encoded with `base32`, but upstream usually provides hexadecimal (`base16`) encoding. Fetchers understand both formats. Nixpkgs does not standardize on any one format.
You can convert between formats with nix-hash, for example:
```ShellSession
$ nix-hash --type sha256 --to-base32 HASH
```
4. Extracting hash from local source tarball can be done with `sha256sum`. Use `nix-prefetch-url file:///path/to/tarball` if you want base32 hash.
5. Fake hash: set the hash to one of
- `""`
- `lib.fakeHash`
- `lib.fakeSha256`
- `lib.fakeSha512`
in the package expression, attempt build and extract correct hash from error messages.
::: {.warning}
You must use one of these four fake hashes and not some arbitrarily-chosen hash.
See [](#sec-source-hashes-security).
:::
This is last resort method when reconstructing source URL is non-trivial and `nix-prefetch-url -A` isnt applicable (for example, [one of `kodi` dependencies](https://github.com/NixOS/nixpkgs/blob/d2ab091dd308b99e4912b805a5eb088dd536adb9/pkgs/applications/video/kodi/default.nix#L73)). The easiest way then would be replace hash with a fake one and rebuild. Nix build will fail and error message will contain desired hash.
### Obtaining hashes securely {#sec-source-hashes-security}
Let's say Man-in-the-Middle (MITM) sits close to your network. Then instead of fetching source you can fetch malware, and instead of source hash you get hash of malware. Here are security considerations for this scenario:
- `http://` URLs are not secure to prefetch hash from;
- hashes from upstream (in method 3) should be obtained via secure protocol;
- `https://` URLs are secure in methods 1, 2, 3;
- `https://` URLs are secure in method 5 *only if* you use one of the listed fake hashes. If you use any other hash, `fetchurl` will pass `--insecure` to `curl` and may then degrade to HTTP in case of TLS certificate expiration.
## Patches {#sec-patches}
Patches available online should be retrieved using `fetchpatch`.
```nix
patches = [
(fetchpatch {
name = "fix-check-for-using-shared-freetype-lib.patch";
url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285";
hash = "sha256-uRcxaCjd+WAuGrXOmGfFeu79cUILwkRdBu48mwcBE7g=";
})
];
```
Otherwise, you can add a `.patch` file to the `nixpkgs` repository. In the interest of keeping our maintenance burden to a minimum, only patches that are unique to `nixpkgs` should be added in this way.
If a patch is available online but does not cleanly apply, it can be modified in some fixed ways by using additional optional arguments for `fetchpatch`. Check [](#fetchpatch) for details.
```nix
patches = [ ./0001-changes.patch ];
```
If you do need to do create this sort of patch file, one way to do so is with git:
1. Move to the root directory of the source code you're patching.
```ShellSession
$ cd the/program/source
```
2. If a git repository is not already present, create one and stage all of the source files.
```ShellSession
$ git init
$ git add .
```
3. Edit some files to make whatever changes need to be included in the patch.
4. Use git to create a diff, and pipe the output to a patch file:
```ShellSession
$ git diff -a > nixpkgs/pkgs/the/package/0001-changes.patch
```
## Package tests {#sec-package-tests}
Tests are important to ensure quality and make reviews and automatic updates easy.
The following types of tests exists:
* [NixOS **module tests**](https://nixos.org/manual/nixos/stable/#sec-nixos-tests), which spawn one or more NixOS VMs. They exercise both NixOS modules and the packaged programs used within them. For example, a NixOS module test can start a web server VM running the `nginx` module, and a client VM running `curl` or a graphical `firefox`, and test that they can talk to each other and display the correct content.
* Nix **package tests** are a lightweight alternative to NixOS module tests. They should be used to create simple integration tests for packages, but cannot test NixOS services, and some programs with graphical user interfaces may also be difficult to test with them.
* The **`checkPhase` of a package**, which should execute the unit tests that are included in the source code of a package.
Here in the nixpkgs manual we describe mostly _package tests_; for _module tests_ head over to the corresponding [section in the NixOS manual](https://nixos.org/manual/nixos/stable/#sec-nixos-tests).
### Writing inline package tests {#ssec-inline-package-tests-writing}
For very simple tests, they can be written inline:
```nix
{ …, yq-go }:
buildGoModule rec {
passthru.tests = {
simple = runCommand "${pname}-test" {} ''
echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
[ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
'';
};
}
```
### Writing larger package tests {#ssec-package-tests-writing}
This is an example using the `phoronix-test-suite` package with the current best practices.
Add the tests in `passthru.tests` to the package definition like this:
```nix
{ stdenv, lib, fetchurl, callPackage }:
stdenv.mkDerivation {
passthru.tests = {
simple-execution = callPackage ./tests.nix { };
};
meta = { … };
}
```
Create `tests.nix` in the package directory:
```nix
{ runCommand, phoronix-test-suite }:
let
inherit (phoronix-test-suite) pname version;
in
runCommand "${pname}-tests" { meta.timeout = 60; }
''
# automatic initial setup to prevent interactive questions
${phoronix-test-suite}/bin/phoronix-test-suite enterprise-setup >/dev/null
# get version of installed program and compare with package version
if [[ `${phoronix-test-suite}/bin/phoronix-test-suite version` != *"${version}"* ]]; then
echo "Error: program version does not match package version"
exit 1
fi
# run dummy command
${phoronix-test-suite}/bin/phoronix-test-suite dummy_module.dummy-command >/dev/null
# needed for Nix to register the command as successful
touch $out
''
```
### Running package tests {#ssec-package-tests-running}
You can run these tests with:
```ShellSession
$ cd path/to/nixpkgs
$ nix-build -A phoronix-test-suite.tests
```
### Examples of package tests {#ssec-package-tests-examples}
Here are examples of package tests:
- [Jasmin compile test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/jasmin/test-assemble-hello-world/default.nix)
- [Lobster compile test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/lobster/test-can-run-hello-world.nix)
- [Spacy annotation test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/spacy/annotation-test/default.nix)
- [Libtorch test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/science/math/libtorch/test/default.nix)
- [Multiple tests for nanopb](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/nanopb/default.nix)
### Linking NixOS module tests to a package {#ssec-nixos-tests-linking}
Like [package tests](#ssec-package-tests-writing) as shown above, [NixOS module tests](https://nixos.org/manual/nixos/stable/#sec-nixos-tests) can also be linked to a package, so that the tests can be easily run when changing the related package.
For example, assuming we're packaging `nginx`, we can link its module test via `passthru.tests`:
```nix
{ stdenv, lib, nixosTests }:
stdenv.mkDerivation {
...
passthru.tests = {
nginx = nixosTests.nginx;
};
...
}
```
### Import From Derivation {#ssec-import-from-derivation}
Import From Derivation (IFD) is disallowed in Nixpkgs for performance reasons:
[Hydra] evaluates the entire package set, and sequential builds during evaluation would increase evaluation times to become impractical.
[Hydra]: https://github.com/NixOS/hydra
Import From Derivation can be worked around in some cases by committing generated intermediate files to version control and reading those instead.
<!-- TODO: remove the following and link to Nix manual once https://github.com/NixOS/nix/pull/7332 is merged -->
See also [NixOS Wiki: Import From Derivation].
[NixOS Wiki: Import From Derivation]: https://nixos.wiki/wiki/Import_From_Derivation

View File

@@ -1,118 +0,0 @@
# Contributing to this documentation {#chap-contributing}
The sources of the Nixpkgs manual are in the [doc](https://github.com/NixOS/nixpkgs/tree/master/doc) subdirectory of the Nixpkgs repository. The manual is still partially written in DocBook but it is progressively being converted to [Markdown](#sec-contributing-markup).
You can quickly check your edits with `make`:
```ShellSession
$ cd /path/to/nixpkgs/doc
$ nix-shell
[nix-shell]$ make
```
If you experience problems, run `make debug` to help understand the docbook errors.
After making modifications to the manual, it's important to build it before committing. You can do that as follows:
```ShellSession
$ cd /path/to/nixpkgs/doc
$ nix-shell
[nix-shell]$ make clean
[nix-shell]$ nix-build .
```
If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`.
## Syntax {#sec-contributing-markup}
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:
- []{#ssec-contributing-markup-anchors}
Explicitly defined **anchors** on headings, to allow linking to sections. These should be always used, to ensure the anchors can be linked even when the heading text changes, and to prevent conflicts between [automatically assigned identifiers](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/auto_identifiers.md).
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.
:::
- []{#ssec-contributing-markup-anchors-inline}
**Inline anchors**, which allow linking arbitrary place in the text (e.g. individual list items, sentences…).
They are defined using a hybrid of the link syntax with the attributes syntax known from headings, called [bracketed spans](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/bracketed_spans.md):
```markdown
- []{#ssec-gnome-hooks-glib} `glib` setup hook will populate `GSETTINGS_SCHEMAS_PATH` and then `wrapGAppsHook` will prepend it to `XDG_DATA_DIRS`.
```
- []{#ssec-contributing-markup-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)` will result in [](#chap-contributing).
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing).
- []{#ssec-contributing-markup-inline-roles}
If you want to link to a man page, you can use `` {manpage}`nix.conf(5)` ``, which will turn into {manpage}`nix.conf(5)`. The references will turn into links when a mapping exists in {file}`doc/manpage-urls.json`.
A few markups for other kinds of literals are also available:
- `` {command}`rm -rfi` `` turns into {command}`rm -rfi`
- `` {env}`XDG_DATA_DIRS` `` turns into {env}`XDG_DATA_DIRS`
- `` {file}`/etc/passwd` `` turns into {file}`/etc/passwd`
- `` {option}`networking.useDHCP` `` turns into {option}`networking.useDHCP`
- `` {var}`/etc/passwd` `` turns into {var}`/etc/passwd`
These literal kinds are used mostly in NixOS option documentation.
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.
- []{#ssec-contributing-markup-admonitions}
**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
:::
```
which renders as
> ::: {.warning}
> This is a warning.
> :::
The following are supported:
- [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
- [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
- []{#ssec-contributing-markup-definition-lists}
[**Definition lists**](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md), for defining a group of terms:
```markdown
pear
: green or yellow bulbous fruit
watermelon
: green fruit with red flesh
```
which renders as
> pear
> : green or yellow bulbous fruit
>
> watermelon
> : green fruit with red flesh
For contributing to the legacy parts, please see [DocBook: The Definitive Guide](https://tdg.docbook.org/) or the [DocBook rocks! primer](https://web.archive.org/web/20200816233747/https://docbook.rocks/).

View File

@@ -1,77 +0,0 @@
# Quick Start to Adding a Package {#chap-quick-start}
To add a package to Nixpkgs:
1. Checkout the Nixpkgs source tree:
```ShellSession
$ git clone https://github.com/NixOS/nixpkgs
$ cd nixpkgs
```
2. Find a good place in the Nixpkgs tree to add the Nix expression for your package. For instance, a library package typically goes into `pkgs/development/libraries/pkgname`, while a web browser goes into `pkgs/applications/networking/browsers/pkgname`. See [](#sec-organisation) for some hints on the tree organisation. Create a directory for your package, e.g.
```ShellSession
$ mkdir pkgs/development/libraries/libfoo
```
3. In the package directory, create a Nix expression — a piece of code that describes how to build the package. In this case, it should be a _function_ that is called with the package dependencies as arguments, and returns a build of the package in the Nix store. The expression should usually be called `default.nix`.
```ShellSession
$ emacs pkgs/development/libraries/libfoo/default.nix
$ git add pkgs/development/libraries/libfoo/default.nix
```
You can have a look at the existing Nix expressions under `pkgs/` to see how its done. Here are some good ones:
- GNU Hello: [`pkgs/applications/misc/hello/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/hello/default.nix). Trivial package, which specifies some `meta` attributes which is good practice.
- GNU cpio: [`pkgs/tools/archivers/cpio/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/archivers/cpio/default.nix). Also a simple package. The generic builder in `stdenv` does everything for you. It has no dependencies beyond `stdenv`.
- GNU Multiple Precision arithmetic library (GMP): [`pkgs/development/libraries/gmp/5.1.x.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/gmp/5.1.x.nix). Also done by the generic builder, but has a dependency on `m4`.
- Pan, a GTK-based newsreader: [`pkgs/applications/networking/newsreaders/pan/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/newsreaders/pan/default.nix). Has an optional dependency on `gtkspell`, which is only built if `spellCheck` is `true`.
- Apache HTTPD: [`pkgs/servers/http/apache-httpd/2.4.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/http/apache-httpd/2.4.nix). A bunch of optional features, variable substitutions in the configure flags, a post-install hook, and miscellaneous hackery.
- buildMozillaMach: [`pkgs/applications/networking/browser/firefox/common.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/browsers/firefox/common.nix). A reusable build function for Firefox, Thunderbird and Librewolf.
- JDiskReport, a Java utility: [`pkgs/tools/misc/jdiskreport/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/jdiskreport/default.nix). Nixpkgs doesnt have a decent `stdenv` for Java yet so this is pretty ad-hoc.
- XML::Simple, a Perl module: [`pkgs/top-level/perl-packages.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix) (search for the `XMLSimple` attribute). Most Perl modules are so simple to build that they are defined directly in `perl-packages.nix`; no need to make a separate file for them.
- Adobe Reader: [`pkgs/applications/misc/adobe-reader/default.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/adobe-reader/default.nix). Shows how binary-only packages can be supported. In particular the [builder](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/adobe-reader/builder.sh) uses `patchelf` to set the RUNPATH and ELF interpreter of the executables so that the right libraries are found at runtime.
Some notes:
- All [`meta`](#chap-meta) attributes are optional, but its still a good idea to provide at least the `description`, `homepage` and [`license`](#sec-meta-license).
- You can use `nix-prefetch-url url` to get the SHA-256 hash of source distributions. There are similar commands as `nix-prefetch-git` and `nix-prefetch-hg` available in `nix-prefetch-scripts` package.
- A list of schemes for `mirror://` URLs can be found in [`pkgs/build-support/fetchurl/mirrors.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchurl/mirrors.nix).
The exact syntax and semantics of the Nix expression language, including the built-in function, are described in the Nix manual in the [chapter on writing Nix expressions](https://hydra.nixos.org/job/nix/trunk/tarball/latest/download-by-type/doc/manual/#chap-writing-nix-expressions).
4. Add a call to the function defined in the previous step to [`pkgs/top-level/all-packages.nix`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix) with some descriptive name for the variable, e.g. `libfoo`.
```ShellSession
$ emacs pkgs/top-level/all-packages.nix
```
The attributes in that file are sorted by category (like “Development / Libraries”) that more-or-less correspond to the directory structure of Nixpkgs, and then by attribute name.
5. To test whether the package builds, run the following command from the root of the nixpkgs source tree:
```ShellSession
$ nix-build -A libfoo
```
where `libfoo` should be the variable name defined in the previous step. You may want to add the flag `-K` to keep the temporary build directory in case something fails. If the build succeeds, a symlink `./result` to the package in the Nix store is created.
6. If you want to install the package into your profile (optional), do
```ShellSession
$ nix-env -f . -iA libfoo
```
7. Optionally commit the new package and open a pull request [to nixpkgs](https://github.com/NixOS/nixpkgs/pulls), or use [the Patches category](https://discourse.nixos.org/t/about-the-patches-category/477) on Discourse for sending a patch without a GitHub account.

View File

@@ -1,319 +0,0 @@
# Reviewing contributions {#chap-reviewing-contributions}
::: {.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.
## Package updates {#reviewing-contributions-package-updates}
A package update is the most trivial and common type of pull request. These pull requests mainly consist of updating the version part of the package name and the source hash.
It can happen that non-trivial updates include patches or more complex changes.
Reviewing process:
- Ensure that the package versioning fits the guidelines.
- Ensure that the commit text fits the guidelines.
- Ensure that the package maintainers are notified.
- [CODEOWNERS](https://help.github.com/articles/about-codeowners) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
- Ensure that the meta field information is correct.
- License can change with version updates, so it should be checked to match the upstream license.
- If the package has no maintainer, a maintainer must be set. This can be the update submitter or a community member that accepts to take maintainership of the package.
- Ensure that the code contains no typos.
- Building the package locally.
- pull requests are often targeted to the master or staging branch, and building the pull request locally when it is submitted can trigger many source builds.
- It is possible to rebase the changes on nixos-unstable or nixpkgs-unstable for easier review by running the following commands from a nixpkgs clone.
```ShellSession
$ git fetch origin nixos-unstable
$ git fetch origin pull/PRNUMBER/head
$ git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD
```
- The first command fetches the nixos-unstable branch.
- The second command fetches the pull request changes, `PRNUMBER` is the number at the end of the pull request title and `BASEBRANCH` the base branch of the pull request.
- The third command rebases the pull request changes to the nixos-unstable branch.
- The [nixpkgs-review](https://github.com/Mic92/nixpkgs-review) tool can be used to review a pull request content in a single command. `PRNUMBER` should be replaced by the number at the end of the pull request title. You can also provide the full github pull request url.
```ShellSession
$ nix-shell -p nixpkgs-review --run "nixpkgs-review pr PRNUMBER"
```
- Running every binary.
Sample template for a package update review is provided below.
```markdown
##### Reviewed points
- [ ] package name fits guidelines
- [ ] package version fits guidelines
- [ ] package build on ARCHITECTURE
- [ ] executables tested on ARCHITECTURE
- [ ] all depending packages build
##### Possible improvements
##### Comments
```
## New packages {#reviewing-contributions-new-packages}
New packages are a common type of pull requests. These pull requests consists in adding a new nix-expression for a package.
Review process:
- Ensure that the package versioning fits the guidelines.
- Ensure that the commit name fits the guidelines.
- Ensure that the meta fields contain correct information.
- License must match the upstream license.
- Platforms should be set (or the package will not get binary substitutes).
- Maintainers must be set. This can be the package submitter or a community member that accepts taking up maintainership of the package.
- Report detected typos.
- Ensure the package source:
- Uses mirror URLs when available.
- Uses the most appropriate functions (e.g. packages from GitHub should use `fetchFromGitHub`).
- Building the package locally.
- Running every binary.
Sample template for a new package review is provided below.
```markdown
##### Reviewed points
- [ ] package path fits guidelines
- [ ] package name fits guidelines
- [ ] package version fits guidelines
- [ ] package build on ARCHITECTURE
- [ ] executables tested on ARCHITECTURE
- [ ] `meta.description` is set and fits guidelines
- [ ] `meta.license` fits upstream license
- [ ] `meta.platforms` is set
- [ ] `meta.maintainers` is set
- [ ] build time only dependencies are declared in `nativeBuildInputs`
- [ ] source is fetched using the appropriate function
- [ ] the list of `phases` is not overridden
- [ ] when a phase (like `installPhase`) is overridden it starts with `runHook preInstall` and ends with `runHook postInstall`.
- [ ] patches that are remotely available are fetched with `fetchpatch`
##### Possible improvements
##### Comments
```
## Module updates {#reviewing-contributions-module-updates}
Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
Reviewing process:
- Ensure that the module maintainers are notified.
- [CODEOWNERS](https://help.github.com/articles/about-codeowners/) will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
- Ensure that the module tests, if any, are succeeding.
- Ensure that the introduced options are correct.
- Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
- Description, default and example should be provided.
- Ensure that option changes are backward compatible.
- `mkRenamedOptionModuleWith` provides a way to make option changes backward compatible.
- Ensure that removed options are declared with `mkRemovedOptionModule`
- Ensure that changes that are not backward compatible are mentioned in release notes.
- Ensure that documentations affected by the change is updated.
Sample template for a module update review is provided below.
```markdown
##### Reviewed points
- [ ] changes are backward compatible
- [ ] removed options are declared with `mkRemovedOptionModule`
- [ ] changes that are not backward compatible are documented in release notes
- [ ] module tests succeed on ARCHITECTURE
- [ ] options types are appropriate
- [ ] options description is set
- [ ] options example is provided
- [ ] documentation affected by the changes is updated
##### Possible improvements
##### Comments
```
## New modules {#reviewing-contributions-new-modules}
New modules submissions introduce a new module to NixOS.
Reviewing process:
- Ensure that the module tests, if any, are succeeding.
- Ensure that the introduced options are correct.
- Type should be appropriate (string related types differs in their merging capabilities, `loaOf` and `string` types are deprecated).
- Description, default and example should be provided.
- Ensure that module `meta` field is present
- Maintainers should be declared in `meta.maintainers`.
- Module documentation should be declared with `meta.doc`.
- Ensure that the module respect other modules functionality.
- For example, enabling a module should not open firewall ports by default.
Sample template for a new module review is provided below.
```markdown
##### Reviewed points
- [ ] module path fits the guidelines
- [ ] module tests succeed on ARCHITECTURE
- [ ] options have appropriate types
- [ ] options have default
- [ ] options have example
- [ ] options have descriptions
- [ ] No unneeded package is added to environment.systemPackages
- [ ] meta.maintainers is set
- [ ] module documentation is declared in meta.doc
##### Possible improvements
##### Comments
```
## Individual maintainer list {#reviewing-contributions-individual-maintainer-list}
When adding users to `maintainers/maintainer-list.nix`, the following
checks should be performed:
- If the user has specified a GPG key, verify that the commit is
signed by their key.
First, validate that the commit adding the maintainer is signed by
the key the maintainer listed. Check out the pull request and
compare its signing key with the listed key in the commit.
If the commit is not signed or it is signed by a different user, ask
them to either recommit using that key or to remove their key
information.
Given a maintainter entry like this:
``` nix
{
example = {
email = "user@example.com";
name = "Example User";
keys = [{
fingerprint = "0000 0000 2A70 6423 0AED 3C11 F04F 7A19 AAA6 3AFE";
}];
}
};
```
First receive their key from a keyserver:
$ gpg --recv-keys 0xF04F7A19AAA63AFE
gpg: key 0xF04F7A19AAA63AFE: public key "Example <user@example.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
Then check the commit is signed by that key:
$ git log --show-signature
commit b87862a4f7d32319b1de428adb6cdbdd3a960153
gpg: Signature made Wed Mar 12 13:32:24 2003 +0000
gpg: using RSA key 000000002A7064230AED3C11F04F7A19AAA63AFE
gpg: Good signature from "Example User <user@example.com>
Author: Example User <user@example.com>
Date: Wed Mar 12 13:32:24 2003 +0000
maintainers: adding example
and validate that there is a `Good signature` and the printed key
matches the user's submitted key.
Note: GitHub's "Verified" label does not display the user's full key
fingerprint, and should not be used for validating the key matches.
- If the user has specified a `github` account name, ensure they have
also specified a `githubId` and verify the two match.
Maintainer entries that include a `github` field must also include
their `githubId`. People can and do change their GitHub name
frequently, and the ID is used as the official and stable identity
of the maintainer.
Given a maintainer entry like this:
``` nix
{
example = {
email = "user@example.com";
name = "Example User";
github = "ghost";
githubId = 10137;
}
};
```
First, make sure that the listed GitHub handle matches the author of
the commit.
Then, visit the URL `https://api.github.com/users/ghost` and
validate that the `id` field matches the provided `githubId`.
## Maintainer teams {#reviewing-contributions-maintainer-teams}
Feel free to create a new maintainer team in `maintainers/team-list.nix`
when a group is collectively responsible for a collection of packages.
Use taste and personal judgement when deciding if a team is warranted.
Teams are allowed to define their own rules about membership.
For example, some teams will represent a business or other group which
wants to carefully track its members. Other teams may be very open about
who can join, and allow anybody to participate.
When reviewing changes to a team, read the team's scope and the context
around the member list for indications about the team's membership
policy.
In any case, request reviews from the existing team members. If the team
lists no specific membership policy, feel free to merge changes to the
team after giving the existing members a few days to respond.
*Important:* If a team says it is a closed group, do not merge additions
to the team without an approval by at least one existing member.
## Other submissions {#reviewing-contributions-other-submissions}
Other type of submissions requires different reviewing steps.
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.
## Merging pull requests {#reviewing-contributions--merging-pull-requests}
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.

View File

@@ -1,302 +0,0 @@
# Submitting changes {#chap-submitting-changes}
## Making patches {#submitting-changes-making-patches}
- Read [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/).
- Fork [the Nixpkgs repository](https://github.com/nixos/nixpkgs/) on GitHub.
- Create a branch for your future fix.
- You can make branch from a commit of your local `nixos-version`. That will help you to avoid additional local compilations. Because you will receive packages from binary cache. For example
```ShellSession
$ nixos-version --hash
0998212
$ git checkout 0998212
$ git checkout -b 'fix/pkg-name-update'
```
- Please avoid working directly on the `master` branch.
- Make commits of logical units.
- If you removed pkgs or made some major NixOS changes, write about it in the release notes for the next stable release. For example `nixos/doc/manual/release-notes/rl-2003.xml`.
- Check for unnecessary whitespace with `git diff --check` before committing.
- Format the commit in a following way:
```
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
Additional information.
```
- Examples:
- `nginx: init at 2.0.1`
- `firefox: 54.0.1 -> 55.0`
- `nixos/hydra: add bazBaz option`
- `nixos/nginx: refactor config generation`
- Test your changes. If you work with
- nixpkgs:
- update pkg
- `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
- add pkg
- Make sure its in `pkgs/top-level/all-packages.nix`
- `nix-env -iA pkg-attribute-name -f <path to your local nixpkgs folder>`
- _If you dont want to install pkg in you profile_.
- `nix-build -A pkg-attribute-name <path to your local nixpkgs folder>` and check results in the folder `result`. It will appear in the same directory where you did `nix-build`.
- If you installed your package with `nix-env`, you can run `nix-env -e pkg-name` where `pkg-name` is as reported by `nix-env -q` to uninstall it from your system.
- NixOS and its modules:
- You can add new module to your NixOS configuration file (usually its `/etc/nixos/configuration.nix`). And do `sudo nixos-rebuild test -I nixpkgs=<path to your local nixpkgs folder> --fast`.
- If you have commits `pkg-name: oh, forgot to insert whitespace`: squash commits in this case. Use `git rebase -i`.
- [Rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) your branch against current `master`.
## Submitting changes {#submitting-changes-submitting-changes}
- Push your changes to your fork of nixpkgs.
- Create the pull request
- Follow [the contribution guidelines](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#submitting-changes).
## Submitting security fixes {#submitting-changes-submitting-security-fixes}
Security fixes are submitted in the same way as other changes and thus the same guidelines apply.
- If a new version fixing the vulnerability has been released, update the package;
- If the security fix comes in the form of a patch and a CVE is available, then add the patch to the Nixpkgs tree, and apply it to the package.
The name of the patch should be the CVE identifier, so e.g. `CVE-2019-13636.patch`; If a patch is fetched the name needs to be set as well, e.g.:
```nix
(fetchpatch {
name = "CVE-2019-11068.patch";
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
hash = "sha256-SEKe/8HcW0UBHCfPTTOnpRlzmV2nQPPeL6HOMxBZd14=";
})
```
If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
Critical security fixes may by-pass the staging branches and be delivered directly to release branches such as `master` and `release-*`.
## Deprecating/removing packages {#submitting-changes-deprecating-packages}
There is currently no policy when to remove a package.
Before removing a package, one should try to find a new maintainer or fix smaller issues first.
### Steps to remove a package from Nixpkgs {#steps-to-remove-a-package-from-nixpkgs}
We use jbidwatcher as an example for a discontinued project here.
1. Have Nixpkgs checked out locally and up to date.
1. Create a new branch for your change, e.g. `git checkout -b jbidwatcher`
1. Remove the actual package including its directory, e.g. `git rm -rf pkgs/applications/misc/jbidwatcher`
1. Remove the package from the list of all packages (`pkgs/top-level/all-packages.nix`).
1. Add an alias for the package name in `pkgs/top-level/aliases.nix` (There is also `pkgs/applications/editors/vim/plugins/aliases.nix`. Package sets typically do not have aliases, so we can't add them there.)
For example in this case:
```
jbidwatcher = throw "jbidwatcher was discontinued in march 2021"; # added 2021-03-15
```
The throw message should explain in short why the package was removed for users that still have it installed.
1. Test if the changes introduced any issues by running `nix-env -qaP -f . --show-trace`. It should show the list of packages without errors.
1. Commit the changes. Explain again why the package was removed. If it was declared discontinued upstream, add a link to the source.
```ShellSession
$ git add pkgs/applications/misc/jbidwatcher/default.nix pkgs/top-level/all-packages.nix pkgs/top-level/aliases.nix
$ git commit
```
Example commit message:
```
jbidwatcher: remove
project was discontinued in march 2021. the program does not work anymore because ebay changed the login.
https://web.archive.org/web/20210315205723/http://www.jbidwatcher.com/
```
1. Push changes to your GitHub fork with `git push`
1. Create a pull request against Nixpkgs. Mention the package maintainer.
This is how the pull request looks like in this case: [https://github.com/NixOS/nixpkgs/pull/116470](https://github.com/NixOS/nixpkgs/pull/116470)
## Pull Request Template {#submitting-changes-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 {#submitting-changes-tested-with-sandbox}
When sandbox builds are enabled, Nix will setup an isolated environment for each build process. It is used to remove further hidden dependencies set by the build environment to improve reproducibility. This includes access to the network during the build outside of `fetch*` functions and files outside the Nix store. Depending on the operating system access to other resources are blocked as well (ex. inter process communication is isolated on Linux); see [sandbox](https://nixos.org/nix/manual/#conf-sandbox) in Nix manual for details.
Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for [nixpkgs](https://github.com/NixOS/nixpkgs/) people are asked to test builds with sandboxing enabled (see `Tested using sandboxing` in the pull request template) because in<https://nixos.org/hydra/> sandboxing is also used.
Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing **before** building the package:
- **Globally enable sandboxing on NixOS**: add the following to `configuration.nix`
```nix
nix.useSandbox = true;
```
- **Globally enable sandboxing on non-NixOS platforms**: add the following to: `/etc/nix/nix.conf`
```ini
sandbox = true
```
### Built on platform(s) {#submitting-changes-platform-diversity}
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) {#submitting-changes-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` {#submitting-changes-tested-compilation}
If you are updating a packages version, you can use `nixpkgs-review` to make sure all packages that depend on the updated package still compile correctly. The `nixpkgs-review` utility can look for and build all dependencies either based on uncommitted changes with the `wip` option or specifying a GitHub pull request number.
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/`) {#submitting-changes-tested-execution}
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 {#submitting-changes-contribution-standards}
The last checkbox is fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md). The contributing 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.
## Hotfixing pull requests {#submitting-changes-hotfixing-pull-requests}
- Make the appropriate changes in you branch.
- Dont create additional commits, do
- `git rebase -i`
- `git push --force` to your branch.
## Commit policy {#submitting-changes-commit-policy}
- Commits must be sufficiently tested before being merged, both for the master and staging branches.
- Hydra builds for master and staging should not be used as testing platform, its a build farm for changes that have been already tested.
- When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break peoples installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from \@edolstra.
```{.graphviz caption="Staging workflow"}
digraph {
"small changes" [shape=none]
"mass-rebuilds and other large changes" [shape=none]
"critical security fixes" [shape=none]
"broken staging-next fixes" [shape=none]
"small changes" -> master
"mass-rebuilds and other large changes" -> staging
"critical security fixes" -> master
"broken staging-next fixes" -> "staging-next"
"staging-next" -> master [color="#E85EB0"] [label="stabilization ends"] [fontcolor="#E85EB0"]
"staging" -> "staging-next" [color="#E85EB0"] [label="stabilization starts"] [fontcolor="#E85EB0"]
master -> "staging-next" -> staging [color="#5F5EE8"] [label="every six hours (GitHub Action)"] [fontcolor="#5F5EE8"]
}
```
[This GitHub Action](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/periodic-merge-6h.yml) brings changes from `master` to `staging-next` and from `staging-next` to `staging` every 6 hours; these are the blue arrows in the diagram above. The purple arrows in the diagram above are done manually and much less frequently. You can get an idea of how often these merges occur by looking at the git history.
### Master branch {#submitting-changes-master-branch}
The `master` branch is the main development branch. It should only see non-breaking commits that do not cause mass rebuilds.
### Staging branch {#submitting-changes-staging-branch}
The `staging` branch is a development branch where mass-rebuilds go. Mass rebuilds are commits that cause rebuilds for many packages, like more than 500 (or perhaps, if it's 'light' packages, 1000). It should only see non-breaking mass-rebuild commits. That means it is not to be used for testing, and changes must have been well tested already. If the branch is already in a broken state, please refrain from adding extra new breakages.
During the process of a releasing a new NixOS version, this branch or the release-critical packages can be restricted to non-breaking changes.
### Staging-next branch {#submitting-changes-staging-next-branch}
The `staging-next` branch is for stabilizing mass-rebuilds submitted to the `staging` branch prior to merging them into `master`. Mass-rebuilds must go via the `staging` branch. It must only see non-breaking commits that are fixing issues blocking it from being merged into the `master` branch.
If the branch is already in a broken state, please refrain from adding extra new breakages. Stabilize it for a few days and then merge into master.
During the process of a releasing a new NixOS version, this branch or the release-critical packages can be restricted to non-breaking changes.
### Stable release branches {#submitting-changes-stable-release-branches}
The same staging workflow applies to stable release branches, but the main branch is called `release-*` instead of `master`.
Example branch names: `release-21.11`, `staging-21.11`, `staging-next-21.11`.
Most changes added to the stable release branches are cherry-picked (“backported”) from the `master` and staging branches.
#### Automatically backporting a Pull Request {#submitting-changes-stable-release-branches-automatic-backports}
Assign label `backport <branch>` (e.g. `backport release-21.11`) to the PR and a backport PR is automatically created after the PR is merged.
#### Manually backporting changes {#submitting-changes-stable-release-branches-manual-backports}
Cherry-pick changes via `git cherry-pick -x <original commit>` so that the original commit id is included in the commit message.
Add a reason for the backport when it is not obvious from the original commit message. You can do this by cherry picking with `git cherry-pick -xe <original commit>`, which allows editing the commit message. This is not needed for minor version updates that include security and bug fixes but don't add new features or when the commit fixes an otherwise broken package.
Here is an example of a cherry-picked commit message with good reason description:
```
zfs: Keep trying root import until it works
Works around #11003.
(cherry picked from commit 98b213a11041af39b39473906b595290e2a4e2f9)
Reason: several people cannot boot with ZFS on NVMe
```
Other examples of reasons are:
- Previously the build would fail due to, e.g., `getaddrinfo` not being defined
- The previous download links were all broken
- Crash when starting on some X11 systems
#### Acceptable backport criteria
The stable branch does have some changes which cannot be backported. Most notable are breaking changes. The desire is to have stable users be uninterrupted when updating packages.
However, many changes are able to be backported, including:
- New Packages / Modules
- Security / Patch updates
- Version updates which include new functionality (but no breaking changes)
- Services which require a client to be up-to-date regardless. (E.g. `spotify`, `steam`, or `discord`)
- Security critical applications (E.g. `firefox`)

View File

@@ -1,45 +0,0 @@
# Vulnerability Roundup {#chap-vulnerability-roundup}
## Issues {#vulnerability-roundup-issues}
Vulnerable packages in Nixpkgs are managed using issues.
Currently opened ones can be found using the following:
[github.com/NixOS/nixpkgs/issues?q=is:issue+is:open+"Vulnerability+roundup"](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+%22Vulnerability+roundup%22)
Each issue correspond to a vulnerable version of a package; As a consequence:
- One issue can contain several CVEs;
- One CVE can be shared across several issues;
- A single package can be concerned by several issues.
A "Vulnerability roundup" issue usually respects the following format:
```txt
<link to relevant package search on search.nix.gsc.io>, <link to relevant files in Nixpkgs on GitHub>
<list of related CVEs, their CVSS score, and the impacted NixOS version>
<list of the scanned Nixpkgs versions>
<list of relevant contributors>
```
Note that there can be an extra comment containing links to previously reported (and still open) issues for the same package.
## Triaging and Fixing {#vulnerability-roundup-triaging-and-fixing}
**Note**: An issue can be a "false positive" (i.e. automatically opened, but without the package it refers to being actually vulnerable).
If you find such a "false positive", comment on the issue an explanation of why it falls into this category, linking as much information as the necessary to help maintainers double check.
If you are investigating a "true positive":
- Find the earliest patched version or a code patch in the CVE details;
- Is the issue already patched (version up-to-date or patch applied manually) in Nixpkgs's `master` branch?
- **No**:
- [Submit a security fix](#submitting-changes-submitting-security-fixes);
- Once the fix is merged into `master`, [submit the change to the vulnerable release branch(es)](https://nixos.org/manual/nixpkgs/stable/#submitting-changes-stable-release-branches);
- **Yes**: [Backport the change to the vulnerable release branch(es)](https://nixos.org/manual/nixpkgs/stable/#submitting-changes-stable-release-branches).
- When the patch has made it into all the relevant branches (`master`, and the vulnerable releases), close the relevant issue(s).

View File

@@ -1,39 +0,0 @@
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
let
doc-support = import ./doc-support { inherit pkgs nixpkgs; };
in pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual";
nativeBuildInputs = with pkgs; [
pandoc
graphviz
libxml2
libxslt
zip
jing
xmlformat
];
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
postPatch = ''
ln -s ${doc-support} ./doc-support/result
'';
installPhase = ''
dest="$out/share/doc/nixpkgs"
mkdir -p "$(dirname "$dest")"
mv out/html "$dest"
mv "$dest/index.html" "$dest/manual.html"
mv out/epub/manual.epub "$dest/nixpkgs-manual.epub"
mkdir -p $out/nix-support/
echo "doc manual $dest manual.html" >> $out/nix-support/hydra-build-products
echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
'';
# Environment variables
PANDOC_LUA_FILTERS_DIR = "${pkgs.pandoc-lua-filters}/share/pandoc/filters";
PANDOC_LINK_MANPAGES_FILTER = import build-aux/pandoc-filters/link-manpages.nix { inherit pkgs; };
}

View File

@@ -1,84 +0,0 @@
{ pkgs ? (import ../.. {}), nixpkgs ? { }}:
let
inherit (pkgs) lib;
inherit (lib) hasPrefix removePrefix;
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 = "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 = "sources"; description = "source filtering functions"; }
{ name = "cli"; description = "command-line serialization functions"; }
];
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs libsets; };
functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs libsets; };
version = pkgs.lib.version;
epub-xsl = pkgs.writeText "epub.xsl" ''
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="${pkgs.docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl" />
<xsl:import href="${./parameters.xml}"/>
</xsl:stylesheet>
'';
xhtml-xsl = pkgs.writeText "xhtml.xsl" ''
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="${pkgs.docbook_xsl_ns}/xml/xsl/docbook/xhtml/docbook.xsl" />
<xsl:import href="${./parameters.xml}"/>
</xsl:stylesheet>
'';
# 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 ]; }) options;
documentType = "none";
transformOptions = opt:
opt // {
declarations =
map
(decl:
if hasPrefix (toString ../..) (toString decl)
then
let subpath = removePrefix "/" (removePrefix (toString ../..) (toString decl));
in { url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}"; name = subpath; }
else decl)
opt.declarations;
};
};
in pkgs.runCommand "doc-support" {}
''
mkdir result
(
cd result
ln -s ${locationsXml} ./function-locations.xml
ln -s ${functionDocs} ./function-docs
ln -s ${optionsDoc.optionsDocBook} ./config-options.docbook.xml
ln -s ${pkgs.docbook5}/xml/rng/docbook/docbook.rng ./docbook.rng
ln -s ${pkgs.docbook_xsl_ns}/xml/xsl ./xsl
ln -s ${epub-xsl} ./epub.xsl
ln -s ${xhtml-xsl} ./xhtml.xsl
ln -s ${../../nixos/doc/xmlformat.conf} ./xmlformat.conf
ln -s ${pkgs.documentation-highlighter} ./highlightjs
echo -n "${version}" > ./version
)
mv result $out
''

View File

@@ -1,36 +0,0 @@
# Generates the documentation for library functions via nixdoc.
{ pkgs, locationsXml, libsets }:
with pkgs; stdenv.mkDerivation {
name = "nixpkgs-lib-docs";
src = ../../lib;
buildInputs = [ nixdoc ];
installPhase = ''
function docgen {
# TODO: wrap lib.$1 in <literal>, make nixdoc not escape it
if [[ -e "../lib/$1.nix" ]]; then
nixdoc -c "$1" -d "lib.$1: $2" -f "$1.nix" > "$out/$1.xml"
else
nixdoc -c "$1" -d "lib.$1: $2" -f "$1/default.nix" > "$out/$1.xml"
fi
echo "<xi:include href='$1.xml' />" >> "$out/index.xml"
}
mkdir -p "$out"
cat > "$out/index.xml" << 'EOF'
<?xml version="1.0" encoding="utf-8"?>
<root xmlns:xi="http://www.w3.org/2001/XInclude">
EOF
${lib.concatMapStrings ({ name, description }: ''
docgen ${name} ${lib.escapeShellArg description}
'') libsets}
echo "</root>" >> "$out/index.xml"
ln -s ${locationsXml} $out/locations.xml
'';
}

View File

@@ -1,85 +0,0 @@
{ pkgs, nixpkgs ? { }, libsets }:
let
revision = pkgs.lib.trivial.revisionWithDefault (nixpkgs.revision 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}";
xmlstrings = (nixpkgsLib.strings.concatMapStrings
({ name, value }:
''
<section><title>${name}</title>
<para xml:id="${sanitizeId name}">
Located at
<link
xlink:href="${urlPrefix}/${value.file}#L${builtins.toString value.line}">${value.file}:${builtins.toString value.line}</link>
in <literal>&lt;nixpkgs&gt;</literal>.
</para>
</section>
'')
relativeLocs);
in pkgs.writeText
"locations.xml"
''
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5">
<title>All the locations for every lib function</title>
<para>This file is only for inclusion by other files.</para>
${xmlstrings}
</section>
''

View File

@@ -1,19 +0,0 @@
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="chapter.autolabel" select="0" />
<xsl:param name="part.autolabel" select="0" />
<xsl:param name="preface.autolabel" select="0" />
<xsl:param name="reference.autolabel" select="0" />
<xsl:param name="section.autolabel" select="0" />
<xsl:param name="html.stylesheet" select="'style.css overrides.css highlightjs/mono-blue.css'" />
<xsl:param name="html.script" select="'./highlightjs/highlight.pack.js ./highlightjs/loader.js'" />
<xsl:param name="xref.with.number.and.title" select="0" />
<xsl:param name="use.id.as.filename" select="1" />
<xsl:param name="generate.section.toc.level" select="1" />
<xsl:param name="toc.section.depth" select="0" />
<xsl:param name="admon.style" select="''" />
<xsl:param name="callout.graphics.extension" select="'.svg'" />
<xsl:param name="generate.consistent.ids" select="1" />
</xsl:stylesheet>

View File

@@ -1,14 +0,0 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="chap-functions">
<title>Functions reference</title>
<para>
The nixpkgs repository has several utility functions to manipulate Nix expressions.
</para>
<xi:include href="functions/library.xml" />
<xi:include href="functions/generators.section.xml" />
<xi:include href="functions/debug.section.xml" />
<xi:include href="functions/prefer-remote-fetch.section.xml" />
<xi:include href="functions/nix-gitignore.section.xml" />
</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,56 +0,0 @@
# Generators {#sec-generators}
Generators are functions that create file formats from nix data structures, e.g. for configuration files. There are generators available for: `INI`, `JSON` and `YAML`
All generators follow a similar call interface: `generatorName configFunctions data`, where `configFunctions` is an attrset of user-defined functions that format nested parts of the content. They each have common defaults, so often they do not need to be set manually. An example is `mkSectionName ? (name: libStr.escape [ "[" "]" ] name)` from the `INI` generator. It receives the name of a section and sanitizes it. The default `mkSectionName` escapes `[` and `]` with a backslash.
Generators can be fine-tuned to produce exactly the file format required by your application/service. One example is an INI-file format which uses `: ` as separator, the strings `"yes"`/`"no"` as boolean values and requires all string values to be quoted:
```nix
with lib;
let
customToINI = generators.toINI {
# specifies how to format a key/value pair
mkKeyValue = generators.mkKeyValueDefault {
# specifies the generated string for a subset of nix values
mkValueString = v:
if v == true then ''"yes"''
else if v == false then ''"no"''
else if isString v then ''"${v}"''
# and delegats all other values to the default generator
else generators.mkValueStringDefault {} v;
} ":";
};
# the INI file can now be given as plain old nix values
in customToINI {
main = {
pushinfo = true;
autopush = false;
host = "localhost";
port = 42;
};
mergetool = {
merge = "diff3";
};
}
```
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`.

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