Compare commits

..

1344 Commits

Author SHA1 Message Date
Nikolay Amiantov
dda40aa8d1 Revert "liferea: 1.10.18 -> 1.12-rc2"
This reverts commit 73d9d2d577.

It was pushed here accidentially, I've meant 17.03.
2017-03-04 01:15:25 +03:00
Nikolay Amiantov
73d9d2d577 liferea: 1.10.18 -> 1.12-rc2
It's a release candidate but it works with new WebKitGTK and we don't build old
one anymore because of vulnerabilities.

(cherry picked from commit 4a6ba21bdd)
2017-03-04 01:05:37 +03:00
Domen Kožar
5f94adc918 nixos: fix terminal-server, fixes #21834
(cherry picked from commit e5dcce837a)
Signed-off-by: Domen Kožar <domen@dev.si>
2017-01-12 16:42:52 +01:00
Tim Steinbach
294648246d linux: 4.4.30 -> 4.4.31
(cherry picked from commit 579f5fd9dd)
2016-11-12 12:39:53 +03:00
Aneesh Agrawal
d4e38c02dc openssh: Patch CVE-2016-8858
Also add myself as a maintainer.

(cherry picked from commit 7374105a96)
2016-11-12 12:39:53 +03:00
Graham Christensen
3bf5398aeb openssh: apply patch to fix https://bugzilla.redhat.com/show_bug.cgi?id=1380296
(cherry picked from commit 83a8cb1dc2)
2016-11-12 12:39:53 +03:00
Benjamin Staffin
385c74483f openssh: update gssapi patch, fix the build
(cherry picked from commit 43dcb662e7)
2016-11-12 12:39:53 +03:00
Aneesh Agrawal
9366a9bc9f openssh: 7.2p2 -> 7.3p1 (#17493)
Also remove patch for CVE-2015-8325 that has been fixed upstream.
(cherry picked from commit f6eae2efab)
2016-11-12 12:39:52 +03:00
Aneesh Agrawal
759faee13c openssh: update homepage link
Unfortunately, the site is not available over HTTPS.

(cherry picked from commit 2dd09b634e)
2016-11-12 12:39:52 +03:00
Eelco Dolstra
5a090dd515 debian: 8.5 -> 8.6
(cherry picked from commit f081a1aaf4)
2016-11-08 18:04:35 +01:00
Eelco Dolstra
dba154a11a linux: 4.4.26 -> 4.4.30 (close #20226)
(cherry picked from commit ef1a188e07)
2016-11-07 16:51:52 +01:00
Graham Christensen
0973d27ddb tre: add patch for CVE-2016-8859
(cherry picked from commit cd67a0aada)
2016-11-02 12:00:21 +01:00
Eelco Dolstra
c1c0484041 initrd: Include i8042 kernel module
For some reason, between Linux 4.4.19 and 4.4.20, the atkbd and libps2
kernel modules lost their dependency on i8042 in modules.dep, causing
i8042 not to be included in the initrd. This breaks keyboard in the
initrd, in turn breaking LUKS.

This only happens on the 16.03 branch; on 16.09, it appears i8042 is
pulled into the initrd anyway (through some other dependency,
presumably). But let's include it explicitly.

http://hydra.nixos.org/build/40468431
(cherry picked from commit e6088f77be)
2016-10-21 14:30:20 +02:00
Eelco Dolstra
4bd888fb59 linux: 4.4.25 -> 4.4.26
(cherry picked from commit 76a57d83b5)
2016-10-20 13:39:40 +02:00
Eelco Dolstra
31e0e38c26 linux: 4.4.24 -> 4.4.25
(cherry picked from commit 13f43c7ebc)
2016-10-20 13:39:07 +02:00
Tim Steinbach
3af2088b3c linux: 4.4.23 -> 4.4.24 (#19346)
(cherry picked from commit a699eb4798)
2016-10-20 13:38:59 +02:00
Eelco Dolstra
44557795ae linux: 4.4.22 -> 4.4.23
(cherry picked from commit 613a12a8bd)
2016-10-20 13:38:47 +02:00
Franz Pletz
bc6ae16dbb linux: 4.4.20 -> 4.4.22
(cherry picked from commit c83f8a536a)
2016-10-20 13:38:34 +02:00
Vladimír Čunát
a8210cfcd6 intltool: fix #19487 patch download
It's strange.  Maybe they prune the history.

(cherry picked from commit e4d3254101)
2016-10-13 21:56:43 +02:00
Jon Banafato
fa2e6fec02 gnome-maps: add webkitgtk to buildInputs
Per #17143 on GitHub, `gnome-maps` currently fails due to missing
Webkit2. Adding `webkitgtk` to `buildInputs` fixes the issue.

(cherry picked from commit ecd41c19b8)

[Bjørn: orig commit was for GNOME 3.20, I backported it to 3.18 (trivial).]
2016-10-02 20:23:36 +02:00
Thomas Tuegel
9851ca2cb0 dropbox: 11.4.20 -> 11.4.21
(cherry picked from commit ad6b2a68a7)
2016-09-30 14:45:33 -05:00
Tim Steinbach
1abec08343 openvpn: 2.3.10 -> 2.3.12
(cherry picked from commit 244aee5cd1)
2016-09-29 23:22:57 +02:00
Thomas Tuegel
46cfd78b5a spotify: unpack into temporary directory to fix output permissions
(cherry picked from commit f2806a09c4)
2016-09-27 13:50:26 -05:00
Thomas Tuegel
62754725d5 spotify: 1.0.37.152 -> 1.0.38.171
(cherry picked from commit 8e83bb4220)
2016-09-27 13:50:18 -05:00
Peter Simons
29c970988e bind: update to version 9.10.4-P3 to fix CVE-2016-2776
Dropped libressl.patch in the process since this code appears to be
included in newer versions of BIND.
2016-09-27 19:36:19 +02:00
Thomas Tuegel
fb0bab3e8e dropbox: 10.4.26 -> 11.4.20
(cherry picked from commit 240552cba1)
2016-09-26 15:48:51 -05:00
Thomas Tuegel
9dbad47115 dropbox: 10.4.25 -> 10.4.26
(cherry picked from commit 41e0146136)
2016-09-25 10:44:00 -05:00
Vladimír Čunát
3d432d39f0 Merge #18905: ffmpeg: 2.8.6 -> 2.8.8
It contains security fixes.

(cherry picked from commit c3d1caf97b)
2016-09-24 17:42:09 +02:00
Graham Christensen
8a61594f5a lighttpd: 1.4.40 -> 1.4.41
(cherry picked from commit 33be079486)
2016-09-24 11:32:47 +02:00
Bjørn Forsman
91ca9c05f9 lighttpd: 1.4.39 -> 1.4.40
Major bug-fix release; hundreds of issues resolved in issue tracker.

https://www.lighttpd.net/2016/7/16/1.4.40/
(cherry picked from commit 2173e6b49a)
2016-09-24 11:31:14 +02:00
Franz Pletz
b593d62ab8 lighttpd: 1.4.37 -> 1.4.39
(cherry picked from commit 669cd2adbf)
2016-09-24 11:31:05 +02:00
Frederik Rietdijk
43e690f35c pythonPackages.tornado: fix tests, closes #14634
The test runner would import all modules to check whether they might
have tests.

On a Linux system it would load the Tornado module that depends on
kqueue, which is BSD only, and fail.

(cherry picked from commit 6876eab511)
2016-09-22 09:52:28 +02:00
Tom Hunger
70c459e9e4 tornado: disable tests, see #14634
(cherry picked from commit 5b782924c1)
2016-09-22 09:52:17 +02:00
Vladimír Čunát
92c6a44b9e treewide: change $IN_NIX_SHELL handling
... to be compatible with https://github.com/NixOS/nix/pull/933
while not breaking compatibility with current nix.

(cherry picked from commit d4de02c46e)
2016-09-20 14:32:41 +02:00
aszlig
9f765f928b nixos/networking: Use type lines for localCommands
Using types.str doesn't work if you want to mkBefore/mkAfter across
different module definitions, because it only allows for one definition
for the same priority.

This is especially useful if you deploy Hetzner machines via NixOps,
because the physical specification already defines localCommands.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 97801380b0)
2016-09-20 13:34:44 +02:00
Peter Simons
613eb006e2 nbd: update to version 3.14
(cherry picked from commit 545040811b)
2016-09-19 15:46:54 +02:00
Franz Pletz
b8f7f0e8ab php70: 7.0.10 -> 7.0.11 (security)
See https://secure.php.net/ChangeLog-7.php#7.0.11.

(cherry picked from commit a32281639e)
2016-09-15 14:02:02 +02:00
Herwig Hochleitner
745e18df16 dropbox: 9.4.49 -> 10.4.25
(cherry picked from commit 85fdf8665f)
2016-09-14 12:21:49 -05:00
taku0
42d08c2882 flashplayer: 11.2.202.632 -> 11.2.202.635
(cherry picked from commit 8b6e522bf8)
2016-09-14 17:22:40 +02:00
Franz Pletz
70b9bf3f77 perlPackages.WWWCurl: fix build due to curl 5.10.3
The define CURL_STRICTER is only set if CURL_NO_OLDIES is set, but that breaks
compatibility with this package. Defining CURL_STRICTER is enough to fix the
build.

(cherry picked from commit 46790f360d)
2016-09-14 10:24:13 +02:00
Franz Pletz
ed27ce5a46 curl: 7.50.1 -> 7.50.3, fix CVE-2016-7167
(cherry picked from commit 4ecd0e7434)
2016-09-14 09:02:02 +02:00
Sander van der Burg
36d8acec2b disnix: 0.6 -> 0.6.1
(cherry picked from commit 77b9abf78c)
2016-09-13 19:48:33 +00:00
Sander van der Burg
178282adae dysnomia: bump to version 0.6.1
(cherry picked from commit 2edb28ffc5)
2016-09-13 19:43:49 +00:00
Eelco Dolstra
e302218576 Use builtins.partition if available
(cherry picked from commit 822e1ddd89)
2016-09-12 23:37:29 +02:00
Eelco Dolstra
03fea35ebe enableParallelBuild -> enableParallelBuilding
(cherry picked from commit 02ee9d83d0)
2016-09-12 23:35:41 +02:00
Eelco Dolstra
883f2912e6 chatzilla: 0.9.91 -> 0.9.92
(cherry picked from commit 445a39a23b)
2016-09-12 23:34:55 +02:00
Eelco Dolstra
851c0fd22c nix: Enable install check
Looks like this got disabled accidentally in
ec5b66eb4a.

(cherry picked from commit 6a9fb8b9e0)
2016-09-12 23:34:40 +02:00
Eelco Dolstra
7455231091 linux: 4.4.19 -> 4.4.20
(cherry picked from commit bc7e4e390a)
2016-09-12 23:30:26 +02:00
Eelco Dolstra
0db7608676 nix: 1.11.3 -> 1.11.4
(cherry picked from commit f2ddf2a9be)
2016-09-12 23:29:46 +02:00
Vladimír Čunát
0b5d170c33 nix: maintenance 1.11.2 -> 1.11.3
Fixes #17804.

(cherry picked from commit 3996aa8953)
2016-09-12 23:27:41 +02:00
Kirill Boltaev
a8e0739e0a gnome2.gnome_settings_daemon: add libSM to fix build
(cherry picked from commit 125188b0dc651fc81709fd7bf380a57cf39b260c)
2016-09-12 03:10:52 +03:00
Kirill Boltaev
c283bb5fac gnome2.at_spi: disable hardening to fix build
(cherry picked from commit 8b96b391db)
2016-09-12 03:08:18 +03:00
Kirill Boltaev
9c0634b886 gnome2.gnome_control_center: add libSM to fix build
(cherry picked from commit e3033d87b3)
2016-09-12 03:08:07 +03:00
Kirill Boltaev
36b0a8a5c6 gtkmathview: mark as broken
(cherry picked from commit 43a8ce0f5e)
2016-09-12 03:08:06 +03:00
Kirill Boltaev
b38af9c899 gnome2.gnome_session: mark as broken
(cherry picked from commit 605ddb1047)
2016-09-12 03:08:04 +03:00
Matt Billenstein
fcf24d378c mongodb: 3.2.1 -> 3.2.9
[Bjørn: add missing hash update.]

(cherry picked from commit a83f70c249)
2016-09-09 16:09:31 +02:00
Bjørn Forsman
28fc7e76cd plantuml: 8037 -> 8047
(cherry picked from commit daf068c33b)
2016-09-08 23:21:54 +02:00
Raymond Gauthier
dac192879b plantuml: 8012 -> 8037
Updated to latest stable version.

(cherry picked from commit 5e9a344e62)
2016-09-08 23:21:50 +02:00
Eelco Dolstra
efe2d64b33 charybdis: Fix eval
http://hydra.nixos.org/build/40042712
2016-09-07 10:41:26 +02:00
Franz Pletz
d98383328c charybdis: 3.5.1 -> 3.5.3 (security)
Fixes CVE-2016-7143 (certificate fingerprint spoofing through crafted
SASL messages).

(cherry picked from commit 5f6557d437)
2016-09-07 08:17:25 +02:00
Franz Pletz
f2109ae52c graphicsmagick: 1.3.24 -> 1.3.25 (security)
Includes some security fixes, see

  http://www.graphicsmagick.org/NEWS.html#september-5-2016

(cherry picked from commit 5929399527)
2016-09-07 07:10:32 +02:00
Rob Vermaas
b7d79b9e01 Update maintainers alias to github name. 2016-09-06 09:39:29 +00:00
Alexander Ried
6ac7ffd9d7 tomcat5: remove since it's end of life (#18341)
Source is not available anymore.
(cherry picked from commit 36e8df19e1)
2016-09-06 04:05:10 +02:00
Graham Christensen
b6b0fcbccc Merge pull request #18329 from grahamc/broadcom-sta
Backport broadcom-sta fixes from master to release-16.03
2016-09-05 21:27:01 -04:00
Graham Christensen
d8bade9460 Merge pull request #18330 from grahamc/nvidia-x11
nvidia-x11 fixes from master to release-16.03
2016-09-05 21:25:31 -04:00
aszlig
8daf7e99af broadcom_sta: Add patch to fix NULL pointer deref
The patch is from the following Gentoo bug:

https://bugs.gentoo.org/show_bug.cgi?id=523326#c24

Built successfully against Linux 3.18.36, 4.4.16 and 4.7.0.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @phreedom, @vcunat
(cherry picked from commit fef4b62657)
2016-09-05 17:32:51 -04:00
aszlig
cbdd371988 broadcom_sta: Reindent file, no code changes
Let's make sure we indent using two spaces, because the unpackPhase was
indented using four spaces.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 8f08399671)
2016-09-05 17:32:49 -04:00
aszlig
531a73d4d0 broadcom_sta: Add patch for supporting Linux 4.7
Patch is from Arch Linux at:

https://aur.archlinux.org/cgit/aur.git/tree/?h=broadcom-wl

I've tested building against 3.18.36, 4.4.16 and 4.7.0.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @phreedom, @vcunat
(cherry picked from commit 4d3545f2a5)
2016-09-05 17:32:47 -04:00
aszlig
5fb7b4b2aa broadcom_sta: 6.30.223.248 -> 6.30.223.271
The patch for kernel version 3.18 is already applied upstream, so we
don't need it any longer.

Without i686-build-failure.patch, the build for i686-linux fails because
it references rdtscl(), which is no longer available in Linux 4.3.0.

Patch for missing rdtscl() is from Arch Linux:

https://aur.archlinux.org/cgit/aur.git/tree/002-rdtscl.patch?h=broadcom-wl-ck

I've tested building against 32 and 64 bit Linux versions 3.18.36,
4.4.16 and 4.7.0.

The hashes were verified using the ones from the AUR (using the 16 bit
hashes of course):

$ nix-hash --type sha256 --to-base16 1kaqa2dw3nb8k23ffvx46g8jj3wdhz8xa6jp1v3wb35cjfr712sg
4f8b70b293ac8cc5c70e571ad5d1878d0f29d133a46fe7869868d9c19b5058cd
$ nix-hash --type sha256 --to-base16 1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz
5f79774d5beec8f7636b59c0fb07a03108eef1e3fd3245638b20858c714144be

AUR hashes can be found at:

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=broadcom-wl&id=9d6f10b1b7745fbf5d140ac749e2253caf70daa8#n26

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @phreedom, @vcunat
(cherry picked from commit bd7ce1581d)
2016-09-05 17:32:44 -04:00
Frederik Rietdijk
fa9432161e nvidia-x11: fix driSupport32Bit
(cherry picked from commit 8eb4b3af10)
2016-09-05 17:31:56 -04:00
Karn Kallio
5a147f7d82 nvidia-x11: advance to 365.35 and patch kernel 4.7.
(cherry picked from commit 5d11dac8bb)
2016-09-05 17:31:49 -04:00
Shea Levy
cbb1774631 Backport proofgeneral_HEAD 2016-09-05 11:46:17 -04:00
Bjørn Forsman
c84026f7a9 owncloud-client: 2.2.1 -> 2.2.3
Changelog: https://owncloud.org/changelog/desktop/
(cherry picked from commit 5120af001f)
2016-09-05 08:14:14 +02:00
Cast
d13aad6d53 owncloud: 2.1.1 -> 2.2.1
(cherry picked from commit 0efb130d50)
2016-09-05 08:14:00 +02:00
Mayeu - Cast
4967be3d22 owncloud-client: Fix "libocsync.so.0 not found" error
Close #15130

(cherry picked from commit 61b4f1463c)
2016-09-05 08:13:48 +02:00
Micxjo Funkcio
6a4afcded0 owncloudclient: 1.7.1 -> 2.1.1
(cherry picked from commit 23fad46b76)

[Bjørn: unbreaks build (fixes #17016).]
2016-09-05 08:10:13 +02:00
Peter Hoeg
18821680f6 dropbox: 8.4.21 -> 9.4.49
(cherry picked from commit d0ef7140e9)
2016-09-03 16:57:41 +02:00
Thomas Tuegel
46d9f15f4a spotify: 1.0.36 -> 1.0.37
(cherry picked from commit 7bc711e0a7)

The old version is no longer available.
2016-09-02 08:53:54 -05:00
Michael Raskin
546618ccaa libreoffice: 5.1.2.2 -> 5.1.5.2 (fixes CVE-2016-4324) 2016-09-01 10:06:54 +02:00
Tuomas Tynkkynen
8fe93051f6 nilfs-utils: Set dontPatchELF due to broken RPATH by patchelf
(cherry picked from commit 96004b9d8c)
2016-09-01 01:49:52 +03:00
Robin Gloster
17b51929df linux_4_6: fix by removing upstreamed patch
(cherry picked from commit 1e806458dc)

fixes #18157
2016-08-31 14:45:25 +02:00
Thomas Tuegel
31c0cc5531 Merge pull request #18106 from peterhoeg/db_stable
dropbox: 3.20.1 -> 8.4.21
2016-08-31 07:33:25 -05:00
Eelco Dolstra
fe242af45c thunderbird: 45.2.0 -> 45.3.0
(cherry picked from commit 25c9f2729e)
2016-08-31 14:14:09 +02:00
Eelco Dolstra
6c40d62ae2 firefox: 48.0 -> 48.0.2
(cherry picked from commit c2fb3490c9)
2016-08-31 14:06:12 +02:00
Domen Kožar
34175e7d69 sct: backport #17163 2016-08-31 11:56:24 +02:00
Peter Hoeg
90430d4a13 dropbox: 3.20.1 -> 8.4.21 2016-08-30 11:00:19 +08:00
Frederik Rietdijk
7bcf764af8 mendeley: add missing liborc
(cherry picked from commit aca4801f53)
2016-08-29 10:36:53 +02:00
Frederik Rietdijk
4321379991 liborc: init at 0.4.16
(cherry picked from commit 5da0b34591)
2016-08-29 10:36:45 +02:00
Frederik Rietdijk
fa39eb12d0 mendeley: 1.16.1 -> 1.16.2
(cherry picked from commit d87b415dec)
2016-08-29 10:05:32 +02:00
Rahul Gopinath
697e631973 mendeley: fix sha
(cherry picked from commit 1df37fe7a8)
2016-08-29 10:05:20 +02:00
Bjørn Forsman
f36e610413 borgbackup: 1.0.6 -> 1.0.7
(cherry picked from commit 1ba0ef1c73)
2016-08-28 10:51:09 +02:00
Tobias Geerinckx-Rice
d5dd4a6711 borgbackup: 1.0.5 -> 1.0.6
(cherry picked from commit 0e003d39bc)
2016-08-28 10:49:26 +02:00
Nikolay Amiantov
576be66c64 svox: init at 2016-01-25 2016-08-27 00:45:48 +03:00
Nikolay Amiantov
6bb7c96519 mumble: 1.2.10 -> 1.2.15
(cherry picked from commit 6900fdc84b)
2016-08-26 23:30:43 +02:00
Nikolay Amiantov
a91e5c630c mumble: fix speechd support
(cherry picked from commit 5489bc4109)
2016-08-26 23:30:43 +02:00
Nikolay Amiantov
047df60ba7 speechd: 0.7.1 -> 0.8.3
Make it actually useful -- support sound output and several voice modules

(cherry picked from commit f3435096e2)
2016-08-26 23:30:43 +02:00
Franz Pletz
f209ff7757 linux: 4.4.18 -> 4.4.19
(cherry picked from commit aacf6651c1)
2016-08-26 14:48:53 +02:00
Franz Pletz
372a953f31 linux: 4.1.30 -> 4.1.31
(cherry picked from commit 90251478ec)
2016-08-26 14:48:51 +02:00
Franz Pletz
023b486d55 linux: 3.18.36 -> 3.18.40
(cherry picked from commit 377c851395)
2016-08-26 14:48:49 +02:00
Franz Pletz
edf8e8caa4 linux: 3.14.73 -> 3.14.77
(cherry picked from commit dc37edb36c)
2016-08-26 14:48:48 +02:00
Franz Pletz
427e2bb516 linux: 3.12.61 -> 3.12.62
(cherry picked from commit 458d477215)
2016-08-26 14:48:42 +02:00
Vladimír Čunát
15dd86b92e texlive: sync package versions from current master
Fixes #17907, hopefully. The likelihood of fixing a setup
seems better than the likelihood of breaking it.
2016-08-25 22:41:25 +02:00
Vladimír Čunát
4f8cfadb6e Merge #17928: openssl: fix CVE-2016-2177
(cherry picked from commit 801692c3dd)
2016-08-25 22:31:46 +02:00
Lluís Batlle i Rossell
8911ef5132 fossil: update to 1.35
(cherry picked from commit 3aa8f23aec)

Fixing minimal conflicts.
2016-08-25 18:13:55 +02:00
Kevin Marsh
2983880d18 pythonPackages.django_1_9: 1.9.5 -> 1.9.9
(cherry picked from commit c9b29d4e5f)
2016-08-25 18:10:41 +02:00
Kevin Marsh
9bcf8bd223 pythonPackages.django_1_8: 1.8.12 -> 1.8.14
(cherry picked from commit dfb7d6c223)
2016-08-25 18:10:30 +02:00
Franz Pletz
7bc02d0c7f apacheHttpd: 2.4.20 -> 2.4.23 (security)
Fixes CVE-2016-4979.

(cherry picked from commit 4cb7272537)
2016-08-25 03:12:34 +02:00
Tim Steinbach
c5cbda2414 linux: 4.7.1 -> 4.7.2
(cherry picked from commit 175028582c)
2016-08-21 10:15:15 -04:00
Joachim F
5c40862598 Merge pull request #17849 from a1russell/idea
Idea: 2016.1.2 -> 2016.2
2016-08-20 12:04:19 +02:00
Peter Hoeg
03f9a518f0 spotify: 1.0.34.146 -> 1.0.36.120
(cherry picked from commit cb6d258738)
2016-08-19 18:09:02 +02:00
Thomas Tuegel
c7a3fef5a0 spotify: 1.0.33.106 -> 1.0.34.146
(cherry picked from commit 8dc53d76d5)
2016-08-19 18:08:51 +02:00
Vladimír Čunát
3a25b26b2e gnutls*: drop the parallel-build hack
... as it didn't work, apparently: 024cb9ee

(cherry picked from commit 6d75fd1476)
2016-08-19 17:08:13 +02:00
Vladimír Čunát
4dc0b15d94 gnutls33: maintenance 3.3.18 -> 3.3.24
(cherry picked from commit 1441366fdd)
2016-08-19 17:07:33 +02:00
Vladimír Čunát
677910da30 gnutls: security 3.4.13 -> 3.4.14
http://gnutls.org/security.html#GNUTLS-SA-2016-2
(no CVE seems assigned ATM)

(cherry picked from commit cd07a6b4dd)
2016-08-19 17:07:30 +02:00
Edward Tjörnhammar
81ce50f02f idea.idea-{community,ultimate}: 2016.1.3 -> 2016.2
(cherry picked from commit 6423ded1bc)
2016-08-19 09:20:32 -05:00
José Romildo Malaquias
2b573e92d5 idea.idea-{community,ultimate}: 2016.1.2 -> 2016.1.3
(cherry picked from commit a6fd3e8680ff3da7ddc55c8d8dfd38e17f9fcd1f)
(cherry picked from commit 1f77d3cd09)
2016-08-19 09:19:22 -05:00
Rob Vermaas
9994c07ef7 Update TexLive hashes. 2016-08-18 22:19:19 +00:00
Gabriel Ebner
018c04c7ac libewf: fix build with gcc 5
Fixes #15289.

(cherry picked from commit 75d1e986a7)
2016-08-18 22:11:27 +02:00
Rob Vermaas
4396e8f8a3 Set GIT_SSL_CAINFO for fetch-bower 2016-08-18 19:58:45 +00:00
Ricardo M. Correia
a53bb3ceb1 zfs: print the output of the zpool command (if any) when it succeeds
(cherry picked from commit 1cf9bcaa3f)
2016-08-18 17:39:51 +02:00
Svein Ove Aas
5688c39af5 zfs: Keep trying root import until it works
Works around #11003.

(cherry picked from commit 98b213a110)

Reason: several people cannot boot with ZFS on NVMe
2016-08-18 17:38:55 +02:00
Rok Garbas
81a8ce8668 Merge pull request #17816 from lancelotsix/CVE-2016-6313_on_16.03
Update gnupg and libgcrypt on release-16.03 (fixes CVE-2016-6313)
2016-08-18 12:59:46 +02:00
Lancelot SIX
f026bbcba2 gnupg1orig: 1.4.20 -> 1.4.21
Fixes CVE-2016-6313.

See http://lists.gnu.org/archive/html/info-gnu/2016-08/msg00008.html
2016-08-18 11:57:42 +02:00
Lancelot SIX
9cad85016e libgcrypt: 1.6.5 -> 1.6.6
Fixes CVE-2016-6313.

See http://lists.gnu.org/archive/html/info-gnu/2016-08/msg00008.html
2016-08-18 11:57:26 +02:00
Lancelot SIX
5ae1b21df5 libgcrypt_1_5: 1.5.4 -> 1.5.6
Fixes CVE-2016-6313.

See http://lists.gnu.org/archive/html/info-gnu/2016-08/msg00008.html
2016-08-18 11:57:00 +02:00
Lluís Batlle i Rossell
5237768d62 Updating mlt to 6.2.0
(cherry picked from commit 93d8ab8007)

I checked with kdenlive people, and they say that we should always use the
latest mlt possible; that it should not be any problem, and provide only
improvements.

(cherry picked from commit 9f9cac34d3)
2016-08-18 11:22:43 +02:00
Lluís Batlle i Rossell
a898588dd6 Fixing build of shotcut, after cherrypicks from master. 2016-08-18 09:53:29 +02:00
Lluís Batlle i Rossell
f3edc3cd8c More dependencies to shotcut
(cherry picked from commit e31951cb88)
2016-08-18 09:49:08 +02:00
Lluís Batlle i Rossell
aae489527a Shotcut builds, but wants jack1 libs on start.
(cherry picked from commit 5b3c885b35)
2016-08-18 09:48:59 +02:00
Lluís Batlle i Rossell
4e2a6fd288 Removing old traces of broken=true in shotcut 2016-08-18 09:47:45 +02:00
Robert Helgesson
14975c8db8 redstore: fix build under recent glibc
Previously the build would fail due to, e.g., `getaddrinfo` not being
defined.

(cherry picked from commit a4ae7b87f0)
2016-08-17 22:35:04 +02:00
Franz Pletz
bd148edee2 linux: 4.7 -> 4.7.1
(cherry picked from commit 2571438988)
2016-08-17 05:47:21 +02:00
Franz Pletz
37554cb0fd linux: 4.6.6 -> 4.6.7
Fixes CVE-2016-5696.

(cherry picked from commit 7a4407461b)
2016-08-17 05:47:14 +02:00
Franz Pletz
5215a29740 linux: 4.4.17 -> 4.4.18
Fixes CVE-2016-5696.

(cherry picked from commit da95fb368c)
2016-08-17 05:46:51 +02:00
Franz Pletz
a7be831b43 linux: 4.1.27 -> 4.1.30
Fixes CVE-2016-5696.

(cherry picked from commit 2104d28bcd)
2016-08-17 05:46:51 +02:00
Franz Pletz
106e2c1362 postgresql: security updates for all versions
Fixes CVE-2016-5423 and CVE-2016-5424.

See https://www.postgresql.org/about/news/1688/.

(cherry picked from commit 2709079569)
2016-08-16 18:39:20 +02:00
jokogr
baf46b99e3 syncthing: 0.14.3 -> 0.14.4 (#17723) (#17776)
(cherry picked from commit 6172662676)
2016-08-16 14:52:24 +02:00
Nikolay Amiantov
f6a4aa0697 audacity: 2.1.1 -> 2.1.2
(cherry picked from commit 3c4f861200)
2016-08-16 10:27:02 +02:00
Eelco Dolstra
33b8e724ad systemd: Apply upstream bug fix
https://github.com/systemd/systemd/pull/2695
2016-08-15 19:29:44 +02:00
Shea Levy
9906378e77 long-shebang: 1.0.1 -> 1.1.0
(cherry picked from commit 7069047f2e)
2016-08-14 12:33:55 -04:00
Shea Levy
a686013321 long-shebang: 1.0.0 -> 1.0.1
(cherry picked from commit 670801a56a)
2016-08-14 10:58:59 -04:00
obadz
154263c07e Revert "linux kernel 4.4: fix race during build"
Removes patch. Was fixed upstream.

This reverts commit 4788ec1372.
2016-08-12 16:45:13 +01:00
Franz Pletz
985f9ffa59 linux: fix build, remove upstreamed patches
(cherry picked from commit 263fff0ab8)
2016-08-12 17:09:11 +02:00
Domen Kožar
dfa909e74d add Fedora 24
(cherry picked from commit b9e009b5b5)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-08-12 16:44:57 +02:00
obadz
96924b9f28 Revert "ecryptfs: fix kernel bug introduced in 4.4.14"
The Linux 4.4.17 release fixes the underlying issue

This reverts commit fad9a8841b.

(cherry picked from commit 18947c9e36)
2016-08-12 10:56:04 +01:00
Eelco Dolstra
189781a5ad firefox: 47.0.1 -> 48.0
(cherry picked from commit 8877b93649)
2016-08-12 11:30:23 +02:00
Eelco Dolstra
65b384d9bd nss: 3.24 -> 3.26
(cherry picked from commit 6aabe2e4bb)
2016-08-12 11:25:21 +02:00
rnhmjoj
d2bcccfaf0 nss: 3.23 -> 3.24
(cherry picked from commit f2842da8b2)
2016-08-12 11:25:16 +02:00
Eelco Dolstra
7d5a5e146e linux: 4.4.16 -> 4.4.17
(cherry picked from commit e26ac7afd4)
2016-08-12 11:24:45 +02:00
Eelco Dolstra
56c10200ae linux: 4.4.16 -> 4.4.16
(cherry picked from commit 42f8df10a2)
2016-08-12 11:24:41 +02:00
Frederik Rietdijk
3234a4a26f Merge pull request #17556 from jokogr/upgrade/syncthing-16.03
syncthing:  0.12.25 -> 0.14.3  (backport to 16.03)
2016-08-11 09:21:18 +02:00
Joachim Fasting
96097f1ed3 geis: refactor & fix build
- Pass -Wno-error=pedantic to work around ISO C violations
- Build with X11 unconditionally (also rely on pkgconfig for
  detection, --enable-x11 does not work)
- Build against evemu

(cherry picked from commit 3f5d7c7e04)
2016-08-10 19:07:13 +02:00
Rahul Gopinath
ead5d86b86 gnunet: cleanup patching
Do not use loop and sed since sed can take a list of files.

(cherry picked from commit af074c0972)
2016-08-10 18:47:21 +02:00
Rahul Gopinath
3d3a84da43 gnunet: ensure that zlib is actually linked
Fixes #14969

(cherry picked from commit b31ab67a81)
2016-08-10 18:47:15 +02:00
Eelco Dolstra
d502d02dbd Revert "command-not-found: disable module until it's fixed again"
This reverts commit 9ea8f6ad7d.
2016-08-10 18:12:03 +02:00
Domen Kožar
896e54c535 flatten: drastically improve performance, see #17626
(cherry picked from commit ebffa9fd06)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-08-10 17:59:17 +02:00
Eelco Dolstra
7bcd3a9788 Merge pull request #17627 from dguibert/dg/virtualbox-5.0.26
virtualbox: 5.0.20 -> 5.0.26
2016-08-10 12:23:42 +02:00
David Guibert
0471d403df virtualbox: 5.0.20 -> 5.0.26 2016-08-10 12:15:31 +02:00
Franz Pletz
17f6219f38 simp_le: apply patch to update TOS hash
Fixes #17455.

Also see https://github.com/kuba/simp_le/issues/114.

(cherry picked from commit e55aa50175)
2016-08-09 22:14:34 +02:00
Markus Mueller
d6f1895039 ldap module: fix activationScripts declaration
(cherry picked from commit 19ee3baa32)

Closes #11361
2016-08-09 17:36:56 +01:00
Robert Helgesson
cf62a27a32 wsmancli: fix compilation
Without this the package build fails with a linking error. Fixes #14872.

(cherry picked from commit 28f17215b9)
2016-08-07 19:31:15 +02:00
Lluís Batlle i Rossell
1ec1a7c71f Adding kdenlive for kde-5 (15.12).
Merging the branch where I added it, which has some steps
forward/backward.

The changes for master (applications-16.04) are slightly different,
and although I tried to port it there, kdenlive just crashes on start.
Someone should port it there.
2016-08-07 14:25:50 +02:00
Lluís Batlle i Rossell
da1bf5fc71 Making kdenlive find kinit in PATH 2016-08-07 14:21:08 +02:00
Lluís Batlle i Rossell
008f88ae6f Adding the mlt version that matches kdenlive 15.12. 2016-08-07 14:04:44 +02:00
Vladimír Čunát
4c09ea7e3d mesa: vdpau symlinks, broken after 1a52fdc
Fixes #17559. /cc @edolstra.
Using *relative* symlinks doesn't break when moving the files.

(cherry picked from commit 73e1242172)
2016-08-07 11:38:56 +02:00
Lluís Batlle i Rossell
29ebb13afb Revert "Updating mlt to 6.2.0"
This reverts commit 93d8ab8007.
2016-08-06 21:32:08 +02:00
Lluís Batlle i Rossell
06b1f2f3aa More pieces to kdenlive (copied from archlinux) 2016-08-06 17:47:25 +02:00
Peter Hoeg
ac34f8f977 syncthing: 0.14.2 -> 0.14.3 2016-08-06 16:09:22 +03:00
jokogr
22bb834b59 syncthing: 0.14.0 -> 0.14.2 (#17274)
* Update syncthing from 0.14.0 to 0.14.2
* Use fetchFromGitHub instead of fetchgit
* Add joko to package maintainers
2016-08-06 16:09:22 +03:00
Ioannis Koutras
73d54728ca maintainers.nix: add joko 2016-08-06 16:09:22 +03:00
Peter Hoeg
9b3ff00a6f syncthing: 0.13.10 -> 0.14.0 (#17110) 2016-08-06 16:09:22 +03:00
kc1212
0d5c67db6b syncthing: 0.13.9 -> 0.13.10 (#16912) 2016-08-06 16:09:21 +03:00
kc1212
d825227d2c syncthing: 0.13.7 -> 0.13.9 (#16558) 2016-08-06 16:09:21 +03:00
Ioannis Koutras
4c86791195 maintainers.nix: add peterhoeg 2016-08-06 16:09:21 +03:00
Lluís Batlle i Rossell
e17bc0b871 Adding kdenlive for kde5 2016-08-06 14:57:59 +02:00
Lluís Batlle i Rossell
93d8ab8007 Updating mlt to 6.2.0 2016-08-06 14:57:26 +02:00
Peter Hoeg
cbf29a669f syncthing: 0.13.4 -> 0.13.7 2016-08-06 13:41:20 +03:00
Paul Hendry
27f197ca6f syncthing: 0.12.25 -> 0.13.4 (#15730)
Cherry-picked from 8ea1f2d36c

* Rename v0.12.25 package from 'syncthing' to 'syncthing012'
* Remove syncthing011
2016-08-06 13:39:43 +03:00
Franz Pletz
9cb194cfa4 collectd: 5.5.1 -> 5.5.2 (security)
Fixes CVE-2016-6254.

(cherry picked from commit a3f6ca6d17)
2016-08-05 04:10:33 +02:00
Benjamin Staffin
fe8aefa5ed Update google-chrome versions
The previous download links were all broken.

Stable: 51.0.2704.103 -> 52.0.2743.116
Beta:   52.0.2743.41  -> 53.0.2785.34
Dev:    53.0.2767.4   -> 54.0.2816.0
(cherry picked from commit 78e5e61bbe)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-08-04 19:42:53 +02:00
Rob Vermaas
25e68f79e6 Update spotify 2016-08-04 09:12:21 +00:00
Langston Barrett
44b1d6bff3 mopidy service: add default value for configuration (#17385)
Mopidy will start if the configuration is empty.

Fixes #17381.
(cherry picked from commit a28273df32)
2016-08-01 14:54:32 +02:00
Shea Levy
be56795a59 Add dell-530cdn printer driver
(cherry picked from commit 52b787b0cd)
2016-08-01 08:33:14 -04:00
Shea Levy
36bc5257e3 Add long-shebang tool
(cherry picked from commit 03a8f723bd)
2016-07-31 13:12:04 -04:00
artuuge
f5bcd93ea7 epson-escpr: 1.6.4 -> 1.6.5
(cherry picked from commit 03912a2761)
2016-07-29 17:07:37 -04:00
artuuge
392c19f281 update epson-escpr meta
(cherry picked from commit edfb2e7ccb)
2016-07-29 17:07:29 -04:00
artuuge
8ab4500ab4 epson-escpr: 1.6.3 -> 1.6.4
(cherry picked from commit 7ddd6fc1c3)
2016-07-29 17:07:20 -04:00
Rob Vermaas
1425a1f964 dd-agent: support jmx, needs a separate daemon nowadays. 2016-07-29 12:41:35 +00:00
Kranium Gikos Mendoza
b062b52729 pwsafe: 0.95 -> 0.99
(cherry picked from commit cf08d94d18)

pwsafe never built successfully on 16.03; this patch fixes that.
2016-07-28 14:19:05 +02:00
Franz Pletz
f2d4ee1674 php: 5.5.37 -> 5.5.38, 5.6.23 -> 5.6.24 (security)
https://secure.php.net/ChangeLog-5.php#5.5.38
https://secure.php.net/ChangeLog-5.php#5.6.24

(cherry picked from commit 63784b8021)
2016-07-28 06:24:20 +02:00
Teo Klestrup Röijezon
2fb54132c0 oidentd: Set C dialect to gnu89 (broken by GCC 5)
(cherry picked from commit 2d4af4b979)
2016-07-27 15:14:50 +02:00
Robert Helgesson
41c016ee7c autorandr: avoid use of xxd
Use the Python fallback instead of bringing in a dependency on Vim.

(cherry picked from commit 8a82798f97)
2016-07-27 13:27:17 +02:00
Graham Christensen
5deb702e96 autorandr: 4f5e2401ef -> 20150127
wertarbyte has allowed his project to languish, and phillipberdt
has taken it over and is merging pull requests

(cherry picked from commit 7bd2052436)
2016-07-27 13:26:40 +02:00
Lluís Batlle i Rossell
ccd1f37ffe Fix psutils licence.
(cherry picked from commit e412f2199a)
2016-07-27 10:30:42 +02:00
Lluís Batlle i Rossell
d7dca678a9 Adding psutils.
Have we lived without psnup so many years? Incredible.

(cherry picked from commit 03f368ca93)
2016-07-27 10:30:42 +02:00
Kranium Gikos Mendoza
8541088132 vtun: add debian gcc5 fix
(cherry picked from commit 16cc4dd3a3)

See https://hydra.nixos.org/build/35637382/log/raw
2016-07-26 21:58:45 +02:00
Rahul Gopinath
81154eeb07 zandronum: fix build
Fixes #15994

(cherry picked from commit 97dd3b3e62)

See https://hydra.nixos.org/build/37882372/log/raw
2016-07-26 21:47:36 +02:00
Proglodyte
c267320219 v8: fix 4.5.107 build
Similar to #14272, but fixes 4.5 build rather than generic.
- Ignores errors due to strict-overflow warnings
- Strips clang-only '-Wno-format-pedantic' flag out since this build
  uses gcc

(cherry picked from commit 16bd51fc0d)

Fixes https://hydra.nixos.org/build/37879354/nixlog/1/raw
2016-07-26 21:44:47 +02:00
Joachim Fasting
e8395ec41d grsecurity: also disable build of 4.1 packages (16.03)
I failed to realize that 4.1 had not been disabled already
and so this was not included in efb897f221
2016-07-26 21:07:10 +02:00
Vladimír Čunát
ced94a57fb Merge #17141: libidn: security 1.32 -> 1.33
(cherry picked from commit fa1012a294)
2016-07-26 21:00:30 +02:00
Bjørn Forsman
5109827b50 git: fix gitweb.cgi breakage due to missing CGI.pm
CGI.pm was removed from Perl core in v5.22, breaking the gitweb.cgi
script and thus NixOS' services.lighttpd.gitweb. Nixpkgs switched to
Perl 5.22 with a85ba820a4 ("perl: Make 5.22 the default").

Fix it by bringing in the Perl CGI module (and dependency HTMLParser).
The closure size of "nix-build -A git" increase by 1 MiB, to 201 MiB.

(cherry picked from commit e7ef33c50a)
2016-07-26 15:21:13 +02:00
Joachim F
c78f7c4874 Merge pull request #17255 from joachifm/release-16.03-drop-grsec
grsecurity: drop support on 16.03
2016-07-26 10:35:53 +02:00
Vladimír Čunát
f19ce017e6 tiptop: init at 2.3
(cherry picked from commit 375ae11a34)
2016-07-26 11:57:07 +02:00
Joachim Fasting
efb897f221 grsecurity: drop support on 16.03
I'm unable to provide reasonable support for grsecurity on the 16.03 release
branch.  Mark as broken to more accurately reflect the current state of
affairs.  Also disable the grsecurity test.

If sombody wishes to maintain grsecurity on 16.03, please revert this commit.

Closes https://github.com/NixOS/nixpkgs/issues/17061
2016-07-25 19:33:24 +02:00
obadz
ba40b32de2 ecryptfs: fix kernel bug introduced in 4.4.14
Introduced by mainline commit 2f36db7
Patch is from http://www.spinics.net/lists/stable/msg137350.html
Fixes #16766

(cherry picked from commit fad9a8841b)
2016-07-25 14:05:55 +01:00
obadz
932eeb7c0e ecryptfs: cherry-pick test from 4 commits
ecryptfs: add nixos/tests/ecryptfs.nix
(cherry picked from commit ab6fc29719)

ecryptfs: test bug from #16766
(cherry picked from commit d781bf94c1)

ecryptfs: add test to release (#16910)
Would have caught regression #16766
(cherry picked from commit f76a8fbbac)

ecryptfs: add test to release-combined.nix
(cherry picked from commit de80d0544c)
2016-07-25 14:05:55 +01:00
Shea Levy
6d520cec5c Linux 4.7
(cherry picked from commit ac93e9f2c8)
2016-07-24 18:35:08 -04:00
Robert Helgesson
20a83abdcf stellarium: 0.14.2 -> 0.14.3
(cherry picked from commit 1012508356)
2016-07-24 17:40:38 +02:00
Robert Helgesson
31a1303387 stellarium: wrap binary using wrapQtProgram
Fixes #13582 where Stellarium segfaults when starting.

(cherry picked from commit 1bedecb4f9)
2016-07-24 17:40:37 +02:00
Peter Simons
faba44816e stellarium: update to 0.14.2
This patch also fixes https://github.com/NixOS/nixpkgs/issues/13582.

(cherry picked from commit 288d01fe2b)
2016-07-24 17:40:36 +02:00
Michael Raskin
c9be718b43 cvc4: fix the build by skipping line markers in cpp expansions during configure, helps the configure script to find Boost version
(cherry picked from commit 016d523d82)
2016-07-24 16:56:49 +02:00
Ronny Pfannschmidt
3811a6b8a8 gnome-disk-utility: wrapGAppsHook
(cherry picked from commit be7043e01a)
2016-07-24 12:52:34 +02:00
Ronny Pfannschmidt
01328d4a32 gnome-keyring: wrapGAppsHook
(cherry picked from commit ebda96638a)
2016-07-24 12:52:33 +02:00
Ronny Pfannschmidt
58ad6b9236 gnome-online-accounts: use wrapGAppsHook
(cherry picked from commit e6ba55dcf5)
2016-07-24 12:52:33 +02:00
Tobias Geerinckx-Rice
502de3d6e3 dropbear: 2016.73 -> 2016.74
Security fixes:
- Message printout was vulnerable to format string injection
- dropbearconvert import of OpenSSH keys could run arbitrary code
  as the local dropbearconvert user when parsing malicious key
  files
- dbclient could run arbitrary code as the local dbclient user if
  particular -m or -c arguments are provided
- dbclient or dropbear server could expose process memory to the
  running user if compiled with DEBUG_TRACE and running with -v

Fixes:
- Fix port forwarding failure when connecting to domains that have
  both IPv4 and IPv6 addresses. The bug was introduced in 2015.68
- Fix 100% CPU use while waiting for rekey to complete

(cherry picked from commit 7c84bd121a)
2016-07-23 21:35:13 +02:00
Tobias Geerinckx-Rice
c326a1975a dropbear: 2016.72 -> 2016.73
Changes: https://matt.ucc.asn.au/dropbear/CHANGES.
(cherry picked from commit a685456213)
2016-07-23 21:35:00 +02:00
Tobias Geerinckx-Rice
425c5124b5 dropbear: 2015.71 -> 2016.72
Bugfix release:
- Validate X11 forwarding input. Could allow bypass of
  authorized_keys command= restrictions.

(cherry picked from commit e834a7c05b)
2016-07-23 21:34:52 +02:00
Rok Garbas
7c435c925a mysql: 5.5.49 -> 5.5.50 for CVEs (#17160)
Problems include buffer overflows, null pointer dereferences, and
other bugfixes.

 - CVE-2016-3477
 - CVE-2016-3521
 - CVE-2016-3615
 - CVE-2016-5440

Details:
https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-50.html

backporting @grahamc's work to release-16.03
2016-07-23 18:00:04 +02:00
Tim Steinbach
63f78d9bf3 kernel: 4.6.3 -> 4.6.4 (#16875)
(cherry picked from commit 47da65923b)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-07-23 15:00:18 +02:00
Tobias Geerinckx-Rice
2568ee3d73 lrzip: 0.621 -> 0.630
Changes: http://ck-hack.blogspot.com/2016/06/lrzip-0630.html
(cherry picked from commit 1212d921c1)
2016-07-22 10:06:22 +02:00
Lluís Batlle i Rossell
757901bc6d perf: depend on libiberty to get c++ demangling.
(cherry picked from commit dd02b6f118)
2016-07-21 17:28:07 +02:00
Franz Pletz
349a2a1b01 php: 7.0.8 -> 7.0.9 (security)
https://secure.php.net/ChangeLog-7.php#7.0.9

(cherry picked from commit 77a9ab33a6)
2016-07-21 14:13:12 +02:00
Eelco Dolstra
5a687613c2 Remove nixos.tests.boot.biosUsb.* as release blockers
These have a high random failure rate, blocking channel updates. Issue

(cherry picked from commit a78ecb0d33)
2016-07-21 11:46:03 +02:00
Lluís Batlle i Rossell
3beaca99cb vm/rpm/rpm-closure.pl: make it deterministic
Some recent perl version introduced "keys" to return the keys
in random order. As some of the packages are solved by "provides" and
based on the order, this randomness affects what packages get into the
closure.

This problem may be in other nix perl scripts.

(cherry picked from commit 202ebf794c)
2016-07-21 09:52:57 +02:00
Sheena Artrip
9a2e73c586 gnome-shell: add missing python3 deps for gnome-shell-extension-tool (#16433)
Fix #14651
2016-07-21 01:21:07 +02:00
taku0
6328769bda oraclejdk: 8u91, 8u92 -> 8u101, 8u102 (#17125)
(cherry picked from commit afcf3176ec)
2016-07-20 18:00:44 +02:00
Lluís Batlle i Rossell
24353b91f9 Adding intel-gpu-tools to xorg.
(cherry picked from commit 13fc6e56fe)
2016-07-20 12:45:46 +02:00
Eelco Dolstra
d74e23efa9 gnutls: Disable parallel building
This can fail randomly with

    CC       systemkey.o
  In file included from systemkey.c:47:0:
  systemkey-args.h:1:1: error: unterminated comment
   /*   -*- buffer-read-only: t -*- vi: set ro:

which is presumably caused by a race with the generation step above:

  autogen systemkey-args.def

http://hydra.nixos.org/build/37878764#tabs-buildsteps
(cherry picked from commit 024cb9eecd)
2016-07-20 11:56:40 +02:00
Bjørn Forsman
b9fa0cf83c nixos/ddclient: add warning about password being world readable
Closes #16885.

(cherry picked from commit 78eac466b0)
2016-07-19 16:53:11 +02:00
Rob Vermaas
9909d31602 nixops: update to 1.4 2016-07-19 14:33:15 +00:00
Eelco Dolstra
94eec8fe77 gnutls: Disable test suite
The 3.4.x test suite contains a certificate that expired June 29,
leading to:

FAIL: name-constraints
======================
...
Chain verification output: Not verified. The certificate is NOT trusted. The certificate chain uses expired certificate.
2016-07-19 15:20:45 +02:00
Michiel Leenaars
a6b7474964 gnutls: 3.4.11 -> 3.4.13
(cherry picked from commit 325dafe82b)
2016-07-19 15:12:32 +02:00
Michiel Leenaars
c73d3b13c2 gnutls: 3.4.6 -> 3.4.11
(cherry picked from commit 4ea23ca277)
2016-07-19 15:12:27 +02:00
Matthew Justin Bauer
ebb204732e virtualbox: fix virtualbox guest additions (#16964)
(cherry picked from commit 802a700373)
2016-07-19 13:56:37 +02:00
Franz Pletz
1daaf68e38 imagemagick: fix hashes
See #16958.

(cherry picked from commit b1ff7f83ef)
2016-07-19 13:56:11 +02:00
Ram Kromberg
19e8d07f4e imagemagick: 6.9.3-9 -> 6.9.5-2 (#16958)
(cherry picked from commit 9ff51cc3c4)
2016-07-19 13:56:11 +02:00
Frederik Rietdijk
13138d5fea Python 2.7.11 -> 2.7.12
(cherry picked from commit b49bedd75b)
2016-07-19 11:53:53 +02:00
Eelco Dolstra
9146390f64 python-2.7: Don't use ldconfig and speed up uuid load
(cherry picked from commit de1b4e71c1)
2016-07-19 11:53:38 +02:00
Peter Jones
f231b2b3f7 slic3r: Add LWP for "Send to printer"
This patch adds a dependency on the LWP perl module so that Slic3r can
make HTTP connections to Octoprint and send G-code to a remote printer.

(cherry picked from commit f303a072c0)
2016-07-18 21:26:28 +02:00
Joachim Fasting
ec0889d393 grsecurity_base_linux_4_5: fix build
The hiddev CVE patch, added in
10ba79450b
breaks the grsecurity kernel build.  For now, the simplest solution is to set
kernel patches applied to the grsec base kernel explicitly rather than
inheriting patches from linux_4_5.

Fixes https://github.com/NixOS/nixpkgs/issues/17061
2016-07-18 21:10:36 +02:00
Stephen Whitmore
3a8765a323 youtube-dl: 2016.07.09.2 -> 2016.07.17
(cherry picked from commit d8516b0fe3)
2016-07-18 19:40:17 +02:00
Vladimír Čunát
175ba559f7 gimp: security 2.8.16 -> 2.8.18
Fixes CVE-2016-4994 and some bugs:
http://www.gimp.org/news/2016/07/14/gimp-2-8-18-released/

(cherry picked from commit 540f4a8eab)
2016-07-17 21:55:17 +02:00
Vladimír Čunát
904a6fabdc Merge #16970: webkitgtk24x: 2.4.9 -> 2.4.11
(cherry picked from commit d167bedb67)
2.4.10 introduced lots of security fixes.
2016-07-17 20:25:06 +02:00
Márton Boros
a0c4a3a714 youtube-dl: 2016.07.03.1 -> 2016.07.09.2
(cherry picked from commit 129c17b222)
2016-07-16 12:38:59 +02:00
mimadrid
1513e65b66 youtube-dl: 2016.06.27 -> 2016.07.03.1
(cherry picked from commit aaa023c858)
2016-07-16 12:38:48 +02:00
mimadrid
9ae9de9b56 youtube-dl: 2016.06.19.1 -> 2016.06.27
(cherry picked from commit 654b978fa3)
2016-07-16 12:38:42 +02:00
wrb
c561fe49a6 youtube-dl: 2016.05.21.2 -> 2016.06.19.1 (#16338)
(cherry picked from commit 22a7f3a849)
2016-07-16 12:38:36 +02:00
wrb
0e98bd31ef youtube-dl: 2016.04.19 -> 2016.05.21.2
(cherry picked from commit c27eec296a)
2016-07-16 12:38:30 +02:00
Joachim Schiele
e040c01aab youtube-dl: version bump to 2016.04.19
(cherry picked from commit a021b6a617)
2016-07-16 12:38:23 +02:00
Joachim Fasting
1e70aaaffe youtube-dl: 2016.02.13 -> 2016.04.06
(cherry picked from commit 6111d5b480)
2016-07-16 12:38:11 +02:00
Bjørn Forsman
00dfa5b4e5 nixos/systemd: disable timer units with service
A disabled systemd service with a "startAt" attribute, like this:

  systemd.services.foo-service = {
    enable = false;
    startAt = "*-*-* 05:15:00";
    ...
  };

will cause the following errors in the system journal:

  systemd[1]: foo-service.timer: Refusing to start, unit to trigger not loaded.
  systemd[1]: Failed to start foo-service.timer.

Fix it by not generating the corresponding timer unit when the service
is disabled.

(cherry picked from commit 2eb8aab42c)
2016-07-16 09:41:52 +02:00
Bjørn Forsman
bd1d9ffa91 nixos/swap: support for resizing swapfile
Currently NixOS creates the swapfile (with the specified size) only if
it doesn't already exist. Changing the swapfile size afterwards will not
have any effect.

This commit changes that so the swapfile will be recreated whenever
swapDevices.*.size is changed (or more precisely, whenever the actual
file size differs from the configured one), allowing both growing and
shrinking the swapfile.

The service unit has "restartIfChanged = false", so we don't have to
worry about the swapfile being in use at the time this code is run (you
have to reboot for swapfile changes).

fallocate doesn't shrink files, use truncate for that. truncate can also
be used to grow files, but it creates "holes" in the file which doesn't
work with swapfiles.

(cherry picked from commit b30852ed41)
2016-07-16 09:41:52 +02:00
Bjørn Forsman
08f4bc4c34 nixos/grub: change state file device separator from ':' to ','
':' is currently used as separator in /boot/grub/state for the list of
devices GRUB should be installed to. The problem is that ':' itself may
appear in a device path:

  /dev/disk/by-id/usb-SanDisk_Cruzer_20043512300546C0B317-0:0

With such a path, NixOS will install GRUB *every* time, because it
thinks the configuration differs from the state file (due to the wrong
list split). Fix it by using ',' as separator.

For existing systems with GRUB installed on multiple devices, this
change means that GRUB will be installed one extra time.

(cherry picked from commit aeb516c741)
2016-07-16 09:41:52 +02:00
Bjørn Forsman
3480e79657 avahi: 0.6.31 -> 0.6.32
Bugfix release, backwards compatible:

  https://github.com/lathiat/avahi/releases/tag/v0.6.32

* Update src URL to github (the latest release is only available there).
* Change "$(mkdir_p)" to "$(MKDIR_P)" in the patch to keep it working
  (apply'able).

(cherry picked from commit 79ed40cd69)
2016-07-16 09:41:52 +02:00
mimadrid
ff2c69e1fd strace: 4.11 -> 4.12
(cherry picked from commit a3581f802e)
2016-07-16 09:41:52 +02:00
Rastus Vernon
5424a1dd0e cryptsetup: update project homepage
The project was moved from code.google.com to gitlab.com.

(cherry picked from commit 77d9966d93)
2016-07-16 09:41:52 +02:00
Bjørn Forsman
368214c636 pencil: mark as broken
Currently pencil won't start, due to incompatible firefox version:

  $ pencil
  Error: Platform version '47.0.1' is not compatible with
  minVersion >= 36.0

See https://github.com/prikhi/pencil/issues/840.

(cherry picked from commit 5b6e3a3ed1)
2016-07-16 00:50:03 +02:00
Bjørn Forsman
1ff47d2bfb pencil: unbreak build by using 'firefox-unwrapped' as 'xulrunner'
The xulrunner build itself is broken at the moment.

(cherry picked from commit 15072e8986)
2016-07-16 00:49:35 +02:00
Franz Pletz
92d3da8108 wxPython: Fix missing libgobject-2.0.so
This fixes the following error when trying to run wxPython applications:

    libgobject-2.0.so.0: cannot open shared object file: No such file or directory

This only applies to 16.03. The master branch is not affected.
2016-07-15 23:25:28 +02:00
Bjørn Forsman
bd66409a01 switch-to-configuration: use absolute path to systemd-escape
Fixes issue when upgrading from very old NixOS systems that don't have
systemd-escape in $PATH:

  $ sudo nixos-rebuild switch
  ...
  building the system configuration...
  updating GRUB 2 menu...
  Can't exec "systemd-escape": No such file or directory at /nix/var/nix/profiles/system/bin/switch-to-configuration line 264.
  Unable to escape /!

(cherry picked from commit 9050077cff)
2016-07-15 13:40:03 +02:00
Frederik Rietdijk
fc83837a9c pythonPackages.aws_shell: use futures 3.0, not 2.2
(cherry picked from commit 8fa6930d84)
2016-07-15 11:16:42 +02:00
Frederik Rietdijk
07283cf2b2 pythonPackages.boto3: enable tests, fixes #14985
I've modified #14985 by @adnelson to take into account the update in
b68f09a520

(cherry picked from commit 8729bd8bb9)
2016-07-15 11:16:42 +02:00
Tobias Geerinckx-Rice
119866cf73 pythonPackages.boto3: 1.2.2 -> 1.3.1
(cherry picked from commit b68f09a520)
2016-07-15 11:16:42 +02:00
Eelco Dolstra
7f021bcc38 awscli: 1.10.38 -> 1.10.46
(cherry picked from commit 0fa00cce01)
2016-07-15 11:16:42 +02:00
Patrick Mahoney
20e5938c36 awscli: 1.10.1 -> 1.10.18
And awscli dependencies:

botocore: 1.3.23 -> 1.4.9
s3transfer: init at 0.0.1
(cherry picked from commit f14bf70db4)
2016-07-15 11:16:42 +02:00
Ram Kromberg
0b40a93388 flashplayer: 11.2.202.626 -> 11.2.202.632
(cherry picked from commit 6046702e5e)
2016-07-14 22:27:27 +03:00
Ram Kromberg
d7450443c4 ansible: 1.9.4 -> 1.9.6
(cherry picked from commit e9ddfe3d4c)
2016-07-14 11:09:34 +02:00
Eelco Dolstra
f0210311aa Update 16.03 AMIs
(cherry picked from commit 9aa3e78ab2)
2016-07-13 10:40:29 +02:00
Eelco Dolstra
acfbf1c7d6 Add AMIs in ap-northeast-2 and ap-south-1
(cherry picked from commit 94cc18e9aa)
2016-07-13 10:40:00 +02:00
Eelco Dolstra
2daacfa887 Copy AMIs in parallel
(cherry picked from commit 1e9b8bfb31)
2016-07-13 10:39:57 +02:00
Eelco Dolstra
fbd04a7d97 Create AMIs with Enhanced Networking
Fixes #15956.

(cherry picked from commit 02db7d9821)
2016-07-13 10:39:54 +02:00
obadz
0452a46957 ec2/create-amis.sh: specify the approriate size on snapshots
Should help with #15148

(cherry picked from commit 364a4373cf)
2016-07-13 10:39:50 +02:00
Franz Pletz
10ba79450b linux: Add patch to fix CVE-2016-5829 (#16824)
Fixed for all available 4.x series kernels.

From CVE-2016-5829:

  Multiple heap-based buffer overflows in the hiddev_ioctl_usage function
  in drivers/hid/usbhid/hiddev.c in the Linux kernel through 4.6.3 allow
  local users to cause a denial of service or possibly have unspecified
  other impact via a crafted (1) HIDIOCGUSAGES or (2) HIDIOCSUSAGES ioctl
  call.
(cherry picked from commit dde259dfb5)
2016-07-12 21:01:58 +02:00
Ricardo Ardissone
7545ed3744 subversion: fix apr-1 linking
(cherry picked from commit 025ccbccd7)
2016-07-12 18:08:55 +02:00
Robert Helgesson
6207f049cd handbrake: depend on hicolor_icon_theme
This avoids conflicts on `share/icons/hicolor/icon-theme.cache`.

(cherry picked from commit c071831b8b)
2016-07-12 17:26:22 +02:00
Robert Helgesson
fc144cb62c brasero: depend on hicolor_icon_theme
This avoids conflicts on `share/icons/hicolor/icon-theme.cache`.

(cherry picked from commit 02600dacf8)
2016-07-12 17:26:22 +02:00
mimadrid
73e28bc9b7 filezilla: 3.18.0 -> 3.19.0
(cherry picked from commit 15d28334a7)
2016-07-11 22:24:42 +02:00
mimadrid
cc0d5dd458 filezilla: 3.17.0.1 -> 3.18.0
(cherry picked from commit d7695b790f)
2016-07-11 22:24:33 +02:00
mimadrid
0707378780 libfilezilla: 0.5.1 -> 0.5.3
(cherry picked from commit baab0ff6d3)
2016-07-11 22:24:26 +02:00
Pascal Wittmann
f8da4daeb0 filezilla: 3.17.0 -> 3.17.0.1
(cherry picked from commit 34f4515051)
2016-07-11 22:24:20 +02:00
Pascal Wittmann
b12aae2a53 libfilezilla: 0.5.0 -> 0.5.1
(cherry picked from commit 8ce8226655)
2016-07-11 22:24:14 +02:00
Pascal Wittmann
6b7d187ee6 filezilla: 3.16.1 -> 3.17.0
(cherry picked from commit c03d7f2819)
2016-07-11 22:24:08 +02:00
Pascal Wittmann
98fa5068b3 libfilezilla: 0.4.0.1 -> 0.5.0
(cherry picked from commit 8d7e44745d)
2016-07-11 22:24:01 +02:00
Pascal Wittmann
473754295c filezilla: 3.16.0 -> 3.16.1
(cherry picked from commit de8cc270c1)
2016-07-11 22:23:54 +02:00
Pascal Wittmann
b2846708ea filezilla: 3.15.0.2 -> 3.16.0
(cherry picked from commit ba7b5ad530)
2016-07-11 22:23:46 +02:00
Pascal Wittmann
db8505c1cc libfilezilla: 0.4.0 -> 0.4.0.1
(cherry picked from commit b56c1982bd)
2016-07-11 22:23:33 +02:00
Eelco Dolstra
b8c98b4aa9 linux: Enable paravirtualized spinlocks
This prevents ticket-lock storms on Xen. See
https://blog.xenproject.org/2012/05/11/benchmarking-the-new-pv-ticketlock-implementation/.

Extracted from 7b9c493d60.
2016-07-11 15:17:44 +02:00
Eelco Dolstra
5788d8ed05 linux: Bump NR_CPUS
The default limit (64) is too low for systems like EC2 x1.* instances
or Xeon Phis, so let's increase it.

(cherry picked from commit 1cd7dbc00b)
2016-07-11 15:17:44 +02:00
Eelco Dolstra
ab4e3c7b80 amazon-image.nix: Add the ena driver
This is necessary for Enhanced Networking on x1.* instances.

(cherry picked from commit 56badfee94)
2016-07-11 15:17:44 +02:00
Eelco Dolstra
025a255ea6 ena: Init at 20160629
This adds the Amazon Elastic Network Adapter kernel module required by
EC2 x1.* instances.

(cherry picked from commit 8710672225)
2016-07-11 15:17:44 +02:00
Eelco Dolstra
0229827a15 amazon-image.nix: Add the ixgbevf driver
(cherry picked from commit 3adb769776)
2016-07-11 15:17:44 +02:00
Eelco Dolstra
e501f19620 ixgbevf: Init at 3.2.2
This driver is necessary for Enhanced Networking on most EC2 instance
types.

(cherry picked from commit 04eb7492dc)
2016-07-11 15:17:44 +02:00
Domen Kožar
984e559cdd nix-repl: 2015-09-07 -> 2016-02-28
(cherry picked from commit 5789f5875f)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-07-11 14:01:14 +02:00
Frederik Rietdijk
466303bbe4 python 3.4.4 -> 3.4.5
(cherry picked from commit f04b018111)
2016-07-10 19:19:31 +02:00
Frederik Rietdijk
1cb6bf00b9 python 3.5.1 -> 3.5.2
(cherry picked from commit 52bc8d203f)
2016-07-10 19:06:09 +02:00
Franz Pletz
f57c4b5aac ntp: 4.2.8p6 -> 4.2.8p8 (security)
Fixes CVE-2016-4953, CVE-2016-4954, CVE-2016-4955, CVE-2016-4956.

(cherry picked from commit bdf4c0d21f)
2016-07-10 10:55:08 +02:00
Franz Pletz
e37f347e55 dnsmasq: 2.75 -> 2.76 (security)
Fixes CVE-2015-8899.

(cherry picked from commit 033e593a4f)
2016-07-10 10:55:04 +02:00
Franz Pletz
9d15fdda5e graphicsmagick: 1.3.21 -> 1.3.24 (security)
Fixes CVE-2016-3716, CVE-2016-3717, CVE-2016-2317, CVE-2016-2318,
CVE-2016-5118, CVE-2016-3714, CVE-2016-3715, CVE-2016-3718.

(cherry picked from commit 22c1416192)
2016-07-10 10:54:50 +02:00
Franz Pletz
a130d36e40 vlc: 2.2.2 -> 2.2.4 (security)
Fixes CVE-2016-5108.

(cherry picked from commit 64ab827873)
2016-07-10 10:54:13 +02:00
Franz Pletz
4a9de9cb26 plib: add patch to fix CVE-2011-4620
(cherry picked from commit 9c9abc4c94)
2016-07-10 10:53:42 +02:00
Franz Pletz
e1a506a2f8 wireshark: 2.0.3 -> 2.0.4 (security)
Fixes a few security problems:
  https://www.wireshark.org/docs/relnotes/wireshark-2.0.4.html

(cherry picked from commit a950c154c1)
2016-07-10 10:53:39 +02:00
Franz Pletz
ef6c951d70 libusbmuxd, libimobiledevice: Fix CVE-2016-5104
(cherry picked from commit 77f2fff41d)
2016-07-10 10:53:37 +02:00
Franz Pletz
fdd3f94a97 libvirt: add patch to fix CVE-2016-5008 2016-07-10 10:16:58 +02:00
Vladimír Čunát
f06e94b8b8 gd: use 2.0.* from Debian to fix security 2016-07-10 10:11:27 +02:00
Vladimír Čunát
8e327a08e4 Revert "gd: major+security update 2.0.35 -> 2.2.2"
This reverts commit f48d21551b.
I give up this way; I will try to apply patches instead.
2016-07-10 10:11:27 +02:00
Franz Pletz
98c99b2e0c xercesc: 3.1.3 -> 3.1.4 (security)
Fixes CVE-2016-4463.

(cherry picked from commit 7e9c1a30b3)
2016-07-09 23:30:37 +02:00
Vladimír Čunát
f48d21551b gd: major+security update 2.0.35 -> 2.2.2
Fixes CVE-2015-8874 and CVE-2016-5767 in 2.2.1 -> 2.2.2
Hopefully any breakages will be build-time only.
2016-07-09 17:34:15 +02:00
Robert Helgesson
16e753e54d ddclient service: use environment.etc
The ddclient daemon requires that the configuration file is only
accessible by the ddclient user. This since it typically contains login
information.

(cherry picked from commit 9f4775dbb5)
2016-07-09 14:56:28 +02:00
Franz Pletz
19cf2e9270 Add missing matainer ralith, fix evaluation
Caused by 466e7feece.
2016-07-09 14:17:58 +02:00
Tobias Geerinckx-Rice
6ac1abc6f0 borgbackup: 1.0.4 -> 1.0.5
This update slipped in between 1.0.4 and me pushing 276448a. Upstream says:

This is a critical bugfix release - upgrading to it is strongly recommended!
Please read https://github.com/borgbackup/borg/blob/1.0.5/docs/changes.rst.

(cherry picked from commit 3970c6da5e)
2016-07-09 13:17:44 +02:00
Tobias Geerinckx-Rice
db59a2a8ad borgbackup: 1.0.3 -> 1.0.4
Take Pypi's hint and switch to GitHub.

(cherry picked from commit 276448a477)
2016-07-09 13:17:27 +02:00
roblabla
466e7feece matrix-synapse: update 0.12.0 -> 0.16.1-r1
Fixes critical security issue:

  https://matrix.org/blog/2016/07/08/critical-security-vulnerability-in-synapse-0-12-to-0-16-1-inclusive/

See #16798.

(cherry picked from commit be21e16652)
(cherry picked from commit 091a911bcd)
(cherry picked from commit 26da79230b)
(cherry picked from commit 65005fe302)
(cherry picked from commit f77af9aa5e)
2016-07-09 03:45:40 +02:00
Anders Lundstedt
6320299e16 nixos: fix avahi connectivity for shairport-sync module
The shairport-sync service currently fails to start with the error

shairport avahi_entry_group_new failed

This problem seems to have been introduced by

cdd7310a50

After some trial and error I concluded that the attached commit is a minimal
fix.

(cherry picked from commit 5f3c4bd11e)
2016-07-08 18:11:48 +02:00
Franz Pletz
89d1d487b5 thunderbird-bin: Fix cherry pick fail
Fixes version bump in 094c6ceff0 due to
missing backport of changes to thunderbird-bin on master.

See #16659.

(cherry picked from commit eb4e6b821b)
2016-07-08 17:40:22 +02:00
Vladimír Čunát
eb764fdd44 pythonPackages.breathe: init at 4.2.0
(cherry-picked from b732af00bb)
2016-07-08 15:02:29 +02:00
Ram Kromberg
c2050a492c libpng: 1.2.55 > 1.2.56 CVE-2015-8540 (#16793)
(cherry picked from commit 56791034f6)
2016-07-08 10:55:55 +02:00
taku0
094c6ceff0 thunderbird-bin: 45.1.1 -> 45.2.0 (#16659)
(cherry picked from commit 4774abecb6)
2016-07-08 10:55:28 +02:00
Neil Mayhew
f13e916223 symbola: fix hash mismatch due to new upstream release
Upstream releases are made in-place, ie they update the same URL
rather than creating a new one.

(cherry picked from commit 7a8de0fdcf)
2016-07-07 16:16:09 +02:00
Franz Pletz
67544d2a9f php: fix hashes for 5.5 and 5.6
(cherry picked from commit 5c59a30191)
2016-07-07 14:29:56 +02:00
Franz Pletz
3d4d093b6e php55: 5.5.36 -> 5.5.37 (security)
See https://secure.php.net/ChangeLog-5.php#5.5.37.

(cherry picked from commit d6680b73c3)
2016-07-07 14:29:52 +02:00
Franz Pletz
554782ebc6 php56: 5.6.22 -> 5.6.23 (security)
See https://secure.php.net/ChangeLog-5.php#5.6.23.

(cherry picked from commit 56bbc4cc61)
2016-07-07 14:29:23 +02:00
Alexey Shmalko
0546a4aa57 guake: add gconf to propagatedUserEnvPkgs
This fixes #15978.

(cherry picked from commit 2bd7855c46)
2016-07-06 01:22:21 +03:00
Joachim Fasting
26c327c35d seabios: 1.7.5.2 -> 1.9.2
Also fixes the build

(cherry picked from commit b148be7ff9)
2016-07-05 16:17:36 +02:00
Al Zohali
057421e8e2 nix.requireSignedBinaryCaches: description fix
(cherry picked from commit a227bd4e3b)

[Bjørn: The description says the default is "disabled" (wrong).]
2016-07-05 13:11:13 +02:00
Vincent Laporte
17a777c8ed zim: 0.63 -> 0.65
(cherry picked from commit 13c6b9ba85)

[Bjørn: Without this commit, zim fails to start:
"ERROR: Failed running: $PWD/zim", where $PWD is the (expanded) current
working directory. Fix by making sys.argv[0] an absolute path to zim.]
2016-07-05 10:29:42 +02:00
Lancelot SIX
cc3bae4b92 Merge pull request #16595 from lancelotsix/update_mysql55_url
pkgs.mysql55: update download URL
2016-07-04 22:45:32 +02:00
Tobias Geerinckx-Rice
068d53cb5c geolite-legacy: 2016-06-30 -> 2016-07-04
(cherry picked from commit 17de009046)
2016-07-04 22:18:54 +02:00
Eelco Dolstra
86662a57a5 firefox-esr: Fix build
http://hydra.nixos.org/build/36668046
(cherry picked from commit 0967b0d303)
2016-07-04 14:33:42 +02:00
Eelco Dolstra
b0e30ba444 firefox-esr: 45.1.1 -> 45.2.0
(cherry picked from commit 0c832dceb2)
2016-07-04 14:33:24 +02:00
Eelco Dolstra
3e67bd11d8 firefox: 47.0 -> 47.0.1
(cherry picked from commit 653be3c802)
2016-07-04 14:32:10 +02:00
Franz Pletz
1e1d6ecc1d linux_4_3: Remove, not maintained anymore
(cherry picked from commit 7e9affa7ee)
2016-07-03 09:03:39 +02:00
Franz Pletz
8087fb594e linux: 3.10.101 -> 3.10.102
(cherry picked from commit eed51eccef)
2016-07-03 08:43:48 +02:00
Franz Pletz
de0a27422b linux: 3.12.57 -> 3.12.61
(cherry picked from commit b7e0b118d9)
2016-07-03 08:43:37 +02:00
Franz Pletz
473a643326 linux: 3.14.65 -> 3.14.73
(cherry picked from commit 0387eddb51)
2016-07-03 08:43:24 +02:00
Franz Pletz
0a8eccc471 linux: 3.18.29 -> 3.18.36
(cherry picked from commit 6165af4db2)
2016-07-03 08:43:16 +02:00
Franz Pletz
553900fc7e linux: 4.1.25 -> 4.1.27
(cherry picked from commit 5806b185bd)
2016-07-03 08:43:06 +02:00
Franz Pletz
257fcdd764 linux: 4.4.13 -> 4.4.14
(cherry picked from commit 4a942499b4)
Includes fixes for CVE-2016-{4997,4998}.
2016-07-03 08:42:01 +02:00
Frederik Rietdijk
6317da4000 pythonPackages.setuptools: fix for use in buildEnv
pythonPath needs to be set for it to be included in buildEnv.
This will also fix tox.

(cherry picked from commit def310df45)
2016-07-02 23:45:57 +02:00
mimadrid
708143853e thunderbird: 45.1.0 -> 45.2.0
(cherry picked from commit 0dfaa1e8bd)
It fixes some security problems:
https://www.mozilla.org/en-US/security/advisories/mfsa2016-49/
2016-07-02 17:07:35 +02:00
Rickard Nilsson
953fe5c24a libvirt: Fix libsystemd dependency
(cherry picked from commit 8404d626ad)
2016-07-01 20:20:46 +02:00
Rickard Nilsson
ad2137eeb0 libvirt and pythonPackages.libvirt: 1.3.3 -> 1.3.5
(cherry picked from commit b43268bfeb)
2016-07-01 20:18:14 +02:00
Franz Pletz
eb57c2c9af libvirt: enable zfs on linux
(cherry picked from commit 26964c2fb5)
2016-07-01 20:16:08 +02:00
Alexander Ried
e5b91151e7 libvirt: add comment about updating
(cherry picked from commit e898c4f1d5)
2016-07-01 20:14:55 +02:00
Franz Pletz
3fe1d396bd libvirt: 1.3.2 -> 1.3.3
(cherry picked from commit 862875f9cd)
2016-07-01 20:14:49 +02:00
Rickard Nilsson
3f49faa6aa nixos/libvirtd: Don't use the --daemon flag now that we use the 'notify' service type
(cherry picked from commit 7d67a4da99)
2016-07-01 19:10:21 +02:00
Rickard Nilsson
462d3747b1 nixos/elasticsearch: Set a group on the user
This fixed a problem I had when running ElasticSearch in an LXC
container, and it doesn't hurt using a dedicated group instead of
nogroup anyway.

(cherry picked from commit 9facb7078b)
2016-07-01 19:10:16 +02:00
Rickard Nilsson
adc5760bb2 nixos/libvirt: Syntactic-only refactoring
(cherry picked from commit a0c0f63811)
2016-07-01 19:09:56 +02:00
Rickard Nilsson
bb52e1449d nixos/libvirt: Add virtlogd and virtlockd systemd sockets and services
(cherry picked from commit 301b4e9018)
2016-07-01 19:09:48 +02:00
Rickard Nilsson
b9397df732 nixos/libvirt: Adapt libvirtd.service to upstream sources
(cherry picked from commit 1b54e48561)
2016-07-01 19:09:44 +02:00
Rickard Nilsson
0a16a4e5b1 nixos/libvirt: Remove non-functional service libvirt-guests
It doesn't have a start script, so it hasn't worked at all in
a long time.

(cherry picked from commit 37f4889851)
2016-07-01 19:09:17 +02:00
Frederik Rietdijk
b1aa70a78c python: fix modules in buildEnv, closes #16646
Python 2.7 on Nix is stripped of some modules, which can be added when
needed. This was broken with python.buildEnv.
2016-07-01 16:25:21 +02:00
Frederik Rietdijk
240f55fab6 Python: fix the wheel package 2016-07-01 14:33:28 +02:00
Bjørn Forsman
b5a905beac nixos/update-users-groups.pl: print UIDs and GIDs
Instead of showing this output from "nixos-rebuild switch":

  warning: not applying GID change of group ‘munin’
  warning: not applying UID change of user ‘ntp’

print this:

  warning: not applying GID change of group ‘munin’ (95 -> 102)
  warning: not applying UID change of user ‘ntp’ (3 -> 179)

This makes it possible for users to take action and fixup the UIDs/GIDs
that NixOS won't touch.

(cherry picked from commit 6e528893a8)
2016-07-01 14:23:32 +02:00
Peter Simons
eb4cfc545e ghc-8.0.1.nix: cosmetic
(cherry picked from commit 94b6127f8e)
2016-07-01 10:28:18 +02:00
Nikolay Amiantov
c0fc272230 haskell.packages.ghc801.ghc: upstream tarball updated
(cherry picked from commit c366ab933d)
2016-07-01 10:28:17 +02:00
Nikolay Amiantov
e2c04f25f6 haskell.packages.ghc801: 8.0.0.20160421 -> 8.0.1
(cherry picked from commit 3098547ebc)
2016-07-01 10:28:17 +02:00
Peter Simons
d615935dab ghc: update 8.0.x version to rc4
(cherry picked from commit bdaf650336)
2016-07-01 10:28:17 +02:00
Peter Simons
66b0b2817d ghc: update 8.0.x pre-release from rc2 to rc3
(cherry picked from commit 2422ae0838)
2016-07-01 10:28:17 +02:00
Bjørn Forsman
7bcd427ca9 nixos/gnome-desktop: enable colord service
Fixes this (line wrapped):

  $ gnome-control-center
  [... click on the "Color" item ...]
  (gnome-control-center:3977): color-cc-panel-WARNING **: \
    The name org.freedesktop.ColorManager was not provided by any .service files

With this patch applied, the above warnings are not printed and the GUI
shows some devices that can be managed (my printer and display). Without
this patch the GUI is empty (non-functional).

(cups will also complain in the journal with a similar message when
doing print jobs, without this patch.)

(cherry picked from commit 66ee7a4c46)
2016-07-01 07:34:40 +02:00
Nikolay Amiantov
be4e63004f colord service: init
(cherry picked from commit 4e58b33dee)

[Bjørn: Add ./services/x11/colord.nix to module-list.nix, was missing in
the above commit. (It was added as part of 776845bbeb
("xiccd: init at 0.2.2") though.)
]
2016-07-01 07:34:19 +02:00
Nikolay Amiantov
d445ad758a colord: fix udev rules, add sane support
(cherry picked from commit cf9ddb27d6)
2016-07-01 07:24:23 +02:00
Tobias Geerinckx-Rice
f4aa57ac91 libpsl: list 2016-02-25 -> 2016-06-30
(cherry picked from commit dccac25d5f)
2016-06-30 17:20:26 +02:00
Tobias Geerinckx-Rice
956e33169a geolite-legacy: 2016-06-20 -> 2016-06-30
(cherry picked from commit d6871a2c7a)
2016-06-30 15:41:26 +02:00
Bjørn Forsman
48ded04143 xpra: 0.17.3 -> 0.17.4 (important fixes)
(cherry picked from commit c5b7a9ffeb)
2016-06-30 15:27:29 +02:00
Bjørn Forsman
f2a7816225 xpra: fix some runtime issues
* Add missing modules (fixes warnings and errors).
* Step 1 to unbreak starting Xvfb by making xpra invoke it with
  valid log dir ($HOME/.xpra). Without this fix, it is invoked with
  ~/.xpra, which Xvfb doesn't know how to interpret and uses it
  literally (fail). Step 2 will be fixing an Xvfb permission issue:
  "xf86OpenConsole: Cannot open virtual console 1 (Permission denied)".
* Use XPRA_INSTALL_PREFIX to make it find its icons.

(cherry picked from commit 6d48539fdb)
2016-06-30 15:27:29 +02:00
Bjørn Forsman
37134a4f6b pythonPackages.lz4: init at 0.8.2
Needed for xpra (better compression => better performance).

(cherry picked from commit d71ef00b9d)
2016-06-30 15:27:29 +02:00
Bjørn Forsman
00e58f6557 xpra: 0.17.0 -> 0.17.3
(cherry picked from commit ce8c1ab5e0)
2016-06-30 15:27:29 +02:00
Bjørn Forsman
7efdca8d3d xpra: add missing python 'rencode' module
Fixes this:

  $ xpra [...]
  2016-06-23 17:40:03,407 Warning: rencode import failed:
  2016-06-23 17:40:03,407  No module named rencode
  [...]

(cherry picked from commit 34363d77b0)
2016-06-30 15:27:28 +02:00
David Guibert
ba017747b0 xpra: 0.16.2 -> 0.17.0
(cherry picked from commit 8601f69072)

[Bjørn: 0.16.x is unsupported. Better switch to 0.17.x, like upstream
suggests.]
2016-06-30 15:27:17 +02:00
Emery Hemingway
019c6a15b5 qtox: 1.3.0 -> 1.4.1
(cherry picked from commit c544cbca42)
2016-06-30 09:22:48 +02:00
Edward Tjörnhammar
62e738fb10 qtox: 1.2.4 -> 1.3.0
(cherry picked from commit 7da494b8ae)
2016-06-30 09:22:39 +02:00
Lancelot SIX
47395a0bf1 pkgs.mysql55: update download URL
Point to the archive URL since the 5.5.48 release is not available
anymore on the main URL.
2016-06-29 14:10:19 +02:00
Domen Kožar
1da05dfe43 fix eval 2016-06-29 10:45:19 +02:00
Ruslan Babayev
431b2bbc83 dpdk: pktgen: odp-dpdk: upgrades (#16586)
* dpdk: sync with master

* dpdk: separate configure phase

* pktgen: 3.0.00 -> 3.0.04

* pktgen: add withGtk build option

* odp-dpdk: init at 1.10.1.0

Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2016-06-29 10:33:29 +02:00
Shea Levy
1e159c7b2c Backport src 1.11 2016-06-28 10:26:42 -04:00
Rickard Nilsson
ff10a7dd40 spotify: 1.0.32.94 -> 1.0.32.96
(cherry picked from commit 58e732978f)
2016-06-28 15:54:16 +02:00
Joachim Fasting
8bf31d7d27 torbrowser: 6.0.1 -> 6.0.2
(cherry picked from commit 9675384c7b)
2016-06-25 14:32:45 +02:00
Joachim Fasting
52e07c5b91 torbrowser: 6.0 -> 6.0.1
(cherry picked from commit 8fc6ca75a9)
2016-06-25 14:32:44 +02:00
Joachim Fasting
00d22e311c torbrowser: explicitly set paths to torrc-defaults and tor
This patch fixes an issue introduced by b897f825942b63ab790cad9ed66c8a79cbb3fc2d
where the bundled tor fails to run.

The error message claims that it cannot communicate with tor, but what actually
happens is that tor never runs at all, because it is invoked with a non-existent
rc file.  Specifying an absolute path to the torrc-defaults file fixes the
problem.  For good measure, we specify an absolute path to the tor executable
itself as well; we want as little autodetection logic as possible.

Note that users of torbrowser *must* remove the existing `~/.torbrowser4` folder
for this to take effect, otherwise torbrowser will continue to use extension
data from the previous release (this is why some existing users were able to
successfully use the new torbrowser version, see
https://github.com/NixOS/nixpkgs/pull/15854).

(cherry picked from commit 961164a8a7)
2016-06-25 14:32:44 +02:00
Mayeu - Cast
e38910e456 torbrowser: 5.5.5 -> 6.0 (#15854)
(cherry picked from commit 4e20fa47e0)
2016-06-25 14:32:43 +02:00
Alexander Ried
eb840acd0b expat: 2.1.1 -> 2.2.0, /cc 16477
Security patches have been integrated upstream, and
(vcunat:) and apparently it includes more security fixes.

(cherry picked from commit 964fd18676)
2016-06-25 09:23:06 +02:00
Tim Steinbach
0202cf7b2e kernel: 4.6.2 -> 4.6.3
(cherry picked from commit 125ffff089)
2016-06-24 20:19:17 -04:00
Nikolay Amiantov
fcd0923564 nixos-install: fix SSL certificate error
(cherry picked from commit 1193790b95)
2016-06-24 19:18:34 +03:00
Michael Raskin
22bb7e8c0b Firefox: 46.0.1 -> 47.0
(cherry picked from commit d88aa14c6e)
Reason: the update includes security fixes.
2016-06-24 08:50:55 -07:00
Vladimír Čunát
f1492d05dd libpng: 1.6.20 -> 1.6.21
(cherry picked from commit 41d3aa5cd2)
Reason: needed to update Firefox to 47.0.
2016-06-24 08:50:48 -07:00
Kyle McKean
0067fa0538 collectd: add snmp support
(cherry picked from commit 544d9a7620)
2016-06-23 16:55:43 +02:00
Vincent Laporte
e1570f766f coq: 8.5 -> 8.5pl1
(cherry picked from commit a036fda544)
2016-06-22 19:09:18 -04:00
Eric Sagnes
d5c61f3e15 php: add meta.platforms 2016-06-22 20:00:14 +01:00
Christopher Lübbemeier
9b4dad2e9a spotify: 1.0.28.89 -> 1.0.32.94 2016-06-22 19:54:48 +01:00
Bjørn Forsman
5c8d9bacd0 nixos/gnome-desktop: fix adding printers with GNOME Control Center
...by adding system-config-printer to services.dbus.packages (if
services.printing.enable is true).

Without this patch, trying to add a printer will result in a little dialog
saying "Failed to add new printer" and gnome-control-center will print this to
the terminal (line wrapped):

(gnome-control-center:3546): printers-cc-panel-WARNING **: \
  GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: \
  The name org.fedoraproject.Config.Printing was not provided by any .service files

system-config-printer supplies the "org.fedoraproject.Config.Printing" dbus
service, thus fixing the problem.

(cherry picked from commit a156a8ab1a)
2016-06-22 14:23:07 +02:00
Bjørn Forsman
83c050aa40 system-config-printer: unbreak dbus service (again)
The service file refers to /usr/bin/... instead of a Nix store path.
Fix it.

The original fix was wrongly removed in commit 03353ce6ff
("system-config-printer: 1.3.12 -> 1 5.7"). We can remove this fixup on
the _next_ upstream release.

(cherry picked from commit b741df943f)
2016-06-22 14:23:07 +02:00
Bjørn Forsman
67d0dd7717 autorevision: init at 1.14
A shell script for extracting revision information useful in
release/build scripting from repositories.

(cherry picked from commit 6536804848)
2016-06-21 15:24:37 +02:00
Joachim Fasting
3b12b30086 Merge pull request #16373 from jb55/fix/wkhtmltopdf-16.03
wkhtmltopdf: fix openssl bug (#15443)
2016-06-21 03:20:09 +02:00
Eric Merritt
ea170eddd5 wget: apply patch for cve-2016-4971 vulnerability
Patch pulled from: https://bugzilla.redhat.com/show_bug.cgi?id=1343666

Backport of #16368.
2016-06-20 22:13:41 +02:00
William Casarin
0472af9f72 wkhtmltopdf: fix openssl bug (#15443)
(cherry picked from commit cac460f6c4)
2016-06-20 09:57:58 -07:00
Scott R. Parish
4b6a974af9 chromium: Update to latest stable, beta, and dev channels
stable 51.0.2704.63 => 51.0.2704.103
beta   51.0.2704.63 => 52.0.2743.41
dev    52.0.2743.10 => 53.0.2767.4

This addresses 15 security fixes, including:

 * High   CVE-2015-1696: Cross-origin bypass in Extension bindings. Credit to
                         anonymous.
 * High   CVE-2015-1697: Cross-origin bypass in Blink. Credit to Mariusz
                         Mlynski.
 * Medium CVE-2016-1698: Information leak in Extension bindings. Credit to
                         Rob Wu.
 * Medium CVE-2016-1699: Parameter sanitization failure in DevTools. Credit
                         to Gregory Panakkal.
 * Medium CVE-2016-1700: Use-after-free in Extensions. Credit to Rob Wu.
 * Medium CVE-2016-1701: Use-after-free in Autofill. Credit to Rob Wu.
 * Medium CVE-2016-1702: Out-of-bounds read in Skia. Credit to cloudfuzzer.

See: http://googlechromereleases.blogspot.com/2016/06/stable-channel-update.html
(cherry picked from commit 1f1f0f049b)
Reason: 18 Security fixes for the stable channel.
2016-06-20 18:49:18 +02:00
Bjørn Forsman
cff5f2ea34 microscheme: 0.9.2 -> 0.9.3
(cherry picked from commit 099d3dc43b)
2016-06-20 16:31:18 +02:00
Tobias Geerinckx-Rice
7348540422 geolite-legacy: 2016-06-13 -> 2016-06-20
(cherry picked from commit 5dd3dbdec4)
2016-06-20 16:03:08 +02:00
Anders Papitto
c204b0d233 gdb: 7.11 -> 7.11.1
(cherry picked from commit e97e6061f7)
2016-06-20 14:41:21 +02:00
Eelco Dolstra
1330016a32 linux: 4.4.12 -> 4.4.13
(cherry picked from commit 453086a15f)
2016-06-20 14:40:50 +02:00
Eelco Dolstra
a274dba845 debian: 7.10 -> 7.11, 8.4 -> 8.5
(cherry picked from commit 5fc64c4baa)
2016-06-20 14:40:44 +02:00
Edward Tjörnhammar
a96c3088f8 jonprl: corrected sha change
(cherry picked from commit f027aa2059)
2016-06-19 10:46:45 +02:00
michael bishop
e53d74d6fc haskell docs: now that hydra pushes directly to S3, it cant function as a binary cache
(cherry picked from commit 410aad942f)
2016-06-19 09:02:42 +02:00
Lluís Batlle i Rossell
256ebc4de1 Update ffmpeg-full to 3.0.2
(cherry picked from commit 3a61de4e69)
2016-06-18 15:50:59 +02:00
Lluís Batlle i Rossell
15235f5ae3 x265: enable parallel build
(cherry picked from commit 726ed32bfd)
2016-06-18 15:50:59 +02:00
Anthony Cowley
3d5ef21601 x265: 1.7 -> 1.9
Unblocks #13822

(cherry picked from commit 6bc1aed873)
2016-06-18 15:50:59 +02:00
Lluís Batlle i Rossell
f827da0136 Update x264 to a recent snapshot (1,5 years update)
(cherry picked from commit 3078537b6a)
2016-06-18 15:50:59 +02:00
Anthony Cowley
19f3e09c06 ffmpeg-full: 2.8.5 -> 3.0
Also changes the homepage URL to https.

(cherry picked from commit 2f6f3c7b55)
2016-06-18 15:50:59 +02:00
Sander van der Burg
af412f29c8 disnix-module: split dysnomia's functionality into a separate module so that it can be used without Disnix and remove the hacky/obsolete avahi publisher
(cherry picked from commit 8fccaa9011)
2016-06-17 09:26:20 +00:00
Robert Helgesson
ea672e3bb8 perl-IO-Socket-SSL: fix default path to SSL certs
(cherry picked from commit 98096004ce)
2016-06-17 11:04:32 +02:00
Robert Helgesson
4ac7425f18 perl-IO-Socket-SSL: 2.020 -> 2.027
(cherry picked from commit e612954896)
2016-06-17 11:04:32 +02:00
Sander van der Burg
ca97cce179 DisnixWebService: 0.5 -> 0.6
(cherry picked from commit fcf72b82ae)
2016-06-17 08:17:35 +00:00
Sander van der Burg
98fda7148e disnixos: 0.4.1 -> 0.5
(cherry picked from commit 16bbfe893b)
2016-06-16 22:17:42 +00:00
Sander van der Burg
50ce587b93 disnix: 0.5 -> 0.6
(cherry picked from commit b4315e523f)
2016-06-16 21:03:30 +00:00
Sander van der Burg
18b0e0e25a dysnomia: 0.5.1 -> 0.6
(cherry picked from commit c5faa7c83d)
2016-06-16 15:47:04 +00:00
Cole Mickens
e3c29b27d8 mitmproxy: change source url
(cherry picked from commit e9b55a03d3)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-06-16 14:24:53 +01:00
taku0
8218d00c42 flashplayer: 11.2.202.621 -> 11.2.202.626
(cherry picked from commit c802f56639)

https://helpx.adobe.com/security/products/flash-player/apsa16-03.html
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-4171
2016-06-16 15:10:54 +02:00
Vladimír Čunát
31a2117c61 texlive: add xindy binary
Fixes #16207.

(cherry picked from commit 7a6ec0a0ee)
It seems very unlikely to break anything.
2016-06-16 12:57:59 +02:00
Tobias Geerinckx-Rice
2f1174b6d0 tzdata: 2015g -> 2016e 2016-06-14 19:25:59 +02:00
Tobias Geerinckx-Rice
2f430d2eae geolite-legacy: 2016-06-08 -> 2016-06-13
(cherry picked from commit 156a14d153)
2016-06-14 19:06:44 +02:00
zimbatm
7d4dcf04d4 virtualbox: give full url for downloading the ext (#15869)
The user only has to agree on the terms and conditions before
downloading the file. We might as well give him access to the full URL
by default.
(cherry picked from commit a6593a16f7)
2016-06-13 22:38:29 +02:00
Michael Raskin
b984ab19ae virtualboxGuestAdditions: update hash for virtualbox 5.0.20
(cherry picked from commit fde921578a)
2016-06-13 22:38:15 +02:00
Michael Raskin
76ebea5f53 virtualbox: 5.0.14 -> 5.0.20
(cherry picked from commit 4f5e4ad69c)
2016-06-13 22:38:05 +02:00
Herwig Hochleitner
f9e2b4cc15 virtualbox: 5.0.12 -> 5.0.14
(cherry picked from commit bd3ca11e0d)
2016-06-13 22:37:05 +02:00
Rob Vermaas
fd60751ce0 Fix hash for Debian 8.4 Jessie 2016-06-13 12:20:33 +00:00
Rob Vermaas
eab6c3a636 nlopt: remove broken attribute, build works fine. 2016-06-13 10:46:01 +00:00
Shea Levy
9e959ce644 linux 4.6.1 -> 4.6.2
(cherry picked from commit 4fbafb2395)
2016-06-10 09:30:22 -04:00
taku0
6daa706c06 firefox-bin: 46.0.1 -> 47.0
(cherry picked from commit 697437c8e7)
2016-06-09 22:32:01 +02:00
taku0
cde6bb63c0 firefox-bin: fixed missing icon
(cherry picked from commit 07a83f226e)
2016-06-09 22:32:00 +02:00
taku0
d77e65360e firefox-bin: 45.0.2 -> 46.0.1
(cherry picked from commit 90f5be3133)
2016-06-09 22:31:59 +02:00
Vladimír Čunát
4959bd75db io: fix evaluation by adding maintainers.vrthra 2016-06-09 20:51:32 +02:00
Joachim Fasting
0e0bb8a173 grsecurity: simplify preConfigure
(cherry picked from commit 39db90eaf6)
2016-06-09 15:08:26 +02:00
Joachim Fasting
f1d7572a5f build-support/grsecurity: simplify the grsecurityOverrider
Adding inputs required by gcc plugins to the ambient environment is sufficient.

(cherry picked from commit 27035365ec)

Fixes the build error: https://hydra.nixos.org/build/36725847/nixlog/1/raw
2016-06-09 15:08:26 +02:00
Vladimír Čunát
d6c4dc1094 Merge #16045: kernel: 4.6.0 -> 4.6.1
(cherry picked from commit 20c2ce4954)
2016-06-09 15:02:58 +02:00
Vladimír Čunát
e61983e6a5 Merge #16044: kernel: 4.1.20 -> 4.1.25
(cherry picked from commit c0895be3ee)
2016-06-09 15:02:53 +02:00
Vladimír Čunát
8eb439701e Merge #16043: kernel: 4.4.11 -> 4.4.12
(cherry picked from commit f9310c2eee)
2016-06-09 15:02:40 +02:00
Rahul Gopinath
dd06c4e52b io: 2013.12.04 -> 2015.11.11
Updating IO language to latest version

(cherry picked from commit c860de987d)

This also fixes the build
2016-06-09 14:17:52 +02:00
Eelco Dolstra
72b4009367 php56: update to 5.6.22 2016-06-09 11:58:43 +02:00
Tobias Geerinckx-Rice
1207ac1aaf geolite-legacy: 2016-06-06 -> 2016-06-08 2016-06-08 19:55:13 +02:00
Eelco Dolstra
55b2e62cd0 mesa: Use symlinks instead of hard links for the DRI/vdpau drivers
This reduces the size of the drivers output from 193 MiB to 44 MiB.

(cherry picked from commit 1a52fdc3c6)
2016-06-07 19:38:21 +02:00
Domen Kožar
f199be0faf Merge pull request #15963 from abuibrahim/release-16.03
pktgen: build with the same CFLAGS as dpdk
2016-06-07 14:28:57 +01:00
Matthias Beyer
3e3f2d9f55 postgresql: 9.5.1 -> 9.5.3, potentially fixes CVE-2016-2193, CVE-2016-3065
(cherry picked from commit 0ac6b862ac)
2016-06-07 15:09:08 +02:00
Joachim Fasting
184fcf6f99 grsecurity: 4.5.5-201605291201 -> 4.5.6-201606051644
(cherry picked from commit 72899d92d0)
2016-06-07 15:08:32 +02:00
Joachim Fasting
7336a66637 grsecurity: 4.5.5-201605211442 -> 4.5.5-201605291201
(cherry picked from commit bfefc54bc5)
2016-06-07 15:08:31 +02:00
Joachim Fasting
c5e10541fb Merge pull request #16028 from grahamc/patch-1
gemconfig: rmagick requires which as of 2.15.4 (16.03)
2016-06-07 14:35:59 +02:00
Graham Christensen
55d6354b1b gemconfig: rmagick requires which as of 2.15.4 (16.03) 2016-06-06 15:58:48 -05:00
Tobias Geerinckx-Rice
a24903b558 geolite-legacy: 2016-02-25 -> 2016-06-06 2016-06-06 16:23:09 +02:00
Vladimír Čunát
8d8fd460e1 libexttextcat: homepage has moved
(cherry picked from commit ab5a5f760f)
2016-06-06 11:10:54 +02:00
koral
87fe38fd0e rmlint: 2.4.2 -> 2.4.4
(cherry picked from commit 92471cbc8f)
2016-06-05 17:41:01 +02:00
koral
3104d1a871 moreutils: 0.58 -> 0.59
(cherry picked from commit 179f5e9500)
2016-06-05 17:21:26 +02:00
Ruslan Babayev
82fe7aca1e pktgen: build with the same CFLAGS as dpdk 2016-06-03 11:04:22 -07:00
Eelco Dolstra
3111985677 Explicitly specify the subsystem for /dev/vboxguest
Otherwise systemd gets confused and forgets about device units after
reloading.

https://github.com/NixOS/nixops/issues/391
https://github.com/systemd/systemd/issues/3423
(cherry picked from commit 7c19b395eb)
2016-06-03 00:43:50 +02:00
Graham Christensen
44079251e1 nvidia-x11: 361.42 -> 361.45.11 (close #15885)
(cherry picked from commit 180417f385)
2016-06-03 00:19:27 +02:00
Bjørn Forsman
bc64569195 sam-ba: init at 2.16
Programming tools for Atmel SAM3/7/9 ARM-based microcontrollers.

(I've only runtime tested the 64-bit binary, not the 32-bit one.)

(cherry picked from commit fbde3a7452,
plus removing ".lib" from "stdenv.cc.cc.lib" to be compatible with
release-16.03.)
2016-06-02 12:57:49 +02:00
Domen Kožar
63b97855f1 Merge pull request #15907 from abuibrahim/release-16.03
Release 16.03
2016-06-01 23:54:59 +01:00
Ruslan Babayev
179a099704 add DPDK pktgen 2016-06-01 14:04:00 -07:00
Ruslan Babayev
a0912e7093 dpdk: make primary output usable as RTE_SDK 2016-06-01 00:37:04 -07:00
Ruslan Babayev
f0006ff228 dpdk: separate kernel modules 2016-05-31 22:31:53 -07:00
Ruslan Babayev
d1934f6741 dpdk: move apps to examples output 2016-05-31 22:27:36 -07:00
Ruslan Babayev
d08fa96079 dpdk: install examples to bin 2016-05-31 22:25:13 -07:00
Ruslan Babayev
3780426629 dpdk: add pkgconfig to buildInputs
This unbreaks vm_power_mgr example.
2016-05-31 22:24:12 -07:00
Tuomas Tynkkynen
d9a80ed0a5 NixOS installer tests: Add a test using Gummiboot
Issue #14956

(cherry picked from commit 1feed61164)
2016-05-31 17:04:24 +02:00
Bjørn Forsman
009fa8e588 zbar: fix camera support (enables 'zbarcam' tool)
Add Debian patches (with fetchpatch) to make things work. Among other
things, the patches port the application from V4L to V4L2.

This increases the closure size from 729 MiB to 730 MiB.

(cherry picked from commit 65ccda5b96)
2016-05-31 09:32:48 +02:00
aszlig
00682602ae Merge pull request #15762 (Chromium update)
This is the original pull request plus some commits from me to bring all
channels to the latest versions, because the fixed security
vulnerabilites might not be fixed in the dev version we had before.

I've tested the whole changeset on my Hydra at:

https://headcounter.org/hydra/eval/322006

Thanks to @srp for the initial commit and thus implicitly also for the
security notice.

Cc: @abbradar
(backported from commit b5f95a5303)
Reason: Lots of security fixes (see e2d067d)
2016-05-28 21:26:35 +02:00
Eelco Dolstra
15e7e6e561 Term::ReadLine::Gnu: Fix finding libncursesw
Fixes

  Cannot do `initialize' in Term::ReadLine::Gnu at /nix/store/8kld1l6cn75lh0csw8wq6zbccallkr73-nixos-test-driver/bin/.nixos-test-driver-wrapped line 115.

when running NixOS VM tests interactively.

(cherry picked from commit 012313f253)
2016-05-27 13:42:04 +02:00
Eelco Dolstra
a80c23228f Improve types.listOf error message
If an option value is not a list, you now get

  The option value `bla' in `file.nix' is not a list.

rather than

  value is a string while a list was expected, at .../nixpkgs/lib/lists.nix:49:56

(cherry picked from commit b056948c00)
2016-05-27 13:41:45 +02:00
Eelco Dolstra
08ab2e49f8 thunderbird: 45.0 -> 45.1.0
(cherry picked from commit fa1b9ec1e6)
2016-05-27 13:41:19 +02:00
Eelco Dolstra
a4c9f82bdc nixos-generate-config: Enable strictness
(cherry picked from commit c6ab4ab206)
2016-05-27 13:41:09 +02:00
Eelco Dolstra
4701211bf8 Fix failure to start old containers
The existence of $root/var/lib/private/host-notify as a socket
prevented a bind mount:

  container foo[8083]: Failed to create mount point /var/lib/containers/foo/var/lib/private/host-notify: No such device or address

(cherry picked from commit b37d6d8996)
2016-05-27 13:40:50 +02:00
Eelco Dolstra
0559af6262 KDE test: Bump kdm start timeout
Hopefully this will fix random failures like
http://hydra.nixos.org/build/36249079.

(cherry picked from commit b786b00023)
2016-05-27 13:39:56 +02:00
Joachim Fasting
31ad93861a Merge pull request #15727 from bendlas/update-dropbox-stable
dropbox: [nixos-stable] use qt55, fixes #15703
2016-05-27 13:01:32 +02:00
Vladimír Čunát
16e9b2d121 nixpkgs manual: fix #15735: correct dash rendering
(cherry picked from commit 88a6ce17ef)
2016-05-27 10:41:55 +02:00
Joachim Fasting
b73a9c1f66 Merge pull request #15708 from grahamc/facetimehd-16.03
Backport facetimehd updates to 16.03
2016-05-27 00:49:15 +02:00
Marius Bakke
17aa9bdd97 openvswitch: 2.3.1 -> 2.3.3 (CVE-2016-2074) (#15724) 2016-05-26 22:00:29 +02:00
Graham Christensen
5f26258fc1 facetimehd, facetimehd-firmware: Add grahamc as a maintainer
(cherry picked from commit f993e6543a)
2016-05-26 14:14:17 -05:00
Graham Christensen
c192196ce7 facetimehd: Document updating the facetimehd-firmware
(cherry picked from commit 24a87685e2)
2016-05-26 14:13:25 -05:00
Graham Christensen
de802776d2 facetimehd-firmware: 1.43 -> 1.43_4
(cherry picked from commit 27bf0d203d)
2016-05-26 14:13:22 -05:00
David Tulig
415a07e126 syncthing: 0.12.23 -> 0.12.25 (#15723)
fixes #15633

(cherry picked from commit ddf264536c)
2016-05-26 21:04:31 +02:00
Herwig Hochleitner
aa3b85e370 dropbox: use qt55, fixes #15703 2016-05-26 19:57:09 +02:00
Franz Pletz
796f7fbba2 php: 5.5.35 -> 5.5.36, 7.0.6 -> 7.0.7 (security)
See:

  * https://secure.php.net/ChangeLog-5.php#5.5.36
  * https://secure.php.net/ChangeLog-7.php#7.0.7

(cherry picked from commit 93c010ddad)
2016-05-26 18:45:19 +02:00
Franz Pletz
e124e7d9b8 libndp: 1.5 -> 1.6 (security)
Fix CVE-2016-3698.

See https://lwn.net/Articles/688591/.

(cherry picked from commit 28395e85da)
2016-05-26 17:26:14 +02:00
Vladimír Čunát
cc3d2344a4 grsecurity_base_linux_4_5: get all patches
This in particular includes qat_common_Makefile to fix parallel make.

(cherry picked from commit 058c71498e)
2016-05-26 16:36:44 +02:00
Vladimír Čunát
e2f484f780 Revert "root: enable parallel building"
This reverts commit 2991fdca52.
Hydra builds often report missing various files.

(cherry picked from commit ee1a10ee6b)
2016-05-26 16:29:31 +02:00
Bjørn Forsman
3fa87b52cd shutter: init at 0.93.1
Screenshot and annotation tool.

The application may complain about missing GConf dbus service[1], but it
still works (and remembers its settings, AFAICT).

[1]: The error message is (line wrapped):
  GConf Error: Failed to contact configuration server; the most
  common cause is a missing or misconfigured D-Bus session bus daemon. See
  http://projects.gnome.org/gconf/ for information. (Details -  1: GetIOR
  failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
  org.gnome.GConf was not provided by any .service files)

(cherry picked from commit 0b3b45c5a7)
2016-05-26 14:58:21 +02:00
Bjørn Forsman
cc8368af7c perlPackages: add dependencies needed by 'shutter' application
shutter is a screenshot and annotation GUI tool, coming to Nix soon.
This commit adds its needed perl dependencies:

  Gnome2, Gnome2Canvas, Gnome2VFS, Gnome2Wnck, GooCanvas,
  Gtk2AppIndicator, Gtk2ImageView, Gtk2Unique, ProcSimple

All expressions are created with nix-generate-from-cpan and manual
tweaks to (propagated)buildInputs and meta.license.

(cherry picked from commit 444afc43ac)
2016-05-26 14:58:21 +02:00
Bjørn Forsman
719b9a3187 goocanvas: 0.10 -> 1.0 (fixes build)
I'm not updating to the 2.x version yet, because the only dependee of
this package is 'shutter' (which I'm about to package) and it doesn't
support 2.x.

(cherry picked from commit b9f30bdc20)
2016-05-26 14:58:21 +02:00
Vladimír Čunát
1b5e492e0f libxml2: fixup validation problems with 2.9.4
... by reverting an upstream commit
/cc #15697.

I should make some distro pay me for digging into such things :-)

(cherry picked from commit 3069606108)
2016-05-26 13:51:25 +02:00
Peter Simons
b8b4585a78 haskell-split: disable test suite to fix the build 2016-05-26 12:40:06 +02:00
Kranium Gikos Mendoza
9fe9a1a95b facetimehd: git-20160127 -> git-20160503
Fixes issues with kernels newer than 4.4.

(cherry picked from commit bc93957bb5)
2016-05-25 15:13:47 -05:00
Bjørn Forsman
ebf0815d9d qscreenshot: init at 1.0
Create and edit screenshots.

(cherry picked from commit 41fa133548)
2016-05-25 19:03:21 +02:00
Graham Christensen
809aa9ca22 libxml2: 2.9.3 -> 2.9.4 for three CVEs (close #15697)
- CVE-2016-4447: libxml2: Heap-based buffer underreads due to xmlParseName
   https://bugzilla.redhat.com/show_bug.cgi?id=1338686

 - CVE-2016-4448 libxml2: Format string vulnerability
   https://bugzilla.redhat.com/show_bug.cgi?id=1338700

 - CVE-2016-4449 libxml2: Inappropriate fetch of entities content
   https://bugzilla.redhat.com/show_bug.cgi?id=1338701

and many other fixed issues, available at http://www.xmlsoft.org/news.html

(cherry picked from commit 772851ff46)
2016-05-25 18:30:33 +02:00
Eelco Dolstra
b8d73243f5 nixos.tests.swraid: Drop mdadm -W
This command is racy because it will return a non-zero exit code if
the array is already clean. This caused numerous random failures. It
should be unnecessary anyway. (Maybe in the past we needed this
because of #15226.)

http://hydra.nixos.org/job/nixos/release-16.03/nixos.tests.installer.swraid.i686-linux
(cherry picked from commit 3e7b510281)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-05-24 20:03:27 +01:00
Eelco Dolstra
1d65b59fa2 test-driver: Fix "unit X is inactive and there are no pending jobs"
This was causing many random test failures.

(cherry picked from commit ad29b72686)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-05-24 20:01:52 +01:00
Joachim Fasting
2da70691d6 top-level/release.nix: remove xf86videomodesetting
See c7d92f9485

(cherry picked from commit 7817d0901d)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-05-24 17:59:03 +01:00
Domen Kožar
37e7e86ddd snabbswitch: use prePatch phase so we can still apply patches 2016-05-24 17:37:08 +01:00
Eelco Dolstra
18e067ac80 xf86-video-modesetting: Remove
This driver is part of xorg-server now, so we were using an outdated
version.

(cherry picked from commit c7d92f9485)
2016-05-24 15:34:30 +02:00
Domen Kožar
a96ca6491a add CentOS 7.1
(cherry picked from commit 56714859f4)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-05-24 11:36:03 +01:00
Domen Kožar
2cf5dcd99a add OpenSuse 13.2 2016-05-24 11:04:53 +01:00
Domen Kožar
9d5fde9c5a debian7: change hash due to 7.10 release 2016-05-24 10:41:13 +01:00
Taeradan
34a7a5ce98 fail2ban service: add iproute to PATH
iproute is required for blocking via null routes; without it, rules
based on routes.conf will fail.

Closes #15638

(cherry picked from commit 77028b1e8d)
2016-05-23 22:38:53 +02:00
Bjørn Forsman
25077350b7 wireshark: 2.0.2 -> 2.0.3
(cherry picked from commit d809ef47cb)

Fixes security issues:
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4084
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4083
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4082
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4080
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4079
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4078
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4077
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4076
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4006
2016-05-23 20:30:33 +02:00
Domen Kožar
91cc776f0a setuid-wrappers: remove config.system.path from the closure
The motivation is using sudo in chroot nix builds, a somewhat
special edge case I have and pulling system path into chroot
yields to some very nasty bug like
https://github.com/NixOS/nixpkgs/issues/15581

Previously:

$ cat /var/setuid-wrappers/sudo.real
/nix/store/3sm04dzh0994r86xqxy52jjc0lqnkn65-system-path/bin/sudo

After the change:

$ cat /var/setuid-wrappers/sudo.real
/nix/store/4g9sxbzy8maxf1v217ikp69c0c3q12as-sudo-1.8.15/bin/sudo
2016-05-23 13:50:50 +01:00
Eelco Dolstra
8688c1774d xf86-video-intel: 2015-11-14 -> 2016-05-22
This fixes compositing in KDE on a Intel HD Graphics 530 for me.

(cherry picked from commit a0f89ee509)
2016-05-22 23:20:17 +02:00
Eelco Dolstra
d35b0bae59 xkeyboard-config: 2.16 -> 2.17
(cherry picked from commit 600cd79f1e)
2016-05-22 23:20:03 +02:00
Eelco Dolstra
5679647b18 linux: 4.4.10 -> 4.4.11
(cherry picked from commit 3ee6b22dc3)
2016-05-22 23:19:52 +02:00
Joachim Fasting
7e5aca7e37 grsecurity: 4.5.5-201605202102 -> 4.5.5-201605211442
(cherry picked from commit 5a357d9731)
2016-05-22 20:13:38 +02:00
Joachim Fasting
d7e4b2328d grsecurity: 4.5.4-201605131918 -> 4.5.5-201605202102
(cherry picked from commit cdf2ffda9d)
2016-05-22 20:13:38 +02:00
Joachim Fasting
c93dd27168 linux: 4.5.4 -> 4.5.5
(cherry picked from commit 79481bd68f)
2016-05-22 20:13:37 +02:00
Franz Pletz
0a76452a07 linux: 4.5.3 -> 4.5.4
(cherry picked from commit 006f6d9437)
2016-05-22 20:13:36 +02:00
Tim Steinbach
b3b73d8d1f kernel: 4.5.2 -> 4.5.3
(cherry picked from commit 02d94d335a)
2016-05-22 20:13:36 +02:00
Bjørn Forsman
0f9e365e0f wildmidi: 0.3.8 -> 0.3.9
(cherry picked from commit 1cc4e03a7c)
2016-05-22 18:19:17 +02:00
Nick Novitski
9e41ad381f neovim: fix Man command
(cherry picked from commit 15c6fa023f)
2016-05-22 17:35:23 +02:00
Bjørn Forsman
a59d84038f qmmp: 0.8.4 -> 0.9.9
The 0.x versions is for Qt 4, whereas the new 1.x is for Qt 5. We'll
update to the Qt 5 version later. Upstream currently makes simultaneous
releases of both Qt 4 and 5 branches.

(cherry picked from commit cc41cb30e3)
2016-05-22 16:35:56 +02:00
Bjørn Forsman
aff03ae142 evtest: fixup source hash for release-16.03
Cherry-picking directly from master is now unsafe (ref. parent commit),
because fetchgit on master branch creates different hashes than on
release-16.03. (And I didn't notice until building on a *different*
machine, because on my first machine, the source was already
downloaded...)
2016-05-22 00:30:58 +02:00
Bjørn Forsman
6353f87b2a evtest: 1.32 -> 1.33
(cherry picked from commit b51986b8d1)
2016-05-21 23:30:06 +02:00
Svend Sorensen
65dcba37b7 librecad: 2.0.9 -> 2.0.10
(cherry picked from commit ddcf5d3941)
2016-05-21 22:37:23 +02:00
ne0phyte
ff2cb156ec librecad: 2.0.8 -> 2.0.9
(cherry picked from commit 1532ce35b8)
2016-05-21 22:37:23 +02:00
Arnold Krille
0b0f759b93 unbound service: do not initialize root cert
When enableRootTrustAnchor is set to false, there is really no point in
initializing the root key before starting unbound.

Fixes #15605.

(cherry picked from commit bf0e745597)
2016-05-21 22:27:55 +02:00
Tobias Geerinckx-Rice
7f9d53813d borgbackup: 1.0.2 -> 1.0.3
Changes: https://github.com/borgbackup/borg/blob/1.0.3/docs/changes.rst

(cherry picked from commit b1f6a10e1e)
2016-05-21 22:21:50 +02:00
Bjørn Forsman
652659adae john: use gcc 4.9 instead of 5 (unbreaks build)
Fixes this build error:

  dynamic_fmt.o: In function `DynamicFunc__crypt_md5_to_input_raw_Overwrite_NoLen':
  .../john-1.8.0-jumbo-1/src/dynamic_fmt.c:4989: undefined reference to `MD5_body_for_thread'

Upstream issue:

  https://github.com/magnumripper/JohnTheRipper/issues/1093

(cherry picked from commit d5656873d7)
2016-05-21 22:18:22 +02:00
Alexander Ried
e2deaf77c1 releasenotes: fix opengl.extraPackages option name
Should be merged into master and release-16.03 I guess
(cherry picked from commit 31fa7eda70)
2016-05-21 16:35:31 +02:00
Rickard Nilsson
d1226f311c openldap: 2.4.42 -> 2.4.44
(cherry picked from commit efe33d6e87)
Signed-off-by: Domen Kožar <domen@dev.si>

CVE-2015-6908
2016-05-20 19:06:23 +01:00
Lluís Batlle i Rossell
0dae829da7 Allow not rebasing in cygwin stdenv.
This changes cygwin stdenv, but I don't think it will hurt much people.

This allows mkDerivation to get "dontRebase=true" to skip the usual cygwin
rebase. This is required, if we are using this stdenv to build DLLs for win32
inside x86_64-cygwin, because /bin/rebase crashes at finding an arch mismatch.
Additionally, we don't need any rebase for libraries built by visual studio and
meant for visual studio (my use case).

I'm using nix in x86_64-cygwin to build libraries with visual studio, both for
x86_64 and x86.

(cherry picked from commit f6f5c185ca)
2016-05-20 17:25:56 +02:00
Nikolay Amiantov
4d97547bc3 buildFHSUserEnv: don't run bash in login mode for .env
Fixes https://github.com/NixOS/nixpkgs/issues/12406 for `.env`

(cherry picked from commit ca38376566)
2016-05-20 14:21:00 +03:00
Robert Helgesson
56060a2081 expat: patch CVE-2015-1283 and CVE-2016-0718 (close #15561)
Note, CVE-2015-1283 is already patched in expat version 2.1.1 but, as
explained in the patch, the fix was insufficient.

(cherry picked from commit 34cf7934c3)
2016-05-20 09:45:14 +02:00
Vladimír Čunát
38793f09b2 mesa: maintenance update 11.1.2 -> 11.1.4
It's probably the last one in this branch.
2016-05-20 09:44:38 +02:00
Joachim Fasting
6e0dddf9c5 Merge pull request #15566 from bendlas/update-dropbox-stable
[nixos-stable] dropbox: 3.12.6 -> 3.20.1
2016-05-20 06:22:07 +02:00
Domen Kožar
9ea8f6ad7d command-not-found: disable module until it's fixed again
See https://github.com/NixOS/nixos-channel-scripts/issues/4

(cherry picked from commit 2a3c0ca3d5)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-05-19 20:17:02 +01:00
Domen Kožar
c4622d53a1 dpdk: predefined instruction set, build in parallel, use external deps 2016-05-19 19:37:11 +01:00
Domen Kožar
9c0ed7fa21 snabb: build in parallel
(cherry picked from commit 76aa0ba664)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-05-19 15:05:56 +01:00
Bjørn Forsman
bf9903cdb8 gnome-terminal: enable GNOME Shell search provider (for 3.18)
[This is a re-application of the patch that was originally written for
GNOME 3.16. It was lost during the transition to GNOME 3.18.]

Silly ./configure, it looks for dbus file from gnome-shell in the
installation tree of the package it is configuring. Fix by copying the
needed file from gnome-shell before ./configure is run.

This change makes gnome-shell a build time dependency (not runtime).

(cherry picked from commit ca717d0d65)
2016-05-19 13:59:54 +02:00
Vladimír Čunát
ed6a1e01c5 Merge #15541: expat: 2.1.0 -> 2.1.1 (security)
Tested it builds, including some reverse dependencies,
and it certainly didn't cause a mass build breakage on master.
2016-05-19 08:45:11 +02:00
Bjørn Forsman
168b688150 qtcreator: 3.6.0 -> 3.6.1 (bugfixes)
Changelog:
http://code.qt.io/cgit/qt-creator/qt-creator.git/tree/dist/changes-3.6.1.md?h=3.6
(cherry picked from commit b06ecd7f85)
2016-05-18 23:03:38 +02:00
Pascal Wittmann
d3c3177c90 subversion: fix evaluation 2016-05-18 21:56:09 +02:00
Pascal Wittmann
43e8b6d5bd subversion: 1.9.3 -> 1.9.4 (fixes CVE-2016-2168, CVE-2016-2167) 2016-05-18 21:33:55 +02:00
Pascal Wittmann
44353501f6 subversion: 1.8.15 -> 1.8.16 (fixes CVE-2016-2168, CVE-2016-2167) 2016-05-18 21:33:07 +02:00
Robert Helgesson
f23048d0e4 expat: 2.1.0 -> 2.1.1
Also remove CVE patch merged upstream and enable tests.

(Cherry-picked from 6658077815 by falsifian.)
2016-05-18 08:53:47 -07:00
Eelco Dolstra
6ae66651ad linux: 4.4.9 -> 4.4.10
(cherry picked from commit 7a8ea6138e)
2016-05-18 11:42:42 +02:00
Tim Steinbach
c92b8f6a53 kernel: 4.4.8 -> 4.4.9 (#15276)
(cherry picked from commit f53850bf21)
2016-05-18 11:42:38 +02:00
Tobias Geerinckx-Rice
d9af74cac8 mcelog: 136 -> 137
(cherry picked from commit 806ce6323e)
2016-05-17 16:02:52 +02:00
Tobias Geerinckx-Rice
a9c465bdcd mcelog: 135 -> 136
Adds support to decode MSCOD values for Skylake server.

(cherry picked from commit d99df88efe)
2016-05-17 16:02:38 +02:00
Tobias Geerinckx-Rice
d4581ee724 mcelog: 134 -> 135
(cherry picked from commit d5207802fa)
2016-05-17 16:02:21 +02:00
Tobias Geerinckx-Rice
4b977a2656 mcelog: 133 -> 134
trigger: Avoid warning from earlier merge
(cherry picked from commit c0a35241f0)
2016-05-17 16:02:13 +02:00
Tobias Geerinckx-Rice
5921de6cf3 mcelog: 132 -> 133
Bugfix: no longer hangs on unknown errors in non-daemon mode.
(cherry picked from commit 7951dd531e)
2016-05-17 16:02:04 +02:00
Bjørn Forsman
5438cb191c saleae-logic: 1.1.15 -> 1.2.9
Changelog:
http://support.saleae.com/hc/en-us/articles/210245593-Saleae-Logic-Beta-Software-Changelog

(Yes, the changelog title contains the word 'beta', but as of version
1.2.9 the beta branding is removed from the software as the beta branch
was merged to master.)

This software update is required for newer logic analysers (e.g. Logic
Pro 8). (The original Logic is still supported, although it's difficult
to find info about it on their website.)

v1.2.9 grew new dependencies: libxcb, zlib, pciutils, xkeyboardconfig.

The LD_PRELOAD library hack, used to divert writes from
$out/Settings/settings.xml to $HOME/.saleae-logic-settings.xml, has been
updated. The new software writes more paths
($out/{Settings,Errors,Databases,Calibration}) and uses a few extra
library calls to access those paths
(open,openat,stat,access,unlink,...). So instead of single file
redirect, the library now redirects accesses to all those directories,
mirrored in $HOME/.saleae-logic/. (Existing
$HOME/.saleae-logic-settings.xml files will be automatically migrated to
$HOME/.saleae-logic/Settings/settings.xml.)

(cherry picked from commit 314b1fbf0c)

[release-16.03 backport note: s/stdenv.cc.cc.lib/stdenv.cc.cc/ to fix
error: attribute ‘lib’ missing, at .../saleae-logic/default.nix:19:65]
2016-05-17 15:08:36 +02:00
Vladimír Čunát
15941ff8f2 fetchurl mirrors: fix gnupg URLs
Some mirrors were missing /gcrypt. Now they should be consistent.
Fixes 15510. Closes 15511.

(cherry picked from commit af364c0f77)
2016-05-17 11:38:15 +02:00
Shea Levy
01f5711485 notmuch: Backport 0.22 2016-05-16 15:20:39 -04:00
Shea Levy
6c23e7e59a gsasl: Maintain, fix gssapi support
(cherry picked from commit da998cffcd)
2016-05-16 14:10:38 -04:00
Shea Levy
059fc4505d linux-4.6: Fix copy-paste error.
Thanks to @NeQuissimus for the spot

(cherry picked from commit 1ea263ef03)
2016-05-16 13:53:32 -04:00
Shea Levy
102a5d663c Linux 4.6
(cherry picked from commit 0373eb86f1)
2016-05-16 12:03:01 -04:00
Joachim Fasting
22a6aaa7ed kernelPatches.grsecurity: 4.5.4-201605122039 -> 4.5.4-201605131918
Also revert to using the grsecurity-scrape mirror; relying on upstream
just isn't viable. Lately, updates have been so frequent that a new
version is released before Hydra even gets around to building the
previous one.

(cherry picked from commit 6194e9d801)
2016-05-15 11:07:29 +02:00
Joachim Fasting
efa24fbae9 kernelPatches.grsecurity_4_5: 4.5.4-201605112030 -> 4.5.4-201605122039
(cherry picked from commit 7fdce2feb0)
2016-05-15 11:07:19 +02:00
Joachim Fasting
890949a2f0 grsecurity_4_5: 4.5.3-201605080858 -> 4.5.4-201605112030
(cherry picked from commit 10aaca8c1f)
2016-05-15 11:07:06 +02:00
Joachim Fasting
5f6dbe1a5a grsecurity: add option to disable chroot caps restriction
The chroot caps restriction disallows chroot'ed processes from running
any command that requires `CAP_SYS_ADMIN`, breaking `nixos-rebuild`. See
e.g., https://github.com/NixOS/nixpkgs/issues/15293

This significantly weakens chroot protections, but to break
nixos-rebuild out of the box is too severe.

(cherry picked from commit d4d7bfe07b)
2016-05-15 11:06:50 +02:00
Joachim Fasting
149d9acf4f kernelPatches.grsecurity_4_5: 201605060852 -> 201605080858
(cherry picked from commit 52477b0a0b)
2016-05-15 11:06:35 +02:00
Joachim Fasting
4ac9b33fa4 linuxPackages_grsec_4_5: 3.1-4.5.2-201604290633 -> 3.1-4.5.3-201605060852
(cherry picked from commit 27061905bd)
2016-05-15 11:06:04 +02:00
Joachim Fasting
bddaf83203 grsecurity: drop support for 4.4 kernels
From now on, only the testing branch of grsecurity will be supported.
Additionally, use only patches from upstream.

It's impossible to provide meaningful support for grsecurity stable.
First, because building and testing \(m \times n \times z) [1], packages
is infeasible.  Second, because stable patches are only available from
upstream for-pay, making us reliant on third-parties for patches. In
addition to creating yet more work for the maintainers, using stable
patches provided by a third-party goes against the wishes of upstream.

nixpkgs provides the tools necessary to build grsecurity kernels for any
version the user chooses, however, provided they pay for, or otherwise
acquire, the patch themselves.

Eventually, we'll want to remove the now obsolete top-level attributes,
but leave them in for now to smoothe migration (they have been removed
from top-level/release.nix, though, because it makes no sense to have
them there).

[1]: where \(m\) is the number of grsecurity flavors, \(n\) is the
number of kernel versions, and z is the size of the `linuxPackages` set

(cherry picked from commit 0bd31bce10)
2016-05-15 11:05:42 +02:00
Joachim Fasting
e8faaf0996 grsecurity module: fix grsec-lock unit ordering
Requirement without ordering implies parallel execution; it is crucial
that sysctl tunables are finalized before the lock is engaged, however.

(cherry picked from commit 60a27781d6)
2016-05-15 11:05:16 +02:00
Joachim Fasting
2884d35e98 grsecurity: ensure that PaX ELF markings are enabled
The upstream default is to enable only xattr markings, breaking the
paxmarks facility.

(cherry picked from commit a69501a936)
2016-05-15 11:05:02 +02:00
Joachim Fasting
1e97d62dfd linuxPackages_grsec_4_5: init at 3.1-4.5.2-201604290633
(cherry picked from commit fecb56fc3f)
2016-05-15 11:04:11 +02:00
Joachim Fasting
b799be8305 dirmngr: 1.0.3 -> 1.1.1
Fixes the build.

This package is probably ripe for removal by now, as dirmngr was incorporated
into gnupg a couple of years ago:
https://lists.gnupg.org/pipermail/gnupg-announce/2014q4/000358.html

(cherry picked from commit 201f6600cb)
2016-05-15 10:36:01 +02:00
Joachim Fasting
2ae983dda5 libksba: 1.3.3 -> 1.3.4
Contains a fix for https://access.redhat.com/security/cve/CVE-2016-4574

(cherry picked from commit 7e4db700dc)
2016-05-15 10:35:49 +02:00
aszlig
5454a88346 chromium: Update to latest beta and dev channels
Overview of the updated versions:

beta: 50.0.2661.49 -> 51.0.2704.47
dev:  51.0.2693.2  -> 52.0.2729.3

It has been a while since we had a major Chromium update that compiled
and worked without troubles, but version 52 builds and the VM tests are
successful as well:

https://headcounter.org/hydra/eval/320335

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit ad2c8d3510)
Reason: 50.0.2661.102 fixes a bunch of security vulnerabilities and
        we want to have them fixed in beta/dev as well.
2016-05-15 05:20:05 +02:00
Scott R. Parish
5dbabdd2a9 chromium: Update stable to 50.0.2661.102 for multiple security fixes
This addresses the following security fixes:

 * High   CVE-2016-1667: Same origin bypass in DOM. Credit to
                         Mariusz Mlynski.
 * High   CVE-2016-1668: Same origin bypass in Blink V8 bindings. Credit
                         to Mariusz Mlynski.
 * High   CVE-2016-1669: Buffer overflow in V8. Credit to Choongwoo Han.
 * Medium CVE-2016-1670: Race condition in loader. Credit to anonymous.
 * Medium CVE-2016-1671: Directory traversal using the file scheme on
                         Android. Credit to Jann Horn.

See: http://googlechromereleases.blogspot.com/2016/05/stable-channel-update.html

Signed-off-by: Scott R. Parish <srparish@gmail.com>
Tested-by: aszlig <aszlig@redmoonstudios.org>
Closes: #15446
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 5ebf20db0f)
2016-05-15 05:19:10 +02:00
Nikolay Amiantov
342435cc57 firefox: upstream moved to ffmpeg from gstreamer
Sadly, they don't support using system library yet (or I was unattentive).
2016-05-15 01:12:12 +03:00
Vladimír Čunát
607f4aea53 Merge #15447: glibc security updates
(cherry picked from commit 45a14c873b)
2016-05-14 21:38:57 +02:00
Chris Martin
db49414fe3 idea.webstorm: 10.0.4 -> 10.0.5
(cherry picked from commit ff48229c42)
2016-05-13 16:02:56 +02:00
Chris Martin
de0aaaa2e7 idea.phpstorm: 10.0.1 -> 10.0.4
(cherry picked from commit ee511456fc)
2016-05-13 16:02:56 +02:00
Chris Martin
a3b52aadd6 idea.pycharm-professional: 2016.1.2 -> 2016.1.3
(cherry picked from commit 8cf2a2dbeb)
2016-05-13 16:02:55 +02:00
Chris Martin
d045c5379a idea.pycharm-community: 2016.1.2 -> 2016.1.3
(cherry picked from commit 89f46ab3e3)
2016-05-13 16:02:55 +02:00
Chris Martin
ef4ad6f467 idea.ruby-mine: 7.1.2 -> 7.1.5
(cherry picked from commit 22b8bb4bd0)
2016-05-13 16:02:55 +02:00
Chris Martin
528113039d idea.idea-ultimate: 2016.1.1 -> 2016.1.2
(cherry picked from commit 69448be776)
2016-05-13 16:02:54 +02:00
Chris Martin
4ef2b9f770 idea.idea15-ultimate: 15.0.5 -> 15.0.6
(cherry picked from commit ac076eeb20)
2016-05-13 16:02:54 +02:00
Chris Martin
80aa3b2594 idea.idea-community: 2016.1.1 -> 2016.1.2
(cherry picked from commit 4217743b94)
2016-05-13 16:02:54 +02:00
Chris Martin
eb94b7cdf5 idea.idea14-community: 14.1.6 -> 14.1.7
(cherry picked from commit 149ba81f79)
2016-05-13 16:02:53 +02:00
Chris Martin
2b7584da96 idea.clion: 1.2.4 -> 1.2.5
(cherry picked from commit 9fe577bdc0)
2016-05-13 16:02:53 +02:00
Chris Martin
9683f06fb2 idea.android-studio: 2.0.0.20 -> 2.1.1.0
(cherry picked from commit 7d0570a253)
2016-05-13 16:02:43 +02:00
Edward Tjörnhammar
dee9b879ca Merge pull request #15321 from a1russell/idea
idea.idea14-ultimate: init at 14.1.7
2016-05-13 15:53:14 +02:00
taku0
f98d57b46d flashplayer: 11.2.202.616 -> 11.2.202.621
(cherry picked from commit cade2f36e5)
2016-05-12 16:26:09 +03:00
Eelco Dolstra
aab59c028a pythonPackages.psutil: Drop busybox dependency
This broke the build on OS X. And we're not even running the tests
anyway.

(cherry picked from commit 742e72eded)
2016-05-12 14:42:08 +02:00
Bjørn Forsman
d3456dc1e4 sigrok: update whole suite to latest (2016-01)
Release announcement, 2016-01-30:
https://www.sigrok.org/blog/major-sigrok-releases-libsigrok-libsigrokdecode-sigrok-cli-pulseview

I first tried updating the projects in separate commits. But later I
found cyclic dependencies, that would break git bisect, so I ended up
squashing the commits:

* libsigrok: 0.3.0 -> 0.4.0
  Enable building libsigrokcxx.so, the C++ bindings for libsigrok, by
  adding doxygen, glibmm and python as build deps. This is needed for
  Pulseview >= 0.3.0. Also update the firmware (sigrok-firmware-fx2lafw)
  while at it.

* libsigrokdecode: 0.3.0 -> 0.4.0

* sigrok-cli: 0.5.0 -> 0.6.0

* pulseview: 0.2.0 -> 0.3.0
  New dependency: glibmm (due to libsigrokcxx.pc from libsigrok).

Note that collectd is incompatible with the new libsigrok release, so
I let it use the old one (0.3.0).

(cherry picked from commit 300e495101)
2016-05-11 22:25:47 +02:00
Bjørn Forsman
c8269df1b5 libserialport: 0.1.0 -> 0.1.1
(cherry picked from commit f768098e3e)
2016-05-11 22:25:45 +02:00
Adam Russell
a4f13a8bae idea.idea14-ultimate: init at 14.1.7 2016-05-11 13:43:20 -05:00
Eelco Dolstra
600efba242 google-talk-plugin: 5.4.2.0 -> 5.41.0.0
(cherry picked from commit 86c45ba50d)
2016-05-11 20:18:53 +02:00
Bjørn Forsman
92099db6f7 hashcat: 0.49 -> 2.00
The current URL is broken, upstream has moved the download from .../files/ to
.../files_legacy/. But after fixing that, starting hashcat results in:

  $ ./result/bin/hashcat
  ERROR: this copy of hashcat is outdated. Get a more recent version.

So just update to latest.

New releases are on github, the license is now MIT and there are build
system changes.

(cherry picked from commit 800042b310)
2016-05-11 19:17:36 +02:00
Franz Pletz
eae3eef2c1 msmtp: 1.6.2 -> 1.6.4
(cherry picked from commit d7338bf9d7)
2016-05-11 10:25:22 -04:00
Carles Pagès
995ddb04a3 makeImageFromDebDist: accept additional parameters for vm, as in rpm version.
(cherry picked from commit e7ab828da1)
2016-05-11 16:24:41 +02:00
Shea Levy
1906eb9cd5 Add kerberos mappings for MIT exchange server
(cherry picked from commit 67d430096f)
2016-05-11 09:09:34 -04:00
Rob Vermaas
2c5ad36cff Add scikitlearn to binary cache. 2016-05-11 10:35:51 +00:00
Shea Levy
b10f61bc1b Backport offlineimap-6.7 2016-05-10 18:10:39 -04:00
Shea Levy
e2cd6d6931 Fix license attr
(cherry picked from commit 6f12b7aec4)
2016-05-10 17:43:16 -04:00
Shea Levy
042b69374d Add kerberos pythonPackage
(cherry picked from commit f298ebb957)
2016-05-10 17:32:32 -04:00
Herwig Hochleitner
4f2a7a9eba [nixos-stable] dropbox: 3.12.6 -> 3.20.1 2016-05-10 19:32:18 +02:00
Rob Vermaas
713c240563 Adding pythonPackags.pandas to binary cache. Python packages are
not part of nixpkgs/nixos jobsets in 16.03+ since ccd1029f58. Until
it gets added again, adding some python packages that take really
long to build.
2016-05-10 15:15:12 +00:00
Tuomas Tynkkynen
4cdf5b4279 otter: Mark broken
Build hangs an hits the hydra time limit:
http://hydra.nixos.org/build/34897110

(cherry picked from commit ca0e724266)
2016-05-10 15:50:23 +02:00
Eelco Dolstra
091ca4e97c firefox: Revert to SHA-256 hashes
Using SHA-512 causes problems for users upgrading from NixOS 15.09.

Fixes #15349.
2016-05-10 15:31:52 +02:00
Tobias Geerinckx-Rice
659212aea7 thunderbird: 38.7.1 -> 45.0
Changes: https://www.mozilla.org/en-US/thunderbird/45.0/releasenotes/
(cherry picked from commit 2dc8975bc4)
2016-05-10 11:10:53 +02:00
Bjørn Forsman
1c1efaad6e moreutils: add meta.platforms (= all)
(cherry picked from commit 977cd5de36)
2016-05-09 20:35:40 +02:00
Eelco Dolstra
53d34e016f thunderbird: 38.7.0 -> 38.7.1
(cherry picked from commit ca983ec20c)
2016-05-09 19:43:20 +02:00
Eelco Dolstra
d2fcb5afb7 Add mirror://mozilla scheme
(cherry picked from commit cb37ab146b)
2016-05-09 19:42:30 +02:00
Eelco Dolstra
2eb3eafedf Fix some URLs that lacked a URI scheme
(cherry picked from commit 7ce5d43c63)
2016-05-09 19:40:51 +02:00
Eelco Dolstra
efd03d53ca copy-tarballs.pl: Add --exclude flag
(cherry picked from commit 4f4ba0d3f4)
2016-05-09 19:40:47 +02:00
Eelco Dolstra
a5d71c175c firefox-esr: 45.0.2 -> 45.1.1
(cherry picked from commit de22402f85)
2016-05-09 19:40:42 +02:00
Eelco Dolstra
a8f1c55157 firefox: 46.0 -> 46.0.1
(cherry picked from commit 02d01dc7c5)
2016-05-09 19:40:38 +02:00
Eelco Dolstra
592dd23efc aws-sdk-cpp: 0.9.6 -> 0.10.6
(cherry picked from commit 11e252e5a0)
2016-05-09 19:40:17 +02:00
Eelco Dolstra
96e204b064 firefox: Don't use out-dated system sqlite 2016-05-09 19:39:46 +02:00
Eelco Dolstra
4d496ea6b0 firefox: 45.0.2 -> 46.0
Still using GTK+ 2 for now, since apparently building with GTK+ 3
still requires GTK+ 2, increasing the closure size. (#15008)

(cherry picked from commit 930d243ea4)
2016-05-09 19:39:21 +02:00
Eelco Dolstra
7efca53da4 Update EC2 AMIs to 16.03.659.011ea84
This includes the binutils mass rebuild.

(cherry picked from commit ecfc523d32)
2016-05-09 19:39:12 +02:00
Tobias Geerinckx-Rice
44eeb747ac borgbackup: 1.0.1 -> 1.0.2
Changes: https://github.com/borgbackup/borg/blob/1.0.2/docs/changes.rst
(cherry picked from commit 6e261865a4)
2016-05-09 14:55:40 +02:00
Tobias Geerinckx-Rice
984dc3ef6c borgbackup: 1.0.0 -> 1.0.1
Changes: https://github.com/borgbackup/borg/blob/1.0.1/docs/changes.rst
(cherry picked from commit f019db633f)
2016-05-09 14:55:34 +02:00
Tobias Geerinckx-Rice
7c406f347f borgbackup: 0.30.0 -> 1.0.0
Major upgrade, be sure to read the release notes:
https://github.com/borgbackup/borg/blob/1.0.0/docs/changes.rst

(cherry picked from commit b747253700)
2016-05-09 14:55:25 +02:00
Lluís Batlle i Rossell
1cfa84a52d Making vm's interactive shell handle the terminal well.
(cherry picked from commit e21dd19168)
2016-05-09 14:30:07 +02:00
Lluís Batlle i Rossell
6e4a8bea9e Making vm's qemu cache=unsafe. Faster.
I don't think it's unsafe, if it's meant for nix expressions.

(cherry picked from commit ab93f8c137)
2016-05-09 14:30:02 +02:00
Lluís Batlle i Rossell
8fd1ed7621 vm: allow overriding QEMU_OPTS / memSize for images.
It's nice to be able to create disk images with -smp 4
in qemu.

(cherry picked from commit 635c99ce87)
2016-05-09 14:29:56 +02:00
Lluís Batlle i Rossell
b1ffcd19d1 Adding libuuid (libblkid) to lvm2.
It wants it to detect if there are filesystems present in block devices, in
case of pvcreate. Otherwise it complaints "lvm built without blkid support" and
lacks the feature of detecting/wiping.

(cherry picked from commit 2f35e223b1)

I fixed an easy conflict.
2016-05-09 14:29:34 +02:00
Lluís Batlle i Rossell
165781b529 Fixing nfsd service, wait on local-fs.
Otherwise, mountd was started exporting directories before local-fs was ready,
and it failed to start nfsd on missing fs.

(cherry picked from commit 9f6afb7d78)
2016-05-09 14:26:49 +02:00
Lluís Batlle i Rossell
74139a6b58 Fixing stunt-rally 2.6 (adding newer bullet)
(cherry picked from commit f0c503593f)

There were some weird conflicts.
2016-05-08 16:25:49 +02:00
Lluís Batlle i Rossell
aa296f3913 Adding vmlinux to linux kernel 'dev' derivation.
It takes some extra 13MB (and in dev, not out), but allows perf to show kernel
symbols when profiling. I think it is worth it.

In my NixOS, I refer to it in the system derivation, for easy telling to perf
through /run/booted-system/vmlinux:

  system.extraSystemBuilderCmds = ''
    ln -s ${config.boot.kernelPackages.kernel.dev}/vmlinux $out/vmlinux
  '';

(cherry picked from commit 53a4582552)
2016-05-07 23:32:55 +02:00
Nikolay Amiantov
1527011d5f dropbox: meta.licenses -> meta.license
(cherry picked from commit 62c41cc539)
2016-05-07 15:17:43 +03:00
Nikolay Amiantov
f4d610867a dropbox: mark as unfree
(cherry picked from commit 41ced9f100)
2016-05-07 15:17:42 +03:00
Thomas Tuegel
fcd2a001ef quassel: 0.12.3 -> 0.12.4
Security update for CVE-2016-4414 (denial of service).

(cherry picked from commit f2ec142847)
2016-05-07 07:00:39 -05:00
zimbatm
bbd47710de quassel: fix sources
Fixes changes after #14080 where the updated hash was missing.

Put the source in a common file so there is only one place to update.

(cherry picked from commit 23b9d037de)

Backported from master to facilitate future updates.
2016-05-07 07:00:39 -05:00
Nikolay Amiantov
54b7bdac59 Merge pull request #15284 from sheenobu/bspwm/socket_patch/1603
bspwm: backport of socket unlink fix to 0.9
2016-05-07 15:50:50 +04:00
Sheena Artrip
15a51fcfdb bspwm: backport of socket unlink fix to 0.9 2016-05-07 04:31:06 -04:00
aszlig
65f4e9d4c5 Merge branch 'stage1-dont-kill-kthreads'
Merges pull request #15275:

    This addresses #15226 and fixes killing of processes before
    switching from the initrd to the real root.

    Right now, the pkill that is issued not only kills user space
    processes but also sends a SIGKILL to kernel threads as well.
    Usually these threads ignore signals, but some of these processes do
    handle signals, like for example the md module, which happened in
    #15226.

    It also adds a small check for the swraid installer test and a
    standalone test which checks on just that problem, so in the future
    this shouldn't happen again.

This has been acked by @edolstra on IRC.

The reason I'm merging this to 16.03 is that this branch fixes #15226
and thus also fixes mdraid setups out there.

Tested using the boot-stage1.nix NixOS test against release-16.03.
2016-05-06 22:11:10 +02:00
aszlig
6228949157 nixos/tests/boot-stage1: Add myself to maintainers
As @edolstra pointed out that the kernel module might be painful to
maintain. I strongly disagree because it's only a small module and it's
good to have such a canary in the tests no matter how the bootup process
looks like, so I'm going the masochistic route and try to maintain it.

If it *really* becomes too much maintenance burden, we can still drop or
disable kcanary.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-05-06 22:06:34 +02:00
aszlig
43da2f3209 nixos/release-combined: Add boot-stage1 test
We don't want to push out a channel update whenever this test fails,
because that might have unexpected and confused side effects and it
*really* means that stage 1 of our boot up is broken.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-05-06 22:06:34 +02:00
aszlig
45b7d41fa7 nixos/tests: Add a test for boot stage 1
We already have a small regression test for #15226 within the swraid
installer test. Unfortunately, we only check there whether the md
kthread got signalled but not whether other rampaging processes are
still alive that *should* have been killed.

So in order to do this we provide multiple canary processes which are
checked after the system has booted up:

 * canary1: It's a simple forking daemon which just sleeps until it's
            going to be killed. Of course we expect this process to not
            be alive anymore after boot up.
 * canary2: Similar to canary1, but tries to mimick a kthread to make
            sure that it's going to be properly killed at the end of
            stage 1.
 * canary3: Like canary2, but this time using a @ in front of its
            command name to actually prevent it from being killed.
 * kcanary: This one is a real kthread and it runs until killed, which
            shouldn't be the case.

Tested with and without 67223ee and everything works as expected, at
least on my machine.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-05-06 22:06:34 +02:00
aszlig
74b41a7385 nixos/tests/installer/swraid: Check for safemode
This is a regression test for #15226, so that the test will fail once we
accidentally kill one or more of the md kthreads (aka: if safe mode is
enabled).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-05-06 22:06:34 +02:00
aszlig
cc98c4e105 nixos/stage-1: Don't kill kernel threads
Unfortunately, pkill doesn't distinguish between kernel and user space
processes, so we need to make sure we don't accidentally kill kernel
threads.

Normally, a kernel thread ignores all signals, but there are a few that
do. A quick grep on the kernel source tree (as of kernel 4.6.0) shows
the following source files which use allow_signal():

  drivers/isdn/mISDN/l1oip_core.c
  drivers/md/md.c
  drivers/misc/mic/cosm/cosm_scif_server.c
  drivers/misc/mic/cosm_client/cosm_scif_client.c
  drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
  drivers/staging/rtl8188eu/core/rtw_cmd.c
  drivers/staging/rtl8712/rtl8712_cmd.c
  drivers/target/iscsi/iscsi_target.c
  drivers/target/iscsi/iscsi_target_login.c
  drivers/target/iscsi/iscsi_target_nego.c
  drivers/usb/atm/usbatm.c
  drivers/usb/gadget/function/f_mass_storage.c
  fs/jffs2/background.c
  fs/lockd/clntlock.c
  fs/lockd/svc.c
  fs/nfs/nfs4state.c
  fs/nfsd/nfssvc.c

While not all of these are necessarily kthreads and some functionality
may still be unimpeded, it's still quite harmful and can cause
unexpected side-effects, especially because some of these kthreads are
storage-related (which we obviously don't want to kill during bootup).

During discussion at #15226, @dezgeg suggested the following
implementation:

for pid in $(pgrep -v -f '@'); do
    if [ "$(cat /proc/$pid/cmdline)" != "" ]; then
        kill -9 "$pid"
    fi
done

This has a few downsides:

 * User space processes which use an empty string in their command line
   won't be killed.
 * It results in errors during bootup because some shell-related
   processes are already terminated (maybe it's pgrep itself, haven't
   checked).
 * The @ is searched within the full command line, not just at the
   beginning of the string. Of course, we already had this until now, so
   it's not a problem of his implementation.

I posted an alternative implementation which doesn't suffer from the
first point, but even that one wasn't sufficient:

for pid in $(pgrep -v -f '^@'); do
    readlink "/proc/$pid/exe" &> /dev/null || continue
    echo "$pid"
done | xargs kill -9

This one spawns a subshell, which would be included in the processes to
kill and actually kills itself during the process.

So what we have now is even checking whether the shell process itself is
in the list to kill and avoids killing it just to be sure.

Also, we don't spawn a subshell anymore and use /proc/$pid/exe to
distinguish between user space and kernel processes like in the comments
of the following StackOverflow answer:

http://stackoverflow.com/a/12231039

We don't need to take care of terminating processes, because what we
actually want IS to terminate the processes.

The only point where this (and any previous) approach falls short if we
have processes that act like fork bombs, because they might spawn
additional processes between the pgrep and the killing. We can only
address this with process/control groups and this still won't save us
because the root user can escape from that as well.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Fixes: #15226
2016-05-06 22:06:34 +02:00
Joachim Fasting
24e394d447 bittorrentSync20: 2.3.6 -> 2.3.7
(cherry picked from commit e4bd66c8f0)

For a list of changes post 2.x (mostly fixes & minor improvements), see
http://help.getsync.com/hc/en-us/articles/206216855-Sync-2-x-change-log
2016-05-06 08:33:53 +02:00
Joachim Fasting
f10759fb19 bittorrentSync14: 1.4.110 -> 1.4.111
(cherry picked from commit 6d2625a940)
2016-05-06 08:33:30 +02:00
Joachim Fasting
011de8e341 bittorrentSync20: 2.3.3 -> 2.3.6 (#15147)
Note that this changes the domain from getsyncapp.com (no longer valid)
to getsync.com.
(cherry picked from commit a7886c9189)
2016-05-06 08:33:25 +02:00
obadz
b82cef091a linux kernel 4.4: fix race during build
Patch drivers/crypto/qat/qat_common/Makefile so that qat_asym_algs.o
explicitly depends on headers qat_rsaprivkey-asn1.h and qat_rsapubkey-asn1.h

(cherry picked from commit 4788ec1372)
This should fix evaluation of 4.5 kernel. I forgot to pick this one.
2016-05-05 13:41:56 +02:00
Vladimír Čunát
1c161afba8 linux kernel 4.5: fix race during build
This is just 4788ec1372 but for 4.5 instead of 4.4.
Example failure: http://hydra.nixos.org/build/35194276

(cherry picked from commit 323825f967)
2016-05-05 12:18:08 +02:00
José Romildo Malaquias
69420c5242 imlib2: 1.4.8 -> 1.4.9
(cherry picked from commit 3e401a8d01)

Contains fixes for CVE-2011-5326, CVE-2016-3993, CVE-2016-3994, CVE-2016-4024
2016-05-04 06:48:45 +02:00
Franz Pletz
853fe4ceeb libressl: 2.2.6 -> 2.2.7, 2.3.3 -> 2.3.4
Fix multiple vulnerabilities in libcrypto relating to ASN.1 and encoding.

http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.2.7-relnotes.txt
http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.3.4-relnotes.txt
(cherry picked from commit 6d55b2e9c0)
2016-05-04 01:28:01 +02:00
Franz Pletz
99e8c374ab gitlab: 8.5.7 -> 8.5.12
(cherry picked from commit 2acea21155)
2016-05-04 01:26:50 +02:00
Franz Pletz
26d9b997f2 imagemagick: Disable insecure coders (ImageTragick)
See:

  * https://imagetragick.com/
  * https://www.imagemagick.org/discourse-server/viewtopic.php?f=4&t=29588

(cherry picked from commit 69c14985d0)
2016-05-04 01:26:47 +02:00
Franz Pletz
1b48d611f0 imagemagick: 6.9.3-8 -> 6.9.3-9
(cherry picked from commit 05eae0242d)
2016-05-04 01:26:42 +02:00
Hannu Hartikainen
bd65ff6157 silver-searcher: add alias "ag" (2nd attempt)
(Now 'self' is removed, to fix eval on release-16.03.)

(cherry picked from commit e3e502e37a)
2016-05-03 23:54:40 +02:00
Lluís Batlle i Rossell
6a142de011 Adding blktrace
Tool to get traces of operations in block devices on linux.

(cherry picked from commit 94520a25ad)
2016-05-03 23:46:05 +02:00
Franz Pletz
82ca7f75d6 redshift service: run as user service
Fixes #14882.

(cherry picked from commit 882391a162)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-05-03 22:33:27 +01:00
Bjørn Forsman
45156b4057 jenkins service: improve curl call in postStart
* Perform HTTP HEAD request instead of full GET (lighter weight)
* Don't log output of curl to the journal (it's noise/debug)
* Use explicit http:// URL scheme
* Reduce poll interval from 10s to 2s (respond to state changes
  quicker). Probably not relevant on boot (lots of services compete for
  the CPU), but online service restarts/reloads should be quicker.
* Pass --fail to curl (should be more robust against false positives)
* Use 4 space indent for shell code.

(cherry picked from commit 78b6e8c319)
2016-05-03 23:19:16 +02:00
Bjørn Forsman
b786bfd8a3 jenkins service: remove unneeded (and brittle) part of postStart
The current postStart code holds Jenkins off the "started" state until
Jenkins becomes idle. But it should be enough to wait until Jenkins
start handling HTTP requests to consider it "started".

More reasons why the current approach is bad and we should remove it,
from @coreyoconnor in
https://github.com/NixOS/nixpkgs/issues/14991#issuecomment-216572571:

  1. Repeatedly curling for a specific human-readable string to
  determine "Active" is fragile. For instance, what happens when jenkins
  is localized?

  2. The time jenkins takes to initializes is variable. This (at least
  used to) depend on the number of jobs and any plugin upgrades requested.

  3. Jenkins can be requested to restart from the UI. Which will not
  affect the status of the service. This means that the service being
  "active" does not imply jenkins is initialized. Downstream services
  cannot assume jenkins is initialized if the service is active. Might
  as well accept that and remove the initialized test from service
  startup.

Fixes #14991.

(cherry picked from commit 51e5beca42)
2016-05-03 23:18:49 +02:00
Eelco Dolstra
ef4354ed47 Revert "silver-searcher: add alias "ag""
This reverts commit 6a87c8278f. It
breaks Nixpkgs evaluation:

http://hydra.nixos.org/build/35152628
2016-05-03 17:09:46 +02:00
Nathan Zadoks
e48108a671 openssl: 1.0.1s -> 1.0.1t, 1.0.2g -> 1.0.2h
CVE-2016-2108, high severity: Memory corruption in the ASN.1 encoder
CVE-2016-2107, high severity: Padding oracle in AES-NI CBC MAC check
CVE-2016-2105, low severity: EVP_EncodeUpdate overflow
CVE-2016-2106, low severity: EVP_EncryptUpdate overflow
CVE-2016-2109, low severity: ASN.1 BIO excessive memory allocation
CVE-2016-2176, low severity: EBCDIC overread

(cherry picked from commit bdafc6df04)
2016-05-03 17:06:30 +02:00
Edward Tjörnhammar
d444f80a67 idea.idea-{community,ultimate}: 2016.1 -> 2016.1.1
(cherry picked from commit 066b5cb11a)
2016-05-03 11:06:20 +02:00
Jascha Geerds
5ef3d295fa idea.pycharm: 5.0.3 -> 2016.1.2
(cherry picked from commit cf224573d6)
2016-05-03 11:06:19 +02:00
Chris Martin
538325fa13 idea.idea15-ultimate: init at 15.0.5
(cherry picked from commit 19abd55420)
2016-05-03 11:06:19 +02:00
Edward Tjörnhammar
e7203e849c idea.idea-{community,ultimate}: 15.0.4 -> 2016.1
(cherry picked from commit 5bb0aa3bac)
2016-05-03 11:06:19 +02:00
Hannu Hartikainen
6a87c8278f silver-searcher: add alias "ag"
(cherry picked from commit e3e502e37a)
2016-05-03 10:54:03 +02:00
Edward Tjörnhammar
69ec0b84fc kodi: 16.0 -> 16.1 2016-05-03 07:13:21 +02:00
Edward Tjörnhammar
86eba313d2 kodiPlugins.svtplay: 4.0.23 -> 4.0.24 2016-05-03 07:13:21 +02:00
Simon Vandel Sillesen
5e99cb7b37 kodiPlusings.pvr-hts: fix loading of plugin
The plugin was looking for pvr.hts.so.2.2.13, so as only pvr.hts.so was copied, the plugin would not load. This symlinks all variants of the name to the addons folder.
2016-05-03 07:13:20 +02:00
Edward Tjörnhammar
c6d47d58d2 kodiPlugins.svtplay: 4.0.21 -> 4.0.23 2016-05-03 07:13:20 +02:00
Edward Tjörnhammar
698839dacd kodiPlugins.steam-launcher: 3.1.1 -> 3.1.4 2016-05-03 07:13:20 +02:00
Edward Tjörnhammar
605dad66c8 kodiPlugins.salts: 2.0.6 -> 2.0.19 2016-05-03 07:13:20 +02:00
Edward Tjörnhammar
70f8e48774 kodiPlugins.hyper-launcher.{plugin,service}: init at 1.2.0 2016-05-03 07:13:20 +02:00
Edward Tjörnhammar
3e2ed47f86 kodiPlugins.pdfreader: init at 1.0.2 2016-05-03 07:13:19 +02:00
Edward Tjörnhammar
f2637409ca kodiPlugins: sort collection alphabetically 2016-05-03 07:13:10 +02:00
Shea Levy
65145c529f krb5: 1.14 -> 1.14.2 (security updates)
(cherry picked from commit edb0b7e36f)
2016-05-02 14:19:46 -04:00
Tobias Geerinckx-Rice
dde31766dd stress-ng: 0.05.00 -> 0.05.25
(cherry picked from commit d51a55366e)
2016-05-02 16:29:34 +02:00
Louis Taylor
149d1c6dfe kernel: 4.5.1 -> 4.5.2
(cherry picked from commit 90cdfb5414)
2016-05-02 11:25:58 +02:00
Tim Steinbach
ef69b9faca kernel: 4.5 -> 4.5.1 (#14691)
(cherry picked from commit af4d84544f)
2016-05-02 11:25:58 +02:00
Louis Taylor
006c8b35cf linux: add 4.5
(cherry picked from commit 8bdee80d39)
2016-05-02 11:25:57 +02:00
Lluís Batlle i Rossell
143fdbc8d4 Enabling vaapi by default on mpv.
vdpau is enabled; why vaapi not?
2016-05-02 11:25:57 +02:00
Joachim Fasting
15d0025919 Merge pull request #15143 from Beauhurst/php_updates_r16.03
PHP security updates (r16.03 backport)
2016-05-02 01:55:20 +02:00
Robert Scott
38cb63fa33 php: 5.5.34 -> 5.4.35 2016-05-01 20:36:00 +00:00
Robert Scott
ad33a4e258 php: 5.6.20 -> 5.6.21 2016-05-01 20:36:00 +00:00
Sheena Artrip
e843b35e39 Added sheenobu as maintainer
(cherry picked from commit 15f46547d9)
2016-05-01 13:46:25 +02:00
Joachim Fasting
2597f52e51 Merge pull request #15114 from Beauhurst/squid_r16.03
Squid security fixes (16.03 backport)
2016-04-30 19:19:35 +02:00
Robert Scott
6cf2f5d8e8 squid: 3.2.13 -> 3.2.14 (though many CVEs still have no fix on this branch!) 2016-04-30 16:48:58 +00:00
Robert Scott
13513e731e squid: 3.4.11 -> 3.4.14 (though many CVEs still have no fix on this branch!) 2016-04-30 16:09:40 +00:00
Robert Scott
eb17cacf36 squid: 3.5.15 -> 3.5.17 (resolving CVE-2016-3947, CVE-2016-3948, CVE-2016-4051, CVE-2016-4052, CVE-2016-4053, CVE-2016-4054)
squid supplies patches for advisories, but patches for the above advisories applied together don't compile, hence the version bump for stable
2016-04-30 14:24:42 +00:00
Brad Ediger
e9351babed spotify: 1.0.27 -> 1.0.28
(cherry picked from commit 0da43bdc1d)

Backported because the old version is not available for download anymore.
2016-04-30 00:27:51 +02:00
Sheena Artrip
accca28dfd spotify: add sheenobu as maintainer
(cherry picked from commit 45b19e1908)

0da43bdc1d depends on this.
2016-04-30 00:27:00 +02:00
Tobias Geerinckx-Rice
ba705adfc3 claws-mail: rename from (and alias to) clawsMail
(cherry picked from commit 730d488a12)
2016-04-29 22:59:00 +02:00
Domen Kožar
d84ef15f1f vmTools.diskImages: add ubuntu 16.04
(cherry picked from commit 8a3b70791c)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-29 12:35:03 +01:00
Tuomas Tynkkynen
3b196dbb6f utillinux: Restore utillinuxCurses alias
This got removed by eead3bc536. Reintroduce the alias to avoid
breaking users' configurations.

(cherry picked from commit 676019bd85)
2016-04-29 10:10:20 +02:00
Rommel M. Martinez
bf1f79384e consoletools: copy utils to bin
(cherry picked from commit a6ce78130b)

Without this, `make install` puts stuff in `$out/usr/local`
2016-04-29 06:32:32 +02:00
Joachim Fasting
94137534be torbrowser: fix argument handling in wrapper
With $@ unquoted, the wrapper would always just pass "" to firefox

(cherry picked from commit 4741627bcf)
2016-04-28 23:50:00 +02:00
Joachim Fasting
5ccb23ff86 torbrowser: 5.5.4 -> 5.5.5
(cherry picked from commit 38ea8c6c30)
2016-04-28 23:50:00 +02:00
Vladimír Čunát
fcbb56accc fixup the previous cherry-pick
Thanks to @obadz for noticing promptly.
2016-04-28 18:50:44 +02:00
obadz
b1c19d6e00 qt4: add a toplevel entry for the version skype uses
Otherwise, it won't get built by hydra

abbradar: use `self` as needed for overrides.
(cherry picked from commit 98a7f819d9)
2016-04-28 18:35:21 +02:00
Eelco Dolstra
a240110dc8 acme.nix: Fix unit descriptions
Unit descriptions should be capitalized, and timer units don't have
to describe that they're timers.

(cherry picked from commit 0c5e837b66)
2016-04-28 13:59:17 +02:00
Eelco Dolstra
fa941ebacb copy-tarballs.pl: Use substituters to obtain tarballs
(cherry picked from commit 35bd7708d5)
2016-04-28 13:58:55 +02:00
Eelco Dolstra
9723a7df51 texlive-new: Export source tarballs via an attribute
This allows them to be found by find-tarballs.nix (which can only see
fetchurl dependencies if they are attributes, not if they're part of a
string context).

(cherry picked from commit be8fc33164)
2016-04-28 13:58:47 +02:00
Eelco Dolstra
a906b4be43 linux: 4.4.7 -> 4.4.8
(cherry picked from commit 454eefa63b)
2016-04-28 13:58:19 +02:00
Bjørn Forsman
0170599d55 jenkins service: bring back $SSL_CERT_FILE
A continuation of commit 23489b34c0
("Bring back $SSL_CERT_FILE"). Quoting that commit message:

  Commit 9f358f809d removed
  $SSL_CERT_FILE, which is fine for binaries linking against the current
  OpenSSL package, but not old binaries (e.g. those installed via
  nix-env). So let's keep $SSL_CERT_FILE for a while longer.

The above patch is only applied to 'release-16.03', so do the same for
this one.
2016-04-27 20:34:00 +02:00
Rob Vermaas
011ea84707 Fix nlopt build.
(cherry picked from commit 6c8fbed541)
2016-04-27 09:32:12 +00:00
Rob Vermaas
8914bb774b Add openblas 0.2.17 to make octave 4.0.1 work. 2016-04-27 09:31:47 +00:00
David Guibert
0c12babcfd kerberos_server: fix evaluation (closes #14928)
(cherry picked from commit 23e3cbeca4)
2016-04-25 16:05:45 +02:00
Sheena Artrip
47f2bf34f7 virtualbox: obey NIX_BUILD_CORES for make invocation, backport to 16.03 (#14964) 2016-04-25 07:14:11 +01:00
Joachim Fasting
dd1fa18646 rsync: fix version typo
Typo introduced at c3b4dd920b50d6fd7625ada250d042b47fbd0217; went
undetected because the checksum was not changed.

Reported by m4t__ on IRC

(cherry picked from commit 68691d31b1)
2016-04-25 02:04:52 +02:00
Robert Helgesson
a5e9fe0c6c perl-Guard: 1.022 -> 1.023
Fixes build with Perl 5.22.

(cherry picked from commit 5895b38c29)
2016-04-24 18:20:27 +02:00
Robert Helgesson
8cba91997f perl-Exception-Base: 0.25 -> 0.2501
Fixes build under Perl 5.22.

(cherry picked from commit 46e5412cfd)
2016-04-24 18:20:27 +02:00
Tuomas Tynkkynen
15530f9d48 dar: 2.5.2 -> 2.5.3
While at it, add xz support and enable parallel build.

(cherry picked from commit a3466e300d)
2016-04-24 13:36:59 +02:00
Joachim Fasting
a122cccd37 Merge pull request #14932 from grahamc/graceful-facetimehd-module-unload-16.03
Backport: replace module_init_tools with kmod, and graceful facetimehd module unloading to 16.03
2016-04-23 20:17:31 +02:00
Graham Christensen
b6c51f3e79 facetimehd: Only unload module if it is loaded
The pre-sleep service exits if any command fails. Unloading facetimehd
without it being loaded blocks subsequent commands from running.

Note: `modprobe -r` works a bit better when unloading unused modules,
and is preferrable to `rmmod`. However, the facetimehd module does not
support suspending. In this case, it seems preferable to forcefully
unload the module. `modprobe` does not support a `--force` flag when
removing, so we are left with `rmmod`.

See:
 - https://github.com/NixOS/nixpkgs/pull/14883
 - https://github.com/patjak/bcwc_pcie/wiki#known-issues
2016-04-23 11:59:00 -05:00
Tuomas Tynkkynen
aad8f223d8 module_init_tools: Remove
It is deprecated doesn't handle compressed modules, unlike its modern
counterpart kmod.

Add a compatibility alias to kmod for now in case someone is depending
on this in their scripts.
2016-04-23 11:58:17 -05:00
Tuomas Tynkkynen
37ad310ceb qemu-img: Fix module paths
They are compressed nowadays.

Not sure if these are really needed since nobody noticed they were
broken, but anyway...
2016-04-23 11:54:54 -05:00
Tuomas Tynkkynen
809a13010a treewide: Replace module_init_tools -> kmod
The former is deprecated and doesn't handle compressed kernel modules,
so all current usages of it are broken.

(cherry picked from commit 01854a850a)
2016-04-23 11:54:34 -05:00
Joachim Fasting
5740226f88 Revert "Merge pull request #14926 from grahamc/graceful-facetimehd-module-unload-16.03"
This reverts commit 71916459a3, reversing
changes made to 9d1662c6c9.

I noticed too late that this does not use kmod, like its counterpart on master.
See https://github.com/NixOS/nixpkgs/issues/14885
2016-04-23 18:24:18 +02:00
Joachim Fasting
71916459a3 Merge pull request #14926 from grahamc/graceful-facetimehd-module-unload-16.03
facetimehd: Only unload module if it is loaded (16.03)
2016-04-23 18:05:10 +02:00
Graham Christensen
52ecfe2da2 facetimehd: Only unload module if it is loaded
The pre-sleep service exits if any command fails. Unloading facetimehd
without it being loaded blocks subsequent commands from running.

Note: `modprobe -r` works a bit better when unloading unused modules,
and is preferrable to `rmmod`. However, the facetimehd module does not
support suspending. In this case, it seems preferable to forcefully
unload the module. `modprobe` does not support a `--force` flag when
removing, so we are left with `rmmod`.

See:
 - https://github.com/NixOS/nixpkgs/pull/14883
 - https://github.com/patjak/bcwc_pcie/wiki#known-issues
2016-04-23 09:31:40 -05:00
Domen Kožar
9d1662c6c9 make all boot tests release critical #14902 2016-04-23 13:12:17 +01:00
danbst
b991fc6e88 tortoisehg: 3.7.1 -> 3.7.3, refactor
update tortoisehg to 3.7.3 and remove source patch in build expression.
setup.py in TortoiseHG computes wrong paths in `build` phase
(upstream bug https://bitbucket.org/tortoisehg/thg/issues/4483/problems-with-setuppy-on-posix-systems).
So we skip this phase and perform install manually (the `build` phase is still performed as subcommand).

(cherry picked from commit 2fce49d3e8)
2016-04-22 19:14:44 +02:00
Dan Connolly
f9f4988bf3 tortoisehg: 3.6 -> 3.7.1, fixes package
fixes #13507

On June 8 (e8655ee) tortoisehg changed the way
it computes the `/usr/share` directory in a way that
invalidated the assumptions behind the use
of substituteInPlace in postUnpack.

(cherry picked from commit a4ce0e233b)
2016-04-22 19:14:43 +02:00
Domen Kožar
8bdc9ba2ad eval
(cherry picked from commit 8262cd0244)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-20 23:39:02 +01:00
Domen Kožar
a56a9d1b59 linuxPackages.dpdk: fix build 2016-04-20 23:09:30 +01:00
Dmitry Kalinkin
4e75fd5ceb root: fix NixOS build, build with lzma from nix, update homepage url
(cherry picked from commit f2200369e5)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-20 22:59:07 +01:00
Dmitry Kalinkin
b6d61b18aa root: 5.34.15 -> 6.04.16
(cherry picked from commit b8b368ef7c)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-20 22:59:07 +01:00
Joachim Fasting
e86e97b6d9 Merge #14851: oraclejdk: 8u77 -> 8u91, 8u92
(cherry picked from commit 1636d18050)
2016-04-20 18:16:01 +02:00
Domen Kožar
55830cfb33 add linuxPackages.dpdk: libs and drivers for fast packet processing
(cherry picked from commit e6899cc80c)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-20 16:14:19 +01:00
Joachim Fasting
94d5586c3a kernel-headers: mark broken for grsecurity kernels
Extracting headers from a grsecurity patched kernel triggers additional
build steps that require gcc plugins.  For this to work, we'd need to
add gmp, libmpfr, and libmpc to the build inputs as well as run `make
prepare` before installing the headers (lest the build fail due to
missing files).

Out-of-tree modules use kernel.dev and user space should use the Linux
API headers used to build libc, not headers extracted from random
kernels, so fixing this for grsecurity is pointless.

(cherry picked from commit 893186f4fd)
2016-04-19 22:52:26 +02:00
Michael Raskin
77e694fb08 libreoffice: 5.1.0.3 -> 5.1.2.2; still building, but the previous version in master was broken anyway and these problems are now fixed
(cherry picked from commit b338187e71)

Closes NixOS/nixpkgs#14799
2016-04-19 16:07:28 +02:00
Tom Hinton
5fc8d32ed2 Patch virtinst to refer to ${libvirt}/bin/virsh (#14818)
Also amend to resolve virt-viewer from $PATH, as this is considered an
optional dependency by upstream (per the error messages).
2016-04-19 10:12:53 +01:00
Thomas Tuegel
9d52c8d439 kde5.kcolorchooser: init at 15.12.3
(cherry picked from commit c37c5d4b52)
2016-04-18 16:29:35 -05:00
joachifm
6c89eed306 Merge pull request #14765 from jraygauthier/jrg/brother_printer_fixes_nixos1603
brgenml1cupswrapper: init at 3.1.0-1 + fix regression and improvements
2016-04-18 22:25:05 +02:00
Jos van den Oever
815460df40 davmail: 4.7.1 -> 4.7.2 2016-04-18 17:19:21 +02:00
Lluís Batlle i Rossell
c212183a99 Fixing ogre-paged build.
I update to a tree maintained by rigsofrods people.

(cherry picked from commit ecedf80a52)
2016-04-18 15:19:28 +02:00
Lluís Batlle i Rossell
b5b52a95b1 Fixing back ogre.
The merge of rigs of rods broke this.
2016-04-18 15:19:28 +02:00
Tim Steinbach
49401f708b kernel: 4.4.6 -> 4.4.7 (#14690)
(cherry picked from commit ccc3080857)
2016-04-18 14:21:55 +02:00
Lluís Batlle i Rossell
62c6f988e5 Adding back rigs of rods.
The result is similar to master "3868f02b173f44c735d9b904c687cdf4b8fdc64e".
Should be equivalent.
2016-04-18 14:18:30 +02:00
Raymond Gauthier
2acc814b15 brgenml1cupswrapper: fix regression and improvements
`cp`, `grep`, `chmod`, `sed` executables
no longer found when upgrading from nixos
15.09 to 16.03. Fixed by use of wrapper
script that brings these executables into
`PATH`.

Also fix lpd binaries on 64 bits machines
by use of `callPackage_i686`.
2016-04-18 06:45:57 -04:00
Raymond Gauthier
35fdddd136 brgenml1cupswrapper: init at 3.1.0-1
Brother generic cups wrapper over lpr driver
`brgenml1lpr` init at same version.
2016-04-18 06:45:48 -04:00
Raymond Gauthier
9c2d09201b maintainers.nix: add jraygauthier 2016-04-18 06:45:30 -04:00
Lluís Batlle i Rossell
cd7a5b4478 Removing content-pack download from rigsofrods.
The content packs from 0.37 don't seem to work. We should get one from 0.4, but
there are license problems, I think.
2016-04-18 11:56:43 +02:00
joachifm
4ac4b35948 Merge pull request #14735 from sheenobu/sipsak_fixbuild_gnu89_1603
sipsak: fix build by using --std=gnu89, backport to 16.03
2016-04-16 20:30:37 +02:00
Tobias Geerinckx-Rice
d8b3905a3d debian-devscripts: 2.16.1 -> 2.16.2
(cherry picked from commit ec8484734b)
2016-04-16 20:16:23 +02:00
Tuomas Tynkkynen
a9321b4e4f perlPackages.CGIPSGI: fix build
(cherry picked from commit ad8947ab1d)
2016-04-16 20:07:52 +02:00
Tuomas Tynkkynen
81493ac214 perlPackages.CGIEmulatePSGI: fix build
(cherry picked from commit 0aa19c5d87)
2016-04-16 20:07:52 +02:00
Tuomas Tynkkynen
2a48aef4f4 perlPackages.HTMLMason: fix build
(cherry picked from commit 18245ab18b)
2016-04-16 20:07:52 +02:00
Tuomas Tynkkynen
5d3ce8d177 perlPackages.{libfile,}strip-nondeterminism: 0.014 -> 0.016
Fixes build due to missing tarball.

(cherry picked from commit 2fdb9dcd9b)
2016-04-16 20:07:51 +02:00
Tuomas Tynkkynen
d2e0144945 perlPackages.FileBaseDir: fix build
(cherry picked from commit 9483bf606b)
2016-04-16 20:07:51 +02:00
Tuomas Tynkkynen
e7433c4961 perlPackages.TextTrim: fix build
(cherry picked from commit deb5366a9f)
2016-04-16 20:07:51 +02:00
Tuomas Tynkkynen
2782c1b325 perlPackages.CatalystControllerHTMLFormFu: fix build
(cherry picked from commit 81fc6fc7be)
2016-04-16 20:07:51 +02:00
Tuomas Tynkkynen
6b9f2f46ca perlPackages.TestWWWMechanizeCGI: fix build
(cherry picked from commit b577c309f0)
2016-04-16 20:07:51 +02:00
Tuomas Tynkkynen
aa8b552123 perlPackages.DateTimeFormatMySQL: fix build
(cherry picked from commit 0461c1eeef)
2016-04-16 20:07:50 +02:00
Tuomas Tynkkynen
3575c29135 perlPackages.DateTimeFormatISO8601: fix build
(cherry picked from commit 3dc2e7877e)
2016-04-16 20:07:50 +02:00
Tuomas Tynkkynen
48a1f20705 perlPackages.HTMLFormFu: fix build
(cherry picked from commit 773f27525a)
2016-04-16 20:07:50 +02:00
Tuomas Tynkkynen
669e165442 perlPackages.NetOAuth: fix build
(cherry picked from commit a20e80a816)
2016-04-16 20:07:50 +02:00
Tuomas Tynkkynen
fbc1e14ccd perlPackages.NetTwitterLite: fix build
(cherry picked from commit 7da9f71bf7)
2016-04-16 20:07:49 +02:00
Robert Helgesson
aa2180f0f6 perl-CPAN: depend on ModuleBuild
Also fix license field and minor other cleanups.

(cherry picked from commit a8272280d7)
2016-04-16 20:07:49 +02:00
Sheena Artrip
0520f58246 sipsak: fix build by using --std=gnu89, backport to 16.03 2016-04-16 13:53:25 -04:00
Vladimír Čunát
6ff0fabcd1 Merge #14757: openssh: fix CVE-2015-8325
(cherry picked from commit 4b9e9703d4)
2016-04-16 08:32:43 +02:00
Lluís Batlle i Rossell
067c15ea9e Make rigsofrods build the latest code.
I add angelscript 2.22 too, as it makes RoR happy.
2016-04-16 00:59:45 +02:00
Lluís Batlle i Rossell
9615d3a5be Fixing mygui build.
It wanted to find libboost_system
2016-04-15 20:34:53 +02:00
Lluís Batlle i Rossell
c6f4b4ab6d Fixnig ogre build in gcc 5. 2016-04-15 20:19:36 +02:00
Lluís Batlle i Rossell
40266527a8 Revert "rigsofrods: remove dead package"
This reverts commit 69e7948ffe.
2016-04-15 20:09:41 +02:00
Joachim Fasting
37148e6af4 electrum: 2.6.3 -> 2.6.4
(cherry picked from commit 9340014c58)

Upstream will not hesitate to ignore support requests filed against
anything other than the latest release.
2016-04-15 18:08:14 +02:00
joachifm
7e5838792c Merge pull request #14689 from grahamc/spotify-16.03
backport to 16.03: spotify: 1.0.26.125.g64dc8bc6-14 -> 1.0.27.71.g0a26e3b2-9
2016-04-14 15:43:50 +02:00
Ricardo M. Correia
e45ea6ddb7 nixos.locate: fix update-locatedb service failure
It was failing with a `Read-only filesystem` failure due to the systemd
service option `ReadWriteDirectories` not being correctly configured.

Fixes #14132

(cherry picked from commit f5951c55f7)
2016-04-14 15:38:53 +02:00
Sheena Artrip
07e216686e spotify: 1.0.26.125.g64dc8bc6-14 -> 1.0.27.71.g0a26e3b2-9
(cherry picked from commit 50e8994973)
2016-04-14 08:08:39 -05:00
taku0
ed6ff1be10 thunderbird-bin: 38.7.2 -> 45.0
(cherry picked from commit eb5c4fdadf)
2016-04-14 14:47:03 +02:00
Christoph Hrdinka
eac9571fb4 pcsx2: disable advance SIMD instructions
By setting `-DDISABLE_ADVANCE_SIMD=TRUE` pcsx2 will be compiled with predefined
SIMD flags instead of `-march=native`. This makes the resulting binary more
portable. Further this seems to be needed to make pcsx2 compile with gcc5.

(cherry picked from commit cc1cef3abc)
2016-04-14 14:18:21 +02:00
Eelco Dolstra
75ecb56930 firefox-esr: 45.0.1esr -> 45.0.2esr
Also, switch to upstream SHA-512 hashes.

(cherry picked from commit 18a6403c59)
2016-04-14 13:23:53 +02:00
Franz Pletz
b345526120 firefox: 45.0.1 -> 45.0.2
(cherry picked from commit 84edf81d71)
2016-04-14 13:23:44 +02:00
Eelco Dolstra
f21658dfca Add a regression test for #14623
(cherry picked from commit a42698d2a4)
2016-04-14 13:20:32 +02:00
Eelco Dolstra
b6de72513f Fix X11 tests broken by the removal of -ac
Probably missed a few. Also adding xauth to the system path (it was
already in the closure).

(cherry picked from commit 9153d8ed64)
2016-04-14 13:20:25 +02:00
Eelco Dolstra
659c41a7d5 X server: Enable local access control
For the last ten years we have been passing -ac to the X server, which
is very bad idea.

Fixes #14623.

(cherry picked from commit 1541fa351b)
2016-04-14 13:20:22 +02:00
Eelco Dolstra
e8f2870044 cudatoolkit: Don't barf on GCC > 4.9
Blender appears to build/run fine with GCC 5.3.

(cherry picked from commit bd4720a7d6)
2016-04-14 13:19:42 +02:00
Eelco Dolstra
ebd611f76c blender: 2.77 -> 2.77a
(cherry picked from commit 9fa5c5d461)
2016-04-14 13:19:38 +02:00
Eelco Dolstra
e0f77f7217 Restore default core limit of 0:infinity
Continuation of 79c3c16dcb. Systemd 229
sets the default RLIMIT_CORE to infinity, causing systems to be
littered with core dumps when systemd.coredump.enable is disabled.

This restores the 15.09 soft limit of 0 and hard limit of infinity.

(cherry picked from commit 840f3230a2)
2016-04-14 13:19:25 +02:00
Eelco Dolstra
c813fc2d50 fetchurl: Support SHA-512 hashes
(cherry picked from commit 3ecbe604ef)
2016-04-14 13:19:06 +02:00
Sergey Sofeychuk
57e423f17b imgur-screenshot: 1.5.4 -> 1.7.1
(cherry picked from commit 9a11aafb91)
2016-04-14 05:18:45 +03:00
Tristan Helmich
8add11ee76 samba4Full: 4.3.6 -> 4.3.8 (#14661)
Fixes the following security issues:
 * CVE-2015-5370 (Multiple errors in DCE-RPC code)
 * CVE-2016-2110 (Man in the middle attacks possible with NTLMSSP)
 * CVE-2016-2111 (NETLOGON Spoofing Vulnerability)
 * CVE-2016-2112 (LDAP client and server don't enforce integrity)
 * CVE-2016-2113 (Missing TLS certificate validation)
 * CVE-2016-2114 ("server signing = mandatory" not enforced)
 * CVE-2016-2115 (SMB IPC traffic is not integrity protected)
 * CVE-2016-2118 (SAMR and LSA man in the middle attacks possible)

See http://badlock.org/ for details.

(cherry picked from commit 192dc27dc3)
2016-04-13 18:01:07 +02:00
Taylor "Nekroze" Lawson
e409886147 Updated unifi-controller package to 4.8.15
Previous version (4.8.14) is no longer available to download.
(cherry picked from commit 5330df8984)
2016-04-13 02:54:33 +02:00
Joachim Fasting
027e666b34 Revert "Merge pull request #14262 from peterhoeg/flexget"
This reverts commit c8b6c37792, reversing
changes made to 91a3e47895.

Sorry, I did not notice that this was opened against the wrong branch ...
2016-04-13 02:53:28 +02:00
taku0
8d90560e2d firefox-bin: 45.0.1 -> 45.0.2 (#14626)
(cherry picked from commit c98cca3614)
2016-04-13 02:51:43 +02:00
taku0
9c304461dc firefox-bin: 45.0 -> 45.0.1
(cherry picked from commit 9aa6ca99e4)
2016-04-13 02:51:43 +02:00
taku0
1a2349c328 firefox-bin: 44.0.2 -> 45.0
(cherry picked from commit 153468aa5e)
2016-04-13 02:51:43 +02:00
joachifm
c8b6c37792 Merge pull request #14262 from peterhoeg/flexget
flexget: create nixos service module
2016-04-13 02:44:37 +02:00
joachifm
91a3e47895 Merge pull request #14641 from grahamc/slack-16.03
Backport Slack to 16.03
2016-04-13 01:34:30 +02:00
Tim Steinbach
03cd6abaa8 slack: Fix 2.0.3
(cherry picked from commit b6c80ee36c)
2016-04-12 18:19:39 -05:00
Tim Steinbach
609a09578f slack: 2.0.1 -> 2.0.3
(cherry picked from commit 0dfcc687be)
2016-04-12 18:19:29 -05:00
Greyson Fischer
3ad206abfb slack: init at 2.0.1
(cherry picked from commit 7fe888e521)
2016-04-12 18:19:22 -05:00
Tuomas Tynkkynen
7c0caab184 Merge pull request #14633 from layus/vlc-fix-stable
vlc: fixes the two windows issue with qt5
2016-04-13 00:43:40 +03:00
Guillaume Maudoux
d3c950bf09 vlc: fixes the two windows issue with qt5
Fix a bug with vlc displaying video in a separate window.

(cherry picked from commit 43cf5d3369)
Reason: qt5.vlc is also broken on stable.
2016-04-12 23:30:30 +02:00
Nikolay Amiantov
510eb45314 wine: use gcc49 for 64-bit builds
(cherry picked from commit 24835df322)
2016-04-12 21:32:55 +03:00
Nikolay Amiantov
63909c944d wrapCCMulti: split from gcc_multi
(cherry picked from commit 391c3e505e)
2016-04-12 21:31:28 +03:00
Nikolay Amiantov
f717a5b531 wine: fix outputs and pulseaudio support
(cherry picked from commit b109f33d64)
2016-04-12 18:44:44 +03:00
Robert Scott
1dd14cc044 django: 1.9.4 -> 1.9.5 2016-04-12 12:26:19 +02:00
Robert Scott
bc2efefc5a django: 1.8.11 -> 1.8.12 2016-04-12 12:26:07 +02:00
Eelco Dolstra
0904efa11d find-tarballs.nix: Handle stdenv bootstrap fetchurl
(cherry picked from commit f1f79505fc)
2016-04-12 11:22:10 +02:00
Vladimír Čunát
0864adcc33 vlc: lower priority of qt5 versions
/cc #14610

(cherry picked from commit 4709bdcb71)
Having `nix-env -i vlc` install something else than `pkgs.vlc`
(nondeterministically) was bad.
2016-04-12 10:16:21 +02:00
Vladimír Čunát
4ffe3f9593 nixos-generate-config: lower priority of nix.maxJobs
Fixes #6429.

(cherry picked from commit 5c04313451)
2016-04-12 08:10:31 +02:00
Nikolay Amiantov
4b667665c2 imgurbash: fix for new imgur API 2016-04-12 04:16:34 +03:00
Aaron Son
ed2d804d5d gradle: Fix gradle-2.12 on Linux to find libstdc++.so reference in native library.
(cherry picked from commit bbfad5111a)
2016-04-11 22:32:07 +02:00
Tim Steinbach
766d696c68 gradle: 2.11 -> 2.12
(cherry picked from commit aa4af87501)
2016-04-11 22:32:07 +02:00
risicle
e8c4cab725 PHP security updates (r16.03 backport) (#14590)
* php55: 5.5.33 -> 5.5.34

* php: 5.6.19 -> 5.6.20
2016-04-11 12:08:22 +01:00
joachifm
2e594a50cf Merge pull request #14580 from LumiGuide/fix-php
php: re-enable mysql support
2016-04-11 11:01:36 +02:00
Tomasz Kontusz
a8ffc875a5 partimage: correct the patch SHA256
It was using a hash for the file itself, instead of the one for a sanitized patch.

(cherry picked from commit 789c281a62)
2016-04-11 02:08:12 +03:00
Bas van Dijk
6a0702b5f7 php: re-enable mysql support
Commit 464b56f fixes issue #14351
2016-04-10 20:34:13 +02:00
Joachim Fasting
84ffd46322 mupen64plus: build with gcc49
Works around failure with gcc5, see
https://hydra.nixos.org/build/34273319/nixlog/1/raw
Not a real fix, but a working build is better than nothing ...

I have tested that the program at least runs: it fails to load a few
plugins, tho, have no idea to what extent that affects use
  Couldn't load plugin 'ricevideo.so':
  /nix/store/...-mupen64plus-1.5/share/mupen64plus/plugins/ricevideo.so:
  undefined symbol: glCombinerInputNV
  Couldn't load plugin 'glN64.so':
  /nix/store/...-mupen64plus-1.5/share/mupen64plus/plugins/glN64.so:
  undefined symbol: glCombinerInputNV

(cherry picked from commit 9a55b76db1)
2016-04-10 15:56:02 +02:00
Micxjo Funkcio
acd39d653f botanUnstable: 1.11.28 -> 1.11.29 (security)
This release contains fixes for
  * CVE-2016-2849
  * CVE-2016-2850

(cherry picked from commit 3c2e932450)
2016-04-10 12:12:37 +02:00
Micxjo Funkcio
85ffe0cb45 libsndfile: 1.0.25 -> 1.0.26 (security)
This release contains fixes for
  * CVE-2014-9496
  * CVE-2014-9756
  * CVE-2015-7805

(cherry picked from commit 75c033969b)
2016-04-10 12:12:23 +02:00
Vladimír Čunát
3e1a5d957f Merge #14541: nvidia-x11: 358.16 -> 361.42 2016-04-10 11:56:02 +02:00
Micxjo Funkcio
279b1818c0 pcre: patch CVE-2016-1283
This fixes CVE-2016-1283, which allows remote attackers to cause
a denial of service (heap-based buffer overflow) or possibly
have unspecified other impact via a crafted regular expression.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1283
(cherry picked from commit 1e2fe7e07d)
2016-04-10 04:22:11 +03:00
Marius Bakke
236fc23aae p7zip: 9.38 -> 15.14.1
(cherry picked from commit 5d15c0f5fd)

The delta contains a fix for CVE-2015-1038 which affects p7zip since 0.9.20 (fix
occurs in 15.10)
2016-04-09 19:00:23 +02:00
Joachim Fasting
97f6277819 manual: delete dangling pointer to real-world NixOS configs
At some point we probably want to replace this with a curated list
of configurations or even an upstreamed repository of examples, but
for now this is just noise.

Fixes NixOS/nixpkgs#14522

(cherry picked from commit 678e1955b1)
2016-04-09 18:17:18 +02:00
Eelco Dolstra
1de085f998 nvidia-x11: 358.16 -> 361.42
This fixes the segfault reported in #13942 caused by missing
libEGL.so.0 and libEGL_nvidia.so.0 symlinks.

(cherry picked from commit f3b43b8a4488d50663052a24b02abd77fc668502)
2016-04-08 15:02:01 -05:00
Eelco Dolstra
aef0efc389 httpd.service: Support reload
This is useful when ACME has generated a new TLS certificate.

(cherry picked from commit 133e6e1ea6)
2016-04-08 19:42:15 +02:00
Eelco Dolstra
71b8ddc4f4 Revert "gcc: Use the pre-C++11 ABI by default"
This reverts commit 83011723af. This
never worked because gcc's setup hook is never actually sourced. I
could fix this but since nobody complained, we probably don't need it.

(cherry picked from commit 60f07e8e10)
2016-04-08 19:34:11 +02:00
Evgeny Egorochkin
464b56fd31 binutils: cherry-pick a patch from master; this fixes build failure for akonadi; see https://sourceware.org/bugzilla/show_bug.cgi?id=19698
Fixes #14512

(cherry picked from commit 5982591afc)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-08 18:32:41 +01:00
Nikolay Amiantov
152c67dfb4 flashplayer: cleanup, add comment to maintainers
(cherry picked from commit d45ac41e87)
2016-04-08 18:23:07 +02:00
taku0
7403dde875 flashplayer: fix build on 32-bit platform
(cherry picked from commit 28232c3746)
2016-04-08 18:23:07 +02:00
taku0
01fbc3b4ba flashplayer: 11.2.202.577 -> 11.2.202.616
(cherry picked from commit 03e74fb117)

Security fix for APSB16-10.
2016-04-08 18:22:12 +02:00
Graham Christensen
3c534c83ce mercurial: 3.7.1 -> 3.7.3 for multiple CVEs
CVE-2016-3068

    Blake Burkhart discovered that Mercurial allows URLs for Git
    subrepositories that could result in arbitrary code execution on
    clone.

CVE-2016-3069

    Blake Burkhart discovered that Mercurial allows arbitrary code
    execution when converting Git repositories with specially
    crafted names.

CVE-2016-3630

    It was discovered that Mercurial does not properly perform bounds-
    checking in its binary delta decoder, which may be exploitable for
    remote code execution via clone, push or pull.

(cherry picked from commit f9099deb8e)
2016-04-08 15:18:11 +02:00
Micxjo Funkcio
3c5b61c851 optipng: 0.7.5 -> 0.7.6 (CVE-2016-2191)
(cherry picked from commit eda65083e8)
2016-04-08 11:02:26 +02:00
Nikolay Amiantov
5cce08c86e steam: add xdg_utils to chrootenv
(cherry picked from commit c4bbfdb478)
2016-04-08 03:13:59 +03:00
taku0
3a0b02c880 thunderbird-bin: 38.7.1 -> 38.7.2
(cherry picked from commit 8be8b6c713)

Works around potential security problems with the graphite font
shaping library.
See https://www.mozilla.org/en-US/thunderbird/38.7.2/releasenotes/
2016-04-07 23:09:11 +02:00
Wout Mertens
ac4a8e2e58 Merge pull request #14521 from jb55/fix/wkhtmltopdf
wkhtmltopdf: 0.12.2.4 -> 0.12.3.2, fix broken build on 16.03
2016-04-07 22:02:44 +02:00
Domen Kožar
22bd9c12fe Revert "kernelHeaders: fix build with libmpc"
This reverts commit b0adde8f8a.

Doesn't fix the issue for grsec kernels.
2016-04-07 11:34:48 +01:00
Lluís Batlle i Rossell
516f47efef Making trac/ldap handle httpd 2.4.
The option authzldapauthoritative had been removed in 2.4
2016-04-07 11:38:06 +02:00
Frederik Rietdijk
99a0db0586 mendeley: 1.16 -> 1.16.1 2016-04-07 09:35:47 +02:00
William Casarin
56ff791a54 wkhtmltopdf: 0.12.2.4 -> 0.12.3.2
Fixes #14422
2016-04-07 00:20:41 -07:00
Eelco Dolstra
cbeef98664 Add 16.03 AMIs
(cherry picked from commit ab2855b975)
2016-04-06 18:43:57 +02:00
Eelco Dolstra
b2ca64f52b Move the EC2 AMI registry from the NixOps repo
NixOps has infrequent releases, so it's not the best place for keeping
the list of current AMIs. Putting them in Nixpkgs means that AMI
updates will be delivered as part of the NixOS channels.

(cherry picked from commit 4e356cefd7)
2016-04-06 18:43:14 +02:00
Eelco Dolstra
a550dcac7f Update AMI creation script
(cherry picked from commit 69c746d06b)
2016-04-06 18:40:53 +02:00
Eelco Dolstra
1e462c6ba0 mpv: 0.15.0 -> 0.16.0
(cherry picked from commit 9c2a49e76a)
2016-04-06 18:40:48 +02:00
Domen Kožar
567b65d165 nixos tests: increase timeout for udevadm settle, see #13559 2016-04-06 12:56:51 +01:00
Domen Kožar
22094324fb linuxHeaders: add platforms
(cherry picked from commit c850203487)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-06 12:43:07 +01:00
Domen Kožar
b0adde8f8a kernelHeaders: fix build with libmpc
(cherry picked from commit e9842ea8d7)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-06 12:43:06 +01:00
Domen Kožar
94036474c2 phantomjs2: 2.0.0 -> 2.1.1 (fix build) 2016-04-06 12:29:45 +01:00
Damien Cassou
18eb994dd0 pharo-no-spur: 2015.08.06 -> 2016.02.18
(cherry picked from commit 21cb5fcf78)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-06 10:45:28 +01:00
Damien Cassou
4207e29b0d pharo-spur: 2016.02.15 -> 2016.04.04
(cherry picked from commit e1ab998776)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-04-06 10:45:28 +01:00
Roger Qiu
8777eb989a nixos/stage-1: Removed logCommands conditional for resetting the file descriptors after completion of logging
(cherry picked from commit 53e8e93939)
2016-04-05 23:55:59 +02:00
Markus Wotringer
0a5e7f3ba7 conkeror: 1.0pre-20150730 -> 1.0pre-20160130
(cherry picked from commit 90624dcf89)

See https://github.com/NixOS/nixpkgs/issues/14448
2016-04-05 23:55:25 +02:00
Nikolay Amiantov
a5d3fdc726 dspam service: run after postgresql to prevent segfaults
(cherry picked from commit ea5c7d553c)
2016-04-05 18:01:49 +03:00
Nikolay Amiantov
b2be13433d uwsgi service: use python.buildEnv, fix PATH
(cherry picked from commit 25754a5fc2)
2016-04-05 17:58:47 +03:00
Nikolay Amiantov
4b167d2c79 paprefs: propagate GConf dbus service
(cherry picked from commit 822665f066)
2016-04-05 17:58:30 +03:00
Vladimír Čunát
c8350dd33d vmTools: update debian jessie 8.3 -> 8.4
Their in-place updates break download hashes...

(cherry picked from commit aa670eb503)
2016-04-05 14:34:01 +02:00
Damien Cassou
54cab9cafe emacs25pre: 25.0.50-1b5630e -> 25.0.92
(cherry picked from commit 9b52caaa0c)
2016-04-05 10:49:50 +02:00
Christoph Ruegge
73e0cc9b8e emacs25pre: call autogen.sh before configuring
(cherry picked from commit c251f82de9)
2016-04-05 10:49:50 +02:00
Vladimír Čunát
e154450871 nixpkgs manual introduction: improve
- make line wrapping more consistent (overlong lines)
- don't stress the manual is *only* for contributors,
  as it does contain some user-guide parts, including the intro itself
- since March our Hydra publishes binaries immediately,
  not waiting for channel update

(cherry picked from commit 2bbae9696a)
2016-04-05 10:06:30 +02:00
Daniel Peebles
8fe066a16a Merge pull request #14451 from NeQuissimus/readme1603
README: 15.09 -> 16.03
(cherry picked from commit cf39ca1950)
2016-04-05 10:06:30 +02:00
obadz
a4f36d49a5 citrix-receiver: fix patchelf error during installPhase
Due to recent change in patchelf, it's now necessary to run chmod u+w
prior to running patchelf itself. Fixes #14440 for citrix-receiver
2016-04-04 15:52:17 +01:00
Eelco Dolstra
002d151ebe php: Disable mysql support
It's broken (#14351). Disabling to allow PHP to load.
2016-04-04 15:24:01 +02:00
Eelco Dolstra
ad0b2cfb7c Revert "initrd: Use modprobe from busybox"
This reverts commit 45c218f893.

Busybox's modprobe causes numerous "Unknown symbol" errors in the
kernel log, even though the modules do appear to load correctly.
2016-04-04 15:24:01 +02:00
Tomasz Kontusz
04a9e43f97 mini-httpd: add -ansi to CFLAGS
(cherry picked from commit 36135033b6)

Fixes gcc5 build
2016-04-04 12:55:49 +02:00
Nicolas B. Pierron
3420ac1b2e Fix typo in service.syncthing.dataDir description.
(cherry picked from commit 411408f74c)
2016-04-04 12:42:06 +02:00
Tomasz Kontusz
575450370c gnaural: build with gcc49
(cherry picked from commit 4a75df9395)
2016-04-04 12:19:54 +02:00
=
32d29b7897 libtorrentRasterbar: 1.0.6 -> 1.0.9
(cherry picked from commit 9d8d875918)
Fixes https://bbs.archlinux.org/viewtopic.php?id=206627 (affecting deluge)
2016-04-04 12:18:17 +02:00
David Guibert
3f96280da0 skype: build qt4 with the 32bits clangStdenv
This allows to build skype without errors like this:
clang++ -Wl,-O1 -o libmng libmng.o     -lmng
/nix/store/1d2abmmqvindckyq51nq9kd1yisiv54j-binutils-2.26/bin/ld: skipping incompatible /nix/store/72nklasrjg774iwxxnpyxwkzxz2j37v5-libmng-2.0.2/lib/libmng.so when searching for -lmng
/nix/store/1d2abmmqvindckyq51nq9kd1yisiv54j-binutils-2.26/bin/ld: cannot find -lmng
/nix/store/1d2abmmqvindckyq51nq9kd1yisiv54j-binutils-2.26/bin/ld: skipping incompatible /nix/store/n0y8pv4kaff7vnq7rmzwrd654gqaj0ki-glibc-2.23/lib/libm.so when searching for -lm
/nix/store/1d2abmmqvindckyq51nq9kd1yisiv54j-binutils-2.26/bin/ld: skipping incompatible /nix/store/n0y8pv4kaff7vnq7rmzwrd654gqaj0ki-glibc-2.23/lib/libm.a when searching for -lm
clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)

(cherry picked from commit 7f69d5ed8c)
2016-04-02 19:53:05 +03:00
Rastus Vernon
ae4d57f2e7 nixos manual: recommend use of dd for writing the image
Unetbootin works by altering the image and placing a boot loader on it.
For this reason, it cannot work with UEFI and the installation guides
for other distributions (incl. Debian and Fedora) recommend against
using it.

Since dd writes the image verbatim to the drive, and not just the files,
it is not necessary to change the label after using it for UEFI
installations.

vcunat: tiny changes to the PR. Close #14139.
(cherry picked from commit d6998b0674)
2016-04-02 17:43:13 +02:00
Eric Sagnes
6666a901f1 fcitx-engines.mozc: build protobuf dependency using clang
(cherry picked from commit a5285ae477)
2016-04-02 10:09:51 +02:00
Gabriel Ebner
111132d097 ibus-engines.mozc: build protobuf dependency using clang.
Fixes #14261.

(cherry picked from commit e5c4d29f79)
2016-04-02 10:09:46 +02:00
Franz Pletz
3fbea87f2f imlib2: 1.4.6 -> 1.4.8 (security)
Fixes:

 * CVE-2014-9762
 * CVE-2014-9763
 * CVE-2014-9764

(cherry picked from commit 94396b8d91)
2016-04-02 00:08:34 +02:00
Théophane Hufschmitt
f8a5d1e3ea moreutils : 0.57 -> 0.58
(cherry picked from commit 93856f36a2)

Source URL for 0.57 is 404; fixes NixOS/nixpkgs#14374
2016-04-01 19:21:13 +02:00
Christian Albrecht
2c5df45dad zsh: fix configureFlags #14256
commit 97332d3 introduced non expanding $out/etc/zprofile in zshs compiled in PATH.
this commit reverts the change so that $out is expanded at configure time.

(cherry picked from commit 9c6a69230d)

Fixes #14256.
2016-04-01 18:31:20 +02:00
Domen Kožar
089a5889ce Merge pull request #14368 from ttuegel/kde5-release-16.03
release-16.03: note KDE 5 upgrades in release notes
2016-04-01 15:19:35 +01:00
Eelco Dolstra
6e90d2f83a ssh: Fix support for ssh-dss host keys
(cherry picked from commit 3fb1708427)
2016-04-01 16:04:15 +02:00
Thomas Tuegel
e90ef1b4c3 release-16.03: note KDE 5 upgrades in release notes 2016-04-01 08:57:21 -05:00
Eelco Dolstra
8a8e3cec76 firefox-esr: Fix name
The Firefox wrapped called itself "firefox" rather than "firefox-esr".

Also eliminate a use of splitString which is evil and should never be
used.

(cherry picked from commit 2f0195003e)
2016-04-01 13:53:37 +02:00
Lluís Batlle i Rossell
d9f5e80b9f Updating trigger-rally to 0.6.3
(cherry picked from commit f07b934c8a)
2016-04-01 11:16:31 +02:00
Lluís Batlle i Rossell
90fb3bf286 Updating giv to latest from git (>0.9.25).
We were using a version years old.

I picked the git version instead of the last release because the git version
has fixes not released for almost one year.

(cherry picked from commit f38d620d59)
2016-04-01 10:13:27 +02:00
Frederik Rietdijk
c4d75ae5be spotify: 1.0.26.125.g64dc8bc6-14 -> 1.0.26.125.g64dc8bc6-15 2016-04-01 08:36:46 +02:00
Vladimír Čunát
41eee441ef gnucash-2.6: hack around test failures
They were most likely triggered by #909.
Tested only against 16.03 due to webkitgtk problems on master.

(cherry picked from commit 0689ff1574)
2016-04-01 07:48:53 +02:00
Domen Kožar
ecf6ca477c changelog: correct path to gitit nixos module
(cherry picked from commit d8abfc87c6)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-31 23:49:48 +01:00
Domen Kožar
b01eedaeec nixos-generate-config.pl: correct path for broadcom-43xx 2016-03-31 23:46:54 +01:00
makefu
9733045d05 graphite: fix carbonCache graphiteWeb graphiteApi
This commit implements the changes necessary to start up a graphite carbon Cache
with twisted and start the corresponding graphiteWeb service.
Dependencies need to be included via python buildEnv to include all recursive
implicit dependencies.

Additionally cairo is a requirement of graphiteWeb and pycairo is not a standard
python package (buildPythonPackage) and therefore cannot be included via
buildEnv. It also needs cairo in the Library PATH.

(cherry picked from commit 626bfce3b8)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-31 23:40:00 +01:00
Domen Kožar
216c840ca8 changelog: note binutils upgrade 2016-03-31 23:39:01 +01:00
Domen Kožar
279557e6d2 changelog: note release date 2016-03-31 23:08:49 +01:00
Domen Kožar
d231868990 changelog: add all new NixOS modules 2016-03-31 23:00:24 +01:00
ne0phyte
5c5e904763 kicad: 2013 stable -> 4.0.2
(cherry picked from commit cce37d2164)
2016-03-31 23:11:47 +02:00
Joachim Fasting
a8e92de019 electrum: 2.6.2 -> 2.6.3
(cherry picked from commit 0e05d552f8)
Upstream tends to outright close tickets filed against anything but the
latest version.
2016-03-31 23:11:00 +02:00
Lancelot SIX
70bab96717 gnupg20: 2.0.29 -> 2.0.30
See https://lists.gnupg.org/pipermail/gnupg-announce/2016q1/000385.html

(cherry picked from commit d6f9e35683)
2016-03-31 20:50:37 +02:00
Nikolay Amiantov
9ac86f947e steam: use old C++ ABI for primus
(cherry picked from commit 0276a8b2d2)
2016-03-31 19:53:21 +03:00
Nikolay Amiantov
bd19f47b68 primus: propagate stdenv to primusLibs
(cherry picked from commit 9b7edbeb2f)
2016-03-31 19:53:15 +03:00
Nikolay Amiantov
b0d9cb36de stdenvAdapters.useOldCXXAbi: add new adapter
(cherry picked from commit 9134f9358a)
2016-03-31 19:53:08 +03:00
Joachim Fasting
4a021a017d kdevplatform: disable parallel build
Hotfix for 1edb9b9558
Ref: https://github.com/NixOS/nixpkgs/pull/13843

(cherry picked from commit cd7242d09d)
Hydra has a failure on 16.03, too:
http://hydra.nixos.org/build/33898803/nixlog/1/raw
2016-03-31 18:03:53 +02:00
Vladimír Čunát
6465c790e2 partimage: fix build with openssl-1.0.2
...by using patch from Arch (taken from Debian).

(cherry picked from commit 1186bffb7f)
2016-03-31 17:57:42 +02:00
Franz Pletz
38fca2124a php: 7.0.2 -> 7.0.5 (security)
https://secure.php.net/ChangeLog-7.php#7.0.5

(cherry picked from commit fc1e886f1b)
2016-03-31 16:09:03 +02:00
Michael Raskin
5fa1475d12 davfs2: 1.4.7 -> 1.5.2; fixes the build
(cherry picked from commit cdb2bc77c4)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-31 13:48:26 +01:00
Domen Kožar
0263e6efec qemu: 2.5.0 -> 2.5.1
Hopefully this also fixes installer tests on i686

(cherry picked from commit 8a34a3b37a)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-31 13:48:08 +01:00
Eelco Dolstra
65075167ce NixOS manual: Add some release notes
(cherry picked from commit e60be0923b)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-31 13:47:12 +01:00
Eelco Dolstra
a2b526d41a Fix the boot-ec2-config test
(cherry picked from commit 1783e33b06)
2016-03-31 13:32:56 +02:00
Pascal Wittmann
daf0729f3a nixos/manpages: enable linebreaking after slashes
Allow linbreaks after slashes in long URLs. The option used
is documented at

   http://docbook.sourceforge.net/release/xsl/current/doc/manpages/man.break.after.slash.html

This commit fixes #4538.

(cherry picked from commit 8ddfab0cf2)
2016-03-31 11:29:05 +02:00
Tuomas Tynkkynen
2d840dad4c ios-cross-compile: Don't build on hydra
http://hydra.nixos.org/build/33505267/nixlog/1/raw

(cherry picked from commit c12f63821f)
2016-03-31 07:22:54 +03:00
Vladimír Čunát
2253d675d7 hhvm: disable parallel building
/cc #14151.
http://hydra.nixos.org/build/33846692/nixlog/1/tail

(cherry picked from commit 254e2cc982)
2016-03-31 00:56:48 +02:00
Domen Kožar
26ac90e6ad Merge pull request #14264 from ttuegel/emacs-release-16.03
emacsPackagesNg: remove compatibility cl-lib
2016-03-30 23:33:18 +01:00
Domen Kožar
864b2d6aae perlPackages.UnicodeString: fix build (also imapsync)
(cherry picked from commit 1845159705)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 21:07:53 +01:00
Luca Bruno
2173c47506 namazu: mark as broken
(cherry picked from commit 04d4d0000f)
2016-03-30 21:54:41 +02:00
Eelco Dolstra
792bbd380e Fix the EC2 test
We now generate a qcow2 image to prevent hitting Hydra's output size
limit. Also updated /root/user-data -> /etc/ec2-metadata/user-data.

http://hydra.nixos.org/build/33843133
(cherry picked from commit 0d3738cdcc)
2016-03-30 21:51:15 +02:00
Rickard Nilsson
5feeab1d57 nixos/filesystems: Fix fs options type error
(cherry picked from commit 6ff5821be6)
2016-03-30 21:51:10 +02:00
Luca Bruno
556e1b892b glib-tested: suppress gdbus test needing machine-id
(cherry picked from commit 184b7ba3c6)
2016-03-30 21:29:19 +02:00
Luca Bruno
33fe6ee6a6 oprofile: depend on libiberty_static
(cherry picked from commit 18918507f2)
2016-03-30 21:00:53 +02:00
Luca Bruno
77a465e98f libiberty: add static variant
(cherry picked from commit 088231fe9f)
2016-03-30 21:00:46 +02:00
Domen Kožar
b0f8e15376 remove erlangR14: outdated and doesn't build
(cherry picked from commit a1cfdb9c88)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 18:55:20 +01:00
Lluís Batlle i Rossell
4254bb9828 Fix evaluation. (licenses, not licences)
Thanks Domen.

(cherry picked from commit 0c98b52816)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 18:52:00 +01:00
Lluís Batlle i Rossell
e59d4141c6 Updating wings and dependencies to match erlang
I updated the erlang esdl lib, added the erlang cl lib,
added opencl-headers and ocl-icd to make wings build and run.

I have not tested its opencl part; I only added dependencies so
it builds.

(cherry picked from commit f6a44bea9e)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 18:51:47 +01:00
Michael Raskin
162556c9c6 perl-Alien-Wx: pass ModuleBuild dependency
(cherry picked from commit af3ec2046a)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 18:44:15 +01:00
Domen Kožar
d2e4593240 manual: use a better relaxng validation tool #4966
(cherry picked from commit ccdda96c2f)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 18:37:29 +01:00
Graham Christensen
e8c74f4c61 jenkins: copy .war to $out, fixes #14137
(cherry picked from commit 0b8dd57694)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 18:37:15 +01:00
Ambroz Bizjak
32889165e0 pythonPackages/power: 1.2 -> 1.4
This fixes the build both for Python 2.7 and 3.

(cherry picked from commit 492c826a5d)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 18:36:51 +01:00
Aristid Breitkreuz
7cf7ed166c Finance::Quote: 1.37 -> 1.38 & add missing dependency on CGI
(cherry picked from commit 63032dae9d)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-30 18:13:16 +01:00
Eelco Dolstra
23489b34c0 Bring back $SSL_CERT_FILE
Commit 9f358f809d removed
$SSL_CERT_FILE, which is fine for binaries linking against the current
OpenSSL package, but not old binaries (e.g. those installed via
nix-env). So let's keep $SSL_CERT_FILE for a while longer.
2016-03-30 16:37:18 +02:00
Eelco Dolstra
badecc4c42 nixos-rebuild: Fix Nix fallback
Somebody forgot that Bash is not a real programming language...

(cherry picked from commit c94f8a4abd)
2016-03-30 16:37:03 +02:00
aszlig
7133dcdd28 chromium: Update all channels to latest versions
Overview of the updated versions:

stable: 49.0.2623.87 -> 49.0.2623.110
beta:   50.0.2661.26 -> 50.0.2661.49
dev:    50.0.2661.18 -> 51.0.2693.2

Most notably, this includes a series of urgent security fixes:

 * CVE-2016-1646: Out-of-bounds read in V8. Credit to Wen Xu from
                  Tencent KeenLab.
 * CVE-2016-1647: Use-after-free in Navigation. Credit to anonymous.
 * CVE-2016-1648: Use-after-free in Extensions. Credit to anonymous.
 * CVE-2016-1649: Buffer overflow in libANGLE. Credit to lokihardt
                  working with HP's Zero Day Initiative / Pwn2Own.
 * CVE-2016-1650: Denial of service in PageCaptureSaveAsMHTMLFunction

The official release announcement with details about these fixes can be
found here:

http://googlechromereleases.blogspot.de/2016/03/stable-channel-update_24.html

Beta and stable could be also affected, although I didn't do a detailed
check whether that's the case.

As this introduces Chromium 51 as the dev version, I had to make the
following changes to make it build:

 * libexif got removed, so let's do that on our end as well.
   See https://codereview.chromium.org/1803883002 for details.
 * Chromium doesn't seem to compile with our version of libpng, so let's
   resort to the bundled libpng for now.
 * site_engagement_ui.cc uses isnan outside of std namespace, so
   we're fixing that in postPatch using sed.

I have successfully built all versions on i686-linux and x86_64-linux
and tested it using the VM tests.

Test reports can be found at the following evaluation of my Hydra:

https://headcounter.org/hydra/eval/314584

Thanks to @grahamc for reporting this.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Reported-by: Graham Christensen <graham@grahamc.com>
Fixes: #14299
(cherry picked from commit ef753d210e)
2016-03-30 15:27:44 +02:00
Domen Kožar
6824d79c69 Merge pull request #14316 from ttuegel/kde5-release-16.03
kde5.applications: 15.12.1 -> 15.12.3
2016-03-30 13:02:03 +01:00
Vladimír Čunát
36107e6f03 qt4-clang: fix fallout from f9b5ed66d1
There's still the question of Hydra binaries etc. but this should at
least fix evaluation and running problems.

(cherry picked from commit 8ffe681713)
2016-03-30 13:28:46 +02:00
Franz Pletz
5b83e496c8 dhcpcd: 6.9.4 -> 6.10.1 (security)
Fixes CVE-2016-1503 & CVE-2016-1504.

Changelog:
  - http://roy.marples.name/archives/dhcpcd-discuss/2016/1143.html
  - http://roy.marples.name/archives/dhcpcd-discuss/2016/1146.html

(cherry picked from commit 5aa986fba2)

See #14313.
2016-03-30 13:08:00 +02:00
Eelco Dolstra
24d68896e4 Inline qt4-clang
This prevents a potential name/version conflict in nix-env, and a
large Hydra build for a proprietary package.

(cherry picked from commit f9b5ed66d1)
2016-03-30 11:26:17 +02:00
Eelco Dolstra
115cb2f780 openvpn: 2.3.8 -> 2.3.10
In particular, this fixes the systemd-ask-password regression
re-introduced by cb1c818491.

(cherry picked from commit 38afa836b3)
2016-03-30 11:26:17 +02:00
Eelco Dolstra
e61b8b2294 Catalyst::Action::Rest: 1.19 -> 1.20
(cherry picked from commit 6e08bd27fc)
2016-03-30 11:26:17 +02:00
Eelco Dolstra
79c3c16dcb Restore core dumps
Systemd 229 sets kernel.core_pattern to "|/bin/false" by default,
unless systemd-coredump is enabled. Revert back to the default of
writing "core" in the current directory.

(cherry picked from commit 54ca7e9f75)
2016-03-30 11:26:17 +02:00
Vladimír Čunát
8f9f2347d3 firefox-esr: fix build after 574a6d34d2
We're now using only newer versions that have ./configure in the root.
${pname} isn't the correct directory name for esr versions.

(cherry picked from commit ec4685cf70)
2016-03-30 11:26:17 +02:00
Eelco Dolstra
aeab34ccd2 firefox-esr: 38.6.1 -> 45.0.1
(cherry picked from commit 574a6d34d2)
2016-03-30 11:26:17 +02:00
Eelco Dolstra
8bd86b91d9 firefox: 45.0 -> 45.0.1
(cherry picked from commit 79d6dc91fe)
2016-03-30 11:26:17 +02:00
Peter Simons
5b86bfc58d ghc: version 6.12.3 is broken after updating to gcc 5.x
http://hydra.nixos.org/build/33627548
(cherry picked from commit 070b123d4b)
2016-03-30 10:59:12 +02:00
Vladimír Čunát
2aba37aaf0 intltool: fix problems with perl-5.22
http://hydra.nixos.org/build/33608086/nixlog/1/raw
(cherry picked from commit 117183e27e)
2016-03-30 10:44:48 +02:00
Vladimír Čunát
ccc2c7c9e5 mesa: maintenance update 11.1.1 -> 11.1.2
(cherry picked from commit f4cb39c3d3)
2016-03-30 10:44:43 +02:00
Peter Simons
d665da8ea6 Disable broken Haskell builds some more. 2016-03-29 21:59:06 +02:00
Nikolay Amiantov
f3319286ff xserver service: add glamoregl for intel drivers
Closes #14286

Credits to vcunat for the initial patch.

(cherry picked from commit 63f1eb6b00)
2016-03-29 19:04:11 +03:00
Peter Simons
c1818c2963 Disable broken Haskell builds. 2016-03-29 17:12:45 +02:00
Nikolay Amiantov
bf65250cdb Revert "Remove PATH assumption from fhs-userenv."
This reverts commit 2f26b82411.

This breaks terminfo in Bash for some reason (i.e. TAB and other
special keys).

(cherry picked from commit a5322efd95)
2016-03-29 17:58:36 +03:00
Thomas Tuegel
83d6492b02 kde5.applications: 15.12.1 -> 15.12.3
(cherry picked from commit 7079075d4caab68a22e8a1aac82df774f1d99d58)
2016-03-29 09:49:50 -05:00
Vladimír Čunát
12528e547f manual rl-16.03: document broadcom issue #12595
(cherry picked from commit d9b98b6b50)
2016-03-29 16:33:49 +02:00
Peter Simons
cc8278e186 Document the fact that the firewall allows pings by default in rl-1603.xml.
(cherry picked from commit 9a2ee42f52)
2016-03-29 16:15:17 +02:00
Domen Kožar
2e7727f647 nixos/lib/testing.nix: make 'config' a free variable
cc @edolstra

(cherry picked from commit c56c3b6596)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-29 14:35:56 +01:00
Nikolay Amiantov
90748d0983 avidemux: don't depend on unfree FAAC by default
(cherry picked from commit c2c1ef89cd3c2e232d744b034e685fb10cd23327)
2016-03-29 16:15:55 +03:00
Nikolay Amiantov
0432279805 avidemux: 2.5.6 -> 2.6.12
(cherry picked from commit 8b0076b887)

Fixes i686-linux builds.
2016-03-29 16:01:39 +03:00
Brian McKenna
6af1cd202d steam: enable hardware decoding (for In-Home Streaming)
Previous to this patch I was getting software decoding when I used In-Home
Streaming. I had a look around and according to:

https://bbs.archlinux.org/viewtopic.php?id=187922

> It seems that the libva version Steam comes with, is not compatible anymore to
> the newer libva 1.4.0.

Substituting in our version of libva gives me hardware decoding!

(cherry picked from commit d47e2fde69)
2016-03-29 15:47:56 +03:00
Vladimír Čunát
445e5c4ca5 rustc: disable parallel building
http://hydra.nixos.org/build/33119905/nixlog/1/raw

(cherry picked from commit d7e87db0c7)
2016-03-29 13:02:22 +02:00
Vladimír Čunát
60622584db xmlsec: fix linkage, probably after #909
This fixes builds of (some) reverse dependencies, e.g. aqbanking.

(cherry picked from commit e69306c463)
2016-03-29 12:23:10 +02:00
Vladimír Čunát
6135eafe30 pythonPackages.poppler-qt4: fix build by a hack
/cc maintainer @sepi.

(cherry picked from commit 5147b9d30a)
2016-03-29 11:57:01 +02:00
Vladimír Čunát
e19d01d6c6 dvdisaster: disable parallel building
http://hydra.nixos.org/build/33609373/nixlog/1/raw
/cc @nkcx. I notified upstream.

(cherry picked from commit 62c29908da)
2016-03-29 10:54:46 +02:00
taku0
c9f09d2b77 thunderbird-bin: 38.6.0 -> 38.7.1
(cherry picked from commit dc73280d19)

Security & bug fixes

See https://www.mozilla.org/en-US/thunderbird/38.7.0/releasenotes/
and https://www.mozilla.org/en-US/thunderbird/38.7.1/releasenotes/
2016-03-29 02:34:58 +02:00
Robin Gloster
0f7088161a vacuum: fix build 2016-03-28 23:33:47 +00:00
Nikolay Amiantov
fcd16856b4 haskellPackages.mueval: fix build
(cherry picked from commit d94ffd5655394131d292780cb5e82dc13fcd6d2b)
2016-03-29 02:24:23 +03:00
Domen Kožar
7f2dc5d3f6 garden 2016-03-29 00:15:27 +01:00
Domen Kožar
2267e14d68 Merge pull request #14280 from therealpxc/backport-new-robotics-pkgs
Backport new robotics pkgs
2016-03-29 00:12:19 +01:00
Patrick Callahan
ac5f358c00 genromfs: init at 0.5.2 2016-03-28 15:42:55 -07:00
Patrick Callahan
4ae5327664 gazebo: init at 6.5.1 and 7.0.0 2016-03-28 15:42:05 -07:00
Patrick Callahan
3fd3be4408 ignition.transport: init at 0.9.0 and 1.0.1 2016-03-28 15:42:05 -07:00
Patrick Callahan
f50a79045c sdformat: init at 3.7.0 and 4.0.0 2016-03-28 15:42:05 -07:00
Patrick Callahan
1f379d95e4 ignition robotics libs: init; .math: init at 2.3.0 2016-03-28 15:42:04 -07:00
Patrick Callahan
a6f5f1efad tinyxml-2: init at 3.0.0 2016-03-28 15:42:04 -07:00
Patrick Callahan
20aa39d18d ogre: 1.9.0 -> 1.9-hg 2016-03-28 15:42:04 -07:00
Patrick Callahan
1d72ddad9d qgroundcontrol: init at 2.9.4 2016-03-28 15:42:04 -07:00
=
4e2f29507f meterbridge: fix gcc-5 build (thanks to: http://ports.ubuntu.com/pool/universe/m/meterbridge/)
(cherry picked from commit c7a26ccf9d)
2016-03-28 22:32:19 +02:00
taku0
979bef5356 oraclejdk: 8u73, 8u74 -> 8u77
(cherry picked from commit b8cc111764)

Security fix for CVE-2016-0636.

http://www.oracle.com/technetwork/java/javase/8u77-relnotes-2944725.html
2016-03-28 21:25:56 +02:00
Joachim Fasting
d022dc9300 lsh: fix gcc5 build
The build fails with c11 (also tested c99), but works with gnu90.

(cherry picked from commit 8bd72dfaa4)
2016-03-28 19:06:32 +02:00
Brad Ediger
3a13d4707b spotify: 1.0.25.127 -> 1.0.26.125
(cherry picked from commit 066042e3fa)
2016-03-28 18:27:45 +02:00
Joachim Fasting
713af5258f v8: fix build(s)
Ignore errors due to strict-overflow warnings; strip clang-only flag on
non-clang builds. Concerning the latter "fix", it's not entirely clear to me why
the -Wno-format-pedantic flag ends up being passed to gcc, the .gyp file appears
to already condition the inclusion of this flag on whether cc=clang.

(cherry picked from commit 72b5bfda97)
2016-03-28 18:04:49 +02:00
Domen Kožar
70a3a43ed8 Merge pull request #14268 from grahamc/failingtests-16.03
ikiwiki: Fix failing dependency builds (16.03)
2016-03-28 15:38:27 +01:00
Ambroz Bizjak
caffe29c3e wxPython: Fix runtime error due to library dependencies not in RUNPATH.
I think what's happening is that the linker automatically adds DT_NEEDED dependencies to some libraries because it finds these libraries are being used directly, but
because they're not linked explicitly with -lflags, the gcc wrapper does not add them to RUNPATH.
2016-03-28 16:28:53 +02:00
Graham Christensen
ddede54d49 perlPackage.RTClientREST: Depend on CGI
(cherry picked from commit 125ee11a35)
2016-03-28 09:20:25 -05:00
Graham Christensen
1d05903577 I18NLangTags: Removed, as this version is 12 years old and is now bundled with core.
(cherry picked from commit c3d6b5e8f2)
2016-03-28 09:20:25 -05:00
Graham Christensen
e3def23b8f perlPackages.DateTimeFormatDateParse: Depend on ModuleBuild
(cherry picked from commit 36b88f8df7)
2016-03-28 09:20:25 -05:00
Graham Christensen
65f4afba5e perlPackages.DataSerializer: Depend on ModuleBuild
(cherry picked from commit 200ddaa54f)
2016-03-28 09:20:25 -05:00
Graham Christensen
191df96839 perlPackages.ScalarString: Depend on ModuleBuild
(cherry picked from commit ce5914c898)
2016-03-28 09:20:24 -05:00
Graham Christensen
ad2acc8fcd perlPackages.ParamsClassify: Depend on ModuleBuild
(cherry picked from commit aa73eadc1c)
2016-03-28 09:20:24 -05:00
Graham Christensen
ec561c6075 perlPackages.NetOpenIDConsumer: Depend on CGI
(cherry picked from commit 849e743040)
2016-03-28 09:20:24 -05:00
Graham Christensen
0f59068762 perlPackages.HTTPLite: Depend on ModuleBuild
(cherry picked from commit df9a6362ea)
2016-03-28 09:20:24 -05:00
Graham Christensen
e32aabe4f1 perlPackages.DataFloat: Depend on ModuleBuild
(cherry picked from commit 9fc9ede52d)
2016-03-28 09:20:24 -05:00
Graham Christensen
d8fe0c9790 perlPackages.DataEntropy: Depend on ModuleBuild
(cherry picked from commit 4532a2a75d)
2016-03-28 09:20:24 -05:00
Graham Christensen
3816f98e0a perlPackages.CryptEksblowfish: Depend on ModuleBuild
(cherry picked from commit 5dd946ded9)
2016-03-28 09:20:23 -05:00
Graham Christensen
15c7003f07 perlPackages.ClassMix: Depend on CGI
(cherry picked from commit 189d29e5f6)
2016-03-28 09:20:23 -05:00
Graham Christensen
1ff2835e5a perlPackages.AuthenPassphrase: Depend on ModuleBuild
(cherry picked from commit fb7ebfb8a6)
2016-03-28 09:14:14 -05:00
Graham Christensen
153fdba2c4 perlPackages.AuthenDecHpwd: Depend on ModuleBuild
(cherry picked from commit 2d182a2992)
2016-03-28 09:13:56 -05:00
Graham Christensen
f45acd3831 perlPackages.DataInteger: depend on ModuleBuild
(cherry picked from commit f11fd4a476)
2016-03-28 09:13:48 -05:00
Vladimír Čunát
e7ffa6c42e clang-3.5: mark as broken
It seems unlikely someone will want to fix it anymore.

(cherry picked from commit be447475d3)
2016-03-28 14:43:02 +02:00
Vladimír Čunát
af551f2dea qt55.vlc: fix build
I tested it on a video to make sure the bug doesn't appear.

(cherry picked from commit ed47bb1ca8)
2016-03-28 14:37:52 +02:00
Andrew Kelley
538d9b5d6d llvmPackages: add 3.8.0 (close #13801)
vcunat's review:
 - let's not switch the default versions of llvm* for now
 - the only changes I see is adding python to clang's buildInputs
   and using the big so-file as discussed in #12759
   (BUILD_SHARED_LIBS -> LLVM_LINK_LLVM_DYLIB)
 - in future it will be nice to split libLLVM into a separate output

(cherry picked from commit f5fe051c71)
2016-03-28 13:52:24 +02:00
Thomas Tuegel
c5583a4540 emacsPackagesNg: remove compatibility cl-lib
ELPA has the compatibility library cl-lib-0.5 which interferes with the
builtin cl-lib-1.0.

(cherry picked from commit 6c05554b85)
2016-03-28 06:31:07 -05:00
aszlig
f12e91f2c5 chromium: Link using gold linker flags
I originally wanted to do this a long time (a31301d) but IIRC back then
it didn't compile. Nowadays with the splitup of the gold linking flags
and the binutils integration, it's merely just a switch to flip, so
let's do that.

Only tested it by building against the current Chromium stable version
on 64bit, because right now builds on Hydra seem to time out (because of
this?) anyway so we have nothing to lose here.

The linking time was hereby reduced from >30 minutes (I didn't measure
it exactly but looked half an hour later to the build progress and it
was *still* linking) to about a few seconds, which I guess is even
though the measurement is quite bogus a tremendous improvement
nonetheless.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit f9fff51c2a)
2016-03-28 11:42:07 +02:00
Vladimír Čunát
04e2196d82 glu: fix the pkg-config file (fixes #14260)
(cherry picked from commit a7d34e0c13)
2016-03-28 11:34:05 +02:00
Domen Kožar
7877e33af8 fix munin (and the test), refs #12801 #13999 2016-03-28 10:26:06 +01:00
Michael Raskin
ee6a568a14 Fix Midori build
(cherry picked from commit 891fa19e29)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-28 09:37:30 +01:00
Michael Raskin
6dd99f177c lilypond: set some HOME during the build for Metafont
(cherry picked from commit 1a97cfb91f)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-28 09:37:26 +01:00
Vladimír Čunát
2647742e02 Revert "texlive.combine: patch paths into texmf.cnf"
This reverts commit 7e74fad881.
Let's revert this in the release, at least for now. It seems the change
isn't perfect and causes some problems.
2016-03-28 08:45:08 +02:00
Nikolay Amiantov
64fd93763a skype: use clang-built qt4 to fix segfault
(cherry picked from commit 28af80fcc0)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-27 20:26:25 +01:00
Joachim Fasting
4476d74db6 linux_grsec_3_14: mark as broken
First, The patch is outdated, I failed to find it anywhere in the mirror repos.
Second, the build fails, and while it may be "fixed" by ad-hoc patching (it
appears to simply need some missing includes), this would mean shipping a
potentially insecure software package. Given that the only reason to use
grsecurity is security, this is both misleading and exposes users to undue risk.
Finally, the build has been broken for quite a long time with no complaints,
leading me to believe that the number of actual users is quite low.

(cherry picked from commit dd16dcbba4)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-27 20:25:33 +01:00
Nikolay Amiantov
9b79dd6bf4 pgadmin: enable parallel building
(cherry picked from commit 7b82f5a3fb)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-27 20:25:16 +01:00
Joachim Fasting
30745200d3 lttng-modules: mark as broken on kernel version <3.18
On linux 3.14, we get errors like
  error: 'struct snd_soc_codec' has no member named 'name'
     __string( name,  codec->CODEC_NAME_FIELD )
indicating that the module is incompatible with the linux API
in this kernel version.

See https://hydra.nixos.org/build/33102405/nixlog/1/raw

(cherry picked from commit a452b43ee5)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-27 20:25:06 +01:00
Domen Kožar
7bd9321c6d perlPackages.TestMockModule: fix build 2016-03-27 20:22:52 +01:00
Domen Kožar
bb6d3c16d3 nixUnstable: bump 2016-03-27 20:22:52 +01:00
Nikolay Amiantov
7e74fad881 texlive.combine: patch paths into texmf.cnf
...instead of environment variables. Close #12768.

(cherry picked from commit acf664814e)
2016-03-27 21:20:32 +02:00
Nikolay Amiantov
471e755cc2 Revert "codeblocks: fix build"
This reverts commit fd9416fb4b.

This shouldn't be needed now that we properly link wxGTK.

(cherry picked from commit 4e9ddd3770)
2016-03-27 21:01:27 +03:00
Nikolay Amiantov
3e30c35937 wxgtk: explicitly link to libX11 and libcairo
(cherry picked from commit 5471eed63c)
2016-03-27 21:01:27 +03:00
Nikolay Amiantov
5ce9f24ded skype: small cleanup
(cherry picked from commit 3819384395)
2016-03-27 21:01:27 +03:00
Pascal Wittmann
9cb9a6b509 ispc: fix one error by adding glibc32
llvm linking errors remain
2016-03-27 18:03:40 +02:00
Vladimír Čunát
da25f05fc2 texlive: document in nixpkgs manual
Fixes #13240. It's not really better than source-code comments it replaced,
but it's in a better accessible place.

(cherry picked from commit e3da83297f)
2016-03-27 14:33:40 +02:00
Peter Hoeg
d80126bb93 flexget nixos module: run the service and specify configuration
This module adds support for defining a flexget service.

Due to flexget insisting on being able to write all over where it finds
its configuration file, we use a ExecStartPre hook to copy the generated
configuration file into place under the user's home. It's fairly ugly
and I'm very open to suggestions
2016-03-27 17:41:46 +08:00
Joachim Fasting
843d11b292 codeblocks: fix build
https://hydra.nixos.org/build/33633573/nixlog/1/raw
(cherry picked from commit fd9416fb4b)
2016-03-27 10:30:31 +02:00
Joachim Fasting
424d1aff43 linux_chromiumos: require 64bit build host
I noticed that almost all the Hydra build failures were on i686. Sure
enough, upstream says that you need an x86_64 machine to build the
kernel.

(cherry picked from commit bd9737cc3e)
2016-03-27 10:29:46 +02:00
Joachim Fasting
e332f57678 accelio: mark as broken on grsec kernels
All hydra builds against grsec kernels fail.

(cherry picked from commit 8f261d717d)
2016-03-27 10:29:45 +02:00
Joachim Fasting
6a45a297b9 lttng-modules: mark as broken on grsec
All hydra builds against grsec kernels fail; seemingly because
the PaX hardening plugins are incompatible with lttng-modules
(the code writes to locations marked as read-only).

(cherry picked from commit 1939256550)
2016-03-27 10:29:45 +02:00
Joachim Fasting
207131488e rtl8812au: mark as broken on grsec kernels
All hydra builds against grsec kernels fail; builds against vanilla
kernels work.

(cherry picked from commit 2182fd52ad)
2016-03-27 10:29:45 +02:00
Joachim Fasting
ea8311a366 spl: mark as broken on grsec kernels
All hydra builds against grsec kernels fail; non-grsec kernels
succeed.

(cherry picked from commit 2a097803d4)
2016-03-27 10:29:44 +02:00
Joachim Fasting
bd58129a12 openafsClient: mark as broken on unsupported kernels
Sandboxed builds against linux 3.14 and 4.4 fail; 3.18.29 and 4.3
succeed.  From this, I conclude that 4.3 is the latest supported
version, while the lower bound is set to the oldest kernel in
nixpkgs >3.14 (the changelog does not indicate otherwise).

It appears that openafs-client is simply incompatible with grsec;
all hydra builds of openafs-client on grsec fail; local sandboxed
builds against grsec with the most recent openafs-client also fail.

(cherry picked from commit b741198116)
2016-03-27 10:29:44 +02:00
Joachim Fasting
bfece38f51 openafsClient: 1.6.14 -> 1.6.17
According to the changelog, the delta between these versions contains
fixes for several CVEs.

See https://www.openafs.org/dl/openafs/1.6.17/RELNOTES-1.6.17
and https://www.openafs.org/dl/openafs/1.6.16/RELNOTES-1.6.16
and https://www.openafs.org/dl/openafs/1.6.15/RELNOTES-1.6.15

(cherry picked from commit df0481276d)
2016-03-27 10:29:43 +02:00
Joachim Fasting
3af4a10350 hugin: add missing dependencies
https://hydra.nixos.org/build/33609995/nixlog/2/raw
(cherry picked from commit 29c3314fe4)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:23:58 +00:00
Robert Scott
076dd96812 osrm-backend: add patch fixing build by un-hard-coding gcc-ar and gcc-ranlib paths
(cherry picked from commit 7a3e154c27)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:12:38 +00:00
Robert Scott
939612898d osrm-backend: switch src to use fetchFromGitHub
(cherry picked from commit 0fdf7106e5)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:12:36 +00:00
Joachim Fasting
7f7f3c1bc2 io: fix gcc5 build
c11 inline semantics breaks the build

See https://github.com/stevedekorte/io/issues/316
and https://hydra.nixos.org/build/33606216/nixlog/1/raw

(cherry picked from commit 3fe86ac582)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:11:57 +00:00
Joachim Fasting
32f6c6be6b accelio: kernel 4.2 is the most recent supported kernel
All Hydra builds on more recent kernels fail; from reading
the accelio documentation, I get the impression that 4.2 is
the most recent supported kernel version.

(cherry picked from commit 74838cd03d)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:11:21 +00:00
Joachim Fasting
06416457c2 jool: mark broken for kernel versions > 4.3
All hydra builds for kernel version >4.3 fail; the build failure
indicates changes to the kernel API used by the package.

(cherry picked from commit eeca73dfac)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:11:21 +00:00
Joachim Fasting
bc393f79eb gsb: mark as broken
No active maintenance for several years; dependencies cannot be met.

(cherry picked from commit 1379baca94)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:11:21 +00:00
Joachim Fasting
e96ce2c60e perf: fix build
https://hydra.nixos.org/build/33553564/nixlog/1/raw
(cherry picked from commit 89c6b3c11a)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:11:21 +00:00
Joachim Fasting
be5b364581 grsecurity: fix gcc plugin
Also needs mpfr and libmpc

(cherry picked from commit 304c4a514e)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-26 20:11:21 +00:00
Joachim Fasting
06efe48e33 udftools: fix gcc5 build
-fgnu89-inline was insufficient, revert to -std=gnu90
See https://hydra.nixos.org/build/33103604/nixlog/1/raw

Also fix various undefined reference errors by ad-hoc patching

(cherry picked from commit c13ddd14bd)
2016-03-26 18:24:00 +01:00
Joachim Fasting
04c2762461 yad: ad-hoc patching to fix undefined reference errors
(cherry picked from commit cb896a1e7f)
2016-03-26 18:24:00 +01:00
Joachim Fasting
d6ac1e6d51 yad: fix gcc5 build
https://hydra.nixos.org/build/33612450/nixlog/1/raw
(cherry picked from commit 0b060bdf68)
2016-03-26 18:23:59 +01:00
Joachim Fasting
84fbe0d6d7 zoom: fix gcc5 build
https://hydra.nixos.org/build/33122239/nixlog/1/raw
(cherry picked from commit a4ed052407)
2016-03-26 18:23:59 +01:00
Joachim Fasting
916531dfd1 leocad: work around cmath problem
introduced by recent glibc

https://hydra.nixos.org/build/33610365/nixlog/1/raw
(cherry picked from commit 6448c94e57)
2016-03-26 18:23:59 +01:00
Joachim Fasting
3047988677 curl3: mark as broken
This is an ancient version of curl, that currently has 19 known vulnerabilities.
It is used by and was added to support only one package.

(cherry picked from commit 1f78d14028)
2016-03-26 18:23:59 +01:00
Octavian Cerna
4562338552 quagga: 0.99.24.1 -> 1.0.20160315
(cherry picked from commit c3ee17fe74)
Security update, fixes CVE-2016-2342
2016-03-26 12:59:06 +01:00
Peter Simons
6f10147e8c Synchronize Haskell package sets with master @ ce2c13675d.
The update was generated by hackage2nix from the following inputs:

  - Hackage: ab666959f0
  - LTS Haskell: 6c45757bda
  - Stackage Nightly: d8a2cae779
2016-03-26 11:27:05 +01:00
Cole Mickens
c110614936 python.pyjwt: platforms: linux -> unix 2016-03-25 23:48:09 +02:00
Pascal Wittmann
cecc1e32db eggdrop: fix build with gcc5 2016-03-25 19:56:43 +01:00
Eelco Dolstra
18fd4c1430 blender: Disable i686-linux build
The openimageio dependency doesn't build on i686. But probably nobody
cares about running Blender on 32-bit anymore.

http://hydra.nixos.org/build/33602734
(cherry picked from commit 7f61c7289f)
2016-03-25 16:45:23 +01:00
Eelco Dolstra
ab2ac03378 thunderbird: 38.6.0 -> 38.7.0
Lots of security fixes: https://www.mozilla.org/en-US/security/known-vulnerabilities/thunderbird/#thunderbird38.7

(cherry picked from commit aa6ab92d93)
2016-03-25 16:45:23 +01:00
Eelco Dolstra
970b8ee8e7 blender: 2.76b -> 2.77
(cherry picked from commit 4f47fe2f9c)
2016-03-25 16:45:23 +01:00
Eelco Dolstra
e81ca34a6a opensubdiv: 3.0.3 -> 3.0.4
(cherry picked from commit 5759b447dc)
2016-03-25 16:45:23 +01:00
Eelco Dolstra
5d391c49a9 nixpkgs-metrics: Suppress build products
(cherry picked from commit 03df731fb5)
2016-03-25 16:45:23 +01:00
Eelco Dolstra
5d24af631a Add metrics job to unstable aggregate
(cherry picked from commit c23e9e12f8)
2016-03-25 16:45:23 +01:00
Eelco Dolstra
c3fe7bed20 Keep track of Nixpkgs/NixOS evaluation statistics
(cherry picked from commit fab439201e)
2016-03-25 16:45:23 +01:00
Domen Kožar
148b740a63 nix.useChroot: allow 'relaxed' as a value
(cherry picked from commit cfc1fe345ceb77131a4f7461e28f482baf626de3)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-25 12:48:06 +00:00
Tim Steinbach
92f1827ea0 grsecurity: 4.4.4 -> 4.4.5
(cherry picked from commit a5d8256df4)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-25 09:59:03 +00:00
Domen Kožar
23730413fe kernel: fix build of 3.10 and 3.12 on i686 2016-03-25 09:50:25 +00:00
Domen Kožar
efc7b847e3 libgda: 5.2.2 -> 5.2.4 (fix build) 2016-03-25 09:50:25 +00:00
Joachim Fasting
49e5d4c507 bigloo: pin gcc version to 4.9
https://hydra.nixos.org/build/33120353/nixlog/1/raw
(cherry picked from commit 803b21959e)
2016-03-25 07:55:33 +01:00
Joachim Fasting
67fee4b26e hugs: fix build & meta fixups
Fix build by applying a patch from Arch Linux.
See https://hydra.nixos.org/build/33247205/log/raw

Meta fixups
- The license is actually 3-clause BSD license.
- Use HTTPS homepage
- Adopt the package
- Convert src.sha256 to base32

(cherry picked from commit 04bcb88332)
2016-03-25 00:45:35 +01:00
Pascal Wittmann
bf92ff9657 tpm-tools: fix build by applying debians patch 2016-03-24 22:20:10 +01:00
Evgeny Egorochkin
1695966348 virtualization/azure: update the scripts for image maintenance 2016-03-24 22:38:37 +02:00
Evgeny Egorochkin
13c0d0c86e azure: package sdk and vhd tools for go 2016-03-24 22:38:28 +02:00
Evgeny Egorochkin
cb69e43ad0 virtualization/azure: reorder WALA and SSHD 2016-03-24 22:38:18 +02:00
Evgeny Egorochkin
e86c38f9b3 virtualization/azure: turn off verbose logging 2016-03-24 22:38:08 +02:00
Evgeny Egorochkin
e32412ae22 virtualization/azure: make the image dynamic again since azure-cli upload bug is fixed 2016-03-24 22:37:58 +02:00
Evgeny Egorochkin
45f34ab410 virtualization/azure: take entropy handling code out of WALA and execute it before SSHD generates the host keys 2016-03-24 22:37:47 +02:00
Cole Mickens
c938ab4dc8 virtualization/azure: fixes
azure-agent: add option for verbose logging
azure-agent: disable ssh host key regeneration
azure-common: set verbose logging on
azure-image: increase size to 30GB
2016-03-24 22:37:36 +02:00
Evgeny Egorochkin
32f0c51ab7 azure-image: provide configuration.nix which allows nixos-rebuild to build a working generation and add helpful comments 2016-03-24 22:36:40 +02:00
Pascal Wittmann
523ce20887 jbig2enc: fix build 2016-03-24 20:21:57 +01:00
Joachim Fasting
d64126b0fe cadaver: fix build against newer versions of openssl
Apply patch from Arch Linux.

See https://hydra.nixos.org/build/33258957/nixlog/1/raw

(cherry picked from commit db6ae35bd9)
2016-03-24 19:06:46 +01:00
Pascal Wittmann
273cc85e69 ispc: fix build 2016-03-24 18:12:49 +01:00
Domen Kožar
5ea3dfcc6e bootstrapped-pip: support Python 2.6
(cherry picked from commit 9c274b4bef)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-24 15:45:07 +00:00
Adam Bell
0bac5850a2 pgadmin 1.20.0 -> 1.22.1
(cherry picked from commit 854b13dc00)

Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-24 15:44:54 +00:00
Domen Kožar
6486138750 linux: 4.4.5 -> 4.4.6 2016-03-24 15:44:54 +00:00
Domen Kožar
6df636feef springlobby: 0.195 -> 0.243 (fix build) 2016-03-24 15:44:54 +00:00
Mitchell Pleune
3cac2c5fc5 iodined service: wantedBy ip-up.target
When iodined tries to start before any interface other than loopback has an ip, iodined fails.
Wait for ip-up.target

The above is because of the following:
in iodined's code: src/common.c line 157
	the flag AI_ADDRCONFIG is passed as a flag to getaddrinfo.
	Iodine uses the function

		get_addr(char *host,
			int port,
			int addr_family,
			int flags,
			struct sockaddr_storage *out);

	to get address information via getaddrinfo().

	Within get_addr, the flag AI_ADDRCONFIG is forced.

	What this flag does, is cause getaddrinfo to return
	"Name or service not known" as an error explicitly if no ip
	has been assigned to the computer.
	see getaddrinfo(3)

Wait for an ip before starting iodined.

(cherry picked from commit 927aaecbcb)
2016-03-24 14:24:00 +01:00
Lluís Batlle i Rossell
9fb09319a3 octave: update to 4.0.1
bugfix release, they say.

(cherry picked from commit 1f8ffdde5b)
2016-03-24 13:55:49 +01:00
Lluís Batlle i Rossell
b522266b77 octave: parallel building and check.
I think those were not updated since 3.8.2. They worked for me. Let's see.

(cherry picked from commit 74ccfd690d)
2016-03-24 13:55:49 +01:00
Eelco Dolstra
4be705574a Fix 16.03 version number
The 77900 delta does not correspond to the 16.03-beta tag, so git
describe gives a different version than the NixOS version.
2016-03-24 13:48:16 +01:00
Lluís Batlle i Rossell
b314616134 Setting gfortran to gcc5. octave was crashing.
Otherwise, using imread() in octave threw:

/nix/store/4fvwfzwg58d7167an550xm1k6m7px443-octave-4.0.0/lib/octave/4.0.0/oct/x86_64-unknown-linux-gnu/__magick_read__.oct: failed to load: /nix/store/w7xr6frwffrl135v7vpxdwmnx8l95j5m-gfortran-4.9.3/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /nix/store/qlxkin1arzwbcpiny6amn8747wp8ndg7-graphicsmagick-1.3.21/lib/libGraphicsMagick++.so.11)

(this is from 16.03, although I push this to staging)

(cherry picked from commit a9d14e3452)
2016-03-24 10:58:32 +01:00
Eelco Dolstra
4be870bad3 stdenv-darwin: Fix dependency on bootstrapTools
Commit 2040a9ac57 changed the order of
$PATH elements, causing initialpath to appear after buildInputs. Thus
gnugrep ended up depending on bin/sh from bootstrapTools, rather than
from pkgs.bash. The fix is to provide pkgs.bash via buildInputs rather
than initialPath.

http://hydra.nixos.org/build/33276697
(cherry picked from commit 7fc24dfd21)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-24 09:04:17 +00:00
Vladimír Čunát
52604ad28d ensureNewerSourcesHook: fix problems with symlinks
Fixes #14043. Now symlinks themselves are touched instead of their
targets.

(cherry picked from commit ff60350eb9)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-24 09:04:17 +00:00
Tuomas Tynkkynen
97a7b595ce vc: Broken on i686
http://hydra.nixos.org/build/33122230/nixlog/1/raw =>

CMake Error at CMakeLists.txt:163 (message):
  Unsupported target architecture 'i686'.  No support_???.cpp file exists for
  this architecture.

(cherry picked from commit c58c1f3b50)
2016-03-24 02:23:48 +02:00
Nikolay Amiantov
99d1e66c4d elmPackages.elm-compiler: use old language-ecmascript
(cherry picked from commit f0187cb4c3)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 21:49:28 +00:00
Vladimír Čunát
76c266017d zopfli: disable parallel building
It was failing often, e.g.:
https://hydra.nixos.org/build/32101335/nixlog/1/raw

(cherry picked from commit b336ed89e6)
2016-03-23 20:21:18 +01:00
Graham Christensen
1a3edcdbda zam-plugins: sha256 changed
(cherry picked from commit 587ae0f63f)
2016-03-23 17:44:08 +01:00
Graham Christensen
796efbab1c vacuum: port to mkDerivation, add zlib for hydra failure
(cherry picked from commit aba56e7f59)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 16:06:59 +00:00
Graham Christensen
dc670e38fb codeblocks: ad libX11 build dependency to fix hydra build
http://hydra.nixos.org/build/33296816/nixlog/1
(cherry picked from commit 3f6023dd16)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 15:42:44 +00:00
Michael Raskin
6abce9522c gcl: gcc5 build: enforce old inline semantics for now; will be fixed in the next upstream release
(cherry picked from commit 9ed00ff086)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 15:41:45 +00:00
Joachim Fasting
9687ed9046 gcl: fix gcc5 build
Apply patch from Gentoo

(cherry picked from commit 27eac5313e)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 15:41:40 +00:00
Joachim Fasting
34455365b8 clisp: fix i686 build
Requires -falign-functions=4

See https://hydra.nixos.org/build/33256640/nixlog/1/raw

(cherry picked from commit 1972c5aa17)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 15:41:33 +00:00
Domen Kožar
b5d47a8cfe openimageio: 1.6.9 -> 1.6.11 (fixes build on i686) 2016-03-23 15:41:28 +00:00
Joachim Fasting
26a5e637b7 clementineFree: fix gcc5 build
Uses gcc switches that are no longer valid. Also strip
-Werror for good measure. See
https://hydra.nixos.org/build/33277865/nixlog/1/raw

(cherry picked from commit 72bcff71fe)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 15:41:28 +00:00
Domen Kožar
58153f164d Merge pull request #14160 from ttuegel/release-16.03
[release-16.03] KDE 5 fixes
2016-03-23 15:31:05 +00:00
Thomas Tuegel
cb9f989b18 kde5.l10n.sr: patch shebangs 2016-03-23 08:44:49 -05:00
Thomas Tuegel
e81ee2be29 kde5.l10n.nl: re-enable 2016-03-23 08:44:35 -05:00
Thomas Tuegel
3ff6d0492a kwin: allow CMake to set RPATH during build 2016-03-23 08:44:15 -05:00
Thomas Tuegel
b8db5897c7 calamares: mark broken 2016-03-23 08:44:05 -05:00
Ambroz Bizjak
d1afa1b0d1 opencsg: Fix build related to missing libX11 linking the example.
(cherry picked from commit 853d612c3f)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 12:58:23 +00:00
Graham Christensen
edca647059 slic3r: Add ModuleBuild to BuildInputs, due to http://hydra.nixos.org/build/33298227/nixlog/1
(cherry picked from commit 29cf3ecd78)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 12:54:15 +00:00
Octavian Cerna
257e0f78b0 hhvm: 3.6.0 -> 3.12.1
(cherry picked from commit 524310d29e)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 12:50:50 +00:00
Joachim Fasting
ae5901f97c arangodb: fix gcc5 build
https://hydra.nixos.org/build/33263863/nixlog/1/raw
(cherry picked from commit 037e815787)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 12:39:37 +00:00
Ludovic Courtès
7a1b8a3bdf Remove Guix.
(cherry picked from commit 5dab370d77)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 12:39:25 +00:00
Domen Kožar
709a2fd0c5 sync uids with master 2016-03-23 12:17:53 +00:00
Domen Kožar
0858ece1ad Pin hydra-www and hydra-queue-runner uids
hydra user is already pinned, this is needed due to
https://github.com/NixOS/nixpkgs/issues/14148
2016-03-23 12:15:29 +00:00
Tim Steinbach
ac79602d7d kernel: 3.14.63 -> 3.14.65
(cherry picked from commit 4274edbe40)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 11:33:20 +00:00
Tim Steinbach
80e93efbc9 kernel: 3.12.55 -> 3.12.57
(cherry picked from commit bf41deb889)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 11:33:12 +00:00
Tim Steinbach
fcb270e5f5 kernel: 3.10.99 -> 3.10.101
(cherry picked from commit 6f5f855a2e)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-23 11:33:00 +00:00
Charles Strahan
d664e30a14 go-1.6: fix the build
One of the test scripts dynamically creates and executes a bash script,
which attempts to use `/usr/bin/env bash`. This patches the file to
use the stdenv's shell instead.

Otherwise, the only way this could have worked was by building go_1_6
outside of the sandbox.

(cherry picked from commit 0547fd247f)
2016-03-23 00:28:44 -04:00
Joachim Fasting
531baf82ad cataclysm-dda: build recipe enhancements & gcc5 support
- Remove redundant platform check; meta.platforms is sufficient
- Use postPatch rather than override patchPhase entirely
- Strip -Werror
- Move build-time only dependencies to nativeBuildInputs

This also fixes gcc5 build, which fails due to a deprecated-declarations
warning (see https://hydra.nixos.org/build/33117020/nixlog/2/raw).

(cherry picked from commit 18b35bd741)
2016-03-23 01:44:55 +01:00
Joachim Fasting
77eaab7d6c criu: fix build
Would fail due to -Werror; see
https://hydra.nixos.org/build/33217086/nixlog/2/raw

(cherry picked from commit 3e1ec2b663)
2016-03-23 00:33:52 +01:00
Domen Kožar
ca6ac920ed fix perl modules for i3 2016-03-22 23:13:40 +00:00
Domen Kožar
4452a68425 remove elrangR15 and riak 1.3.0 as they're outdated 2016-03-22 21:39:38 +00:00
Kevin Cox
723989b6c4 mesos: Patch more executable paths.
(cherry picked from commit 8b7adf808e)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-22 21:28:27 +00:00
Kevin Cox
7e0c19c1a2 Mesos: 26.0 -> 27.1
(cherry picked from commit 2843d83905)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-22 21:28:11 +00:00
Domen Kožar
f115f87bb5 nix-exec: use stable Nix
(cherry picked from commit 59ba0fb295)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-22 21:24:34 +00:00
Domen Kožar
15761b0520 flow: 0.18.1 -> 0.22.1 2016-03-22 21:21:53 +00:00
Domen Kožar
5d21d6a8a6 perl: bind some CGI 2016-03-22 21:18:37 +00:00
Domen Kožar
0e41e8bbf0 xen: use gcc49 2016-03-22 21:04:30 +00:00
Domen Kožar
b4d6442660 cmis: fix build with gcc5 2016-03-22 20:59:25 +00:00
Pascal Wittmann
637e3b0b43 mailutils: fix build by using gcc49 2016-03-22 20:52:49 +01:00
Pascal Wittmann
5cdd170af6 zynaddsubfx: fix build
see #13559
2016-03-22 19:09:31 +01:00
Pascal Wittmann
d82e740f9b itk: ping gcc version to 4.9 2016-03-22 17:58:58 +01:00
Joachim Fasting
d5a73df00b archimedes: pin gcc to version 4.9
https://hydra.nixos.org/build/33241446/nixlog/1/raw
(cherry picked from commit 92261129ea)
2016-03-22 15:43:45 +01:00
Joachim Fasting
e10b2fbfb5 afterstep: pin gcc to version 4.9
See https://hydra.nixos.org/build/33238876/nixlog/1/raw

(cherry picked from commit aa4d438107)
2016-03-22 15:43:44 +01:00
Lluís Batlle i Rossell
c431588cd2 Making ffmpeg friendly for arm. 2016-03-22 15:01:18 +01:00
Lluís Batlle i Rossell
d1a8d192a5 Update linux raspberry-pi to 4.1.y.
I could boot it in pi2; I don't know if I needed new
firmware files in /boot.
2016-03-22 15:01:18 +01:00
Lluís Batlle i Rossell
b08b468c2b Fixing vxl build with gcc 5. 2016-03-22 14:42:35 +01:00
Domen Kožar
2e53a8dd7f perl-Net-SMTP-SSL: 1.01 -> 1.03 2016-03-21 21:46:30 +00:00
Pascal Wittmann
a699a188b7 bviplus: fix build
See #13559
2016-03-21 21:54:42 +01:00
Pascal Wittmann
2f666306aa atftp: fix build by using gcc49
See #13559
2016-03-21 21:46:14 +01:00
Pascal Wittmann
98c5bb1603 avarice: fix build by using gcc49
See #13559
2016-03-21 21:40:40 +01:00
Pascal Wittmann
a33efc99b4 amuleGui: fix build
See #13559
2016-03-21 21:29:58 +01:00
Franz Pletz
15d42c3605 nss: 3.22.2 -> 3.23 (security)
Fixes CVE-2016-1950.

See: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.23_release_notes

(cherry picked from commit 1a9b272c09)
2016-03-21 21:29:24 +01:00
Joachim Fasting
2746f3a854 haka: fix build on gcc5
See https://hydra.nixos.org/build/33296799/nixlog/1/raw

(cherry picked from commit c1901038c8)
2016-03-21 19:12:36 +01:00
Graham Christensen
01f2389e2d squid: 3.5.1 -> 3.5.15 for CVE-2016-2571
(cherry picked from commit 75c90fff39)
2016-03-21 18:49:19 +01:00
aszlig
8c2fa806b8 google-chrome: Fix fetching upstream binary
Commit aa097946d2 only fixed evaluation.

Ssince 37dbd62 however, the fetchurl call is already implied so just
changing the path will still result in fetchurl (fetchurl ...), so let's
drop the outer fetchurl.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @msteen, @benley
(cherry picked from commit 4d305102e0)
2016-03-21 16:18:35 +01:00
Tim Steinbach
dc3073b52f kernel: 3.18.27 -> 3.18.29 (close #14057)
(cherry picked from commit 6476075ccf)
2016-03-21 12:42:52 +01:00
Tim Steinbach
12329a24de kernel: 4.1.17 -> 4.1.20 (close #14058)
(cherry picked from commit 379709b404)
2016-03-21 12:42:32 +01:00
Vladimír Čunát
5c04d08990 chrome: fix evaluation after 6041cfe2af
(cherry picked from commit aa097946d2)
2016-03-21 12:05:49 +01:00
Vladimír Čunát
4515fe3934 Merge #14075: backport php security updates 2016-03-21 11:59:57 +01:00
aszlig
4b054488bd nixos/tests/chromium: Propagate "system" to pkgs
Assigning the channelMap by the function attrset argument at the
top-level of the test expression file may reference a different
architecture than we need for the tests.

So if we get the pkgs attribute by auto-calling, this will lead to test
failure because we have a different architecture for the test than for
the browser.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit e047d79279)
2016-03-21 04:21:29 +01:00
aszlig
274a7cf7ee chromium: Fix comment of upstream-info.nix
As of 6041cfe, the upstream-info.nix (back then it was called
sources.nix) is no longer in the source/ subdirectory, so we need to fix
that comment to say that the file is autogenerated from update.sh in the
*same* directory.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 5ebd629c6f)
2016-03-21 04:21:29 +01:00
aszlig
b7aadc752e nixos/tests/chromium: Allow overriding channel map
This has been the case before e45c211, but it turns out that it's very
useful to override the channel packages so we can run tests with
different Chromium build options.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 3bd71b135b)
2016-03-21 04:21:28 +01:00
aszlig
6f4d27f60f chromium: Revert working around --sysroot filter
This reverts commit 5979946c41.

I have tested this by building against the stable version of Chromium
and it seems to compile just fine, so it doesn't seem to be needed
anymore.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit fb65a0048a)
2016-03-21 04:21:27 +01:00
aszlig
5e3cbd4856 chromium: Show status about precompiling .py files
Only a aesthetics thingy, but also corrects the comment, because we're
essentially precompiling .py files, NOT the .pyc files (the latter are
the results).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 1f497204f7)
2016-03-21 04:21:26 +01:00
aszlig
7dcc25befe chromium: Move source/default.nix into common.nix
This addresses #12794 so that we now have only a single tarball where we
base our build on instead of splitting the source into different outputs
first and then reference the outputs.

The reason I did this in the first place is that we previously built the
sandbox as a different derivation and unpacking the whole source tree
just for building the sandbox was a bit too much.

As we now have namespaces sandbox built in by default we no longer have
that derivation anymore. It still might come up however if we want to
build NaCl as a separate derivation (see #8560), but splitting the
source code into things only NaCl might require is already too much work
and doesn't weight out the benefits.

Another issue with the source splitup is that Hydra now has an output
limit for non-fixed-output derivations which we're already hitting.

Tested the build against the stable channel and it went well, but I
haven't tested running the browser.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 4f981b4f84)
2016-03-21 04:21:25 +01:00
aszlig
a7fea3ef54 chromium: Move fetchurl calls to getChannel
We always do something like "fetchurl channelProduct", so let's move it
to getChannel directly so we can avoid those fetchurl calls all over the
place.

Also, we can still access subattributes from the fetchurl call if we
need to, so there really is no need to expose the product's attributes
directly.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 37dbd62a83)
2016-03-21 04:21:24 +01:00
aszlig
6334932eb7 chromium/plugins: Break long line
Yes, I know I'm a bit nitpicky, but lines >80 chars are very ugly if you
have two windows side-by-side.

Thus no feature changes here.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 4984a2bf76)
2016-03-21 04:21:24 +01:00
aszlig
bfec68ed10 chromium/common.nix: Remove unreferenced attrs
We're going to refactor things anyway, so let's first get rid of
everything that's not used anymore.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 985df3900d)
2016-03-21 04:21:23 +01:00
aszlig
5d47e25dc3 chromium/source: Move update.nix to parent dir
We now should have only the default.nix left in the source directory and
we can start to factor out the pieces into the Chromium main derivation
attributes.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 6041cfe2af)
2016-03-21 04:21:22 +01:00
aszlig
8f211997eb chromium: Rename sources.nix to upstream-info.nix
The "sources.nix" also contains information about where to get binary
packages, so calling it "upstream-info.nix" fits better in terms of
naming.

Also, we're moving it away from the sources dir, because the latter will
soon vanish.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 2d9a604907)
2016-03-21 04:21:21 +01:00
aszlig
3c72d75922 chromium/source: Move patches into its own subdir
We're going to reference the patches in the Chromium main build rather
than applying it to the sources. So as a first step, this should keep
the patches away from the "source" subdirectory so we can make it flat.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit d6b11ed722)
2016-03-21 04:21:20 +01:00
Franz Pletz
d1b7c0ea70 bind: 9.10.3 -> 9.10.3-P4 (security)
Fixes:

  * CVE-2016-1285: https://kb.isc.org/article/AA-01352/
  * CVE-2016-1286: https://kb.isc.org/article/AA-01353/

(cherry picked from commit 404a699a20)
2016-03-21 04:05:22 +01:00
Franz Pletz
51c88123b4 lxc: Add patch to fix bash completion
Fixes #9616.

(cherry picked from commit b33453bd98)
2016-03-21 03:10:52 +01:00
Franz Pletz
b79b512ef0 lxc: 1.1.4 -> 1.1.5
(cherry picked from commit 4d0d1124ae)
2016-03-21 03:10:50 +01:00
Peter Simons
cc86145ed5 Merge pull request #14082 from neilmayhew/fix/hardlink
hardlink: Fix Mac build error
2016-03-20 17:25:47 +01:00
Joachim Fasting
23445ad23e ldm: fix build
There were two problems:
- because buildPhase is specified directly, preBuild ends up never being
  executed; and
- the source is missing a header, resulting in an undefined reference error

(cherry picked from commit f59998055b)
2016-03-20 16:59:19 +01:00
Joachim Fasting
8e34256a80 nixos: disable the clfswm window manager module
(cherry picked from commit e891e50946)
2016-03-20 16:59:18 +01:00
Joachim Fasting
e1bb0cdf4a clfswm: mark as broken
This package has been broken for quite a long time.  I attempted
to fix it, to no avail.

See also: https://hydra.nixos.org/build/33498133/nixlog/2/raw

(cherry picked from commit 9ae0e6633e)
2016-03-20 16:59:18 +01:00
Joachim Fasting
5d98a082e5 lp_solve: mark as broken
See https://hydra.nixos.org/build/32393768/log/raw

(cherry picked from commit 649c2cd027)
2016-03-20 16:59:18 +01:00
Sander van der Burg
8cd4e77209 dysnomia: bump to version 0.5.1
(cherry picked from commit 7ed3dc6cfc)
2016-03-20 15:23:31 +00:00
Greyson
c7eba63f29 unifi: 4.7.6 -> 4.8.14
Includes upstream URL relocation.

(cherry picked from commit e379e4aa38)

Old tarball is missing.
2016-03-20 05:58:52 +01:00
Neil Mayhew
0fd813b299 hardlink: Fix Mac build error
Use $CC instead of hardcoded gcc which isn't used on Mac
2016-03-19 21:41:27 -06:00
Lluís Batlle i Rossell
50a2e74991 Missing path in prev commit
(cherry picked from commit 9b8b143c99)
2016-03-20 00:47:40 +01:00
Lluís Batlle i Rossell
34c3b3f27f Fixing icu for ARM with a patch from openembedded.
It failed with an "internal error".

(cherry picked from commit e6e7de082d)
2016-03-20 00:43:02 +01:00
Joachim Fasting
8dfd8b83d4 nano: 2.5.0 -> 2.5.3
Also move build-time dependencies to nativeBuildInputs

(cherry picked from commit d43578b599)
2016-03-19 22:56:14 +01:00
Joachim Fasting
413c01a0f8 ipxe: fix gcc5 build
gcc5 enables additional warnings, causing the build to fail with
-Werror.  The build could be fixed by specifically disabling errors
for `discarded-array-qualifiers` and `logical-not-parentheses` warnings,
but simply passing -Wno-error is more future proof.

See https://hydra.nixos.org/build/33274006/nixlog/1/raw

(cherry picked from commit 8dfb8d06f0)
2016-03-19 22:47:29 +01:00
lukasepple
7cec20c775 torbrowser: 5.5.3 -> 5.5.4
(cherry picked from commit 1dbf51416a)
2016-03-19 22:44:55 +01:00
Franz Pletz
fe3d97ea6b pythonPackages.libvirt: 1.3.0 -> 1.3.2
(cherry picked from commit b887b16a2c)
2016-03-19 17:37:01 +01:00
Franz Pletz
c5e6538869 pythonPackages.searx: 0.7.0 -> 0.8.1
The old version was broken.

(cherry picked from commit 87012e7321)
2016-03-19 16:56:37 +01:00
Franz Pletz
39a87f331c libvirt: Add fpletz as maintainer
(cherry picked from commit e312a34775)
2016-03-19 16:56:37 +01:00
Franz Pletz
2e5f582da8 libvirt: 1.3.0 -> 1.3.2
Fixes CVE-2015-5313.

(cherry picked from commit ff0cfc160f)
2016-03-19 16:56:37 +01:00
Peter Simons
89284c21bc wrap-gapps-hook.sh: fix double inclusion guard
The simple "return" would not override the non-zero error code set by the
preceding test command, therefore aborting scripts running with "set -e".

(cherry picked from commit af81505c00)
2016-03-19 15:58:35 +01:00
Peter Simons
cbcfaaa006 gnupg-2.1: add myself as maintainer plus minor cosmetic
(cherry picked from commit ab450f8477)
2016-03-19 15:58:12 +01:00
Peter Simons
9f75d283c1 gnupg-2.1: drop unnecessary autoreconf hook from build
This change also prevents gnupg 2.1 from considering itself as an
unstable development version, which it is not.

(cherry picked from commit eadf39a16c)
2016-03-19 15:58:01 +01:00
Yann Hodique
eacd290c33 git: 2.7.3 -> 2.7.4
(cherry picked from commit 31c317e09e)
2016-03-19 15:56:41 +01:00
Robert Scott
b07d941c8e php: 5.6.18 -> 5.6.19 (security update) 2016-03-19 13:31:14 +00:00
Robert Scott
a572a2f291 php: 5.5.32 -> 5.5.33 (security update) 2016-03-19 13:31:14 +00:00
Pierre Dal-Pra
f79a9ca3c0 docker: 1.10.0 -> 1.10.3
(cherry picked from commit d97805ccd0)
2016-03-19 12:50:21 +01:00
Joachim Fasting
ef8bb2e6e5 nixos/tests: fix docker test
The docker service is socket activated by default; thus,
`waitForUnit("docker.service")` before any docker command causes the
unit test to time out.

Instead, do `waitForUnit("sockets.target")` to ensure that sockets are
setup before running docker commands.

(cherry picked from commit ece457c62f)
2016-03-19 12:50:21 +01:00
Joachim Fasting
5dc086df29 flexcpp: patch all shebangs & fix installation
Using the original build recipe would result in an output
without the actual flexcpp binary.

(cherry picked from commit a8556bd5d7)
2016-03-19 12:50:21 +01:00
Joachim Fasting
eaeb0d8073 flexcpp: 2.03.00 -> 2.04.00
(cherry picked from commit dd177e62e3)
2016-03-19 12:50:21 +01:00
Joachim Fasting
684a291c66 bobcat: fix installation
Another hotfix for eae059b0b6
(I kind of jumped the gun on this one ...)

The `build install` command takes a positional argument
indicating which components to install; without it, nothing
is installed and the build fails to create the store output.

(cherry picked from commit 8e359b2e21)
2016-03-19 12:50:21 +01:00
Joachim Fasting
28625e932f bobcat: patch all shebangs
Hotfix for eae059b0b6

Not really a regression, but it turns out that the man page
target requires shebang patching as well.

(cherry picked from commit 3704901dc8)
2016-03-19 12:50:21 +01:00
Joachim Fasting
a0e49374df bobcat: 4.00.00 -> 4.01.04
Appears to fix https://hydra.nixos.org/build/33157535/nixlog/1/raw

(cherry picked from commit eae059b0b6)
2016-03-19 12:50:21 +01:00
Joachim Fasting
8be69850ab manual: fix meta.description in ruby example expression
Noted by @namore on github

(cherry picked from commit 49dc7e2d61)
2016-03-19 12:50:21 +01:00
Lluís Batlle i Rossell
d1cd035a3b Updating ts to 0.7.6.
(cherry picked from commit 41c05b47a0)
2016-03-19 12:24:27 +01:00
Sander van der Burg
38b79d7686 fetchbower: quote parameter to prevent ambigious redirects if version specifiers have wildcards
(cherry picked from commit 27e23486bb)
2016-03-18 12:06:37 +00:00
Peter Simons
d505f470d3 nixos/tests/firewall.nix: ping now succeeds in the firewall's default configuration
(cherry picked from commit c523aeffde)
2016-03-18 11:44:50 +01:00
Mathias Schreck
06115a3907 nodejs: 5.8.0 -> 5.9.0
(cherry picked from commit cd38a38316)
2016-03-18 10:10:15 +00:00
Peter Simons
1a07877b5c Set networking.firewall.allowPing = true by default.
This patch fixes https://github.com/NixOS/nixpkgs/issues/12927.

It would be great to configure good rate-limiting defaults for this via
/proc/sys/net/ipv4/icmp_ratelimit and /proc/sys/net/ipv6/icmp/ratelimit,
too, but I didn't since I don't know what a "good default" would be.

(cherry picked from commit a0ab4587b7)
2016-03-18 08:25:35 +01:00
Peter Simons
cfc1b69bed ghcjs: synchronize state with master @ daa03b0229 2016-03-18 08:23:31 +01:00
Peter Simons
014223bd00 cabal2nix: synchronize state with master @ daa03b0229 2016-03-18 08:23:31 +01:00
Peter Simons
26b6957daf Haskell: synchronize state with master @ daa03b0229 2016-03-18 08:23:30 +01:00
Tuomas Tynkkynen
fd4cdf183a ARM stdenv: Update bootstrap tools
For some reason, the current bootstrap tools fail to build gettext:

init2.c:37: MPFR assertion failed: (64 - 0) == ((64 - 0)/8) * 8 && sizeof(mp_limb_t) == ((64 - 0)/8)
libxml/xpath.c: In function 'xmlXPathCompPathExpr':
libxml/xpath.c:10627:1: internal compiler error: Aborted
 xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[5]: *** [libxml/libxml_rpl_la-xpath.lo] Error 1

I didn't investigate why this is the case but rebuilding the bootstrap
tools seems to help.

I used this old-ish WIP branch https://github.com/dezgeg/nixpkgs/commits/arm-bootstrap
since latest master has even more problems with cross-compiling anything.
(I will eventually push this stuff and make the ARM bootstraps build on hydra.)

(cherry picked from commit cdef1cdd38)
2016-03-18 03:17:45 +02:00
Robert Helgesson
8e11767d02 perl-Hook-LexWrap: 0.24 -> 0.25
Also add meta section.

(cherry picked from commit b9f7bb15e5)
2016-03-17 22:35:53 +01:00
Tanner Doshier
f6bec34f6f tarsnap: 1.0.36.1 -> 1.0.37
(cherry picked from commit ab1008014d)
2016-03-17 15:08:06 +01:00
Joachim Fasting
f95d5d0e86 dnscrypt-proxy service: documentation fixes
- fix `enable` option description
  using `mkEnableOption longDescription` is incorrect; override
  `description` instead
- additional details for proper usage of the service, including
  an example of the recommended configuration
- clarify `localAddress` option description
- clarify `localPort` option description
- clarify `customResolver` option description

(cherry picked from commit a0663e3709)
2016-03-17 15:07:44 +01:00
Joachim Fasting
d12bc4ffa1 electrum: 2.6.1 -> 2.6.2
(cherry picked from commit 1b3d974c98)
2016-03-17 15:06:12 +01:00
Joachim Fasting
9379081695 electrum: 2.5.4 -> 2.6.1
(cherry picked from commit 1ff8a6b6c4)
2016-03-17 15:06:11 +01:00
Domen Kožar
12c908ec5b nixUnstable: point to latest 1.12pre
(cherry picked from commit 8e398a88a1)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-17 13:03:50 +00:00
Domen Kožar
baf7f98b45 pythonPackages.cryptography: 1.1.1 -> 1.2.3 (fix openssl build) 2016-03-17 13:01:23 +00:00
Domen Kožar
00793f0756 nghttp2: fix url
(cherry picked from commit 826eeec841)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-17 10:56:46 +00:00
Vladimír Čunát
3fb27d83ab firefox: disable optimization hack (i686-linux)
It seems to build fine even without it, so the original reason doesn't
hold anymore:
https://github.com/NixOS/nixpkgs/commit/f4b5671b0d9e8904a4ad6b3fd85268

(cherry picked from commit 9be0c7d463)
2016-03-17 09:28:04 +01:00
Franz Pletz
c29ebc60f5 gitlab service: Remove emailFrom option
Not being used anymore. Use `services.gitlab.extraConfig.gitlab.email_from`
instead.

(cherry picked from commit 38579a1cc9)
2016-03-17 04:17:55 +01:00
Franz Pletz
72a9c3c018 gitlab: 8.5.5 -> 8.5.7
(cherry picked from commit 1cd99b1a48)
2016-03-17 03:39:48 +01:00
Peter Simons
88a20de886 git: update from version 2.7.1 to 2.7.3 2016-03-16 21:37:31 +01:00
Vladimír Čunát
066d56507e Revert "nvidia: 358.16 -> 361.28" to fix #13942
This reverts commit e0fe8cf204.
Befor updating we need to fixup problems related to GLVND transition.

(cherry picked from commit a1de225913)
2016-03-16 20:09:04 +01:00
Sander van der Burg
2e4c131749 disnixos: bump to version 0.4.1
(cherry picked from commit 0f46200f26)
2016-03-16 13:29:38 +00:00
Nikolay Amiantov
e4662de8c8 cups service: fix gutenprint update when there's no printers
(cherry picked from commit 851af5e888)
2016-03-15 21:47:18 +03:00
Eelco Dolstra
1010ced00c Remove setting non-existent sysctl options 2016-03-15 17:42:12 +01:00
Eelco Dolstra
ac18b492d5 NixOS release: Don't depend on chromium
This is failing because it exceeds the hydra-queue-runner size limit.

http://hydra.nixos.org/build/33303819
(cherry picked from commit 3135af2511)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-15 15:20:05 +00:00
Eelco Dolstra
5f2226ddc7 Fix NixOS tested job
(cherry picked from commit 55e71f45cc)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-15 15:19:56 +00:00
Eelco Dolstra
4066f15504 Build most ISOs/OVAs for x86_64-linux only
Probably not many people care about i686-linux any more, but building
all these images is fairly expensive (e.g. in the worst case, every
Nixpkgs commit would trigger a few gigabytes of uploads to S3).

(cherry picked from commit daa093bf3c)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-15 15:19:37 +00:00
Eelco Dolstra
d24e4eef6c Combine ISO generation steps
This folds adding hydra-build-products into the actual ISO generation,
preventing an unnecessary download of the ISO.

(cherry picked from commit 10293b87a9)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-15 15:18:30 +00:00
Eelco Dolstra
fa4b560533 Combine OVA generation steps
Previously this was done in three derivations (one to build the raw
disk image, one to convert to OVA, one to add a hydra-build-products
file). Now it's done in one step to reduce the amount of copying
to/from S3. In particular, not uploading the raw disk image prevents
us from hitting hydra-queue-runner's size limit of 2 GiB.

(cherry picked from commit 5cc7bcda30)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-15 15:18:25 +00:00
Joachim Fasting
e3153cc3a5 torbrowser: 5.5.2 -> 5.5.3
(cherry picked from commit 665e79324e)
2016-03-15 14:55:47 +01:00
Aneesh Agrawal
0b5026fe95 openssh: 7.2p1 -> 7.2p2 for OSA x11fwd.adv
Fixes OpenSSH Security Advisory x11fwd.adv, which is available at
http://www.openssh.com/txt/x11fwd.adv.

(cherry picked from commit e5ca25eb7a)
2016-03-15 00:39:44 +01:00
Aneesh Agrawal
848855a5ab openssh: update GSSAPI patch to openssh 7.2
(cherry picked from commit ce74aac132)
2016-03-15 00:39:43 +01:00
Aneesh Agrawal
448f8b0451 openssh: decouple gssapi patch from kerberos
The GSSAPI patch is useful but maintained by Debian, not upstream, and
can be slow to update. To avoid breaking openssh_with_kerberos when
the openssh version is bumped but the GSSAPI patch has not been updated,
don't enable the GSSAPI patch implicitly but require it to be explicitly
enabled.

(cherry picked from commit 9e86984fe0)
2016-03-15 00:39:43 +01:00
Eelco Dolstra
4d9f98face openssh: Fix build
(cherry picked from commit cc71804ab0)
2016-03-14 23:22:07 +01:00
Aneesh Agrawal
2d683367ed openssh: 7.1p2 -> 7.2p1
(cherry picked from commit 7f8d50b443)
2016-03-14 23:22:07 +01:00
Graham Christensen
1f6b9b333d ilbc: extract-cfile.awk has fallen off the internet
Close #13923.

(cherry picked from commit 2aae2af845)
2016-03-14 21:42:53 +01:00
Graham Christensen
331e442eb7 graphite2: security update 1.2.4 -> 1.3.6 (close #13918)
CVE-2016-1977 CVE-2016-2790 CVE-2016-2791 CVE-2016-2792
CVE-2016-2793 CVE-2016-2794 CVE-2016-2795 CVE-2016-2796
CVE-2016-2797 CVE-2016-2798 CVE-2016-2799 CVE-2016-2800
CVE-2016-2801 CVE-2016-2802

vcunat fixed the tarball name and redirected to github.

(cherry picked from commit c310cb9e46)
2016-03-14 21:31:42 +01:00
Graham Christensen
7bcbf598ae eduke32: 20150420-5160 moved to the old releases directory
Close #13922.

(cherry picked from commit f165334492)
2016-03-14 20:48:41 +01:00
Graham Christensen
fd3f80cf37 d4x: Update download URL to fedora, d4k.krasu.ru no longer exists
(cherry picked from commit 2c8cb42c71)
2016-03-14 20:48:38 +01:00
Eelco Dolstra
04e07c8db2 pull request #13919 from grahamc/samba
samba: 4.3.1 -> 4.3.6 for CVE-2015-7560 CVE-2016-0771
(cherry picked from commit 06bebedf66)
2016-03-14 20:12:22 +01:00
Vladimír Čunát
d9b70033a6 tevent, ldb: security updates needed for samba
I managed to find no news or changelog on these,
so it's rather a black box to me, but it's clear that (some) bumps
were required for samba.

(cherry picked from commit 530214321d)
2016-03-14 20:12:21 +01:00
Philipp Volguine
4b0fceda0f Gitlab package version 8.5.1 -> 8.5.5
-had to bump the versions on a few gem dependencies

(cherry picked from commit a2424fffd3)
2016-03-14 16:41:02 +01:00
Philipp Volguine
e2c85dc185 gitlab service startup fix
-gitlab-sidekiq was being started with a misspelled argument name
 which caused the mailer queue to never run and never send mail

(cherry picked from commit 10198b586e)
2016-03-14 16:36:27 +01:00
Joachim Fasting
fc2a19eeb4 sway: fix build
Building the manual requires docbook_xsl; in sandboxed environments,
the build would fail due to being unable to download missing docbook
resources.

Also include some minor improvements to the build recipe:
- use fetchFromGitHub
- move build-time dependencies to nativeBuildInputs

xref: https://github.com/NixOS/nixpkgs/pull/13900
(cherry picked from commit 868082f616)
2016-03-14 15:56:56 +01:00
Joachim Fasting
a2273f6125 transmission: build transmission-cli
As of version 2.92, transmission-cli is no longer built by default (it
is deprecated).  This breaks the bittorrent vmtest.  For now, explicitly
enable the cli.

(cherry picked from commit 4393e6f619)
2016-03-14 11:27:18 +01:00
Joel Moberg
8065ea839d avahi: fix test
Reflects module changes made by cdd7310a50

(cherry picked from commit 75e96d2c30)
2016-03-14 11:26:57 +01:00
宋文武
fe5d858fe0 drop my maintainership (close #13881)
(cherry picked from commit 93feb5d115)
2016-03-13 18:39:32 +01:00
Vincent Laporte
f960683794 pixman: remove legacy patches
(cherry picked from commit b1801168e3)
https://github.com/NixOS/nixpkgs/pull/13579#issuecomment-195994082
2016-03-13 18:15:28 +01:00
Frederik Rietdijk
a7c64d5df6 Merge pull request #13888 from Beauhurst/r16.03_django_updates
django security updates (backport to release-16.03)
2016-03-13 10:54:03 -04:00
Robert Scott
b992c1b19b django: 1.9.3 -> 1.9.4, 1.8.10 -> 1.8.11 2016-03-13 14:48:52 +00:00
aszlig
8b39b045d8 chromium/update.sh: Allow to be called out-of-tree
Changing the working directory to
pkgs/applications/networking/browsers/chromium is a bit annoying, so
let's make sure the script can be called from anywhere.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit a62f100ec3)
2016-03-13 12:33:09 +01:00
aszlig
84e8aa8105 chromium/common: Shut up about precompiling .pyc's
The errors are completely non-fatal and only cause a particular file to
be not precompiled. Unfortunately this can lead to confusion to whether
these errors are real errors or not, so let's shut it up completely
because they're *not* real errors.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit f7e2171937)
2016-03-13 12:33:09 +01:00
Graham Christensen
7d734df56d chromium: 49.0.2626.75 -> 50.0.2661.26 for CVE-2016-1643 CVE-2016-1644 CVE-2016-1645
(cherry picked from commit e54434751a)
2016-03-13 12:33:08 +01:00
Joachim Fasting
42079b64d5 fstar: 2016-01-12 -> 0.9.2.0
FStar has been broken for a while, due to its regression test failing.
Bump to the latest release, which is newer than the previous rev.

(cherry picked from commit f82a46cf58)
2016-03-13 11:31:17 +01:00
Joachim Fasting
ae349e1d43 abook: fix build with gcc5
(cherry picked from commit d4ae8b68cb)
2016-03-13 11:30:47 +01:00
Sheena Artrip
8df9058d46 spotify: 1.0.23.93 -> 1.0.25.127
(cherry picked from commit ebc5b6e1ad)
2016-03-13 06:00:31 +01:00
Svein Ove Aas
fbf59749d3 simp_le: 2016-01-09 -> 2016-02-06
(cherry picked from commit 4b998c1f94)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-12 20:43:28 +00:00
tg(x)
d54510bb57 pax-utils: 1.1.1 -> 1.1.6
(cherry picked from commit 184aca3907)
2016-03-12 17:49:54 +01:00
Domen Kožar
dbcb901036 fix installer tests #13559 2016-03-11 16:08:27 +00:00
Eelco Dolstra
5456a2d030 Move testBootstrapTools to make-bootstrap-tools.nix
(cherry picked from commit 639d7409f2)
2016-03-11 16:24:07 +01:00
zimbatm
bb4f9c93dc make-wrapper.sh: add an --unset argument
`--set FOO ""` is not strictly equivalent to `--unset FOO`. In the former case
the environment variable still exists with an empty string as a value.

(cherry picked from commit 5e5494a852)
2016-03-11 16:23:55 +01:00
Vladimír Čunát
207882e82f make-bootstrap-tools: fix #13629: glibc problems
On x86_64-linux glibc started to use linker scripts more extensively.

(cherry picked from commit aa564c9ed0)
(cherry picked from commit 5702bc3b55)
2016-03-11 16:21:17 +01:00
Eelco Dolstra
ad6fee913d Don't apply patchelf to itself
Since patchelf 0.8 rewrites binaries in place, this causes a bus
error.

(cherry picked from commit a6d19c28f1)
2016-03-11 16:21:01 +01:00
Eelco Dolstra
11fc5010e4 go-1.4: Update binutils patch to handle i686-linux
http://hydra.nixos.org/build/32872391
(cherry picked from commit a11a281071)
2016-03-11 16:20:24 +01:00
Eelco Dolstra
f7eb5d7419 librdf_redland: Fix dependency on libraptor2
This broke soprano/nepomuk.

http://hydra.nixos.org/build/32556702
(cherry picked from commit e9f1fa8bb0)
2016-03-11 16:20:19 +01:00
Eelco Dolstra
c4fc753068 go-1.4: Fix build against binutils 2.26
The go linker barfed on the new relocation types emitted by binutils
2.26.

https://github.com/golang/go/issues/13114
http://hydra.nixos.org/build/32554876
(cherry picked from commit ff69fc6fb9)
2016-03-11 16:20:16 +01:00
Eelco Dolstra
a77785096c binutils: Apply upstream bug fix
This broke syslinux: http://hydra.nixos.org/build/32430411/nixlog/89/raw

(cherry picked from commit 89742e6b05)
2016-03-11 16:20:09 +01:00
Eelco Dolstra
07b375e361 glibc: Enable separate debug symbols
The importance of glibc makes it worthwhile to provide debug
symbols. However, this revealed an issue with separateDebugInfo: it
was indiscriminately adding --build-id to all ld invocations, while in
fact it should only do that for final links. Glibc also uses non-final
("relocatable") links, leading to subsequent failure to apply a build
ID ("Cannot create .note.gnu.build-id section, --build-id
ignored"). So now ld-wrapper.sh only passes --build-id for final
links.

(cherry picked from commit d5bb6a1f9c)
2016-03-11 16:19:00 +01:00
Eelco Dolstra
0c00ca14ed separateDebugInfo: Compress debug sections at compile/link time
(cherry picked from commit 69a337edae)
2016-03-11 16:18:56 +01:00
Eelco Dolstra
e9f847ea54 stdenv-linux: Ensure binutils comes before bootstrapTools in $PATH
Otherwise, when building glibc and other packages, the "strip" from
bootstrapTools is used, which doesn't recognise some tags produced by
the newer "ld" from binutils.

(cherry picked from commit 2040a9ac57)
2016-03-11 16:18:49 +01:00
Eelco Dolstra
9bafea49ed stdenv-linux: Avoid building m4/bison twice
(cherry picked from commit 559ecc9212)
2016-03-11 16:18:45 +01:00
Eelco Dolstra
a33faa6919 binutils: 2.23.1 -> 2.26
There has been an abortive attempt to upgrade binutils in the past
(see #909). Since we can't stay stuck at 2.23.1 forever, let's try
again.

(cherry picked from commit 817145ebbc)
2016-03-11 16:18:41 +01:00
Eelco Dolstra
a3750f7803 perlPackages: Fix some Perl 5.22 breakage
Most was caused by the removal of CGI and Module::Build from Perl.

(cherry picked from commit e9a81e41ed)
2016-03-11 16:18:04 +01:00
Eelco Dolstra
fda621baec perl: Make 5.22 the default
(cherry picked from commit a85ba820a4)
2016-03-11 16:17:59 +01:00
Eelco Dolstra
4807161a4d m2crypto: 0.21.1 -> 0.23.0
The previous version broke because it required SSLv2 support in OpenSSL:

ImportError: /nix/store/c0z7qlycaa2jhqjq0v9vy3j4nw4layw2-python2.7-m2crypto-0.21.1/lib/python2.7/site-packages/M2Crypto/__m2crypto.so: undefined symbol: SSLv2_method
(cherry picked from commit 49f23a6028)
2016-03-11 16:16:33 +01:00
Eelco Dolstra
3f65ad28be perl-packages.nix: Remove unnecessary variable quotations
(cherry picked from commit 4e906f9fb2)
2016-03-11 16:16:19 +01:00
Eelco Dolstra
856fa7f3f2 LWP::Protocol::https: Fix SSL cert handling
We lost this in 9f358f809d. Updated to
use /etc/ssl/certs/ca-certificates.crt if it exists and SSL_CERT_FILE
is not set.

(cherry picked from commit bd7f379a3f)
2016-03-11 16:16:07 +01:00
Eelco Dolstra
ac22e8344d Remove unmaintained gnupdate script
(cherry picked from commit 50e1e69c0a)
2016-03-11 16:16:00 +01:00
Eelco Dolstra
43504afcb7 cudatoolkit: Add version 7.5.18
(cherry picked from commit 6d97de951d)
2016-03-11 16:15:52 +01:00
Eelco Dolstra
d9dbe89eb5 cudatoolkit: Merge into one file and use callPackages
(cherry picked from commit 6c1e3a82de)
2016-03-11 16:15:47 +01:00
Eelco Dolstra
41dc4eca0c nix-generate-from-cpan: Skip "if" package since it's part of Perl now
(cherry picked from commit e2ad72342e)
2016-03-11 16:15:38 +01:00
Eelco Dolstra
9f185a9669 nix-generate-from-cpan: Don't quote names that don't need it
(cherry picked from commit 50b950fe8d)
2016-03-11 16:15:33 +01:00
Eelco Dolstra
a7ca3a4afb ifplugd: Remove
This package hasn't been updated in 11 years, and isn't really useful
anymore in a modern Linux system.

(cherry picked from commit 6bd0c3fe9d)
2016-03-11 16:15:21 +01:00
Eelco Dolstra
7ff8194989 keen4: Add license
(cherry picked from commit 449894ccb5)
2016-03-11 16:15:15 +01:00
Eelco Dolstra
147249a5e6 firefox: 44.0.2 -> 45.0
(cherry picked from commit 0d6d91739f)
2016-03-11 16:14:43 +01:00
Eelco Dolstra
e00cbc0130 thunderbird: Fix hash
Commit 4a54794d18 upgraded Thunderbird's
version to 38.6.0 (accidentally?), but didn't change the hash. This
wasn't caught due to tarballs.nixos.org being keyed on hash only.

(cherry picked from commit d25135ff6e)
2016-03-11 16:14:23 +01:00
Eelco Dolstra
e64ae06426 thunderbird: Fix build on gcc 5
It was barfing due to --enable-stdcxx-compat. Not clear if/why we
still need this, so let's disable it. If necessary a fix is available
at https://bugzilla.mozilla.org/show_bug.cgi?id=1153109.

(cherry picked from commit 4f5d48abf5)
2016-03-11 16:14:12 +01:00
Eelco Dolstra
751718af64 pykde4: Fix gcc 5 build failure
(cherry picked from commit bb43b542d6)
2016-03-11 16:14:08 +01:00
Eelco Dolstra
d5ca898035 mtdutils: 1.5.1 -> 1.5.2
Fixes gcc 5 build failure.

(cherry picked from commit 1146f460d3)
2016-03-11 16:14:03 +01:00
Eelco Dolstra
ffb23b77e0 rcs: Fix build on gcc 5
http://hydra.nixos.org/build/32624218
(cherry picked from commit 1c74a16e10)
2016-03-11 16:13:59 +01:00
Eelco Dolstra
e1922e3103 Mark some packages as broken due to GCC 5
(cherry picked from commit 47a04ac52c)
2016-03-11 16:13:56 +01:00
Eelco Dolstra
8668905d22 gcc: Remove 4.3 and 4.4
GCC 4.3 was used by only one package ("self"), which I've marked as
broken.

(cherry picked from commit 62c562a522)
2016-03-11 16:13:51 +01:00
Eelco Dolstra
80961187e0 gsl: Disable tests on i686-linux
http://hydra.nixos.org/build/32624041
(cherry picked from commit dd1f01ec11)
2016-03-11 16:13:46 +01:00
Eelco Dolstra
a98d111d81 telepathy-qt: Fix build on gcc 5
-Werror considered harmful.

(cherry picked from commit 4bb9117992)
2016-03-11 16:13:42 +01:00
Eelco Dolstra
6ef4803b6d libcli: Fix build on gcc 5
http://hydra.nixos.org/build/32606953
(cherry picked from commit 6bec7cb9fc)
2016-03-11 16:13:38 +01:00
Eelco Dolstra
5e936719a0 aterm: Mark as broken
It segfaults when built with GCC 5. I could try to fix it, but it's
not clear if anybody still cares about this package. Disabling it
until somebody complains.

http://hydra.nixos.org/build/32612811
(cherry picked from commit a5b501a36e)
2016-03-11 16:13:30 +01:00
Eelco Dolstra
a9b01de70d gcc: Use the pre-C++11 ABI by default
(cherry picked from commit 83011723af)
2016-03-11 16:13:01 +01:00
Eelco Dolstra
cb5f0fc64d Switch to GCC 5
(cherry picked from commit c388380bb4)
2016-03-11 16:12:57 +01:00
Eelco Dolstra
15db5f4353 openssl: Use 1.0.2 by default
Provided that not too much breaks, we should probably cherry-pick this
to 16.03, since the end of the 1.0.1 support window is a bit too close
to the expected lifetime of 16.0.3. @domenkozar

(cherry picked from commit e0d17fdf10)
2016-03-11 16:11:44 +01:00
Peter Simons
a56c4875dc perl-DateTimeX-Easy: disable failing test suite to fix Hydra build
(cherry picked from commit 83f2a6792c)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-11 13:44:27 +00:00
Lluís Batlle i Rossell
c5b31675a8 Adding rowhammer test.
(cherry picked from commit e026b5c243)
2016-03-11 14:33:40 +01:00
Lluís Batlle i Rossell
3f7eee0c40 Update ghdl mcode to 0.33.
(cherry picked from commit e9d6aadc51ecdd274cd383a99ea840a94b58d954)
(cherry picked from commit 7f7c2171c0)
2016-03-11 14:33:39 +01:00
Domen Kožar
838702564f nss: 3.22 -> 3.22.2 (CVE-2016-1950)
(cherry picked from commit 603ea2652f)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-11 12:18:51 +00:00
taku0
19c10d7347 flashplayer: 11.2.202.559 -> 11.2.202.577
(cherry picked from commit 218901bdb6)
2016-03-11 08:02:22 +01:00
Domen Kožar
8eba878ced speedtest-cli: 0.3.1 -> 0.3.4 (fix runtime)
(cherry picked from commit 83766949c1)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 20:43:02 +00:00
Vladimír Čunát
2b240463bf antimony: fix build with glibc-2.23
And enableParalelBuilding = true;

(cherry picked from commit 7ccccec51b)
2016-03-10 19:03:20 +01:00
Joachim Fasting
d1df887b29 faust2: fix build
Fixes https://github.com/NixOS/nixpkgs/issues/12749

The build failure was caused by brittle detection of the
llvm version. See the code for (excessive) details. This fix
is a quick hack, a proper fix would be to parse the version
of the input llvm derivation and use that to derive a proper
value. Here we just pin the version.

Also move build-time deps to `nativeBuildInputs`.

(cherry picked from commit 2f73decba8)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 16:51:45 +00:00
Domen Kožar
e1ce1fe14d Merge pull request #13598 from ttuegel/release-16.03-kde-5
Plasma 5.5.5
2016-03-10 16:48:53 +00:00
Vladimír Čunát
36bad18d57 nvidia-x11*: use mirror-agnostic URLs
(cherry picked from commit 17b83a88c3)
2016-03-10 15:57:35 +01:00
Graham Christensen
8c6cf0ca7c nvidia_x11_legacy304: 304.125 -> 304.131
Thanks to the great commit message in 6257425dab
(thank you edwtjo) I was able to go back and find out the patch which
was causing build failures is no longer necessary after upgrading
this legacy driver.

(cherry picked from commit fed36719f6)
Close #13799.

Tested-by: vcunat; it refuses to run with 4.4 kernel but it does with 4.1.
2016-03-10 15:51:59 +01:00
Al Zohali
b13a486f24 ChromiumOS kernel option fixup
(cherry picked from commit 9d03355bed)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 12:53:08 +00:00
Christoph Hrdinka
9b544ab3cc transmission: 2.90 -> 2.92
(cherry picked from commit c5695bc8be)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 12:51:58 +00:00
ashgillman
797b5a2f1b Use lcms2 for all pillow python versions
(cherry picked from commit 6ab7c50ea6)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 12:50:27 +00:00
Thomas Strobel
c74e3fd3ae xpra: 0.14.19/0.15.3 -> 0.16.2
(cherry picked from commit 83b15e2fc4)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 12:36:25 +00:00
Tim Steinbach
d41ac378b6 kernel: 4.4.4 -> 4.4.5
(cherry picked from commit 7c90420119)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 12:36:15 +00:00
Domen Kožar
e8e8164f34 Remove which -> type -P alias.
Aliases are not the same as programs. They won't work in subshells.
It's better to just use which as it's only 88K.

(cherry picked from commit 73ba0ae2de)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 10:40:29 +00:00
Domen Kožar
fb57ac55ff bareos: add rocksdb dependency
(cherry picked from commit 76f8ee2418)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-10 09:44:47 +00:00
Hoang Xuan Phu
6fa68be9c2 archiveopteryx: override specific build settings instead of PREFIX
Closes #13708 and fixes #13707.

(cherry picked from commit 5ac1de516e)
Closes #13805.
2016-03-10 09:35:16 +01:00
Franz Pletz
6377a295a3 Merge pull request #13796 from grahamc/libotr-16.03
libotr: upgrade v4, remove v3, and pidgin-otr for CVE-2016-2851 (16.03)
2016-03-10 00:24:01 +01:00
Graham Christensen
a039af10eb pidgin-otr: 4.0.1 -> 4.0.2 for CVE-2016-2851
(cherry picked from commit 6f8a914d57b5696e20c961659649aee286c4c7e6)
2016-03-09 17:23:42 -06:00
Graham Christensen
26833c5ecd libotr_3_2: remove, not updated since 2012, and unused.
(cherry picked from commit 6f574732a43ac24832ac92df99e8c826b301a4eb)
2016-03-09 17:23:42 -06:00
Franz Pletz
33b0851d88 libotr: 4.1.0 -> 4.1.1 (CVE-2016-2851)
https://www.x41-dsec.de/lab/advisories/x41-2016-001-libotr/
(cherry picked from commit 728cf25e16)
2016-03-10 00:14:40 +01:00
Vladimír Čunát
b28e618fb0 gpgstats: fix build on 32-bit; LFS problems
(cherry picked from commit 5782b5d3e8)
/cc #13559.
2016-03-09 23:16:45 +01:00
Nikolay Amiantov
c82d282f06 stepmania: fix on i686
(cherry picked from commit a75eb513c6)
2016-03-09 22:17:33 +03:00
Domen Kožar
34b06b4ba1 xen: remove unneeded depds now that stubdom is disabled
(cherry picked from commit 9ad60eae48)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-09 18:56:41 +00:00
kklas
d005b64940 sw-raid: make mdmon start from initrd
Also add required systemd services for starting/stopping mdmon.

(cherry picked from commit aac666e302)

See https://github.com/NixOS/nixpkgs/pull/13447#issuecomment-189963243 for cherry-pick discussion.
2016-03-09 21:20:36 +03:00
Domen Kožar
9c36de8cb2 xen: disable stubdom due to #13590
(cherry picked from commit 086a7d138d)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-09 13:52:01 +00:00
Lluís Batlle i Rossell
2e324f2144 Fixing my-env to get NIX_CFLAGS_COMPILE and so on
Yes, I still use my-env. I tested that it works on 16.03.

(cherry picked from commit 63ffd27a6b)
2016-03-09 12:45:45 +01:00
Pascal Wittmann
a0531e0394 libclc: 2015-03-27 -> 0.2.0
Fix build with newer LLVM version

(cherry picked from commit b1dd00f616)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-09 11:27:09 +00:00
Domen Kožar
5978790955 boringssl: 2014-08-20 -> 2016-03-08
(cherry picked from commit 64d5af4663)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-09 11:27:09 +00:00
Rok Garbas
e696b60f38 nixos/doc: adding line about the change in service.syncthing 2016-03-09 12:25:58 +01:00
Rob Vermaas
aecf27fe92 Remove kill -9 -1 from initrd of amazon-image.nix. This causes a kernel panic.
(cherry picked from commit ed5920ec65)
2016-03-09 09:56:18 +00:00
John Chee
4baa4995f3 lastpass-cli: 0.7.0 -> 0.9.0
(cherry picked from commit e0b541acc7)
2016-03-09 07:22:11 +01:00
Joachim Fasting
e3613ab3ee dnscrypt-proxy service: fix apparmor profile
The daemon additionally requires libcap, liblz4, and libattr.

(cherry picked from commit e7cfccbcc2)
2016-03-09 05:17:32 +01:00
Joachim Fasting
55588d7acd dnscrypt-proxy service: fix default resolver name
The "opendns" resolver has changed name to "cisco", causing the default
dnscrypt-proxy configuration to fail.

(cherry picked from commit e3ae435aad)
2016-03-09 03:01:17 +01:00
Mathieu Boespflug
440e2a757a spark: Fix tarball hash.
Maybe tarball changed upstream. Who knows.

Fixes #13703

(cherry picked from commit 6cf1853f29)

@joachifm: the original used the archive checksum, whereas `fetchzip` uses the
checksum of the archive contents.
2016-03-08 16:19:32 +01:00
Nathan Zadoks
2a36173043 bird module: run as user/group bird, not ircd
(cherry picked from commit 0360e410b7)
2016-03-08 11:58:34 +01:00
Sander van der Burg
db10d1bd21 runLatex: always include basic texlive stuff (thanks to vcunat)
(cherry picked from commit e91b9bede0)
2016-03-08 10:50:07 +00:00
Franz Pletz
69dbce32ce grsecurity: 4.4.2 -> 4.4.4
See #13505.

(cherry picked from commit 255d710757)
2016-03-08 01:07:55 +01:00
Franz Pletz
613dfd513c Merge remote-tracking branch 'origin/pr/13505'
Fixes #13505.

(cherry picked from commit eb5a897161)
2016-03-08 01:07:40 +01:00
Franz Pletz
3a5a26e2ed linux_4_4: 4.4.3 -> 4.4.4
(cherry picked from commit 3b1f2e070b)
2016-03-07 23:35:07 +01:00
Franz Pletz
89774f5b38 linux_3_14: 3.14.61 -> 3.14.63
(cherry picked from commit af40e356fe)
2016-03-07 23:35:05 +01:00
Franz Pletz
3356e5c033 linux_3_12: 3.12.54 -> 3.12.55
(cherry picked from commit 354a1935d3)
2016-03-07 23:35:04 +01:00
Franz Pletz
bc6547a13f linux_3_10: 3.10.97 -> 3.10.99
(cherry picked from commit 5b8361c118)
2016-03-07 23:34:59 +01:00
Svein Ove Aas
5b3c61ea5f nvidia: major update 358.16 -> 361.28
Beta also gets updated, but even upstream it's older than stable.
vcunat generalized parallel make. Close #12719.

(cherry picked from commit e0fe8cf204)
This is a new long-lived branch, so the update seems suitable for 16.03.
2016-03-07 23:20:15 +01:00
Henry Till
927ce5ca71 racket: fix build error
https://github.com/racket/racket/issues/1222

closes #13733

(cherry picked from commit cf71bc9255)
2016-03-07 21:28:54 +01:00
Robert Helgesson
50131497b7 eclipse-plugin-checkstyle: 6.14.0 -> 6.16.0
Download URL for 6.14.0 is broken, fixes #13746.

(cherry picked from commit 54c7ef17a9)
2016-03-07 21:11:33 +01:00
Christoph Hrdinka
b5a0c16f8f pidgin: fix gstreamer plugin path
Closes #13722, fixes #13719 and maybe #10556.

(cherry picked from commit d3e3b135ea)
2016-03-07 07:12:25 +01:00
Luca Bruno
3b5ae362d9 chromium: add StartupWMClass to desktop file. Fixes #12433
(cherry picked from commit 5f8311775c)
2016-03-06 21:52:47 +01:00
Bjørn Forsman
1db66c9f47 grafana service: unbreak
Accidentally broken by 4fede53c09
("nixos manuals: bring back package references").

Without this fix, grafana won't start:

$ systemctl status grafana
...
systemd[1]: Starting Grafana Service Daemon...
systemd[1]: Started Grafana Service Daemon.
grafana[666]: 2016/03/06 19:57:32 [log.go:75 Fatal()] [E] Failed to detect generated css or javascript files in static root (%!s(MISSING)), have you executed default grunt task?
systemd[1]: grafana.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: grafana.service: Unit entered failed state.
systemd[1]: grafana.service: Failed with result 'exit-code'.

(cherry picked from commit d99033beb9)
2016-03-06 21:44:53 +01:00
Vladimír Čunát
1e634a6fcc curl: use an official download link
It works now that we have e6f61b4cf3.

(cherry picked from commit a458a9f78f)
2016-03-06 11:13:49 +01:00
Profpatsch
0db38615dc manual/installing: add loadkeys hint
Closes #13702 and fixes #3132.
(Tiny changes by vcunat.)

(cherry picked from commit af4e8a4d3b)
2016-03-06 11:06:25 +01:00
aszlig
58d901d16f chromium: Update all channels to latest versions
Overview of the updated versions:

stable: 48.0.2564.116 -> 49.0.2623.75
beta:   49.0.2623.63  -> 49.0.2623.75
dev:    50.0.2657.0   -> 50.0.2661.11

Stable and beta are now in par because of the release of a major stable
update.

The release addresses 26 security vulnerabilities, the following with an
assigned CVE:

 * CVE-2016-1630: Same-origin bypass in Blink. Credit to Mariusz
                  Mlynski.
 * CVE-2016-1631: Same-origin bypass in Pepper Plugin. Credit to Mariusz
                  Mlynski.
 * CVE-2016-1632: Bad cast in Extensions. Credit to anonymous.
 * CVE-2016-1633: Use-after-free in Blink. Credit to cloudfuzzer.
 * CVE-2016-1634: Use-after-free in Blink. Credit to cloudfuzzer.
 * CVE-2016-1635: Use-after-free in Blink. Credit to Rob Wu.
 * CVE-2016-1636: SRI Validation Bypass. Credit to Ryan Lester and
                  Bryant Zadegan.
 * CVE-2015-8126: Out-of-bounds access in libpng. Credit to
                  joerg.bornemann.
 * CVE-2016-1637: Information Leak in Skia. Credit to Keve Nagy.
 * CVE-2016-1638: WebAPI Bypass. Credit to Rob Wu.
 * CVE-2016-1639: Use-after-free in WebRTC. Credit to Khalil Zhani.
 * CVE-2016-1640: Origin confusion in Extensions UI. Credit to Luan
                  Herrera.
 * CVE-2016-1641: Use-after-free in Favicon. Credit to Atte Kettunen of
                  OUSPG.

The full announcement which also includes the link to the bug tracker
can be found here:

http://googlechromereleases.blogspot.de/2016/03/stable-channel-update.html

Also, the 32bit Chrome package needed for the Flash and Widevine plugins
doesn't exist anymore, because Google has dropped support for 32bit
distros, see here for the announcement:

https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/FoE6sL-p6oU

On our end, we need to fix the patch for the plugin paths to work for
the latest dev channel. The change is very minor, because the
nix_plugin_paths_46.patch only doesn't apply because of an iOS-related
ifdef.

Built and tested on my Hydra at:

https://headcounter.org/hydra/eval/311511

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Fixes: #13665
(cherry picked from commit 8b97ca270e)
2016-03-05 22:54:06 +01:00
Vladimír Čunát
3a3f336148 nvidia_x11_legacy340: update 340.76 -> 340.94
Fixes #13658.

(cherry picked from commit 54d342add8)
2016-03-05 22:20:18 +01:00
Domen Kožar
780dc0ad29 Merge pull request #13689 from 4z3/release-16.03
exim: 4.86 -> 4.86.2
2016-03-05 19:24:07 +00:00
tv
62c29a96be exim: 4.86 -> 4.86.2 2016-03-05 14:45:10 +01:00
aszlig
0cb416f51d chromium/updater: Fix eval error on stdenv.is32bit
There is no stdenv.is32bit, so let's just use !stdenv.is64bit.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit c3d82f0fbf)
2016-03-05 03:16:52 +01:00
aszlig
181986627e chromium/updater: Fix getting latest versions
Comparing the current version with the version in sources list and
accidentally swapping the version arguments isn't going to get very far
because every new version that will come up will then be treated as "we
already have that version".

So we're now using versionOlder and also a check whether the version is
the *same* as the one in sources.nix.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit 8d5accb691)
2016-03-05 03:03:39 +01:00
Kevin Marsh
f3ab45e5dc django: 1.8.9 -> 1.8.10 2016-03-04 16:11:14 -05:00
Kevin Marsh
1e2ec46525 django: 1.9.2 -> 1.9.3 2016-03-04 16:11:07 -05:00
Robin Gloster
3d10bc8804 ceph: fix for zip timestamps
(cherry picked from commit e2372a4183)
Signed-off-by: Robin Gloster <mail@glob.in>
2016-03-04 14:17:26 +00:00
zimbatm
f7ac2e1b2e bats: fixes installation
The build was failing with:

  /...-stdenv/setup: ./install.sh: /usr/bin/env: bad interpreter: No such file
  or directory

See https://hydra.nixos.org/build/32353411/log

(cherry picked from commit a3119bd35d)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-03 15:19:16 +00:00
Domen Kožar
c9f73f8860 Merge pull request #13630 from mbakke/dnscrypt-stable
dnscrypt-proxy: 1.6.0 -> 1.6.1
2016-03-03 14:45:18 +00:00
Thomas Tuegel
73435915ba kde5.plasma.plasma-workspace: 5.5.5.1 -> 5.5.5.2
(cherry picked from commit 6af59c9d06)
2016-03-03 05:57:34 -06:00
Marius Bakke
2d6d111a3e dnscrypt-proxy: 1.6.0 -> 1.6.1 2016-03-02 23:49:44 +00:00
Domen Kožar
89d9159353 Merge pull request #13618 from cleverca22/multimc-release
multimc: fix building under chroot
2016-03-02 17:52:53 +00:00
michael bishop
ff28655321 multimc: fix building under chroot 2016-03-02 13:51:15 -04:00
Domen Kožar
31b5d57123 Attempt to fix transient grub1 test kernel panics
Example: http://hydra.nixos.org/build/32469819/nixlog/26/raw
(cherry picked from commit ba05826707)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-02 17:32:30 +00:00
Domen Kožar
12d4f7abfb remove lvm_33, fixes #12310
(cherry picked from commit d72e93f59d)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-02 17:01:15 +00:00
Eelco Dolstra
2068621b45 openssl: 1.0.1r -> 1.0.1s, 1.0.2f -> 1.0.2g
CVE-2016-0800. Fixes #13506.

(cherry picked from commit cdbd14a1a8)
2016-03-02 10:29:59 +01:00
aszlig
468a40bd89 nixos/release: Replace a: b: a // b by mergeAttrs
No change in functionality, it just looks nicer that way.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
(cherry picked from commit a429444a75)
2016-03-02 02:22:03 +01:00
Robin Gloster
a56d33a016 qt_gstreamer1: add upstream patch to build with current gstreamer
(cherry picked from commit 995475944f)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-03-01 23:45:32 +00:00
aszlig
a49ba9c6fe Merge pull request #13585 (nixos-tests-splitup)
This splits a few NixOS tests (namely Chromium, VirtualBox and the
networking tests) into several subtests that are exposed via attributes.

The networking tests were already split up but they didn't expose an
attribute set of available tests but used a function attribute to
specify the resulting test instead.

A new function callSubTests in nixos/release.nix is now responsible for
gathering subtests, which is also used for the installer and boot tests.
The latter is now placed in a tests.boot.* namespace rather than
"polluting" the tests attribute set with its subtest.
2016-03-01 23:19:00 +01:00
Thomas Tuegel
b96e0c2c8c kde5.plasma: 5.5.4 -> 5.5.5
This minor update includes bug and security fixes, so it should be
backported to the release branch.

(cherry picked from commit 78602b6806)
2016-03-01 13:45:25 -06:00
Thomas Tuegel
adb81add90 kde5: consolidate packages into desktops/kde-5
This is an organizational change from master. It is not strictly
necessary, but backporting it to the release branch will make it
significantly easier to backport patches or updates in the future.

(cherry picked from commit 98d8e1a160)
2016-03-01 13:44:33 -06:00
Luca Bruno
5440568fea devhelp: fix build with new webkitgtk
(cherry picked from commit b2889efff2)
2016-03-01 18:58:44 +01:00
Domen Kožar
a202c8027e openspades: fix build 2016-03-01 14:32:06 +01:00
Domen Kožar
746912a9ca rethinkdb: patch for glibc 2.23 2016-03-01 14:13:53 +01:00
Carles Pagès
503bb92245 kodiPlugins.pvr-hts: 2.1.18 -> 2.2.13
(cherry picked from commit 7eb15265d3)
2016-03-01 14:03:02 +01:00
Sander van der Burg
6adae8e146 nodejs-4_x: bump to version 4.3.1
(cherry picked from commit c8e55671cd)
2016-03-01 12:31:19 +00:00
zimbatm
461ed7cc55 redmine: fix compilation with ruby 2.3
Just bumped the JSON dependency manually to the one bundled with ruby 2.3

(cherry picked from commit de8c119a4b)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-02-29 13:49:37 +00:00
Domen Kožar
d07f940046 transmission: 2.84 -> 2.90
(cherry picked from commit 756604cc08)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-02-29 13:10:42 +00:00
Eelco Dolstra
eef44f2495 patchelf: Use 0.9 release tarball
(cherry picked from commit d255a8980a)
2016-02-29 11:42:20 +01:00
Eelco Dolstra
f5351fec36 patchelf: 0.8 -> 0.9
(cherry picked from commit 424af2cd52)
2016-02-29 11:42:16 +01:00
Eelco Dolstra
4025cb9e0c netpbm: Disable parallel building
Looks like the "partlist" file is constructed in an unsound way.

http://hydra.nixos.org/build/32430147
(cherry picked from commit abd3c246a4)
2016-02-29 11:42:04 +01:00
Eelco Dolstra
dc99ce8565 Manual: rl-unstable.xml -> rl-1603.xml
(cherry picked from commit 56e68d4d5f)
2016-02-29 11:41:23 +01:00
Vladimír Čunát
6ee0b0e335 haskellPackages: fix evaluation
It seems `self` was wanted instead of `pkgs` by the author of 3844206.

(cherry picked from commit 0294fc5bbd)
Signed-off-by: Domen Kožar <domen@dev.si>
2016-02-29 10:26:05 +00:00
Domen Kožar
74f22ff827 prepare for 16.03 2016-02-28 22:30:51 +00:00
23104 changed files with 1354034 additions and 1487622 deletions

View File

@@ -1,28 +0,0 @@
# EditorConfig configuration for nixpkgs
# http://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
# see https://nixos.org/nixpkgs/manual/#chap-conventions
# Match nix/ruby/docbook files, set indent to spaces with width of two
[*.{nix,rb,xml}]
indent_style = space
indent_size = 2
# Match shell/python/perl scripts, set indent to spaces with width of four
[*.{sh,py,pl}]
indent_style = space
indent_size = 4
# Match diffs, avoid to trim trailing whitespace
[*.{diff,patch}]
trim_trailing_whitespace = false

16
.gitattributes vendored
View File

@@ -1,16 +0,0 @@
**/deps.nix 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

180
.github/CODEOWNERS vendored
View File

@@ -1,180 +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.
# This file
/.github/CODEOWNERS @edolstra
# Libraries
/lib @edolstra @nbp @infinisil
/lib/systems @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
# 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/cross @Ericson2314 @matthewbauer
/pkgs/build-support/cc-wrapper @Ericson2314 @orivej
/pkgs/build-support/bintools-wrapper @Ericson2314 @orivej
/pkgs/build-support/setup-hooks @Ericson2314
# NixOS Internals
/nixos/default.nix @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 integration test driver
/nixos/lib/test-driver @tfc
# New NixOS modules
/nixos/modules/module-list.nix @Infinisil
# 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
# Haskell
/pkgs/development/compilers/ghc @basvandijk @cdepillabout
/pkgs/development/haskell-modules @basvandijk @cdepillabout @infinisil
/pkgs/development/haskell-modules/default.nix @basvandijk @cdepillabout
/pkgs/development/haskell-modules/generic-builder.nix @basvandijk @cdepillabout
/pkgs/development/haskell-modules/hoogle.nix @basvandijk @cdepillabout
# Perl
/pkgs/development/interpreters/perl @volth
/pkgs/top-level/perl-packages.nix @volth
/pkgs/development/perl-modules @volth
# R
/pkgs/applications/science/math/R @peti
/pkgs/development/r-modules @peti
# Ruby
/pkgs/development/interpreters/ruby @alyssais @zimbatm
/pkgs/development/ruby-modules @alyssais @zimbatm
# Rust
/pkgs/development/compilers/rust @Mic92 @LnL7
/pkgs/build-support/rust @andir
# Darwin-related
/pkgs/stdenv/darwin @NixOS/darwin-maintainers
/pkgs/os-specific/darwin @NixOS/darwin-maintainers
# 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
# Beam-related (Erlang, Elixir, LFE, etc)
/pkgs/development/beam-modules @gleber
/pkgs/development/interpreters/erlang @gleber
/pkgs/development/interpreters/lfe @gleber
/pkgs/development/interpreters/elixir @gleber
/pkgs/development/tools/build-managers/rebar @gleber
/pkgs/development/tools/build-managers/rebar3 @gleber
/pkgs/development/tools/erlang @gleber
# Jetbrains
/pkgs/applications/editors/jetbrains @edwtjo
# Eclipse
/pkgs/applications/editors/eclipse @rycee
# 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
/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
# Network Time Daemons
/pkgs/tools/networking/chrony @thoughtpolice
/pkgs/tools/networking/ntp @thoughtpolice
/pkgs/tools/networking/openntpd @thoughtpolice
/nixos/modules/services/networking/ntp @thoughtpolice
# Dhall
/pkgs/development/dhall-modules @Gabriel439 @Profpatsch
/pkgs/development/interpreters/dhall @Gabriel439 @Profpatsch
# Idris
/pkgs/development/idris-modules @Infinisil
# Bazel
/pkgs/development/tools/build-managers/bazel @mboes @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-modes @adisbladis
/pkgs/applications/editors/emacs @adisbladis
/pkgs/top-level/emacs-packages.nix @adisbladis
# VimPlugins
/pkgs/misc/vim-plugins @jonringer @softinio
# VsCode Extensions
/pkgs/misc/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
/pkgs/development/interpreters/php @etu
/pkgs/top-level/php-packages.nix @etu
/pkgs/build-support/build-pecl.nix @etu

View File

@@ -6,57 +6,10 @@ 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
* [Submit an issue](https://github.com/NixOS/nixpkgs/issues) - assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Include information what version of nixpkgs and Nix are you using (nixos-version or git revision).
## Submitting changes
* Format the commit messages in the following way:
```
(pkg-name | nixos/<module>): (from -> to | init at version | refactor | etc)
(Motivation for change. Additional information.)
```
For consistency, there should not be a period at the end of the commit message's summary line (the first line of the commit message).
Examples:
* nginx: init at 2.0.1
* firefox: 54.0.1 -> 55.0
* nixos/hydra: add bazBaz option
Dual baz behavior is needed to do foo.
* nixos/nginx: refactor config generation
The old config generation system used impure shell scripts and could break in specific circumstances (see #1234).
* `meta.description` should:
* Be capitalized.
* Not start with the package name.
* Not have a period at the end.
* `meta.license` must be set and fit the upstream license.
* If there is no upstream license, `meta.license` should default to `stdenv.lib.licenses.unfree`.
* `meta.maintainers` must be set.
See the nixpkgs manual for more details on [standard meta-attributes](https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes) and on how to [submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).
## Writing good commit messages
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list/Discourse archives, pull request discussions or upstream changes, it may require a lot of work.
For package version upgrades and such a one-line commit message is usually sufficient.
## Backporting changes
To [backport a change into a release branch](https://nixos.org/nixpkgs/manual/#submitting-changes-stable-release-branches):
1. Take note of the commit in which the change was introduced into `master`.
2. Check out the target _release branch_, e.g. `release-19.09`. Do not use a _channel branch_ like `nixos-19.09` or `nixpkgs-19.09`.
3. Use `git cherry-pick -x <original commit>`.
4. Open your backport PR. Make sure to select the release branch (e.g. `release-19.09`) as the target branch of the PR, and link to the PR in which the original change was made to `master`.
## Reviewing contributions
See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#chap-reviewing-contributions).
See the nixpkgs manual for details on how to [Submit changes to nixpkgs](http://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download-by-type/doc/manual#chap-submitting-changes).

View File

@@ -1,11 +1,17 @@
## Issue description
## Basic info
To make sure that we are on the same page:
* Kernel: (run `uname -a`)
* System: (NixOS: `nixos-version`, Ubuntu/Fedora: `lsb_release -a`, ...)
* Nix version: (run `nix-env --version`)
* Nixpkgs version: (run `nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion`)
## Describe your issue here
### Expected result
### Actual result
### Steps to reproduce
## Technical details
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.

View File

@@ -1,37 +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.
**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.
**Metadata**
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
Maintainer information:
```yaml
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
```

View File

@@ -1,18 +0,0 @@
---
name: Packaging requests
about: For packages that are missing
title: ''
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,19 +1,18 @@
<!-- Nixpkgs has a lot of new incoming Pull Requests, but not enough people to review this constant stream. Even if you aren't a committer, we would appreciate reviews of other PRs, especially simple ones like package updates. Just testing the relevant package/service and leaving a comment saying what you tested, how you tested it and whether it worked would be great. List of open PRs: <https://github.com/NixOS/nixpkgs/pulls>, for more about reviewing contributions: <https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download/1/nixpkgs/manual.html#chap-reviewing-contributions>. Reviewing isn't mandatory, but it would help out a lot and reduce the average time-to-merge for all of us. Thanks a lot if you do! -->
###### Motivation for this change
###### Things done:
###### Things done
<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS linux)
- Built on platform(s)
- [ ] NixOS
- [ ] macOS
- [ ] other Linux distributions
- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review wip"`
- [ ] Tested using sandboxing (`nix-build --option build-use-chroot true` or [nix.useChroot](http://nixos.org/nixos/manual/options.html#opt-nix.useChroot) on NixOS)
- [ ] Built on platform(s): NixOS / OSX / Linux
- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run "nox-review wip"`
- [ ] Tested execution of all binary files (usually in `./result/bin/`)
- [ ] Determined the impact on package closure size (by running `nix path-info -S` before and after)
- [ ] Ensured that relevant documentation is up to date
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
###### More
Fixes issue #<insert id>
cc @<maintainer>
---
_Please note, that points are not mandatory, but rather desired._

32
.github/stale.yml vendored
View File

@@ -1,32 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 180
# Number of days of inactivity before a stale issue is closed
daysUntilClose: false
# Issues with these labels will never be considered stale
exemptLabels:
- 1.severity: security
# Label to use when marking an issue as stale
staleLabel: 2.status: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Thank you for your contributions.
This has been automatically marked as stale because it has had no
activity for 180 days.
If this is still important to you, we ask that you leave a
comment below. Your comment can be as simple as "still important
to me". This lets people see that at least one person still cares
about this. Someone will have to do this at most twice a year if
there is no other activity.
Here are suggestions that might help resolve this more quickly:
1. Search for maintainers and people that previously touched the
related code and @ mention them in a comment.
2. Ask on the [NixOS Discourse](https://discourse.nixos.org/).
3. Ask on the [#nixos channel](irc://irc.freenode.net/#nixos) on
[irc.freenode.net](https://freenode.net).
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

3
.gitignore vendored
View File

@@ -13,5 +13,4 @@ result-*
.DS_Store
/pkgs/development/libraries/qt-5/*/tmp/
/pkgs/desktops/kde-5/*/tmp/
/pkgs/development/mobile/androidenv/xml/*
/pkgs/desktops/kde-5/*/tmp/

5
.mention-bot Normal file
View File

@@ -0,0 +1,5 @@
{
"userBlacklist": [
"civodul"
]
}

7
.travis.yml Normal file
View File

@@ -0,0 +1,7 @@
language: python
python: "3.4"
sudo: required
dist: trusty
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 @@
20.03
16.03

13
COPYING
View File

@@ -1,4 +1,4 @@
Copyright (c) 2003-2020 Eelco Dolstra and the Nixpkgs/NixOS contributors
Copyright (c) 2003-2016 Eelco Dolstra and the Nixpkgs/NixOS contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -18,3 +18,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.

130
README.md
View File

@@ -1,111 +1,43 @@
<p align="center">
<a href="https://nixos.org/nixos"><img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="NixOS logo" /></a>
</p>
[<img src="http://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />](https://nixos.org/nixos)
<p align="center">
<a href="https://www.codetriage.com/nixos/nixpkgs"><img src="https://www.codetriage.com/nixos/nixpkgs/badges/users.svg" alt="Code Triagers badge" /></a>
<a href="https://opencollective.com/nixos"><img src="https://opencollective.com/nixos/tiers/supporter/badge.svg?label=Supporter&color=brightgreen" alt="Open Collective supporters" /></a>
</p>
[![Build Status](https://travis-ci.org/NixOS/nixpkgs.svg?branch=master)](https://travis-ci.org/NixOS/nixpkgs)
[![Issue Stats](http://www.issuestats.com/github/nixos/nixpkgs/badge/pr?style=flat)](http://www.issuestats.com/github/nixos/nixpkgs)
[![Issue Stats](http://www.issuestats.com/github/nixos/nixpkgs/badge/issue?style=flat)](http://www.issuestats.com/github/nixos/nixpkgs)
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over
40,000 software packages that can be installed with the
[Nix](https://nixos.org/nix/) package manager. It also implements
[NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
Nixpkgs is a collection of packages for the [Nix](https://nixos.org/nix/) package
manager. It is periodically built and tested by the [hydra](http://hydra.nixos.org/)
build daemon as so-called channels. To get channel information via git, add
[nixpkgs-channels](https://github.com/NixOS/nixpkgs-channels.git) as a remote:
# Manuals
```
% git remote add channels git://github.com/NixOS/nixpkgs-channels.git
```
* [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution
* [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions
* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expressions (programs), and how to use Nix command line tools
For stability and maximum binary package support, it is recommended to maintain
custom changes on top of one of the channels, e.g. `nixos-16.03` for the latest
release and `nixos-unstable` for the latest successful build of master:
# Community
```
% git remote update channels
% git rebase channels/nixos-16.03
```
* [Discourse Forum](https://discourse.nixos.org/)
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)
* [NixOS Weekly](https://weekly.nixos.org/)
* [Community-maintained wiki](https://nixos.wiki/)
For pull-requests, please rebase onto nixpkgs `master`.
# Other Project Repositories
The sources of all official Nix-related projects are in the [NixOS
organization on GitHub](https://github.com/NixOS/). Here are some of
the main ones:
* [Nix](https://github.com/NixOS/nix) - the purely functional package manager
* [NixOps](https://github.com/NixOS/nixops) - the tool to remotely deploy NixOS machines
* [Nix RFCs](https://github.com/NixOS/rfcs) - the formal process for making substantial changes to the community
* [NixOS homepage](https://github.com/NixOS/nixos-homepage) - the [NixOS.org](https://nixos.org) website
* [hydra](https://github.com/NixOS/hydra) - our continuous integration system
* [NixOS Artwork](https://github.com/NixOS/nixos-artwork) - NixOS artwork
# Continuous Integration and Distribution
Nixpkgs and NixOS are built and tested by our continuous integration
system, [Hydra](https://hydra.nixos.org/).
[NixOS](https://nixos.org/nixos/) linux distribution source code is located inside
`nixos/` folder.
* [NixOS installation instructions](https://nixos.org/nixos/manual/#ch-installation)
* [Documentation (Nix Expression Language chapter)](https://nixos.org/nix/manual/#ch-expression-language)
* [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/)
* [Manual (NixOS)](https://nixos.org/nixos/manual/)
* [Nix Wiki](https://nixos.org/wiki/)
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for the NixOS 19.09 release](https://hydra.nixos.org/jobset/nixos/release-19.09)
* [Continuous package builds for 16.03 release](https://hydra.nixos.org/jobset/nixos/release-16.03)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for the NixOS 19.09 release](https://hydra.nixos.org/job/nixos/release-19.09/tested#tabs-constituents)
* [Tests for 16.03 release](https://hydra.nixos.org/job/nixos/release-16.03/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/nix/manual/#sec-channels).
Communication:
# Contributing
Nixpkgs is among the most active projects on GitHub. While thousands
of open issues and pull requests might seem a lot at first, it helps
consider it in the context of the scope of the project. Nixpkgs
describes how to build over 40,000 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/.github/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 by using Open Collective:
<a href="https://opencollective.com/nixos#support"><img src="https://opencollective.com/nixos/tiers/supporter.svg?width=890" /></a>
# License
Nixpkgs is licensed under the [MIT License](COPYING).
Note: MIT license does not apply to the packages built by Nixpkgs,
merely to the files in this repository (the Nix expressions, build
scripts, NixOS modules, etc.). It also might not apply to patches
included in Nixpkgs, which may be derivative works of the packages to
which they apply. The aforementioned artifacts are all covered by the
licenses of the respective packages.
* [Mailing list](http://lists.science.uu.nl/mailman/listinfo/nix-dev)
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)

View File

@@ -2,27 +2,8 @@ let requiredVersion = import ./lib/minver.nix; in
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 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 >= ${requiredVersion}, please upgrade! See https://nixos.org/wiki/How_to_update_when_Nix_is_too_old_to_evaluate_Nixpkgs"
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,110 +0,0 @@
MD_TARGETS=$(addsuffix .xml, $(basename $(wildcard ./*.md ./**/*.md)))
.PHONY: all
all: validate format out/html/index.html out/epub/manual.epub
.PHONY: debug
debug:
nix-shell --run "xmloscopy --docbook5 ./manual.xml ./manual-full.xml"
.PHONY: format
format: 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
.PHONY: fix-misc-xml
fix-misc-xml:
find . -iname '*.xml' -type f \
-exec ../nixos/doc/varlistentry-fixer.rb {} ';'
.PHONY: clean
clean:
rm -f ${MD_TARGETS} doc-support/result .version manual-full.xml functions/library/locations.xml functions/library/generated
rm -rf ./out/ ./highlightjs
.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 ./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 ./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 $^ -w docbook+smart \
-f markdown+smart \
| sed -e 's|<ulink url=|<link xlink:href=|' \
-e 's|</ulink>|</link>|' \
-e 's|<sect. id=|<section xml:id=|' \
-e 's|</sect[0-9]>|</section>|' \
-e '1s| id=| xml:id=|' \
-e '1s|\(<[^ ]* \)|\1xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" |' \
| cat > $@
%.chapter.xml: %.chapter.md
pandoc $^ -w docbook+smart \
--top-level-division=chapter \
-f markdown+smart \
| sed -e 's|<ulink url=|<link xlink:href=|' \
-e 's|</ulink>|</link>|' \
-e 's|<sect. id=|<section xml:id=|' \
-e 's|</sect[0-9]>|</section>|' \
-e '1s| id=| xml:id=|' \
-e '1s|\(<[^ ]* \)|\1|' \
| cat > $@

View File

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

View File

@@ -1,12 +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.xml" />
<xi:include href="images/dockertools.xml" />
<xi:include href="images/ocitools.xml" />
<xi:include href="images/snaptools.xml" />
</chapter>

View File

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

View File

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

View File

@@ -1,62 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-pkgs-ociTools">
<title>pkgs.ociTools</title>
<para>
<varname>pkgs.ociTools</varname> is a set of functions for creating containers according to the <link xlink:href="https://github.com/opencontainers/runtime-spec">OCI container specification v1.0.0</link>. Beyond that it makes no assumptions about the container runner you choose to use to run the created container.
</para>
<section xml:id="ssec-pkgs-ociTools-buildContainer">
<title>buildContainer</title>
<para>
This function creates a simple OCI container that runs a single command inside of it. An OCI container consists of a <varname>config.json</varname> and a rootfs directory.The nix store of the container will contain all referenced dependencies of the given command.
</para>
<para>
The parameters of <varname>buildContainer</varname> with an example value are described below:
</para>
<example xml:id='ex-ociTools-buildContainer'>
<title>Build Container</title>
<programlisting>
buildContainer {
args = [ (with pkgs; writeScript "run.sh" ''
#!${bash}/bin/bash
${coreutils}/bin/exec ${bash}/bin/bash
'').outPath ]; <co xml:id='ex-ociTools-buildContainer-1' />
mounts = {
"/data" = {
type = "none";
source = "/var/lib/mydata";
options = [ "bind" ];
};
};<co xml:id='ex-ociTools-buildContainer-2' />
readonly = false; <co xml:id='ex-ociTools-buildContainer-3' />
}
</programlisting>
<calloutlist>
<callout arearefs='ex-ociTools-buildContainer-1'>
<para>
<varname>args</varname> specifies a set of arguments to run inside the container. This is the only required argument for <varname>buildContainer</varname>. All referenced packages inside the derivation will be made available inside the container
</para>
</callout>
<callout arearefs='ex-ociTools-buildContainer-2'>
<para>
<varname>mounts</varname> 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)
</para>
</callout>
<callout arearefs='ex-ociTools-buildContainer-3'>
<para>
<varname>readonly</varname> makes the container's rootfs read-only if it is set to true. The default value is false <literal>false</literal>.
</para>
</callout>
</calloutlist>
</example>
</section>
</section>

View File

@@ -1,28 +0,0 @@
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";
};
}

View File

@@ -1,12 +0,0 @@
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";
};
}

View File

@@ -1,59 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-pkgs-snapTools">
<title>pkgs.snapTools</title>
<para>
<varname>pkgs.snapTools</varname> is a set of functions for creating Snapcraft images. Snap and Snapcraft is not used to perform these operations.
</para>
<section xml:id="ssec-pkgs-snapTools-makeSnap-signature">
<title>The makeSnap Function</title>
<para>
<function>makeSnap</function> takes a single named argument, <parameter>meta</parameter>. This argument mirrors <link xlink:href="https://docs.snapcraft.io/snap-format">the upstream <filename>snap.yaml</filename> format</link> exactly.
</para>
<para>
The <parameter>base</parameter> should not be be specified, as <function>makeSnap</function> will force set it.
</para>
<para>
Currently, <function>makeSnap</function> does not support creating GUI stubs.
</para>
</section>
<section xml:id="ssec-pkgs-snapTools-build-a-snap-hello">
<title>Build a Hello World Snap</title>
<example xml:id="ex-snapTools-buildSnap-hello">
<title>Making a Hello World Snap</title>
<para>
The following expression packages GNU Hello as a Snapcraft snap.
</para>
<programlisting><xi:include href="./snap/example-hello.nix" parse="text" /></programlisting>
<para>
<command>nix-build</command> this expression and install it with <command>snap install ./result --dangerous</command>. <command>hello</command> will now be the Snapcraft version of the package.
</para>
</example>
</section>
<section xml:id="ssec-pkgs-snapTools-build-a-snap-firefox">
<title>Build a Hello World Snap</title>
<example xml:id="ex-snapTools-buildSnap-firefox">
<title>Making a Graphical Snap</title>
<para>
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.
</para>
<programlisting><xi:include href="./snap/example-firefox.nix" parse="text" /></programlisting>
<para>
<command>nix-build</command> this expression and install it with <command>snap install ./result --dangerous</command>. <command>nix-example-firefox</command> will now be the Snapcraft version of the Firefox package.
</para>
<para>
The specific meaning behind plugs can be looked up in the <link xlink:href="https://docs.snapcraft.io/supported-interfaces">Snapcraft interface documentation</link>.
</para>
</example>
</section>
</section>

View File

@@ -1,44 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-citrix">
<title>Citrix Workspace</title>
<para>
<note>
<para>
Please note that the <literal>citrix_receiver</literal> package has been deprecated since its development was <link xlink:href="https://docs.citrix.com/en-us/citrix-workspace-app.html">discontinued by upstream</link> and has been replaced by <link xlink:href="https://www.citrix.com/products/workspace-app/">the citrix workspace app</link>.
</para>
</note>
<link xlink:href="https://www.citrix.com/products/receiver/">Citrix Receiver</link> and <link xlink:href="https://www.citrix.com/products/workspace-app/">Citrix Workspace App</link> are a remote desktop viewers which provide access to <link xlink:href="https://www.citrix.com/products/xenapp-xendesktop/">XenDesktop</link> installations.
</para>
<section xml:id="sec-citrix-base">
<title>Basic usage</title>
<para>
The tarball archive needs to be downloaded manually as the license agreements of the vendor for <link xlink:href="https://www.citrix.com/downloads/citrix-receiver/">Citrix Receiver</link> or <link xlink:href="https://www.citrix.de/downloads/workspace-app/linux/workspace-app-for-linux-latest.html">Citrix Workspace</link> need to be accepted first. Then run <command>nix-prefetch-url file://$PWD/linuxx64-$version.tar.gz</command>. With the archive available in the store the package can be built and installed with Nix.
</para>
<warning>
<title>Caution with <command>nix-shell</command> installs</title>
<para>
It's recommended to install <literal>Citrix Receiver</literal> and/or <literal>Citrix Workspace</literal> using <literal>nix-env -i</literal> or globally to ensure that the <literal>.desktop</literal> files are installed properly into <literal>$XDG_CONFIG_DIRS</literal>. Otherwise it won't be possible to open <literal>.ica</literal> files automatically from the browser to start a Citrix connection.
</para>
</warning>
</section>
<section xml:id="sec-citrix-custom-certs">
<title>Custom certificates</title>
<para>
The <literal>Citrix Workspace App</literal> in <literal>nixpkgs</literal> trust several certificates <link xlink:href="https://curl.haxx.se/docs/caextract.html">from the Mozilla database</link> 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 <link xlink:href="https://developer-docs.citrix.com/projects/receiver-for-linux-command-reference/en/13.7/"><literal>$ICAROOT</literal></link>, however this directory is a store path in <literal>nixpkgs</literal>. In order to work around this issue the package provides a simple mechanism to add custom certificates without rebuilding the entire package using <literal>symlinkJoin</literal>:
<programlisting>
<![CDATA[with import <nixpkgs> { config.allowUnfree = true; };
let extraCerts = [ ./custom-cert-1.pem ./custom-cert-2.pem /* ... */ ]; in
citrix_workspace.override {
inherit extraCerts;
}]]>
</programlisting>
</para>
</section>
</section>

View File

@@ -1,24 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="dlib">
<title>DLib</title>
<para>
<link xlink:href="http://dlib.net/">DLib</link> is a modern, C++-based toolkit which provides several machine learning algorithms.
</para>
<section xml:id="compiling-without-avx-support">
<title>Compiling without AVX support</title>
<para>
Especially older CPUs don't support <link xlink:href="https://en.wikipedia.org/wiki/Advanced_Vector_Extensions">AVX</link> (<abbrev>Advanced Vector Extensions</abbrev>) instructions that are used by DLib to optimize their algorithms.
</para>
<para>
On the affected hardware errors like <literal>Illegal instruction</literal> will occur. In those cases AVX support needs to be disabled:
<programlisting>self: super: {
dlib = super.dlib.override { avxSupport = false; };
}</programlisting>
</para>
</section>
</section>

View File

@@ -1,72 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-eclipse">
<title>Eclipse</title>
<para>
The Nix expressions related to the Eclipse platform and IDE are in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/eclipse"><filename>pkgs/applications/editors/eclipse</filename></link>.
</para>
<para>
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:
<screen>
<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses --description
</screen>
Once an Eclipse variant is installed it can be run using the <command>eclipse</command> 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.
</para>
<para>
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 <emphasis>Eclipse environment</emphasis>. This type of environment is created using the function <varname>eclipseWithPlugins</varname> found inside the <varname>nixpkgs.eclipses</varname> attribute set. This function takes as argument <literal>{ eclipse, plugins ? [], jvmArgs ? [] }</literal> where <varname>eclipse</varname> is a one of the Eclipse packages described above, <varname>plugins</varname> is a list of plugin derivations, and <varname>jvmArgs</varname> 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
<screen>
packageOverrides = pkgs: {
myEclipse = with pkgs.eclipses; eclipseWithPlugins {
eclipse = eclipse-platform;
jvmArgs = [ "-Xmx2048m" ];
plugins = [ plugins.color-theme ];
};
}
</screen>
to your Nixpkgs configuration (<filename>~/.config/nixpkgs/config.nix</filename>) and install it by running <command>nix-env -f '&lt;nixpkgs&gt;' -iA myEclipse</command> and afterward run Eclipse as usual. It is possible to find out which plugins are available for installation using <varname>eclipseWithPlugins</varname> by running
<screen>
<prompt>$ </prompt>nix-env -f '&lt;nixpkgs&gt;' -qaP -A eclipses.plugins --description
</screen>
</para>
<para>
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 <varname>buildEclipseUpdateSite</varname> and <varname>buildEclipsePlugin</varname> functions found in the <varname>nixpkgs.eclipses.plugins</varname> attribute set. Use the <varname>buildEclipseUpdateSite</varname> function to install a plugin distributed as an Eclipse update site. This function takes <literal>{ name, src }</literal> as argument where <literal>src</literal> 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 <varname>buildEclipsePlugin</varname> function can be used to install a plugin that consists of a pair of feature and plugin JARs. This function takes an argument <literal>{ name, srcFeature, srcPlugin }</literal> where <literal>srcFeature</literal> and <literal>srcPlugin</literal> are the feature and plugin JARs, respectively.
</para>
<para>
Expanding the previous example with two plugins using the above functions we have
<screen>
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";
sha256 = "123…";
};
srcPlugin = fetchurl {
url = "http://…/plugins/myplugin1.jar";
sha256 = "123…";
};
});
(plugins.buildEclipseUpdateSite {
name = "myplugin2-1.0";
src = fetchurl {
stripRoot = false;
url = "http://…/myplugin2.zip";
sha256 = "123…";
};
});
];
};
}
</screen>
</para>
</section>

View File

@@ -1,17 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-elm">
<title>Elm</title>
<para>
To start a development environment do <command>nix-shell -p elmPackages.elm elmPackages.elm-format</command>
</para>
<para>
To update Elm compiler, see <filename>nixpkgs/pkgs/development/compilers/elm/README.md</filename>.
</para>
<para>
To package Elm applications, <link xlink:href="https://github.com/hercules-ci/elm2nix#elm2nix">read about elm2nix</link>.
</para>
</section>

View File

@@ -1,131 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-emacs">
<title>Emacs</title>
<section xml:id="sec-emacs-config">
<title>Configuring Emacs</title>
<para>
The Emacs package comes with some extra helpers to make it easier to configure. <varname>emacsWithPackages</varname> 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 <literal>company</literal>, <literal>counsel</literal>, <literal>flycheck</literal>, <literal>ivy</literal>, <literal>magit</literal>, <literal>projectile</literal>, and <literal>use-package</literal> you could use this as a <filename>~/.config/nixpkgs/config.nix</filename> override:
</para>
<screen>
{
packageOverrides = pkgs: with pkgs; {
myEmacs = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
company
counsel
flycheck
ivy
magit
projectile
use-package
]));
}
}
</screen>
<para>
You can install it like any other packages via <command>nix-env -iA myEmacs</command>. However, this will only install those packages. It will not <literal>configure</literal> 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 provide a <filename>default.el</filename> file in <filename>/share/emacs/site-start/</filename>. Emacs knows to load this file automatically when it starts.
</para>
<screen>
{
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 ("&lt;C-tab&gt;" . 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 = emacsWithPackages (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
]));
};
}
</screen>
<para>
This provides a fairly full Emacs start file. It will load in addition to the user's presonal config. You can always disable it by passing <command>-q</command> to the Emacs command.
</para>
<para>
Sometimes <varname>emacsWithPackages</varname> 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 <filename>pkgs/top-level/emacs-packages.nix</filename>). But you can't control this priorities when some package is installed as a dependency. You can override it on 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 <varname>overrideScope'</varname>.
</para>
<screen>
overrides = self: super: rec {
haskell-mode = self.melpaPackages.haskell-mode;
...
};
((emacsPackagesGen emacs).overrideScope' overrides).emacsWithPackages (p: with p; [
# here both these package will use haskell-mode of our own choice
ghc-mod
dante
])
</screen>
</section>
</section>

View File

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

View File

@@ -1,24 +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.xml" />
<xi:include href="dlib.xml" />
<xi:include href="eclipse.xml" />
<xi:include href="elm.xml" />
<xi:include href="emacs.xml" />
<xi:include href="ibus.xml" />
<xi:include href="kakoune.xml" />
<xi:include href="linux.xml" />
<xi:include href="locales.xml" />
<xi:include href="nginx.xml" />
<xi:include href="opengl.xml" />
<xi:include href="shell-helpers.xml" />
<xi:include href="steam.xml" />
<xi:include href="urxvt.xml" />
<xi:include href="weechat.xml" />
<xi:include href="xorg.xml" />
</chapter>

View File

@@ -1,14 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-kakoune">
<title>Kakoune</title>
<para>
Kakoune can be built to autoload plugins:
<programlisting>(kakoune.override {
configure = {
plugins = with pkgs.kakounePlugins; [ parinfer-rust ];
};
})</programlisting>
</para>
</section>

View File

@@ -1,85 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-linux-kernel">
<title>Linux kernel</title>
<para>
The Nix expressions to build the Linux kernel are in <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel"><filename>pkgs/os-specific/linux/kernel</filename></link>.
</para>
<para>
The function that builds the kernel has an argument <varname>kernelPatches</varname> which should be a list of <literal>{name, patch, extraConfig}</literal> attribute sets, where <varname>name</varname> is the name of the patch (which is included in the kernels <varname>meta.description</varname> attribute), <varname>patch</varname> is the patch itself (possibly compressed), and <varname>extraConfig</varname> (optional) is a string specifying extra options to be concatenated to the kernel configuration file (<filename>.config</filename>).
</para>
<para>
The kernel derivation exports an attribute <varname>features</varname> 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 <varname>iwlwifi</varname> feature (i.e. has built-in support for Intel wireless chipsets), then NixOS doesnt have to build the external <varname>iwlwifi</varname> package:
<programlisting>
modulesTree = [kernel]
++ pkgs.lib.optional (!kernel.features ? iwlwifi) kernelPackages.iwlwifi
++ ...;
</programlisting>
</para>
<para>
How to add a new (major) version of the Linux kernel to Nixpkgs:
<orderedlist>
<listitem>
<para>
Copy the old Nix expression (e.g. <filename>linux-2.6.21.nix</filename>) to the new one (e.g. <filename>linux-2.6.22.nix</filename>) and update it.
</para>
</listitem>
<listitem>
<para>
Add the new kernel to <filename>all-packages.nix</filename> (e.g., create an attribute <varname>kernel_2_6_22</varname>).
</para>
</listitem>
<listitem>
<para>
Now were going to update the kernel configuration. First unpack the kernel. Then for each supported platform (<literal>i686</literal>, <literal>x86_64</literal>, <literal>uml</literal>) do the following:
<orderedlist>
<listitem>
<para>
Make an copy from the old config (e.g. <filename>config-2.6.21-i686-smp</filename>) to the new one (e.g. <filename>config-2.6.22-i686-smp</filename>).
</para>
</listitem>
<listitem>
<para>
Copy the config file for this platform (e.g. <filename>config-2.6.22-i686-smp</filename>) to <filename>.config</filename> in the kernel source tree.
</para>
</listitem>
<listitem>
<para>
Run <literal>make oldconfig ARCH=<replaceable>{i386,x86_64,um}</replaceable></literal> and answer all questions. (For the uml configuration, also add <literal>SHELL=bash</literal>.) Make sure to keep the configuration consistent between platforms (i.e. dont enable some feature on <literal>i686</literal> and disable it on <literal>x86_64</literal>).
</para>
</listitem>
<listitem>
<para>
If needed you can also run <literal>make menuconfig</literal>:
<screen>
<prompt>$ </prompt>nix-env -i ncurses
<prompt>$ </prompt>export NIX_CFLAGS_LINK=-lncurses
<prompt>$ </prompt>make menuconfig ARCH=<replaceable>arch</replaceable></screen>
</para>
</listitem>
<listitem>
<para>
Copy <filename>.config</filename> over the new config file (e.g. <filename>config-2.6.22-i686-smp</filename>).
</para>
</listitem>
</orderedlist>
</para>
</listitem>
<listitem>
<para>
Test building the kernel: <literal>nix-build -A kernel_2_6_22</literal>. If it compiles, ship it! For extra credit, try booting NixOS with it.
</para>
</listitem>
<listitem>
<para>
It may be that the new kernel requires updating the external kernel modules and kernel-dependent packages listed in the <varname>linuxPackagesFor</varname> function in <filename>all-packages.nix</filename> (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.
</para>
</listitem>
</orderedlist>
</para>
</section>

View File

@@ -1,13 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="locales">
<title>Locales</title>
<para>
To allow simultaneous use of packages linked against different versions of <literal>glibc</literal> with different locale archive formats Nixpkgs patches <literal>glibc</literal> to rely on <literal>LOCALE_ARCHIVE</literal> environment variable.
</para>
<para>
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 <literal>LOCALE_ARCHIVE</literal> variable pointing to <literal>${glibcLocales}/lib/locale/locale-archive</literal>. 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 <literal>allLocales</literal> and <literal>locales</literal> of the package.
</para>
</section>

View File

@@ -1,25 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-nginx">
<title>Nginx</title>
<para>
<link xlink:href="https://nginx.org/">Nginx</link> is a reverse proxy and lightweight webserver.
</para>
<section xml:id="sec-nginx-etag">
<title>ETags on static files served from the Nix store</title>
<para>
HTTP has a couple 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 <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified"><literal>Last-Modified</literal></link> response header automatically; unfortunately, it works by using filesystem timestamps to determine the value of the <literal>Last-Modified</literal> 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).
</para>
<para>
Fortunately, HTTP supports an alternative (and more effective) caching mechanism: the <link xlink:href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag"><literal>ETag</literal></link> response header. The value of the <literal>ETag</literal> 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 <literal>If-None-Match</literal> header. If the ETag value is unchanged, then the server does not need to resend the content.
</para>
<para>
As of NixOS 19.09, the nginx package in Nixpkgs is patched such that when nginx serves a file out of <filename>/nix/store</filename>, the hash in the store path is used as the <literal>ETag</literal> 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.
</para>
</section>
</section>

View File

@@ -1,9 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-opengl">
<title>OpenGL</title>
<para>
Packages that use OpenGL have NixOS desktop as their primary target. The current solution for loading the GPU-specific drivers is based on <literal>libglvnd</literal> and looks for the driver implementation in <literal>LD_LIBRARY_PATH</literal>. 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 <literal>libglvnd</literal> and <literal>mesa_drivers</literal> in <literal>LD_LIBRARY_PATH</literal>. For proprietary video drivers you might have luck with also adding the corresponding video driver package.
</para>
</section>

View File

@@ -1,25 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-shell-helpers">
<title>Interactive shell helpers</title>
<para>
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 <command>PACKAGE-share</command> scripts are shipped that print the location of the corresponding shared folder. Current list of such packages is as following:
<itemizedlist>
<listitem>
<para>
<literal>autojump</literal>: <command>autojump-share</command>
</para>
</listitem>
<listitem>
<para>
<literal>fzf</literal>: <command>fzf-share</command>
</para>
</listitem>
</itemizedlist>
E.g. <literal>autojump</literal> can then used in the .bashrc like this:
<screen>
source "$(autojump-share)/autojump.bash"
</screen>
</para>
</section>

View File

@@ -1,131 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-steam">
<title>Steam</title>
<section xml:id="sec-steam-nix">
<title>Steam in Nix</title>
<para>
Steam is distributed as a <filename>.deb</filename> file, for now only as an i686 package (the amd64 package only has documentation). When unpacked, it has a script called <filename>steam</filename> that in Ubuntu (their target distro) would go to <filename>/usr/bin </filename>. 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.
</para>
<para>
Nix problems and constraints:
<itemizedlist>
<listitem>
<para>
We don't have <filename>/bin/bash</filename> and many scripts point there. Similarly for <filename>/usr/bin/python</filename> .
</para>
</listitem>
<listitem>
<para>
We don't have the dynamic loader in <filename>/lib </filename>.
</para>
</listitem>
<listitem>
<para>
The <filename>steam.sh</filename> script in $HOME can not be patched, as it is checked and rewritten by steam.
</para>
</listitem>
<listitem>
<para>
The steam binary cannot be patched, it's also checked.
</para>
</listitem>
</itemizedlist>
</para>
<para>
The current approach to deploy Steam in NixOS is composing a FHS-compatible chroot environment, as documented <link xlink:href="http://sandervanderburg.blogspot.nl/2013/09/composing-fhs-compatible-chroot.html">here</link>. 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.
</para>
</section>
<section xml:id="sec-steam-play">
<title>How to play</title>
<para>
For 64-bit systems it's important to have
<programlisting>hardware.opengl.driSupport32Bit = true;</programlisting>
in your <filename>/etc/nixos/configuration.nix</filename>. You'll also need
<programlisting>hardware.pulseaudio.support32Bit = true;</programlisting>
if you are using PulseAudio - this will enable 32bit ALSA apps integration. To use the Steam controller or other Steam supported controllers such as the DualShock 4 or Nintendo Switch Pro, you need to add
<programlisting>hardware.steam-hardware.enable = true;</programlisting>
to your configuration.
</para>
</section>
<section xml:id="sec-steam-troub">
<title>Troubleshooting</title>
<para>
<variablelist>
<varlistentry>
<term>
Steam fails to start. What do I do?
</term>
<listitem>
<para>
Try to run
<programlisting>strace steam</programlisting>
to see what is causing steam to fail.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
Using the FOSS Radeon or nouveau (nvidia) drivers
</term>
<listitem>
<itemizedlist>
<listitem>
<para>
The <literal>newStdcpp</literal> parameter was removed since NixOS 17.09 and should not be needed anymore.
</para>
</listitem>
<listitem>
<para>
Steam ships statically linked with a version of libcrypto that conflics with the one dynamically loaded by radeonsi_dri.so. If you get the error
<programlisting>steam.sh: line 713: 7842 Segmentation fault (core dumped)</programlisting>
have a look at <link xlink:href="https://github.com/NixOS/nixpkgs/pull/20269">this pull request</link>.
</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
<varlistentry>
<term>
Java
</term>
<listitem>
<orderedlist>
<listitem>
<para>
There is no java in steam chrootenv by default. If you get a message like
<programlisting>/home/foo/.local/share/Steam/SteamApps/common/towns/towns.sh: line 1: java: command not found</programlisting>
You need to add
<programlisting> steam.override { withJava = true; };</programlisting>
to your configuration.
</para>
</listitem>
</orderedlist>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section xml:id="sec-steam-run">
<title>steam-run</title>
<para>
The FHS-compatible chroot used for steam can also be used to run other linux games that expect a FHS environment. To do it, add
<programlisting>pkgs.(steam.override {
nativeOnly = true;
newStdcpp = true;
}).run</programlisting>
to your configuration, rebuild, and run the game with
<programlisting>steam-run ./foo</programlisting>
</para>
</section>
</section>

View File

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

View File

@@ -1,101 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-urxvt">
<title>Urxvt</title>
<para>
Urxvt, also known as rxvt-unicode, is a highly customizable terminal emulator.
</para>
<section xml:id="sec-urxvt-conf">
<title>Configuring urxvt</title>
<para>
In <literal>nixpkgs</literal>, urxvt is provided by the package
<literal>rxvt-unicode</literal>. 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
<programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
plugins = with availablePlugins; [ perls resize-font vtwheel ];
}
}</programlisting>
If the <literal>configure</literal> function returns an attrset without the
<literal>plugins</literal> attribute, <literal>availablePlugins</literal>
will be used automatically.
</para>
<para>
In order to add plugins but also keep all default plugins installed, it is
possible to use the following method:
<programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
};
}</programlisting>
</para>
<para>
To get a list of all the plugins available, open the Nix REPL and run
<programlisting>$ nix repl
:l &lt;nixpkgs&gt;
map (p: p.name) pkgs.rxvt-unicode.plugins
</programlisting>
Alternatively, if your shell is bash or zsh and have completion enabled,
simply type <literal>nixpkgs.rxvt-unicode.plugins.&lt;tab&gt;</literal>.
</para>
<para>
In addition to <literal>plugins</literal> the options
<literal>extraDeps</literal> and <literal>perlDeps</literal> can be used
to install extra packages.
<literal>extraDeps</literal> can be used, for example, to provide
<literal>xsel</literal> (a clipboard manager) to the clipboard plugin,
without installing it globally:
<programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
pluginsDeps = [ xsel ];
}
}</programlisting>
<literal>perlDeps</literal> is a handy way to provide Perl packages to
your custom plugins (in <literal>$HOME/.urxvt/ext</literal>). For example,
if you need <literal>AnyEvent</literal> you can do:
<programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
perlDeps = with perlPackages; [ AnyEvent ];
}
}</programlisting>
</para>
</section>
<section xml:id="sec-urxvt-pkg">
<title>Packaging urxvt plugins</title>
<para>
Urxvt plugins resides in
<literal>pkgs/applications/misc/rxvt-unicode-plugins</literal>.
To add a new plugin create an expression in a subdirectory and add the
package to the set in
<literal>pkgs/applications/misc/rxvt-unicode-plugins/default.nix</literal>.
</para>
<para>
A plugin can be any kind of derivation, the only requirement is that it
should always install perl scripts in <literal>$out/lib/urxvt/perl</literal>.
Look for existing plugins for examples.
</para>
<para>
If the plugin is itself a perl package that needs to be imported from
other plugins or scripts, add the following passthrough:
<programlisting>passthru.perlPackages = [ "self" ];
</programlisting>
This will make the urxvt wrapper pick up the dependency and set up the perl
path accordingly.
</para>
</section>
</section>

View File

@@ -1,85 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-weechat">
<title>Weechat</title>
<para>
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
<programlisting>weechat.override {configure = {availablePlugins, ...}: {
plugins = with availablePlugins; [ python perl ];
}
}</programlisting>
If the <literal>configure</literal> function returns an attrset without the <literal>plugins</literal> attribute, <literal>availablePlugins</literal> will be used automatically.
</para>
<para>
The plugins currently available are <literal>python</literal>, <literal>perl</literal>, <literal>ruby</literal>, <literal>guile</literal>, <literal>tcl</literal> and <literal>lua</literal>.
</para>
<para>
The python and perl plugins allows the addition of extra libraries. For instance, the <literal>inotify.py</literal> script in weechat-scripts requires D-Bus or libnotify, and the <literal>fish.py</literal> script requires pycrypto. To use these scripts, use the plugin's <literal>withPackages</literal> attribute:
<programlisting>weechat.override { configure = {availablePlugins, ...}: {
plugins = with availablePlugins; [
(python.withPackages (ps: with ps; [ pycrypto python-dbus ]))
];
};
}
</programlisting>
</para>
<para>
In order to also keep all default plugins installed, it is possible to use the following method:
<programlisting>weechat.override { configure = { availablePlugins, ... }: {
plugins = builtins.attrValues (availablePlugins // {
python = availablePlugins.python.withPackages (ps: with ps; [ pycrypto python-dbus ]);
});
}; }
</programlisting>
</para>
<para>
WeeChat allows to set defaults on startup using the <literal>--run-command</literal>. The <literal>configure</literal> method can be used to pass commands to the program:
<programlisting>weechat.override {
configure = { availablePlugins, ... }: {
init = ''
/set foo bar
/server add freenode chat.freenode.org
'';
};
}</programlisting>
Further values can be added to the list of commands when running <literal>weechat --run-command "your-commands"</literal>.
</para>
<para>
Additionally it's possible to specify scripts to be loaded when starting <literal>weechat</literal>. These will be loaded before the commands from <literal>init</literal>:
<programlisting>weechat.override {
configure = { availablePlugins, ... }: {
scripts = with pkgs.weechatScripts; [
weechat-xmpp weechat-matrix-bridge wee-slack
];
init = ''
/set plugins.var.python.jabber.key "val"
'':
};
}</programlisting>
</para>
<para>
In <literal>nixpkgs</literal> there's a subpackage which contains derivations for WeeChat scripts. Such derivations expect a <literal>passthru.scripts</literal> attribute which contains a list of all scripts inside the store path. Furthermore all scripts have to live in <literal>$out/share</literal>. An exemplary derivation looks like this:
<programlisting>{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "exemplary-weechat-script";
src = fetchurl {
url = "https://scripts.tld/your-scripts.tar.gz";
sha256 = "...";
};
passthru.scripts = [ "foo.py" "bar.lua" ];
installPhase = ''
mkdir $out/share
cp foo.py $out/share
cp bar.lua $out/share
'';
}</programlisting>
</para>
</section>

View File

@@ -1,34 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-xorg">
<title>X.org</title>
<para>
The Nix expressions for the X.org packages reside in <filename>pkgs/servers/x11/xorg/default.nix</filename>. 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 <filename>pkgs/servers/x11/xorg/overrides.nix</filename>, in which you can override or add to the derivations produced by the generator.
</para>
<para>
The generator is invoked as follows:
<screen>
<prompt>$ </prompt>cd pkgs/servers/x11/xorg
<prompt>$ </prompt>cat tarballs-7.5.list extra.list old.list \
| perl ./generate-expr-from-tarballs.pl
</screen>
For each of the tarballs in the <filename>.list</filename> files, the script downloads it, unpacks it, and searches its <filename>configure.ac</filename> and <filename>*.pc.in</filename> files for dependencies. This information is used to generate <filename>default.nix</filename>. The generator caches downloaded tarballs between runs. Pay close attention to the <literal>NOT FOUND: <replaceable>name</replaceable></literal> messages at the end of the run, since they may indicate missing dependencies. (Some might be optional dependencies, however.)
</para>
<para>
A file like <filename>tarballs-7.5.list</filename> contains all tarballs in a X.org release. It can be generated like this:
<screen>
<prompt>$ </prompt>export i="mirror://xorg/X11R7.4/src/everything/"
<prompt>$ </prompt>cat $(PRINT_PATH=1 nix-prefetch-url $i | tail -n 1) \
| perl -e 'while (&lt;>) { if (/(href|HREF)="([^"]*.bz2)"/) { print "$ENV{'i'}$2\n"; }; }' \
| sort > tarballs-7.4.list
</screen>
<filename>extra.list</filename> contains libraries that arent part of X.org proper, but are closely related to it, such as <literal>libxcb</literal>. <filename>old.list</filename> contains some packages that were removed from X.org, but are still needed by some people or by other packages (such as <varname>imake</varname>).
</para>
<para>
If the expression for a package requires derivation attributes that the generator cannot figure out automatically (say, <varname>patches</varname> or a <varname>postInstall</varname> hook), you should modify <filename>pkgs/servers/x11/xorg/overrides.nix</filename>.
</para>
</section>

View File

@@ -1,10 +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.xml" />
<xi:include href="special/mkshell.xml" />
</chapter>

View File

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

View File

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

View File

@@ -1,90 +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-trivial-builders">
<title>Trivial builders</title>
<para>
Nixpkgs provides a couple of functions that help with building derivations. The most important one, <function>stdenv.mkDerivation</function>, has already been documented above. The following functions wrap <function>stdenv.mkDerivation</function>, making it easier to use in certain cases.
</para>
<variablelist>
<varlistentry xml:id="trivial-builder-runCommand">
<term>
<literal>runCommand</literal>
</term>
<listitem>
<para>
This takes three arguments, <literal>name</literal>, <literal>env</literal>, and <literal>buildCommand</literal>. <literal>name</literal> is just the name that Nix will append to the store path in the same way that <literal>stdenv.mkDerivation</literal> uses its <literal>name</literal> attribute. <literal>env</literal> is an attribute set specifying environment variables that will be set for this derivation. These attributes are then passed to the wrapped <literal>stdenv.mkDerivation</literal>. <literal>buildCommand</literal> specifies the commands that will be run to create this derivation. Note that you will need to create <literal>$out</literal> for Nix to register the command as successful.
</para>
<para>
An example of using <literal>runCommand</literal> is provided below.
</para>
<programlisting>
(import &lt;nixpkgs&gt; {}).runCommand "my-example" {} ''
echo My example command is running
mkdir $out
echo I can write data to the Nix store > $out/message
echo I can also run basic commands like:
echo ls
ls
echo whoami
whoami
echo date
date
''
</programlisting>
</listitem>
</varlistentry>
<varlistentry xml:id="trivial-builder-runCommandCC">
<term>
<literal>runCommandCC</literal>
</term>
<listitem>
<para>
This works just like <literal>runCommand</literal>. The only difference is that it also provides a C compiler in <literal>buildCommand</literal>s environment. To minimize your dependencies, you should only use this if you are sure you will need a C compiler as part of running your command.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="trivial-builder-runCommandLocal">
<term>
<literal>runCommandLocal</literal>
</term>
<listitem>
<para>
Variant of <literal>runCommand</literal> that forces the derivation to be built locally, it is not substituted. This is intended for very cheap commands (&lt;1s execution time). It saves on the network roundrip and can speed up a build.
</para>
<note><para>
This sets <link xlink:href="https://nixos.org/nix/manual/#adv-attr-allowSubstitutes"><literal>allowSubstitutes</literal> to <literal>false</literal></link>, so only use <literal>runCommandLocal</literal> if you are certain the user will always have a builder for the <literal>system</literal> 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 <literal>system</literal> is usually the same as <literal>builtins.currentSystem</literal>.
</para></note>
</listitem>
</varlistentry>
<varlistentry xml:id="trivial-builder-writeText">
<term>
<literal>writeTextFile</literal>, <literal>writeText</literal>, <literal>writeTextDir</literal>, <literal>writeScript</literal>, <literal>writeScriptBin</literal>
</term>
<listitem>
<para>
These functions write <literal>text</literal> to the Nix store. This is useful for creating scripts from Nix expressions. <literal>writeTextFile</literal> takes an attribute set and expects two arguments, <literal>name</literal> and <literal>text</literal>. <literal>name</literal> corresponds to the name used in the Nix store path. <literal>text</literal> will be the contents of the file. You can also set <literal>executable</literal> to true to make this file have the executable bit set.
</para>
<para>
Many more commands wrap <literal>writeTextFile</literal> including <literal>writeText</literal>, <literal>writeTextDir</literal>, <literal>writeScript</literal>, and <literal>writeScriptBin</literal>. These are convenience functions over <literal>writeTextFile</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="trivial-builder-symlinkJoin">
<term>
<literal>symlinkJoin</literal>
</term>
<listitem>
<para>
This can be used to put many derivations into the same directory structure. It works by creating a new derivation and adding symlinks to each of the paths listed. It expects two arguments, <literal>name</literal>, and <literal>paths</literal>. <literal>name</literal> is the name used in the Nix store path for the created derivation. <literal>paths</literal> is a list of paths that will be symlinked. These paths can be to Nix store derivations or any other subdirectory contained within.
</para>
</listitem>
</varlistentry>
</variablelist>
</chapter>

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

@@ -0,0 +1,665 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-conventions">
<title>Coding conventions</title>
<section xml:id="sec-syntax"><title>Syntax</title>
<itemizedlist>
<listitem><para>Use 2 spaces of indentation per indentation level in
Nix expressions, 4 spaces in shell scripts.</para></listitem>
<listitem><para>Do not use tab characters, i.e. configure your
editor to use soft tabs. For instance, use <literal>(setq-default
indent-tabs-mode nil)</literal> in Emacs. Everybody has different
tab settings so its asking for trouble.</para></listitem>
<listitem><para>Use <literal>lowerCamelCase</literal> for variable
names, not <literal>UpperCamelCase</literal>. 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 xml:id="sec-package-naming"><title>Package naming</title>
<para>In Nixpkgs, there are generally three different names associated with a package:
<itemizedlist>
<listitem><para>The <varname>name</varname> attribute of the
derivation (excluding the version part). This is what most users
see, in particular when using
<command>nix-env</command>.</para></listitem>
<listitem><para>The variable name used for the instantiated package
in <filename>all-packages.nix</filename>, and when passing it as a
dependency to other functions. 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>If package is fetched from git's commit then
the version part of the name <emphasis>must</emphasis> be the date of that
(fetched) commit. The date must be in <literal>"YYYY-MM-DD"</literal> format.
Also add <literal>"git"</literal> to the name - e.g.,
<literal>"pkgname-git-2014-09-23"</literal>.</para></listitem>
<listitem><para>Dashes in the package name should be preserved
in new variable names, rather than converted to underscores
(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 xml:id="sec-hierarchy"><title>Hierarchy</title>
<para>Each package should be stored in its own directory somewhere in
the <filename>pkgs/</filename> tree, i.e. in
<filename>pkgs/<replaceable>category</replaceable>/<replaceable>subcategory</replaceable>/<replaceable>...</replaceable>/<replaceable>pkgname</replaceable></filename>.
Below are some rules for picking the right category for a package.
Many packages fall under several categories; what matters is the
<emphasis>primary</emphasis> purpose of a package. For example, the
<literal>libxml2</literal> package builds both a library and some
tools; but its a library foremost, so it goes under
<filename>pkgs/development/libraries</filename>.</para>
<para>When in doubt, consider refactoring the
<filename>pkgs/</filename> tree, e.g. creating new categories or
splitting up an existing category.</para>
<variablelist>
<varlistentry>
<term>If its used to support <emphasis>software development</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a <emphasis>library</emphasis> used by other packages:</term>
<listitem>
<para><filename>development/libraries</filename> (e.g. <filename>libxml2</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>compiler</emphasis>:</term>
<listitem>
<para><filename>development/compilers</filename> (e.g. <filename>gcc</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its an <emphasis>interpreter</emphasis>:</term>
<listitem>
<para><filename>development/interpreters</filename> (e.g. <filename>guile</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a (set of) development <emphasis>tool(s)</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a <emphasis>parser generator</emphasis> (including lexers):</term>
<listitem>
<para><filename>development/tools/parsing</filename> (e.g. <filename>bison</filename>, <filename>flex</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>build manager</emphasis>:</term>
<listitem>
<para><filename>development/tools/build-managers</filename> (e.g. <filename>gnumake</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>development/tools/misc</filename> (e.g. <filename>binutils</filename>)</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>development/misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a (set of) <emphasis>tool(s)</emphasis>:</term>
<listitem>
<para>(A tool is a relatively small program, especially one 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>:</term>
<listitem>
<para><filename>desktops</filename> (e.g. <filename>kde</filename>, <filename>gnome</filename>, <filename>enlightenment</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>window manager</emphasis>:</term>
<listitem>
<para><filename>applications/window-managers</filename> (e.g. <filename>awesome</filename>, <filename>compiz</filename>, <filename>stumpwm</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its an <emphasis>application</emphasis>:</term>
<listitem>
<para>A (typically large) program with a distinct user
interface, primarily used interactively.</para>
<variablelist>
<varlistentry>
<term>If its a <emphasis>version management system</emphasis>:</term>
<listitem>
<para><filename>applications/version-management</filename> (e.g. <filename>subversion</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its for <emphasis>video playback / editing</emphasis>:</term>
<listitem>
<para><filename>applications/video</filename> (e.g. <filename>vlc</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its for <emphasis>graphics viewing / editing</emphasis>:</term>
<listitem>
<para><filename>applications/graphics</filename> (e.g. <filename>gimp</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its for <emphasis>networking</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a <emphasis>mailreader</emphasis>:</term>
<listitem>
<para><filename>applications/networking/mailreaders</filename> (e.g. <filename>thunderbird</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>newsreader</emphasis>:</term>
<listitem>
<para><filename>applications/networking/newsreaders</filename> (e.g. <filename>pan</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>web browser</emphasis>:</term>
<listitem>
<para><filename>applications/networking/browsers</filename> (e.g. <filename>firefox</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>applications/networking/misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>applications/misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>If its <emphasis>data</emphasis> (i.e., does not have a
straight-forward executable semantics):</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its a <emphasis>font</emphasis>:</term>
<listitem>
<para><filename>data/fonts</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its related to <emphasis>SGML/XML processing</emphasis>:</term>
<listitem>
<variablelist>
<varlistentry>
<term>If its an <emphasis>XML DTD</emphasis>:</term>
<listitem>
<para><filename>data/sgml+xml/schemas/xml-dtd</filename> (e.g. <filename>docbook</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>If its an <emphasis>XSLT stylesheet</emphasis>:</term>
<listitem>
<para>(Okay, these are executable...)</para>
<para><filename>data/sgml+xml/stylesheets/xslt</filename> (e.g. <filename>docbook-xsl</filename>)</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term>If its a <emphasis>game</emphasis>:</term>
<listitem>
<para><filename>games</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Else:</term>
<listitem>
<para><filename>misc</filename></para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="sec-versioning"><title>Versioning</title>
<para>Because every version of a package in Nixpkgs creates a
potential maintenance burden, old versions of a package should not be
kept unless there is a good reason to do so. For instance, Nixpkgs
contains several versions of GCC because other packages dont build
with the latest version of GCC. Other examples are having both the
latest stable and latest pre-release version of a package, or to keep
several major releases of an application that differ significantly in
functionality.</para>
<para>If there is only one version of a package, its Nix expression
should be named <filename>e2fsprogs/default.nix</filename>. If there
are multiple versions, this should be reflected in the filename,
e.g. <filename>e2fsprogs/1.41.8.nix</filename> and
<filename>e2fsprogs/1.41.9.nix</filename>. The version in the
filename should leave out unnecessary detail. For instance, if we
keep the latest Firefox 2.0.x and 3.5.x versions in Nixpkgs, they
should be named <filename>firefox/2.0.nix</filename> and
<filename>firefox/3.5.nix</filename>, respectively (which, at a given
point, might contain versions <literal>2.0.0.20</literal> and
<literal>3.5.4</literal>). If a version requires many auxiliary
files, you can use a subdirectory for each version,
e.g. <filename>firefox/2.0/default.nix</filename> and
<filename>firefox/3.5/default.nix</filename>.</para>
<para>All versions of a package <emphasis>must</emphasis> be included
in <filename>all-packages.nix</filename> to make sure that they
evaluate correctly.</para>
</section>
</section>
<section xml:id="sec-sources"><title>Fetching Sources</title>
<para>There are multiple ways to fetch a package source in nixpkgs. The
general guidline is that you should package sources with a high degree of
availability. Right now there is only one fetcher which has mirroring
support and that is <literal>fetchurl</literal>. Note that you should also
prefer protocols which have a corresponding proxy environment variable.
</para>
<para>You can find many source fetch helpers in <literal>pkgs/build-support/fetch*</literal>.
</para>
<para>In the file <literal>pkgs/top-level/all-packages.nix</literal> you can
find fetch helpers, these have names on the form
<literal>fetchFrom*</literal>. The intention of these are to provide
snapshot fetches but using the same api as some of the version controlled
fetchers from <literal>pkgs/build-support/</literal>. As an example going
from bad to good:
<itemizedlist>
<listitem>
<para>Uses <literal>git://</literal> which won't be proxied.
<programlisting>
src = fetchgit {
url = "git://github.com/NixOS/nix.git";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
}
</programlisting>
</para>
</listitem>
<listitem>
<para>This is ok, but an archive fetch will still be faster.
<programlisting>
src = fetchgit {
url = "https://github.com/NixOS/nix.git";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
}
</programlisting>
</para>
</listitem>
<listitem>
<para>Fetches a snapshot archive and you get the rev you want.
<programlisting>
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "04yri911rj9j19qqqn6m82266fl05pz98inasni0vxr1cf1gdgv9";
}
</programlisting>
</para>
</listitem>
</itemizedlist>
</para>
</section>
</chapter>

109
doc/configuration.xml Normal file
View File

@@ -0,0 +1,109 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-packageconfig">
<title><filename>~/.nixpkgs/config.nix</filename>: global configuration</title>
<para>Nix packages can be configured to allow or deny certain options.</para>
<para>To apply the configuration edit
<filename>~/.nixpkgs/config.nix</filename> and set it like
<programlisting>
{
allowUnfree = true;
}
</programlisting>
and will allow the Nix package manager to install unfree licensed packages.</para>
<para>The configuration as listed also applies to NixOS under
<option>nixpkgs.config</option> set.</para>
<itemizedlist>
<listitem>
<para>Allow installing of packages that are distributed under
unfree license by setting <programlisting>allowUnfree =
true;</programlisting> or deny them by setting it to
<literal>false</literal>.</para>
<para>Same can be achieved by setting the environment variable:
<programlisting>
$ export NIXPKGS_ALLOW_UNFREE=1
</programlisting>
</para>
</listitem>
<listitem>
<para>Whenever unfree packages are not allowed, single packages
can still be allowed by a predicate function that accepts package
as an argument and should return a boolean:
<programlisting>
allowUnfreePredicate = (pkg: ...);
</programlisting>
Example to allow flash player only:
<programlisting>
allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name);
</programlisting>
</para>
</listitem>
<listitem>
<para>Whenever unfree packages are not allowed, packages can still
be whitelisted by their license:
<programlisting>
whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];
</programlisting>
</para>
</listitem>
<listitem>
<para>In addition to whitelisting licenses which are denied by the
<literal>allowUnfree</literal> setting, you can also explicitely
deny installation of packages which have a certain license:
<programlisting>
blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];
</programlisting>
</para>
</listitem>
</itemizedlist>
<para>A complete list of licenses can be found in the file
<filename>lib/licenses.nix</filename> of the nix package tree.</para>
<!--============================================================-->
<section xml:id="sec-modify-via-packageOverrides"><title>Modify
packages via <literal>packageOverrides</literal></title>
<para>You can define a function called
<varname>packageOverrides</varname> in your local
<filename>~/.nixpkgs/config.nix</filename> to overide nix packages. It
must be a function that takes pkgs as an argument and return modified
set of packages.
<programlisting>
{
packageOverrides = pkgs: rec {
foo = pkgs.foo.override { ... };
};
}
</programlisting>
</para>
</section>
</chapter>

20
doc/contributing.xml Normal file
View File

@@ -0,0 +1,20 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-contributing">
<title>Contributing to this documentation</title>
<para>The DocBook sources of the Nixpkgs manual are in the <filename
xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc</filename>
subdirectory of the Nixpkgs repository. If you make modifications to
the manual, it's important to build it before committing. You can do that as follows:
<screen>
$ cd /path/to/nixpkgs
$ nix-build doc
</screen>
If the build succeeds, the manual will be in
<filename>./result/share/doc/nixpkgs/manual.html</filename>.</para>
</chapter>

View File

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

View File

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

View File

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

View File

@@ -1,536 +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"
version="5.0"
xml:id="chap-reviewing-contributions">
<title>Reviewing contributions</title>
<warning>
<para>
The following section is a draft, and the policy for reviewing is still being discussed in issues such as <link
xlink:href="https://github.com/NixOS/nixpkgs/issues/11166">#11166 </link> and <link
xlink:href="https://github.com/NixOS/nixpkgs/issues/20836">#20836 </link>.
</para>
</warning>
<para>
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.
</para>
<para>
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 <link
xlink:href="https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc">most recently</link> and the <link
xlink:href="https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc">least recently</link> updated pull requests. We highly encourage looking at <link xlink:href="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"> this list of ready to merge, unreviewed pull requests</link>.
</para>
<para>
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.
</para>
<para>
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.
</para>
<para>
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.
</para>
<para>
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.
</para>
<section xml:id="reviewing-contributions-package-updates">
<title>Package updates</title>
<para>
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.
</para>
<para>
It can happen that non-trivial updates include patches or more complex changes.
</para>
<para>
Reviewing process:
</para>
<itemizedlist>
<listitem>
<para>
Add labels to the pull request. (Requires commit rights)
</para>
<itemizedlist>
<listitem>
<para>
<literal>8.has: package (update)</literal> and any topic label that fit the updated package.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the package versioning fits the guidelines.
</para>
</listitem>
<listitem>
<para>
Ensure that the commit text fits the guidelines.
</para>
</listitem>
<listitem>
<para>
Ensure that the package maintainers are notified.
</para>
<itemizedlist>
<listitem>
<para>
<link xlink:href="https://help.github.com/articles/about-codeowners/">CODEOWNERS</link> will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the meta field information is correct.
</para>
<itemizedlist>
<listitem>
<para>
License can change with version updates, so it should be checked to match the upstream license.
</para>
</listitem>
<listitem>
<para>
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.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the code contains no typos.
</para>
</listitem>
<listitem>
<para>
Building the package locally.
</para>
<itemizedlist>
<listitem>
<para>
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.
</para>
<para>
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.
<screen>
<prompt>$ </prompt>git fetch origin nixos-unstable <co xml:id='reviewing-rebase-2' />
<prompt>$ </prompt>git fetch origin pull/PRNUMBER/head <co xml:id='reviewing-rebase-3' />
<prompt>$ </prompt>git rebase --onto nixos-unstable BASEBRANCH FETCH_HEAD <co
xml:id='reviewing-rebase-4' />
</screen>
<calloutlist>
<callout arearefs='reviewing-rebase-2'>
<para>
Fetching the nixos-unstable branch.
</para>
</callout>
<callout arearefs='reviewing-rebase-3'>
<para>
Fetching the pull request changes, <varname>PRNUMBER</varname> is the number at the end of the pull request title and <varname>BASEBRANCH</varname> the base branch of the pull request.
</para>
</callout>
<callout arearefs='reviewing-rebase-4'>
<para>
Rebasing the pull request changes to the nixos-unstable branch.
</para>
</callout>
</calloutlist>
</para>
</listitem>
<listitem>
<para>
The <link xlink:href="https://github.com/Mic92/nixpkgs-review">nixpkgs-review</link> tool can be used to review a pull request content in a single command. <varname>PRNUMBER</varname> should be replaced by the number at the end of the pull request title. You can also provide the full github pull request url.
</para>
<screen>
<prompt>$ </prompt>nix-shell -p nixpkgs-review --run "nixpkgs-review pr PRNUMBER"
</screen>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Running every binary.
</para>
</listitem>
</itemizedlist>
<example xml:id="reviewing-contributions-sample-package-update">
<title>Sample template for a package update review</title>
<screen>
##### 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
</screen>
</example>
</section>
<section xml:id="reviewing-contributions-new-packages">
<title>New packages</title>
<para>
New packages are a common type of pull requests. These pull requests consists in adding a new nix-expression for a package.
</para>
<para>
Reviewing process:
</para>
<itemizedlist>
<listitem>
<para>
Add labels to the pull request. (Requires commit rights)
</para>
<itemizedlist>
<listitem>
<para>
<literal>8.has: package (new)</literal> and any topic label that fit the new package.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the package versioning is fitting the guidelines.
</para>
</listitem>
<listitem>
<para>
Ensure that the commit name is fitting the guidelines.
</para>
</listitem>
<listitem>
<para>
Ensure that the meta field contains correct information.
</para>
<itemizedlist>
<listitem>
<para>
License must be checked to be fitting upstream license.
</para>
</listitem>
<listitem>
<para>
Platforms should be set or the package will not get binary substitutes.
</para>
</listitem>
<listitem>
<para>
A maintainer must be set. This can be the package submitter or a community member that accepts to take maintainership of the package.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the code contains no typos.
</para>
</listitem>
<listitem>
<para>
Ensure the package source.
</para>
<itemizedlist>
<listitem>
<para>
Mirrors urls should be used when available.
</para>
</listitem>
<listitem>
<para>
The most appropriate function should be used (e.g. packages from GitHub should use <literal>fetchFromGitHub</literal>).
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Building the package locally.
</para>
</listitem>
<listitem>
<para>
Running every binary.
</para>
</listitem>
</itemizedlist>
<example xml:id="reviewing-contributions-sample-new-package">
<title>Sample template for a new package review</title>
<screen>
##### 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
- [ ] phases are respected
- [ ] patches that are remotely available are fetched with `fetchpatch`
##### Possible improvements
##### Comments
</screen>
</example>
</section>
<section xml:id="reviewing-contributions-module-updates">
<title>Module updates</title>
<para>
Module updates are submissions changing modules in some ways. These often contains changes to the options or introduce new options.
</para>
<para>
Reviewing process
</para>
<itemizedlist>
<listitem>
<para>
Add labels to the pull request. (Requires commit rights)
</para>
<itemizedlist>
<listitem>
<para>
<literal>8.has: module (update)</literal> and any topic label that fit the module.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the module maintainers are notified.
</para>
<itemizedlist>
<listitem>
<para>
<link xlink:href="https://help.github.com/articles/about-codeowners/">CODEOWNERS</link> will make GitHub notify users based on the submitted changes, but it can happen that it misses some of the package maintainers.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the module tests, if any, are succeeding.
</para>
</listitem>
<listitem>
<para>
Ensure that the introduced options are correct.
</para>
<itemizedlist>
<listitem>
<para>
Type should be appropriate (string related types differs in their merging capabilities, <literal>optionSet</literal> and <literal>string</literal> types are deprecated).
</para>
</listitem>
<listitem>
<para>
Description, default and example should be provided.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that option changes are backward compatible.
</para>
<itemizedlist>
<listitem>
<para>
<literal>mkRenamedOptionModule</literal> and <literal>mkAliasOptionModule</literal> functions provide way to make option changes backward compatible.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that removed options are declared with <literal>mkRemovedOptionModule</literal>
</para>
</listitem>
<listitem>
<para>
Ensure that changes that are not backward compatible are mentioned in release notes.
</para>
</listitem>
<listitem>
<para>
Ensure that documentations affected by the change is updated.
</para>
</listitem>
</itemizedlist>
<example xml:id="reviewing-contributions-sample-module-update">
<title>Sample template for a module update review</title>
<screen>
##### 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
</screen>
</example>
</section>
<section xml:id="reviewing-contributions-new-modules">
<title>New modules</title>
<para>
New modules submissions introduce a new module to NixOS.
</para>
<itemizedlist>
<listitem>
<para>
Add labels to the pull request. (Requires commit rights)
</para>
<itemizedlist>
<listitem>
<para>
<literal>8.has: module (new)</literal> and any topic label that fit the module.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the module tests, if any, are succeeding.
</para>
</listitem>
<listitem>
<para>
Ensure that the introduced options are correct.
</para>
<itemizedlist>
<listitem>
<para>
Type should be appropriate (string related types differs in their merging capabilities, <literal>optionSet</literal> and <literal>string</literal> types are deprecated).
</para>
</listitem>
<listitem>
<para>
Description, default and example should be provided.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that module <literal>meta</literal> field is present
</para>
<itemizedlist>
<listitem>
<para>
Maintainers should be declared in <literal>meta.maintainers</literal>.
</para>
</listitem>
<listitem>
<para>
Module documentation should be declared with <literal>meta.doc</literal>.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Ensure that the module respect other modules functionality.
</para>
<itemizedlist>
<listitem>
<para>
For example, enabling a module should not open firewall ports by default.
</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
<example xml:id="reviewing-contributions-sample-new-module">
<title>Sample template for a new module review</title>
<screen>
##### 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
</screen>
</example>
</section>
<section xml:id="reviewing-contributions-other-submissions">
<title>Other submissions</title>
<para>
Other type of submissions requires different reviewing steps.
</para>
<para>
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.
</para>
<para>
Container system, boot system and library changes are some examples of the pull requests fitting this category.
</para>
</section>
<section xml:id="reviewing-contributions--merging-pull-requests">
<title>Merging pull requests</title>
<para>
It is possible for community members that have enough knowledge and experience on a special topic to contribute by merging pull requests.
</para>
<para>
TODO: add the procedure to request merging rights.
</para>
<!--
The following paragraph 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.
<para>Please note that contributors with commit rights unactive for more than
three months will have their commit rights revoked.</para>
-->
<para>
In a case a contributor definitively leaves the Nix community, they should create an issue or post on <link
xlink:href="https://discourse.nixos.org">Discourse</link> with references of packages and modules they maintain so the maintainership can be taken over by other contributors.
</para>
</section>
</chapter>

View File

@@ -1,431 +0,0 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-submitting-changes">
<title>Submitting changes</title>
<section xml:id="submitting-changes-making-patches">
<title>Making patches</title>
<itemizedlist>
<listitem>
<para>
Read <link xlink:href="https://nixos.org/nixpkgs/manual/">Manual (How to write packages for Nix)</link>.
</para>
</listitem>
<listitem>
<para>
Fork <link xlink:href="https://github.com/nixos/nixpkgs/">the Nixpkgs repository</link> on GitHub.
</para>
</listitem>
<listitem>
<para>
Create a branch for your future fix.
<itemizedlist>
<listitem>
<para>
You can make branch from a commit of your local <command>nixos-version</command>. That will help you to avoid additional local compilations. Because you will receive packages from binary cache. For example
<screen>
<prompt>$ </prompt>nixos-version --hash
0998212
<prompt>$ </prompt>git checkout 0998212
<prompt>$ </prompt>git checkout -b 'fix/pkg-name-update'
</screen>
</para>
</listitem>
<listitem>
<para>
Please avoid working directly on the <command>master</command> branch.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Make commits of logical units.
</para>
</listitem>
<listitem>
<para>
If you removed pkgs or made some major NixOS changes, write about it in the release notes for the next stable release. For example <command>nixos/doc/manual/release-notes/rl-2003.xml</command>.
</para>
</listitem>
<listitem>
<para>
Check for unnecessary whitespace with <command>git diff --check</command> before committing.
</para>
</listitem>
<listitem>
<para>
Format the commit in a following way:
</para>
<programlisting>
(pkg-name | nixos/&lt;module>): (from -> to | init at version | refactor | etc)
Additional information.
</programlisting>
<itemizedlist>
<listitem>
<para>
Examples:
<itemizedlist>
<listitem>
<para>
<command>nginx: init at 2.0.1</command>
</para>
</listitem>
<listitem>
<para>
<command>firefox: 54.0.1 -> 55.0</command>
</para>
</listitem>
<listitem>
<para>
<command>nixos/hydra: add bazBaz option</command>
</para>
</listitem>
<listitem>
<para>
<command>nixos/nginx: refactor config generation</command>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>
Test your changes. If you work with
<itemizedlist>
<listitem>
<para>
nixpkgs:
<itemizedlist>
<listitem>
<para>
update pkg ->
<itemizedlist>
<listitem>
<para>
<command>nix-env -i pkg-name -f &lt;path to your local nixpkgs folder&gt;</command>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
add pkg ->
<itemizedlist>
<listitem>
<para>
Make sure it's in <command>pkgs/top-level/all-packages.nix</command>
</para>
</listitem>
<listitem>
<para>
<command>nix-env -i pkg-name -f &lt;path to your local nixpkgs folder&gt;</command>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
<emphasis>If you don't want to install pkg in you profile</emphasis>.
<itemizedlist>
<listitem>
<para>
<command>nix-build -A pkg-attribute-name &lt;path to your local nixpkgs folder&gt;/default.nix</command> and check results in the folder <command>result</command>. It will appear in the same directory where you did <command>nix-build</command>.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
If you did <command>nix-env -i pkg-name</command> you can do <command>nix-env -e pkg-name</command> to uninstall it from your system.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
NixOS and its modules:
<itemizedlist>
<listitem>
<para>
You can add new module to your NixOS configuration file (usually it's <command>/etc/nixos/configuration.nix</command>). And do <command>sudo nixos-rebuild test -I nixpkgs=&lt;path to your local nixpkgs folder&gt; --fast</command>.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
If you have commits <command>pkg-name: oh, forgot to insert whitespace</command>: squash commits in this case. Use <command>git rebase -i</command>.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing">Rebase</link> your branch against current <command>master</command>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="submitting-changes-submitting-changes">
<title>Submitting changes</title>
<itemizedlist>
<listitem>
<para>
Push your changes to your fork of nixpkgs.
</para>
</listitem>
<listitem>
<para>
Create the pull request
</para>
</listitem>
<listitem>
<para>
Follow <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes">the contribution guidelines</link>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="submitting-changes-submitting-security-fixes">
<title>Submitting security fixes</title>
<para>
Security fixes are submitted in the same way as other changes and thus the same guidelines apply.
</para>
<para>
If the security fix comes in the form of a patch and a CVE is available, then the name of the patch should be the CVE identifier, so e.g. <literal>CVE-2019-13636.patch</literal> in the case of a patch that is included in the Nixpkgs tree. If a patch is fetched the name needs to be set as well, e.g.:
</para>
<programlisting>
(fetchpatch {
name = "CVE-2019-11068.patch";
url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
})
</programlisting>
<para>
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.
</para>
<para>
Critical security fixes may by-pass the staging branches and be delivered directly to release branches such as <literal>master</literal> and <literal>release-*</literal>.
</para>
</section>
<section xml:id="submitting-changes-pull-request-template">
<title>Pull Request Template</title>
<para>
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.
</para>
<para>
When a PR is created, it will be pre-populated with some checkboxes detailed below:
</para>
<section xml:id="submitting-changes-tested-with-sandbox">
<title>Tested using sandboxing</title>
<para>
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 <function>fetch*</function> 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 <link
xlink:href="https://nixos.org/nix/manual/#conf-sandbox">sandbox</link> in Nix manual for details.
</para>
<para>
Sandboxing is not enabled by default in Nix due to a small performance hit on each build. In pull requests for <link
xlink:href="https://github.com/NixOS/nixpkgs/">nixpkgs</link> people are asked to test builds with sandboxing enabled (see <literal>Tested using sandboxing</literal> in the pull request template) because in<link
xlink:href="https://nixos.org/hydra/">https://nixos.org/hydra/</link> sandboxing is also used.
</para>
<para>
Depending if you use NixOS or other platforms you can use one of the following methods to enable sandboxing <emphasis role="bold">before</emphasis> building the package:
<itemizedlist>
<listitem>
<para>
<emphasis role="bold">Globally enable sandboxing on NixOS</emphasis>: add the following to <filename>configuration.nix</filename>
<screen>nix.useSandbox = true;</screen>
</para>
</listitem>
<listitem>
<para>
<emphasis role="bold">Globally enable sandboxing on non-NixOS platforms</emphasis>: add the following to: <filename>/etc/nix/nix.conf</filename>
<screen>sandbox = true</screen>
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="submitting-changes-platform-diversity">
<title>Built on platform(s)</title>
<para>
Many Nix packages are designed to run on multiple platforms. As such, it's important to let the maintainer know which platforms your changes have been tested on. It's 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.
</para>
</section>
<section xml:id="submitting-changes-nixos-tests">
<title>Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)</title>
<para>
Packages with automated tests are much more likely to be merged in a timely fashion because it doesn't 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 only apply to packages with NixOS modules defined and can only be run on Linux. For more details on writing and running tests, see the <link
xlink:href="https://nixos.org/nixos/manual/index.html#sec-nixos-tests">section in the NixOS manual</link>.
</para>
</section>
<section xml:id="submitting-changes-tested-compilation">
<title>Tested compilation of all pkgs that depend on this change using <command>nixpkgs-review</command></title>
<para>
If you are updating a package's version, you can use nixpkgs-review to make sure all packages that depend on the updated package still compile correctly. The <command>nixpkgs-review</command> utility can look for and build all dependencies either based on uncommited changes with the <literal>wip</literal> option or specifying a github pull request number.
</para>
<para>
review changes from pull request number 12345:
<screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review pr 12345</screen>
</para>
<para>
review uncommitted changes:
<screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review wip</screen>
</para>
<para>
review changes from last commit:
<screen>nix run nixpkgs.nixpkgs-review -c nixpkgs-review rev HEAD</screen>
</para>
</section>
<section xml:id="submitting-changes-tested-execution">
<title>Tested execution of all binary files (usually in <filename>./result/bin/</filename>)</title>
<para>
It's 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 <filename>./result/bin</filename> and running any files in there, or at a minimum, the main executable for the package. For example, if you make a change to <package>texlive</package>, you probably would only check the binaries associated with the change you made rather than testing all of them.
</para>
</section>
<section xml:id="submitting-changes-contribution-standards">
<title>Meets Nixpkgs contribution standards</title>
<para>
The last checkbox is fits <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md">CONTRIBUTING.md</link>. 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.
</para>
</section>
</section>
<section xml:id="submitting-changes-hotfixing-pull-requests">
<title>Hotfixing pull requests</title>
<itemizedlist>
<listitem>
<para>
Make the appropriate changes in you branch.
</para>
</listitem>
<listitem>
<para>
Don't create additional commits, do
<itemizedlist>
<listitem>
<para>
<command>git rebase -i</command>
</para>
</listitem>
<listitem>
<para>
<command>git push --force</command> to your branch.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="submitting-changes-commit-policy">
<title>Commit policy</title>
<itemizedlist>
<listitem>
<para>
Commits must be sufficiently tested before being merged, both for the master and staging branches.
</para>
</listitem>
<listitem>
<para>
Hydra builds for master and staging should not be used as testing platform, it's a build farm for changes that have been already tested.
</para>
</listitem>
<listitem>
<para>
When changing the bootloader installation process, extra care must be taken. Grub installations cannot be rolled back, hence changes may break people's installations forever. For any non-trivial change to the bootloader please file a PR asking for review, especially from @edolstra.
</para>
</listitem>
</itemizedlist>
<section xml:id="submitting-changes-master-branch">
<title>Master branch</title>
<para>
The <literal>master</literal> branch is the main development branch.
It should only see non-breaking commits that do not cause mass rebuilds.
</para>
</section>
<section xml:id="submitting-changes-staging-branch">
<title>Staging branch</title>
<para>
The <literal>staging</literal> branch is a development branch where mass-rebuilds go.
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.
</para>
</section>
<section xml:id="submitting-changes-staging-next-branch">
<title>Staging-next branch</title>
<para>
The <literal>staging-next</literal> branch is for stabilizing mass-rebuilds submitted to the <literal>staging</literal> branch prior to merging them into <literal>master</literal>.
Mass-rebuilds should go via the <literal>staging</literal> branch.
It should only see non-breaking commits that are fixing issues blocking it from being merged into the <literal>master </literal> branch.
</para>
<para>
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.
</para>
</section>
<section xml:id="submitting-changes-stable-release-branches">
<title>Stable release branches</title>
<itemizedlist>
<listitem>
<para>
If you're cherry-picking a commit to a stable release branch (“backporting”), always use <command>git cherry-pick -xe</command> and ensure the message contains a clear description about why this needs to be included in the stable branch.
</para>
<para>
An example of a cherry-picked commit would look like this:
</para>
<screen>
nixos: Refactor the world.
The original commit message describing the reason why the world was torn apart.
(cherry picked from commit abcdef)
Reason: I just had a gut feeling that this would also be wanted by people from
the stone age.
</screen>
</listitem>
</itemizedlist>
</section>
</section>
</chapter>

View File

@@ -1,28 +1,86 @@
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
with import ./.. { };
with lib;
let
lib = pkgs.lib;
doc-support = import ./doc-support { inherit pkgs nixpkgs; };
in pkgs.stdenv.mkDerivation {
sources = sourceFilesBySuffices ./. [".xml"];
sources-langs = ./languages-frameworks;
in
stdenv.mkDerivation {
name = "nixpkgs-manual";
buildInputs = with pkgs; [ pandoc libxml2 libxslt zip jing xmlformat ];
src = ./.;
buildInputs = [ pandoc libxml2 libxslt ];
postPatch = ''
ln -s ${doc-support} ./doc-support/result
xsltFlags = ''
--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'
'';
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"
buildCommand = let toDocbook = { useChapters ? false, inputFile, outputFile }:
let
extraHeader = ''xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" '';
in ''
{
pandoc '${inputFile}' -w docbook ${optionalString useChapters "--chapters"} \
--smart \
| sed -e 's|<ulink url=|<link xlink:href=|' \
-e 's|</ulink>|</link>|' \
-e 's|<sect. id=|<section xml:id=|' \
-e 's|</sect[0-9]>|</section>|' \
-e '1s| id=| xml:id=|' \
-e '1s|\(<[^ ]* \)|\1${extraHeader}|'
} > '${outputFile}'
'';
in
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
''
ln -s '${sources}/'*.xml .
mkdir ./languages-frameworks
cp -s '${sources-langs}'/* ./languages-frameworks
''
+ toDocbook {
inputFile = ./introduction.md;
outputFile = "introduction.xml";
useChapters = true;
}
+ toDocbook {
inputFile = ./haskell-users-guide.md;
outputFile = "haskell-users-guide.xml";
useChapters = true;
}
+ toDocbook {
inputFile = ./../pkgs/development/idris-modules/README.md;
outputFile = "languages-frameworks/idris.xml";
}
+ toDocbook {
inputFile = ./../pkgs/development/r-modules/README.md;
outputFile = "languages-frameworks/r.xml";
}
+ ''
echo ${nixpkgsVersion} > .version
# validate against relaxng schema
xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml
${jing}/bin/jing ${docbook5}/xml/rng/docbook/docbook.rng manual-full.xml
dst=$out/share/doc/nixpkgs
mkdir -p $dst
xsltproc $xsltFlags --nonet --xinclude \
--output $dst/manual.html \
${docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \
./manual.xml
cp ${./style.css} $dst/style.css
mkdir -p $dst/images/callouts
cp "${docbook5_xsl}/xml/xsl/docbook/images/callouts/"*.gif $dst/images/callouts/
mkdir -p $out/nix-support
echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products
'';
}

View File

@@ -1,45 +0,0 @@
{ pkgs ? (import ../.. {}), nixpkgs ? { }}:
let
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs; };
functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs; };
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>
'';
in pkgs.runCommand "doc-support" {}
''
mkdir result
(
cd result
ln -s ${locationsXml} ./function-locations.xml
ln -s ${functionDocs} ./function-docs
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,26 +0,0 @@
# Generates the documentation for library functons via nixdoc. To add
# another library function file to this list, the include list in the
# file `doc/functions/library.xml` must also be updated.
{ pkgs ? import ./.. {}, locationsXml }:
with pkgs; stdenv.mkDerivation {
name = "nixpkgs-lib-docs";
src = ./../../lib;
buildInputs = [ nixdoc ];
installPhase = ''
function docgen {
nixdoc -c "$1" -d "$2" -f "../lib/$1.nix" > "$out/$1.xml"
}
mkdir -p $out
ln -s ${locationsXml} $out/locations.xml
docgen strings 'String manipulation functions'
docgen trivial 'Miscellaneous functions'
docgen lists 'List manipulation functions'
docgen debug 'Debugging functions'
docgen options 'NixOS / nixpkgs option handling'
'';
}

View File

@@ -1,85 +0,0 @@
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
let
revision = pkgs.lib.trivial.revisionWithDefault (nixpkgs.revision or "master");
libDefPos = set:
builtins.map
(name: {
name = name;
location = builtins.unsafeGetAttrPos name set;
})
(builtins.attrNames set);
libset = toplib:
builtins.map
(subsetname: {
subsetname = subsetname;
functions = libDefPos toplib.${subsetname};
})
(builtins.filter
(name: builtins.isAttrs toplib.${name})
(builtins.attrNames toplib));
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,14 +0,0 @@
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:param name="section.autolabel" select="1" />
<xsl:param name="section.label.includes.component.label" select="1" />
<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="1" />
<xsl:param name="use.id.as.filename" 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:stylesheet>

305
doc/erlang-users-guide.xml Normal file
View File

@@ -0,0 +1,305 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="users-guide-to-the-erlang-infrastructure">
<title>User's Guide to the Erlang Infrastructure</title>
<section xml:id="build-tools">
<title>Build Tools</title>
<para>
By default Rebar3 wants to manage it's own dependencies. In the
normal non-Nix, this is perfectly acceptable. In the Nix world it
is not. To support this we have created two versions of rebar3,
<literal>rebar3</literal> and <literal>rebar3-open</literal>. The
<literal>rebar3</literal> version has been patched to remove the
ability to download anything from it. If you are not running it a
nix-shell or a nix-build then its probably not going to work for
you. <literal>rebar3-open</literal> is the normal, un-modified
rebar3. It should work exactly as would any other version of
rebar3. Any Erlang package should rely on
<literal>rebar3</literal> and thats really what you should be
using too.
</para>
</section>
<section xml:id="how-to-install-erlang-packages">
<title>How to install Erlang packages</title>
<para>
Erlang packages are not registered in the top level simply because
they are not relevant to the vast majority of Nix users. They are
installable using the <literal>erlangPackages</literal> attribute set.
You can list the avialable packages in the
<literal>erlangPackages</literal> with the following command:
</para>
<programlisting>
$ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -qaP -A erlangPackages
erlangPackages.esqlite esqlite-0.2.1
erlangPackages.goldrush goldrush-0.1.7
erlangPackages.ibrowse ibrowse-4.2.2
erlangPackages.jiffy jiffy-0.14.5
erlangPackages.lager lager-3.0.2
erlangPackages.meck meck-0.8.3
erlangPackages.rebar3-pc pc-1.1.0
</programlisting>
<para>
To install any of those packages into your profile, refer to them by
their attribute path (first column):
</para>
<programlisting>
$ nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA erlangPackages.ibrowse
</programlisting>
<para>
The attribute path of any Erlang packages corresponds to the name
of that particular package in Hex or its OTP Application/Release name.
</para>
</section>
<section xml:id="packaging-erlang-applications">
<title>Packaging Erlang Applications</title>
<section xml:id="rebar3-packages">
<title>Rebar3 Packages</title>
<para>
There is a Nix functional called
<literal>buildRebar3</literal>. We use this function to make a
derivation that understands how to build the rebar3 project. For
example, the epression we use to build the <link
xlink:href="https://github.com/erlang-nix/hex2nix">hex2nix</link>
project follows.
</para>
<programlisting>
{stdenv, fetchFromGitHub, buildRebar3, ibrowse, jsx, erlware_commons }:
buildRebar3 rec {
name = "hex2nix";
version = "0.0.1";
src = fetchFromGitHub {
owner = "ericbmerritt";
repo = "hex2nix";
rev = "${version}";
sha256 = "1w7xjidz1l5yjmhlplfx7kphmnpvqm67w99hd2m7kdixwdxq0zqg";
};
erlangDeps = [ ibrowse jsx erlware_commons ];
}
</programlisting>
<para>
The only visible difference between this derivation and
something like <literal>stdenv.mkDerivation</literal> is that we
have added <literal>erlangDeps</literal> to the derivation. If
you add your Erlang dependencies here they will be correctly
handled by the system.
</para>
<para>
If your package needs to compile native code via Rebar's port
compilation mechenism. You should add <literal>compilePort =
true;</literal> to the derivation.
</para>
</section>
<section xml:id="hex-packages">
<title>Hex Packages</title>
<para>
Hex packages are based on Rebar packages. In fact, at the moment
we can only compile Hex packages that are buildable with
Rebar3. Packages that use Mix and other build systems are not
supported. That being said, we know a lot more about Hex and can
do more for you.
</para>
<programlisting>
{ buildHex }:
buildHex {
name = "esqlite";
version = "0.2.1";
sha256 = "1296fn1lz4lz4zqzn4dwc3flgkh0i6n4sydg501faabfbv8d3wkr";
compilePort = true;
}
</programlisting>
<para>
For Hex packages you need to provide the name, the version, and
the Sha 256 digest of the package and use
<literal>buildHex</literal> to build it. Obviously, the package
needs to have already been published to Hex.
</para>
</section>
</section>
<section xml:id="how-to-develop">
<title>How to develop</title>
<section xml:id="accessing-an-environment">
<title>Accessing an Environment</title>
<para>
Often, all you want to do is be able to access a valid
environment that contains a specific package and its
dependencies. we can do that with the <literal>env</literal>
part of a derivation. For example, lets say we want to access an
erlang repl with ibrowse loaded up. We could do the following.
</para>
<programlisting>
~/w/nixpkgs nix-shell -A erlangPackages.ibrowse.env --run "erl"
Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.0 (abort with ^G)
1> m(ibrowse).
Module: ibrowse
MD5: 3b3e0137d0cbb28070146978a3392945
Compiled: January 10 2016, 23:34
Object file: /nix/store/g1rlf65rdgjs4abbyj4grp37ry7ywivj-ibrowse-4.2.2/lib/erlang/lib/ibrowse-4.2.2/ebin/ibrowse.beam
Compiler options: [{outdir,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/ebin"},
debug_info,debug_info,nowarn_shadow_vars,
warn_unused_import,warn_unused_vars,warnings_as_errors,
{i,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/include"}]
Exports:
add_config/1 send_req_direct/7
all_trace_off/0 set_dest/3
code_change/3 set_max_attempts/3
get_config_value/1 set_max_pipeline_size/3
get_config_value/2 set_max_sessions/3
get_metrics/0 show_dest_status/0
get_metrics/2 show_dest_status/1
handle_call/3 show_dest_status/2
handle_cast/2 spawn_link_worker_process/1
handle_info/2 spawn_link_worker_process/2
init/1 spawn_worker_process/1
module_info/0 spawn_worker_process/2
module_info/1 start/0
rescan_config/0 start_link/0
rescan_config/1 stop/0
send_req/3 stop_worker_process/1
send_req/4 stream_close/1
send_req/5 stream_next/1
send_req/6 terminate/2
send_req_direct/4 trace_off/0
send_req_direct/5 trace_off/2
send_req_direct/6 trace_on/0
trace_on/2
ok
2>
</programlisting>
<para>
Notice the <literal>-A erlangPackages.ibrowse.env</literal>.That
is the key to this functionality.
</para>
</section>
<section xml:id="creating-a-shell">
<title>Creating a Shell</title>
<para>
Getting access to an environment often isn't enough to do real
development. Many times we need to create a
<literal>shell.nix</literal> file and do our development inside
of the environment specified by that file. This file looks a lot
like the packageing described above. The main difference is that
<literal>src</literal> points to project root and we call the
package directly.
</para>
<programlisting>
{ pkgs ? import &quot;&lt;nixpkgs&quot;&gt; {} }:
with pkgs;
let
f = { buildHex, ibrowse, jsx, erlware_commons }:
buildHex {
name = "hex2nix";
version = "0.1.0";
src = ./.;
erlangDeps = [ ibrowse jsx erlware_commons ];
};
drv = erlangPackages.callPackage f {};
in
drv
</programlisting>
<section xml:id="building-in-a-shell">
<title>Building in a shell</title>
<para>
Unfortunatly for us users of Nix, Rebar isn't very cooperative
with us from the standpoint of building a hermetic
environment. When building the rebar3 support we had to do some
sneaky things to get it not to go out and pull packages on its
own. Also unfortunately, you have to do some of the same things
when building a project inside of a Nix shell.
<orderedlist numeration="arabic">
<listitem>
<para>Run <literal>rebar3-nix-bootstrap</literal> every time
dependencies change</para>
</listitem>
<listitem>
<para>Set Home to the current directory.</para>
</listitem>
</orderedlist>
If you do these two things then Rebar will be happy with you. I
codify these into a makefile. Forunately, rebar3-nix-bootstrap
is idempotent and fairly quick. so you can run it as often as
you like.
</para>
<programlisting>
# =============================================================================
# Rules
# =============================================================================
.PHONY= all test clean repl shell build test analyze bootstrap
all: test
clean:
rm -rf _build
rm -rf .cache
repl:
nix-shell --run "erl"
shell:
nix-shell --run "bash"
bootstrap:
nix-shell --pure --run "rebar3-nix-bootstrap"
build: bootstrap
nix-shell --pure --run "HOME=$(CURDIR) rebar3 compile"
analyze: bootstrap
nix-shell --pure --run "HOME=$(CURDIR) rebar3 do compile,dialyzer"
test: bootstrap
nix-shell --pure --run "HOME=$(CURDIR) rebar3 do compile,dialyzer,eunit"
</programlisting>
<para>
If you add the <literal>shell.nix</literal> as described and
user rebar as follows things should simply work.
</para>
</section>
</section>
</section>
<section xml:id="generating-packages-from-hex-with-hex2nix">
<title>Generating Packages from Hex with Hex2Nix</title>
<para>
Updating the Hex packages requires the use of the
<literal>hex2nix</literal> tool. Given the path to the Erlang
modules (usually
<literal>pkgs/development/erlang-modules</literal>). It will
happily dump a file called
<literal>hex-packages.nix</literal>. That file will contain all
the packages that use a recognized build system in Hex. However,
it can't know whether or not all those packages are buildable.
</para>
<para>
To make life easier for our users, it makes good sense to go
ahead and attempt to build all those packages and remove the
ones that don't build. To do that, simply run the command (in
the root of your <literal>nixpkgs</literal> repository). that follows.
</para>
<programlisting>
$ nix-build -A erlangPackages
</programlisting>
<para>
That will build every package in
<literal>erlangPackages</literal>. Then you can go through and
manually remove the ones that fail. Hopefully, someone will
improve <literal>hex2nix</literal> in the future to automate
that.
</para>
</section>
</chapter>

View File

@@ -1,14 +1,629 @@
<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>
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-functions">
<title>Functions reference</title>
<para>
The nixpkgs repository has several utility functions to manipulate Nix expressions.
</para>
<section xml:id="sec-pkgs-overridePackages">
<title>pkgs.overridePackages</title>
<para>
This function inside the nixpkgs expression (<varname>pkgs</varname>)
can be used to override the set of packages itself.
</para>
<para>
Warning: this function is expensive and must not be used from within
the nixpkgs repository.
</para>
<para>
Example usage:
<programlisting>let
pkgs = import &lt;nixpkgs&gt; {};
newpkgs = pkgs.overridePackages (self: super: {
foo = super.foo.override { ... };
};
in ...</programlisting>
</para>
<para>
The resulting <varname>newpkgs</varname> will have the new <varname>foo</varname>
expression, and all other expressions depending on <varname>foo</varname> will also
use the new <varname>foo</varname> expression.
</para>
<para>
The behavior of this function is similar to <link
linkend="sec-modify-via-packageOverrides">config.packageOverrides</link>.
</para>
<para>
The <varname>self</varname> parameter refers to the final package set with the
applied overrides. Using this parameter may lead to infinite recursion if not
used consciously.
</para>
<para>
The <varname>super</varname> parameter refers to the old package set.
It's equivalent to <varname>pkgs</varname> in the above example.
</para>
</section>
<section xml:id="sec-pkg-override">
<title>&lt;pkg&gt;.override</title>
<para>
The function <varname>override</varname> is usually available for all the
derivations in the nixpkgs expression (<varname>pkgs</varname>).
</para>
<para>
It is used to override the arguments passed to a function.
</para>
<para>
Example usages:
<programlisting>pkgs.foo.override { arg1 = val1; arg2 = val2; ... }</programlisting>
<programlisting>pkgs.overridePackages (self: super: {
foo = super.foo.override { barSupport = true ; };
})</programlisting>
<programlisting>mypkg = pkgs.callPackage ./mypkg.nix {
mydep = pkgs.mydep.override { ... };
})</programlisting>
</para>
<para>
In the first example, <varname>pkgs.foo</varname> is the result of a function call
with some default arguments, usually a derivation.
Using <varname>pkgs.foo.override</varname> will call the same function with
the given new arguments.
</para>
</section>
<section xml:id="sec-pkg-overrideDerivation">
<title>&lt;pkg&gt;.overrideDerivation</title>
<warning>
<para>Do not use this function in Nixpkgs. Because it breaks
package abstraction and doesnt provide error checking for
function arguments, it is only intended for ad-hoc customisation
(such as in <filename>~/.nixpkgs/config.nix</filename>).</para>
</warning>
<para>
The function <varname>overrideDerivation</varname> is usually available for all the
derivations in the nixpkgs expression (<varname>pkgs</varname>).
</para>
<para>
It is used to create a new derivation by overriding the attributes of
the original derivation according to the given function.
</para>
<para>
Example usage:
<programlisting>mySed = pkgs.gnused.overrideDerivation (oldAttrs: {
name = "sed-4.2.2-pre";
src = fetchurl {
url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;
sha256 = "11nq06d131y4wmf3drm0yk502d2xc6n5qy82cg88rb9nqd2lj41k";
};
patches = [];
});</programlisting>
</para>
<para>
In the above example, the name, src and patches of the derivation
will be overridden, while all other attributes will be retained from the
original derivation.
</para>
<para>
The argument <varname>oldAttrs</varname> is used to refer to the attribute set of
the original derivation.
</para>
</section>
<section xml:id="sec-lib-makeOverridable">
<title>lib.makeOverridable</title>
<para>
The function <varname>lib.makeOverridable</varname> is used to make the result
of a function easily customizable. This utility only makes sense for functions
that accept an argument set and return an attribute set.
</para>
<para>
Example usage:
<programlisting>f = { a, b }: { result = a+b; }
c = lib.makeOverridable f { a = 1; b = 2; }</programlisting>
</para>
<para>
The variable <varname>c</varname> is the value of the <varname>f</varname> function
applied with some default arguments. Hence the value of <varname>c.result</varname>
is <literal>3</literal>, in this example.
</para>
<para>
The variable <varname>c</varname> however also has some additional functions, like
<link linkend="sec-pkg-override">c.override</link> which can be used to
override the default arguments. In this example the value of
<varname>(c.override { a = 4; }).result</varname> is 6.
</para>
</section>
<section xml:id="sec-fhs-environments">
<title>buildFHSChrootEnv/buildFHSUserEnv</title>
<para>
<function>buildFHSChrootEnv</function> and
<function>buildFHSUserEnv</function> provide a way to build and run
FHS-compatible lightweight sandboxes. They get their own isolated root with
binded <filename>/nix/store</filename>, so their 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.
</para>
<para>
<function>buildFHSChrootEnv</function> allows to create persistent
environments, which can be constructed, deconstructed and entered by
multiple users at once. A downside is that it requires
<literal>root</literal> access for both those who create and destroy and
those who enter it. It can be useful to create environments for daemons that
one can enter and observe.
</para>
<para>
<function>buildFHSUserEnv</function> uses Linux namespaces feature to create
temporary lightweight environments which are destroyed after all child
processes exit. It does not require root access, and can be useful to create
sandboxes and wrap applications.
</para>
<para>
Those functions both rely on <function>buildFHSEnv</function>, which creates
an actual directory structure given a list of necessary packages and extra
build commands.
<function>buildFHSChrootEnv</function> and <function>buildFHSUserEnv</function>
both accept those arguments which are passed to
<function>buildFHSEnv</function>:
</para>
<variablelist>
<varlistentry>
<term><literal>name</literal></term>
<listitem><para>Environment name.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>targetPkgs</literal></term>
<listitem><para>Packages to be installed for the main host's architecture
(i.e. x86_64 on x86_64 installations).</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>multiPkgs</literal></term>
<listitem><para>Packages to be installed for all architectures supported by
a host (i.e. i686 and x86_64 on x86_64 installations).</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>extraBuildCommands</literal></term>
<listitem><para>Additional commands to be executed for finalizing the
directory structure.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>extraBuildCommandsMulti</literal></term>
<listitem><para>Like <literal>extraBuildCommandsMulti</literal>, but
executed only on multilib architectures.</para></listitem>
</varlistentry>
</variablelist>
<para>
Additionally, <function>buildFHSUserEnv</function> accepts
<literal>runScript</literal> parameter, which is a command that would be
executed inside the sandbox and passed all the command line arguments. It
default to <literal>bash</literal>.
</para>
<para>
It also uses <literal>CHROOTENV_EXTRA_BINDS</literal> environment variable
for binding extra directories in the sandbox to outside places. The format of
the variable is <literal>/mnt=test-mnt:/data</literal>, where
<literal>/mnt</literal> would be mounted as <literal>/test-mnt</literal>
and <literal>/data</literal> would be mounted as <literal>/data</literal>.
<literal>extraBindMounts</literal> array argument to
<function>buildFHSUserEnv</function> function is prepended to this variable.
Latter entries take priority if defined several times -- i.e. in case of
<literal>/data=data1:/data=data2</literal> the actual bind path would be
<literal>/data2</literal>.
</para>
<para>
One can create a simple environment using a <literal>shell.nix</literal>
like that:
</para>
<programlisting><![CDATA[
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "simple-x11-env";
targetPkgs = pkgs: (with pkgs;
[ udev
alsaLib
]) ++ (with pkgs.xorg;
[ libX11
libXcursor
libXrandr
]);
multiPkgs = pkgs: (with pkgs;
[ udev
alsaLib
]);
runScript = "bash";
}).env
]]></programlisting>
<para>
Running <literal>nix-shell</literal> would then drop you into a shell with
these libraries and binaries available. You can use this to run
closed-source applications which expect FHS structure without hassles:
simply change <literal>runScript</literal> to the application path,
e.g. <filename>./bin/start.sh</filename> -- relative paths are supported.
</para>
</section>
<section xml:id="sec-pkgs-dockerTools">
<title>pkgs.dockerTools</title>
<para>
<varname>pkgs.dockerTools</varname> is a set of functions for creating and
manipulating Docker images according to the
<link xlink:href="https://github.com/docker/docker/blob/master/image/spec/v1.md#docker-image-specification-v100">
Docker Image Specification v1.0.0
</link>. Docker itself is not used to perform any of the operations done by these
functions.
</para>
<xi:include href="functions/library.xml" />
<xi:include href="functions/generators.xml" />
<xi:include href="functions/debug.xml" />
<xi:include href="functions/prefer-remote-fetch.xml" />
<xi:include href="functions/nix-gitignore.xml" />
<warning>
<para>
The <varname>dockerTools</varname> API is unstable and may be subject to
backwards-incompatible changes in the future.
</para>
</warning>
<section xml:id="ssec-pkgs-dockerTools-buildImage">
<title>buildImage</title>
<para>
This function is analogous to the <command>docker build</command> command,
in that can used to build a Docker-compatible repository tarball containing
a single image with one or multiple layers. As such, the result
is suitable for being loaded in Docker with <command>docker load</command>.
</para>
<para>
The parameters of <varname>buildImage</varname> with relative example values are
described below:
</para>
<example xml:id='ex-dockerTools-buildImage'><title>Docker build</title>
<programlisting>
buildImage {
name = "redis"; <co xml:id='ex-dockerTools-buildImage-1' />
tag = "latest"; <co xml:id='ex-dockerTools-buildImage-2' />
fromImage = someBaseImage; <co xml:id='ex-dockerTools-buildImage-3' />
fromImageName = null; <co xml:id='ex-dockerTools-buildImage-4' />
fromImageTag = "latest"; <co xml:id='ex-dockerTools-buildImage-5' />
contents = pkgs.redis; <co xml:id='ex-dockerTools-buildImage-6' />
runAsRoot = '' <co xml:id='ex-dockerTools-buildImage-runAsRoot' />
#!${stdenv.shell}
mkdir -p /data
'';
config = { <co xml:id='ex-dockerTools-buildImage-8' />
Cmd = [ "/bin/redis-server" ];
WorkingDir = "/data";
Volumes = {
"/data" = {};
};
};
}
</programlisting>
</example>
<para>The above example will build a Docker image <literal>redis/latest</literal>
from the given base image. Loading and running this image in Docker results in
<literal>redis-server</literal> being started automatically.
</para>
<calloutlist>
<callout arearefs='ex-dockerTools-buildImage-1'>
<para>
<varname>name</varname> specifies the name of the resulting image.
This is the only required argument for <varname>buildImage</varname>.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-2'>
<para>
<varname>tag</varname> specifies the tag of the resulting image.
By default it's <literal>latest</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-3'>
<para>
<varname>fromImage</varname> is the repository tarball containing the base image.
It must be a valid Docker image, such as exported by <command>docker save</command>.
By default it's <literal>null</literal>, which can be seen as equivalent
to <literal>FROM scratch</literal> of a <filename>Dockerfile</filename>.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-4'>
<para>
<varname>fromImageName</varname> can be used to further specify
the base image within the repository, in case it contains multiple images.
By default it's <literal>null</literal>, in which case
<varname>buildImage</varname> will peek the first image available
in the repository.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-5'>
<para>
<varname>fromImageTag</varname> can be used to further specify the tag
of the base image within the repository, in case an image contains multiple tags.
By default it's <literal>null</literal>, in which case
<varname>buildImage</varname> will peek the first tag available for the base image.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-6'>
<para>
<varname>contents</varname> is a derivation that will be copied in the new
layer of the resulting image. This can be similarly seen as
<command>ADD contents/ /</command> in a <filename>Dockerfile</filename>.
By default it's <literal>null</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-runAsRoot'>
<para>
<varname>runAsRoot</varname> is a bash script that will run as root
in an environment that overlays the existing layers of the base image with
the new resulting layer, including the previously copied
<varname>contents</varname> derivation.
This can be similarly seen as
<command>RUN ...</command> in a <filename>Dockerfile</filename>.
<note>
<para>
Using this parameter requires the <literal>kvm</literal>
device to be available.
</para>
</note>
</para>
</callout>
<callout arearefs='ex-dockerTools-buildImage-8'>
<para>
<varname>config</varname> is used to specify the configuration of the
containers that will be started off the built image in Docker.
The available options are listed in the
<link xlink:href="https://github.com/docker/docker/blob/master/image/spec/v1.md#container-runconfig-field-descriptions">
Docker Image Specification v1.0.0
</link>.
</para>
</callout>
</calloutlist>
<para>
After the new layer has been created, its closure
(to which <varname>contents</varname>, <varname>config</varname> and
<varname>runAsRoot</varname> contribute) will be copied in the layer itself.
Only new dependencies that are not already in the existing layers will be copied.
</para>
<para>
At the end of the process, only one new single layer will be produced and
added to the resulting image.
</para>
<para>
The resulting repository will only list the single image
<varname>image/tag</varname>. In the case of <xref linkend='ex-dockerTools-buildImage'/>
it would be <varname>redis/latest</varname>.
</para>
<para>
It is possible to inspect the arguments with which an image was built
using its <varname>buildArgs</varname> attribute.
</para>
</section>
<section xml:id="ssec-pkgs-dockerTools-fetchFromRegistry">
<title>pullImage</title>
<para>
This function is analogous to the <command>docker pull</command> command,
in that can be used to fetch a Docker image from a Docker registry.
Currently only registry <literal>v1</literal> is supported.
By default <link xlink:href="https://hub.docker.com/">Docker Hub</link>
is used to pull images.
</para>
<para>
Its parameters are described in the example below:
</para>
<example xml:id='ex-dockerTools-pullImage'><title>Docker pull</title>
<programlisting>
pullImage {
imageName = "debian"; <co xml:id='ex-dockerTools-pullImage-1' />
imageTag = "jessie"; <co xml:id='ex-dockerTools-pullImage-2' />
imageId = null; <co xml:id='ex-dockerTools-pullImage-3' />
sha256 = "1bhw5hkz6chrnrih0ymjbmn69hyfriza2lr550xyvpdrnbzr4gk2"; <co xml:id='ex-dockerTools-pullImage-4' />
indexUrl = "https://index.docker.io"; <co xml:id='ex-dockerTools-pullImage-5' />
registryVersion = "v1";
}
</programlisting>
</example>
<calloutlist>
<callout arearefs='ex-dockerTools-pullImage-1'>
<para>
<varname>imageName</varname> specifies the name of the image to be downloaded,
which can also include the registry namespace (e.g. <literal>library/debian</literal>).
This argument is required.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-2'>
<para>
<varname>imageTag</varname> specifies the tag of the image to be downloaded.
By default it's <literal>latest</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-3'>
<para>
<varname>imageId</varname>, if specified this exact image will be fetched, instead
of <varname>imageName/imageTag</varname>. However, the resulting repository
will still be named <varname>imageName/imageTag</varname>.
By default it's <literal>null</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-4'>
<para>
<varname>sha256</varname> is the checksum of the whole fetched image.
This argument is required.
</para>
<note>
<para>The checksum is computed on the unpacked directory, not on the final tarball.</para>
</note>
</callout>
<callout arearefs='ex-dockerTools-pullImage-5'>
<para>
In the above example the default values are shown for the variables
<varname>indexUrl</varname> and <varname>registryVersion</varname>.
Hence by default the Docker.io registry is used to pull the images.
</para>
</callout>
</calloutlist>
</section>
<section xml:id="ssec-pkgs-dockerTools-exportImage">
<title>exportImage</title>
<para>
This function is analogous to the <command>docker export</command> command,
in that can used to flatten a Docker image that contains multiple layers.
It is in fact the result of the merge of all the layers of the image.
As such, the result is suitable for being imported in Docker
with <command>docker import</command>.
</para>
<note>
<para>
Using this function requires the <literal>kvm</literal>
device to be available.
</para>
</note>
<para>
The parameters of <varname>exportImage</varname> are the following:
</para>
<example xml:id='ex-dockerTools-exportImage'><title>Docker export</title>
<programlisting>
exportImage {
fromImage = someLayeredImage;
fromImageName = null;
fromImageTag = null;
name = someLayeredImage.name;
}
</programlisting>
</example>
<para>
The parameters relative to the base image have the same synopsis as
described in <xref linkend='ssec-pkgs-dockerTools-buildImage'/>, except that
<varname>fromImage</varname> is the only required argument in this case.
</para>
<para>
The <varname>name</varname> argument is the name of the derivation output,
which defaults to <varname>fromImage.name</varname>.
</para>
</section>
<section xml:id="ssec-pkgs-dockerTools-shadowSetup">
<title>shadowSetup</title>
<para>
This constant string is a helper for setting up the base files for managing
users and groups, only if such files don't exist already.
It is suitable for being used in a
<varname>runAsRoot</varname> <xref linkend='ex-dockerTools-buildImage-runAsRoot'/> script for cases like
in the example below:
</para>
<example xml:id='ex-dockerTools-shadowSetup'><title>Shadow base files</title>
<programlisting>
buildImage {
name = "shadow-basic";
runAsRoot = ''
#!${stdenv.shell}
${shadowSetup}
groupadd -r redis
useradd -r -g redis redis
mkdir /data
chown redis:redis /data
'';
}
</programlisting>
</example>
<para>
Creating base files like <literal>/etc/passwd</literal> or
<literal>/etc/login.defs</literal> are necessary for shadow-utils to
manipulate users and groups.
</para>
</section>
</section>
</chapter>

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

784
doc/haskell-users-guide.md Normal file
View File

@@ -0,0 +1,784 @@
---
title: User's Guide for Haskell in Nixpkgs
author: Peter Simons
date: 2015-06-01
---
# User's Guide to the Haskell Infrastructure
## How to install Haskell packages
Nixpkgs distributes build instructions for all Haskell packages registered on
[Hackage](http://hackage.haskell.org/), but strangely enough normal Nix package
lookups don't seem to discover any of them, except for the default version of ghc, cabal-install, and stack:
$ nix-env -i alex
error: selector alex matches no derivations
$ nix-env -qa ghc
ghc-7.10.2
The Haskell package set is not registered in the top-level namespace because it
is *huge*. If all Haskell packages were visible to these commands, then
name-based search/install operations would be much slower than they are now. We
avoided that by keeping all Haskell-related packages in a separate attribute
set called `haskellPackages`, which the following command will list:
$ nix-env -f "<nixpkgs>" -qaP -A haskellPackages
haskellPackages.a50 a50-0.5
haskellPackages.abacate haskell-abacate-0.0.0.0
haskellPackages.abcBridge haskell-abcBridge-0.12
haskellPackages.afv afv-0.1.1
haskellPackages.alex alex-3.1.4
haskellPackages.Allure Allure-0.4.101.1
haskellPackages.alms alms-0.6.7
[... some 8000 entries omitted ...]
To install any of those packages into your profile, refer to them by their
attribute path (first column):
$ nix-env -f "<nixpkgs>" -iA haskellPackages.Allure ...
The attribute path of any Haskell packages corresponds to the name of that
particular package on Hackage: the package `cabal-install` has the attribute
`haskellPackages.cabal-install`, and so on. (Actually, this convention causes
trouble with packages like `3dmodels` and `4Blocks`, because these names are
invalid identifiers in the Nix language. The issue of how to deal with these
rare corner cases is currently unresolved.)
Haskell packages who's Nix name (second column) begins with a `haskell-` prefix
are packages that provide a library whereas packages without that prefix
provide just executables. Libraries may provide executables too, though: the
package `haskell-pandoc`, for example, installs both a library and an
application. You can install and use Haskell executables just like any other
program in Nixpkgs, but using Haskell libraries for development is a bit
trickier and we'll address that subject in great detail in section [How to
create a development environment].
Attribute paths are deterministic inside of Nixpkgs, but the path necessary to
reach Nixpkgs varies from system to system. We dodged that problem by giving
`nix-env` an explicit `-f "<nixpkgs>"` parameter, but if you call `nix-env`
without that flag, then chances are the invocation fails:
$ nix-env -iA haskellPackages.cabal-install
error: attribute haskellPackages in selection path
haskellPackages.cabal-install not found
On NixOS, for example, Nixpkgs does *not* exist in the top-level namespace by
default. To figure out the proper attribute path, it's easiest to query for the
path of a well-known Nixpkgs package, i.e.:
$ nix-env -qaP coreutils
nixos.coreutils coreutils-8.23
If your system responds like that (most NixOS installations will), then the
attribute path to `haskellPackages` is `nixos.haskellPackages`. Thus, if you
want to use `nix-env` without giving an explicit `-f` flag, then that's the way
to do it:
$ nix-env -qaP -A nixos.haskellPackages
$ nix-env -iA nixos.haskellPackages.cabal-install
Our current default compiler is GHC 7.10.x and the `haskellPackages` set
contains packages built with that particular version. Nixpkgs contains the
latest major release of every GHC since 6.10.4, however, and there is a whole
family of package sets available that defines Hackage packages built with each
of those compilers, too:
$ nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc6123
$ nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc763
The name `haskellPackages` is really just a synonym for
`haskell.packages.ghc7102`, because we prefer that package set internally and
recommend it to our users as their default choice, but ultimately you are free
to compile your Haskell packages with any GHC version you please. The following
command displays the complete list of available compilers:
$ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler
haskell.compiler.ghc6104 ghc-6.10.4
haskell.compiler.ghc6123 ghc-6.12.3
haskell.compiler.ghc704 ghc-7.0.4
haskell.compiler.ghc722 ghc-7.2.2
haskell.compiler.ghc742 ghc-7.4.2
haskell.compiler.ghc763 ghc-7.6.3
haskell.compiler.ghc784 ghc-7.8.4
haskell.compiler.ghc7102 ghc-7.10.2
haskell.compiler.ghcHEAD ghc-7.11.20150402
haskell.compiler.ghcNokinds ghc-nokinds-7.11.20150704
haskell.compiler.ghcjs ghcjs-0.1.0
haskell.compiler.jhc jhc-0.8.2
haskell.compiler.uhc uhc-1.1.9.0
We have no package sets for `jhc` or `uhc` yet, unfortunately, but for every
version of GHC listed above, there exists a package set based on that compiler.
Also, the attributes `haskell.compiler.ghcXYC` and
`haskell.packages.ghcXYC.ghc` are synonymous for the sake of convenience.
## How to create a development environment
### How to install a compiler
A simple development environment consists of a Haskell compiler and one or both
of the tools `cabal-install` and `stack`. We saw in section
[How to install Haskell packages] how you can install those programs into your
user profile:
$ nix-env -f "<nixpkgs>" -iA haskellPackages.ghc haskellPackages.cabal-install
Instead of the default package set `haskellPackages`, you can also use the more
precise name `haskell.compiler.ghc7102`, which has the advantage that it refers
to the same GHC version regardless of what Nixpkgs considers "default" at any
given time.
Once you've made those tools available in `$PATH`, it's possible to build
Hackage packages the same way people without access to Nix do it all the time:
$ cabal get lens-4.11 && cd lens-4.11
$ cabal install -j --dependencies-only
$ cabal configure
$ cabal build
If you enjoy working with Cabal sandboxes, then that's entirely possible too:
just execute the command
$ cabal sandbox init
before installing the required dependencies.
The `nix-shell` utility makes it easy to switch to a different compiler
version; just enter the Nix shell environment with the command
$ nix-shell -p haskell.compiler.ghc784
to bring GHC 7.8.4 into `$PATH`. Alternatively, you can use Stack instead of
`nix-shell` directly to select compiler versions and other build tools
per-project. It uses `nix-shell` under the hood when Nix support is turned on.
See [How to build a Haskell project using Stack].
If you're using `cabal-install`, re-running `cabal configure` inside the spawned
shell switches your build to use that compiler instead. If you're working on
a project that doesn't depend on any additional system libraries outside of GHC,
then it's even sufficient to just run the `cabal configure` command inside of
the shell:
$ nix-shell -p haskell.compiler.ghc784 --command "cabal configure"
Afterwards, all other commands like `cabal build` work just fine in any shell
environment, because the configure phase recorded the absolute paths to all
required tools like GHC in its build configuration inside of the `dist/`
directory. Please note, however, that `nix-collect-garbage` can break such an
environment because the Nix store paths created by `nix-shell` aren't "alive"
anymore once `nix-shell` has terminated. If you find that your Haskell builds
no longer work after garbage collection, then you'll have to re-run `cabal
configure` inside of a new `nix-shell` environment.
### How to install a compiler with libraries
GHC expects to find all installed libraries inside of its own `lib` directory.
This approach works fine on traditional Unix systems, but it doesn't work for
Nix, because GHC's store path is immutable once it's built. We cannot install
additional libraries into that location. As a consequence, our copies of GHC
don't know any packages except their own core libraries, like `base`,
`containers`, `Cabal`, etc.
We can register additional libraries to GHC, however, using a special build
function called `ghcWithPackages`. That function expects one argument: a
function that maps from an attribute set of Haskell packages to a list of
packages, which determines the libraries known to that particular version of
GHC. For example, the Nix expression `ghcWithPackages (pkgs: [pkgs.mtl])`
generates a copy of GHC that has the `mtl` library registered in addition to
its normal core packages:
$ nix-shell -p "haskellPackages.ghcWithPackages (pkgs: [pkgs.mtl])"
[nix-shell:~]$ ghc-pkg list mtl
/nix/store/zy79...-ghc-7.10.2/lib/ghc-7.10.2/package.conf.d:
mtl-2.2.1
This function allows users to define their own development environment by means
of an override. After adding the following snippet to `~/.nixpkgs/config.nix`,
{
packageOverrides = super: let self = super.pkgs; in
{
myHaskellEnv = self.haskell.packages.ghc7102.ghcWithPackages
(haskellPackages: with haskellPackages; [
# libraries
arrows async cgi criterion
# tools
cabal-install haskintex
]);
};
}
it's possible to install that compiler with `nix-env -f "<nixpkgs>" -iA
myHaskellEnv`. If you'd like to switch that development environment to a
different version of GHC, just replace the `ghc7102` bit in the previous
definition with the appropriate name. Of course, it's also possible to define
any number of these development environments! (You can't install two of them
into the same profile at the same time, though, because that would result in
file conflicts.)
The generated `ghc` program is a wrapper script that re-directs the real
GHC executable to use a new `lib` directory --- one that we specifically
constructed to contain all those packages the user requested:
$ cat $(type -p ghc)
#! /nix/store/xlxj...-bash-4.3-p33/bin/bash -e
export NIX_GHC=/nix/store/19sm...-ghc-7.10.2/bin/ghc
export NIX_GHCPKG=/nix/store/19sm...-ghc-7.10.2/bin/ghc-pkg
export NIX_GHC_DOCDIR=/nix/store/19sm...-ghc-7.10.2/share/doc/ghc/html
export NIX_GHC_LIBDIR=/nix/store/19sm...-ghc-7.10.2/lib/ghc-7.10.2
exec /nix/store/j50p...-ghc-7.10.2/bin/ghc "-B$NIX_GHC_LIBDIR" "$@"
The variables `$NIX_GHC`, `$NIX_GHCPKG`, etc. point to the *new* store path
`ghcWithPackages` constructed specifically for this environment. The last line
of the wrapper script then executes the real `ghc`, but passes the path to the
new `lib` directory using GHC's `-B` flag.
The purpose of those environment variables is to work around an impurity in the
popular [ghc-paths](http://hackage.haskell.org/package/ghc-paths) library. That
library promises to give its users access to GHC's installation paths. Only,
the library can't possible know that path when it's compiled, because the path
GHC considers its own is determined only much later, when the user configures
it through `ghcWithPackages`. So we [patched
ghc-paths](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/patches/ghc-paths-nix.patch)
to return the paths found in those environment variables at run-time rather
than trying to guess them at compile-time.
To make sure that mechanism works properly all the time, we recommend that you
set those variables to meaningful values in your shell environment, too, i.e.
by adding the following code to your `~/.bashrc`:
if type >/dev/null 2>&1 -p ghc; then
eval "$(egrep ^export "$(type -p ghc)")"
fi
If you are certain that you'll use only one GHC environment which is located in
your user profile, then you can use the following code, too, which has the
advantage that it doesn't contain any paths from the Nix store, i.e. those
settings always remain valid even if a `nix-env -u` operation updates the GHC
environment in your profile:
if [ -e ~/.nix-profile/bin/ghc ]; then
export NIX_GHC="$HOME/.nix-profile/bin/ghc"
export NIX_GHCPKG="$HOME/.nix-profile/bin/ghc-pkg"
export NIX_GHC_DOCDIR="$HOME/.nix-profile/share/doc/ghc/html"
export NIX_GHC_LIBDIR="$HOME/.nix-profile/lib/ghc-$($NIX_GHC --numeric-version)"
fi
### How to install a compiler with libraries, hoogle and documentation indexes
If you plan to use your environment for interactive programming, not just
compiling random Haskell code, you might want to replace `ghcWithPackages` in
all the listings above with `ghcWithHoogle`.
This environment generator not only produces an environment with GHC and all
the specified libraries, but also generates a `hoogle` and `haddock` indexes
for all the packages, and provides a wrapper script around `hoogle` binary that
uses all those things. A precise name for this thing would be
"`ghcWithPackagesAndHoogleAndDocumentationIndexes`", which is, regrettably, too
long and scary.
For example, installing the following environment
{
packageOverrides = super: let self = super.pkgs; in
{
myHaskellEnv = self.haskellPackages.ghcWithHoogle
(haskellPackages: with haskellPackages; [
# libraries
arrows async cgi criterion
# tools
cabal-install haskintex
]);
};
}
allows one to browse module documentation index [not too dissimilar to
this](https://downloads.haskell.org/~ghc/latest/docs/html/libraries/index.html)
for all the specified packages and their dependencies by directing a browser of
choice to `~/.nix-profiles/share/doc/hoogle/index.html` (or
`/run/current-system/sw/share/doc/hoogle/index.html` in case you put it in
`environment.systemPackages` in NixOS).
After you've marveled enough at that try adding the following to your
`~/.ghc/ghci.conf`
:def hoogle \s -> return $ ":! hoogle search -cl --count=15 \"" ++ s ++ "\""
:def doc \s -> return $ ":! hoogle search -cl --info \"" ++ s ++ "\""
and test it by typing into `ghci`:
:hoogle a -> a
:doc a -> a
Be sure to note the links to `haddock` files in the output. With any modern and
properly configured terminal emulator you can just click those links to
navigate there.
Finally, you can run
hoogle server -p 8080
and navigate to http://localhost:8080/ for your own local
[Hoogle](https://www.haskell.org/hoogle/). Note, however, that Firefox and
possibly other browsers disallow navigation from `http:` to `file:` URIs for
security reasons, which might be quite an inconvenience. See [this
page](http://kb.mozillazine.org/Links_to_local_pages_do_not_work) for
workarounds.
### How to build a Haskell project using Stack
[Stack][http://haskellstack.org] is a popular build tool for Haskell projects.
It has first-class support for Nix. Stack can optionally use Nix to
automatically select the right version of GHC and other build tools to build,
test and execute apps in an existing project downloaded from somewhere on the
Internet. Pass the `--nix` flag to any `stack` command to do so, e.g.
$ git clone --recursive http://github.com/yesodweb/wai
$ cd wai
$ stack --nix build
If you want `stack` to use Nix by default, you can add a `nix` section to the
`stack.yaml` file, as explained in the [Stack documentation][stack-nix-doc]. For
example:
nix:
enable: true
packages: [pkgconfig zeromq zlib]
The example configuration snippet above tells Stack to create an ad hoc
environment for `nix-shell` as in the below section, in which the `pkgconfig`,
`zeromq` and `zlib` packages from Nixpkgs are available. All `stack` commands
will implicitly be executed inside this ad hoc environment.
Some projects have more sophisticated needs. For examples, some ad hoc
environments might need to expose Nixpkgs packages compiled in a certain way, or
with extra environment variables. In these cases, you'll need a `shell` field
instead of `packages`:
nix:
enable: true
shell-file: shell.nix
For more on how to write a `shell.nix` file see the below section. You'll need
to express a derivation. Note that Nixpkgs ships with a convenience wrapper
function around `mkDerivation` called `haskell.lib.buildStackProject` to help you
create this derivation in exactly the way Stack expects. All of the same inputs
as `mkDerivation` can be provided. For example, to build a Stack project that
including packages that link against a version of the R library compiled with
special options turned on:
with (import <nixpkgs> { });
let R = pkgs.R.override { enableStrictBarrier = true; };
in
haskell.lib.buildStackProject {
name = "HaskellR";
buildInputs = [ R zeromq zlib ];
}
[stack-nix-doc]: http://docs.haskellstack.org/en/stable/nix_integration.html
### How to create ad hoc environments for `nix-shell`
The easiest way to create an ad hoc development environment is to run
`nix-shell` with the appropriate GHC environment given on the command-line:
nix-shell -p "haskellPackages.ghcWithPackages (pkgs: with pkgs; [mtl pandoc])"
For more sophisticated use-cases, however, it's more convenient to save the
desired configuration in a file called `shell.nix` that looks like this:
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
let
inherit (nixpkgs) pkgs;
ghc = pkgs.haskell.packages.${compiler}.ghcWithPackages (ps: with ps; [
monad-par mtl
]);
in
pkgs.stdenv.mkDerivation {
name = "my-haskell-env-0";
buildInputs = [ ghc ];
shellHook = "eval $(egrep ^export ${ghc}/bin/ghc)";
}
Now run `nix-shell` --- or even `nix-shell --pure` --- to enter a shell
environment that has the appropriate compiler in `$PATH`. If you use `--pure`,
then add all other packages that your development environment needs into the
`buildInputs` attribute. If you'd like to switch to a different compiler
version, then pass an appropriate `compiler` argument to the expression, i.e.
`nix-shell --argstr compiler ghc784`.
If you need such an environment because you'd like to compile a Hackage package
outside of Nix --- i.e. because you're hacking on the latest version from Git
---, then the package set provides suitable nix-shell environments for you
already! Every Haskell package has an `env` attribute that provides a shell
environment suitable for compiling that particular package. If you'd like to
hack the `lens` library, for example, then you just have to check out the
source code and enter the appropriate environment:
$ cabal get lens-4.11 && cd lens-4.11
Downloading lens-4.11...
Unpacking to lens-4.11/
$ nix-shell "<nixpkgs>" -A haskellPackages.lens.env
[nix-shell:/tmp/lens-4.11]$
At point, you can run `cabal configure`, `cabal build`, and all the other
development commands. Note that you need `cabal-install` installed in your
`$PATH` already to use it here --- the `nix-shell` environment does not provide
it.
## How to create Nix builds for your own private Haskell packages
If your own Haskell packages have build instructions for Cabal, then you can
convert those automatically into build instructions for Nix using the
`cabal2nix` utility, which you can install into your profile by running
`nix-env -i cabal2nix`.
### How to build a stand-alone project
For example, let's assume that you're working on a private project called
`foo`. To generate a Nix build expression for it, change into the project's
top-level directory and run the command:
$ cabal2nix . >foo.nix
Then write the following snippet into a file called `default.nix`:
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
nixpkgs.pkgs.haskell.packages.${compiler}.callPackage ./foo.nix { }
Finally, store the following code in a file called `shell.nix`:
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
(import ./default.nix { inherit nixpkgs compiler; }).env
At this point, you can run `nix-build` to have Nix compile your project and
install it into a Nix store path. The local directory will contain a symlink
called `result` after `nix-build` returns that points into that location. Of
course, passing the flag `--argstr compiler ghc763` allows switching the build
to any version of GHC currently supported.
Furthermore, you can call `nix-shell` to enter an interactive development
environment in which you can use `cabal configure` and `cabal build` to develop
your code. That environment will automatically contain a proper GHC derivation
with all the required libraries registered as well as all the system-level
libraries your package might need.
If your package does not depend on any system-level libraries, then it's
sufficient to run
$ nix-shell --command "cabal configure"
once to set up your build. `cabal-install` determines the absolute paths to all
resources required for the build and writes them into a config file in the
`dist/` directory. Once that's done, you can run `cabal build` and any other
command for that project even outside of the `nix-shell` environment. This
feature is particularly nice for those of us who like to edit their code with
an IDE, like Emacs' `haskell-mode`, because it's not necessary to start Emacs
inside of nix-shell just to make it find out the necessary settings for
building the project; `cabal-install` has already done that for us.
If you want to do some quick-and-dirty hacking and don't want to bother setting
up a `default.nix` and `shell.nix` file manually, then you can use the
`--shell` flag offered by `cabal2nix` to have it generate a stand-alone
`nix-shell` environment for you. With that feature, running
$ cabal2nix --shell . >shell.nix
$ nix-shell --command "cabal configure"
is usually enough to set up a build environment for any given Haskell package.
You can even use that generated file to run `nix-build`, too:
$ nix-build shell.nix
### How to build projects that depend on each other
If you have multiple private Haskell packages that depend on each other, then
you'll have to register those packages in the Nixpkgs set to make them visible
for the dependency resolution performed by `callPackage`. First of all, change
into each of your projects top-level directories and generate a `default.nix`
file with `cabal2nix`:
$ cd ~/src/foo && cabal2nix . >default.nix
$ cd ~/src/bar && cabal2nix . >default.nix
Then edit your `~/.nixpkgs/config.nix` file to register those builds in the
default Haskell package set:
{
packageOverrides = super: let self = super.pkgs; in
{
haskellPackages = super.haskellPackages.override {
overrides = self: super: {
foo = self.callPackage ../src/foo {};
bar = self.callPackage ../src/bar {};
};
};
};
}
Once that's accomplished, `nix-env -f "<nixpkgs>" -qA haskellPackages` will
show your packages like any other package from Hackage, and you can build them
$ nix-build "<nixpkgs>" -A haskellPackages.foo
or enter an interactive shell environment suitable for building them:
$ nix-shell "<nixpkgs>" -A haskellPackages.bar.env
## Miscellaneous Topics
### How to build with profiling enabled
Every Haskell package set takes a function called `overrides` that you can use
to manipulate the package as much as you please. One useful application of this
feature is to replace the default `mkDerivation` function with one that enables
library profiling for all packages. To accomplish that, add configure the
following snippet in your `~/.nixpkgs/config.nix` file:
{
packageOverrides = super: let self = super.pkgs; in
{
profiledHaskellPackages = self.haskellPackages.override {
overrides = self: super: {
mkDerivation = args: super.mkDerivation (args // {
enableLibraryProfiling = true;
});
};
};
};
}
Then, replace instances of `haskellPackages` in the `cabal2nix`-generated
`default.nix` or `shell.nix` files with `profiledHaskellPackages`.
### How to override package versions in a compiler-specific package set
Nixpkgs provides the latest version of
[`ghc-events`](http://hackage.haskell.org/package/ghc-events), which is 0.4.4.0
at the time of this writing. This is fine for users of GHC 7.10.x, but GHC
7.8.4 cannot compile that binary. Now, one way to solve that problem is to
register an older version of `ghc-events` in the 7.8.x-specific package set.
The first step is to generate Nix build instructions with `cabal2nix`:
$ cabal2nix cabal://ghc-events-0.4.3.0 >~/.nixpkgs/ghc-events-0.4.3.0.nix
Then add the override in `~/.nixpkgs/config.nix`:
{
packageOverrides = super: let self = super.pkgs; in
{
haskell = super.haskell // {
packages = super.haskell.packages // {
ghc784 = super.haskell.packages.ghc784.override {
overrides = self: super: {
ghc-events = self.callPackage ./ghc-events-0.4.3.0.nix {};
};
};
};
};
};
}
This code is a little crazy, no doubt, but it's necessary because the intuitive
version
haskell.packages.ghc784 = super.haskell.packages.ghc784.override {
overrides = self: super: {
ghc-events = self.callPackage ./ghc-events-0.4.3.0.nix {};
};
};
doesn't do what we want it to: that code replaces the `haskell` package set in
Nixpkgs with one that contains only one entry,`packages`, which contains only
one entry `ghc784`. This override loses the `haskell.compiler` set, and it
loses the `haskell.packages.ghcXYZ` sets for all compilers but GHC 7.8.4. To
avoid that problem, we have to perform the convoluted little dance from above,
iterating over each step in hierarchy.
Once it's accomplished, however, we can install a variant of `ghc-events`
that's compiled with GHC 7.8.4:
nix-env -f "<nixpkgs>" -iA haskell.packages.ghc784.ghc-events
Unfortunately, it turns out that this build fails again while executing the
test suite! Apparently, the release archive on Hackage is missing some data
files that the test suite requires, so we cannot run it. We accomplish that by
re-generating the Nix expression with the `--no-check` flag:
$ cabal2nix --no-check cabal://ghc-events-0.4.3.0 >~/.nixpkgs/ghc-events-0.4.3.0.nix
Now the builds succeeds.
Of course, in the concrete example of `ghc-events` this whole exercise is not
an ideal solution, because `ghc-events` can analyze the output emitted by any
version of GHC later than 6.12 regardless of the compiler version that was used
to build the `ghc-events' executable, so strictly speaking there's no reason to
prefer one built with GHC 7.8.x in the first place. However, for users who
cannot use GHC 7.10.x at all for some reason, the approach of downgrading to an
older version might be useful.
### How to recover from GHC's infamous non-deterministic library ID bug
GHC and distributed build farms don't get along well:
https://ghc.haskell.org/trac/ghc/ticket/4012
When you see an error like this one
package foo-0.7.1.0 is broken due to missing package
text-1.2.0.4-98506efb1b9ada233bb5c2b2db516d91
then you have to download and re-install `foo` and all its dependents from
scratch:
# nix-store -q --referrers /nix/store/*-haskell-text-1.2.0.4 \
| xargs -L 1 nix-store --repair-path
If you're using additional Hydra servers other than `hydra.nixos.org`, then it
might be necessary to purge the local caches that store data from those
machines to disable these binary channels for the duration of the previous
command, i.e. by running:
rm /nix/var/nix/binary-cache-v3.sqlite
rm /nix/var/nix/manifests/*
rm /nix/var/nix/channel-cache/*
### Builds on Darwin fail with `math.h` not found
Users of GHC on Darwin have occasionally reported that builds fail, because the
compiler complains about a missing include file:
fatal error: 'math.h' file not found
The issue has been discussed at length in [ticket
6390](https://github.com/NixOS/nixpkgs/issues/6390), and so far no good
solution has been proposed. As a work-around, users who run into this problem
can configure the environment variables
export NIX_CFLAGS_COMPILE="-idirafter /usr/include"
export NIX_CFLAGS_LINK="-L/usr/lib"
in their `~/.bashrc` file to avoid the compiler error.
### Builds using Stack complain about missing system libraries
-- While building package zlib-0.5.4.2 using:
runhaskell -package=Cabal-1.22.4.0 -clear-package-db [... lots of flags ...]
Process exited with code: ExitFailure 1
Logs have been written to: /home/foo/src/stack-ide/.stack-work/logs/zlib-0.5.4.2.log
Configuring zlib-0.5.4.2...
Setup.hs: Missing dependency on a foreign library:
* Missing (or bad) header file: zlib.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
When you run the build inside of the nix-shell environment, the system
is configured to find libz.so without any special flags -- the compiler
and linker "just know" how to find it. Consequently, Cabal won't record
any search paths for libz.so in the package description, which means
that the package works fine inside of nix-shell, but once you leave the
shell the shared object can no longer be found. That issue is by no
means specific to Stack: you'll have that problem with any other
Haskell package that's built inside of nix-shell but run outside of that
environment.
You can remedy this issue in several ways. The easiest is to add a `nix` section
to the `stack.yaml` like the following:
nix:
enable: true
packages: [ zlib ]
Stack's Nix support knows to add `${zlib}/lib` and `${zlib}/include` as an
`--extra-lib-dirs` and `extra-include-dirs`, respectively. Alternatively, you
can achieve the same effect by hand. First of all, run
$ nix-build --no-out-link "<nixpkgs>" -A zlib
/nix/store/alsvwzkiw4b7ip38l4nlfjijdvg3fvzn-zlib-1.2.8
to find out the store path of the system's zlib library. Now, you can
1) add that path (plus a "/lib" suffix) to your $LD_LIBRARY_PATH
environment variable to make sure your system linker finds libz.so
automatically. It's no pretty solution, but it will work.
2) As a variant of (1), you can also install any number of system
libraries into your user's profile (or some other profile) and point
$LD_LIBRARY_PATH to that profile instead, so that you don't have to
list dozens of those store paths all over the place.
3) The solution I prefer is to call stack with an appropriate
--extra-lib-dirs flag like so:
$ stack --extra-lib-dirs=/nix/store/alsvwzkiw4b7ip38l4nlfjijdvg3fvzn-zlib-1.2.8/lib build
Typically, you'll need --extra-include-dirs as well. It's possible
to add those flag to the project's "stack.yaml" or your user's
global "~/.stack/global/stack.yaml" file so that you don't have to
specify them manually every time. But again, you're likely better off using
Stack's Nix support instead.
The same thing applies to `cabal configure`, of course, if you're
building with `cabal-install` instead of Stack.
### Creating statically linked binaries
There are two levels of static linking. The first option is to configure the
build with the Cabal flag `--disable-executable-dynamic`. In Nix expressions,
this can be achieved by setting the attribute:
enableSharedExecutables = false;
That gives you a binary with statically linked Haskell libraries and
dynamically linked system libraries.
To link both Haskell libraries and system libraries statically, the additional
flags `--ghc-option=-optl=-static --ghc-option=-optl=-pthread` need to be used.
In Nix, this is accomplished with:
configureFlags = [ "--ghc-option=-optl=-static" "--ghc-option=-optl=-pthread" ];
It's important to realize, however, that most system libraries in Nix are built
as shared libraries only, i.e. there is just no static library available that
Cabal could link!
## Other resources
- The Youtube video [Nix Loves Haskell](https://www.youtube.com/watch?v=BsBhi_r-OeE)
provides an introduction into Haskell NG aimed at beginners. The slides are
available at http://cryp.to/nixos-meetup-3-slides.pdf and also -- in a form
ready for cut & paste -- at
https://github.com/NixOS/cabal2nix/blob/master/doc/nixos-meetup-3-slides.md.
- Another Youtube video is [Escaping Cabal Hell with Nix](https://www.youtube.com/watch?v=mQd3s57n_2Y),
which discusses the subject of Haskell development with Nix but also provides
a basic introduction to Nix as well, i.e. it's suitable for viewers with
almost no prior Nix experience.
- Oliver Charles wrote a very nice [Tutorial how to develop Haskell packages with Nix](http://wiki.ocharles.org.uk/Nix).
- The *Journey into the Haskell NG infrastructure* series of postings
describe the new Haskell infrastructure in great detail:
- [Part 1](http://lists.science.uu.nl/pipermail/nix-dev/2015-January/015591.html)
explains the differences between the old and the new code and gives
instructions how to migrate to the new setup.
- [Part 2](http://lists.science.uu.nl/pipermail/nix-dev/2015-January/015608.html)
looks in-depth at how to tweak and configure your setup by means of
overrides.
- [Part 3](http://lists.science.uu.nl/pipermail/nix-dev/2015-April/016912.html)
describes the infrastructure that keeps the Haskell package set in Nixpkgs
up-to-date.

53
doc/introduction.md Normal file
View File

@@ -0,0 +1,53 @@
---
title: Introduction
author: Frederik Rietdijk
date: 2015-11-25
---
# Introduction
The Nix Packages collection (Nixpkgs) is a set of thousands of packages for the
[Nix package manager](http://nixos.org/nix/), released under a
[permissive MIT/X11 license](https://github.com/NixOS/nixpkgs/blob/master/COPYING).
Packages are available for several platforms, and can be used with the Nix
package manager on most GNU/Linux distributions as well as NixOS.
This manual primarily describes how to write packages for the Nix Packages collection
(Nixpkgs). Thus its mainly for packagers and developers who want to add packages to
Nixpkgs. If you like to learn more about the Nix package manager and the Nix
expression language, then you are kindly referred to the [Nix manual](http://nixos.org/nix/manual/).
## Overview of Nixpkgs
Nix expressions describe how to build packages from source and are collected in
the [nixpkgs repository](https://github.com/NixOS/nixpkgs). Also included in the
collection are Nix expressions for
[NixOS modules](http://nixos.org/nixos/manual/index.html#sec-writing-modules).
With these expressions the Nix package manager can build binary packages.
Packages, including the Nix packages collection, are distributed through
[channels](http://nixos.org/nix/manual/#sec-channels). The collection is
distributed for users of Nix on non-NixOS distributions through the channel
`nixpkgs`. Users of NixOS generally use one of the `nixos-*` channels, e.g.
`nixos-16.03`, which includes all packages and modules for the stable NixOS
16.03. The purpose of stable NixOS releases are generally only given
security updates. More up to date packages and modules are available via the
`nixos-unstable` channel.
Both `nixos-unstable` and `nixpkgs` follow the `master` branch of the Nixpkgs
repository, although both do lag the `master` branch by generally
[a couple of days](http://howoldis.herokuapp.com/). Updates to a channel are
distributed as soon as all tests for that channel pass, e.g.
[this table](http://hydra.nixos.org/job/nixpkgs/trunk/unstable#tabs-constituents)
shows the status of tests for the `nixpkgs` channel.
The tests are conducted by a cluster called [Hydra](http://nixos.org/hydra/),
which also builds binary packages from the Nix expressions in Nixpkgs for
`x86_64-linux`, `i686-linux` and `x86_64-darwin`.
The binaries are made available via a [binary cache](https://cache.nixos.org).
The current Nix expressions of the channels are available in the
[`nixpkgs-channels`](https://github.com/NixOS/nixpkgs-channels) repository,
which has branches corresponding to the available channels. There is also the
[Nixpkgs Monitor](http://monitor.nixos.org) which keeps track of updates
and security vulnerabilities.

View File

@@ -1,239 +0,0 @@
---
title: Android
author: Sander van der Burg
date: 2018-11-18
---
# Android
The Android build environment provides three major features and a number of
supporting features.
Deploying an Android SDK installation with plugins
--------------------------------------------------
The first use case is deploying the SDK with a desired set of plugins or subsets
of an SDK.
```nix
with import <nixpkgs> {};
let
androidComposition = androidenv.composeAndroidPackages {
toolsVersion = "25.2.5";
platformToolsVersion = "27.0.1";
buildToolsVersions = [ "27.0.3" ];
includeEmulator = false;
emulatorVersion = "27.2.0";
platformVersions = [ "24" ];
includeSources = false;
includeDocs = false;
includeSystemImages = false;
systemImageTypes = [ "default" ];
abiVersions = [ "armeabi-v7a" ];
lldbVersions = [ "2.0.2558144" ];
cmakeVersions = [ "3.6.4111459" ];
includeNDK = false;
ndkVersion = "16.1.4479499";
useGoogleAPIs = false;
useGoogleTVAddOns = false;
includeExtras = [
"extras;google;gcm"
];
};
in
androidComposition.androidsdk
```
The above function invocation states that we want an Android SDK with the above
specified plugin versions. By default, most plugins are disabled. Notable
exceptions are the tools, platform-tools and build-tools sub packages.
The following parameters are supported:
* `toolsVersion`, specifies the version of the tools package to use
* `platformsToolsVersion` specifies the version of the `platform-tools` plugin
* `buildToolsVersion` specifies the versions of the `build-tools` plugins to
use.
* `includeEmulator` specifies whether to deploy the emulator package (`false`
by default). When enabled, the version of the emulator to deploy can be
specified by setting the `emulatorVersion` parameter.
* `includeDocs` specifies whether the documentation catalog should be included.
* `lldbVersions` specifies what LLDB versions should be deployed.
* `cmakeVersions` specifies which CMake versions should be deployed.
* `includeNDK` specifies that the Android NDK bundle should be included.
Defaults to: `false`.
* `ndkVersion` specifies the NDK version that we want to use.
* `includeExtras` is an array of identifier strings referring to arbitrary
add-on packages that should be installed.
* `platformVersions` specifies which platform SDK versions should be included.
For each platform version that has been specified, we can apply the following
options:
* `includeSystemImages` specifies whether a system image for each platform SDK
should be included.
* `includeSources` specifies whether the sources for each SDK version should be
included.
* `useGoogleAPIs` specifies that for each selected platform version the
Google API should be included.
* `useGoogleTVAddOns` specifies that for each selected platform version the
Google TV add-on should be included.
For each requested system image we can specify the following options:
* `systemImageTypes` specifies what kind of system images should be included.
Defaults to: `default`.
* `abiVersions` specifies what kind of ABI version of each system image should
be included. Defaults to: `armeabi-v7a`.
Most of the function arguments have reasonable default settings.
When building the above expression with:
```bash
$ nix-build
```
The Android SDK gets deployed with all desired plugin versions.
We can also deploy subsets of the Android SDK. For example, to only the
`platform-tools` package, you can evaluate the following expression:
```nix
with import <nixpkgs> {};
let
androidComposition = androidenv.composeAndroidPackages {
# ...
};
in
androidComposition.platform-tools
```
Using predefine Android package compositions
--------------------------------------------
In addition to composing an Android package set manually, it is also possible
to use a predefined composition that contains all basic packages for a specific
Android version, such as version 9.0 (API-level 28).
The following Nix expression can be used to deploy the entire SDK with all basic
plugins:
```nix
with import <nixpkgs> {};
androidenv.androidPkgs_9_0.androidsdk
```
It is also possible to use one plugin only:
```nix
with import <nixpkgs> {};
androidenv.androidPkgs_9_0.platform-tools
```
Building an Android application
-------------------------------
In addition to the SDK, it is also possible to build an Ant-based Android
project and automatically deploy all the Android plugins that a project
requires.
```nix
with import <nixpkgs> {};
androidenv.buildApp {
name = "MyAndroidApp";
src = ./myappsources;
release = true;
# If release is set to true, you need to specify the following parameters
keyStore = ./keystore;
keyAlias = "myfirstapp";
keyStorePassword = "mykeystore";
keyAliasPassword = "myfirstapp";
# Any Android SDK parameters that install all the relevant plugins that a
# build requires
platformVersions = [ "24" ];
# When we include the NDK, then ndk-build is invoked before Ant gets invoked
includeNDK = true;
}
```
Aside from the app-specific build parameters (`name`, `src`, `release` and
keystore parameters), the `buildApp {}` function supports all the function
parameters that the SDK composition function (the function shown in the
previous section) supports.
This build function is particularly useful when it is desired to use
[Hydra](http://nixos.org/hydra): the Nix-based continuous integration solution
to build Android apps. An Android APK gets exposed as a build product and can be
installed on any Android device with a web browser by navigating to the build
result page.
Spawning emulator instances
---------------------------
For testing purposes, it can also be quite convenient to automatically generate
scripts that spawn emulator instances with all desired configuration settings.
An emulator spawn script can be configured by invoking the `emulateApp {}`
function:
```nix
with import <nixpkgs> {};
androidenv.emulateApp {
name = "emulate-MyAndroidApp";
platformVersion = "28";
abiVersion = "x86_64"; # armeabi-v7a, mips, x86
systemImageType = "google_apis_playstore";
}
```
It is also possible to specify an APK to deploy inside the emulator
and the package and activity names to launch it:
```nix
with import <nixpkgs> {};
androidenv.emulateApp {
name = "emulate-MyAndroidApp";
platformVersion = "24";
abiVersion = "armeabi-v7a"; # mips, x86, x86_64
systemImageType = "default";
useGoogleAPIs = false;
app = ./MyApp.apk;
package = "MyApp";
activity = "MainActivity";
}
```
In addition to prebuilt APKs, you can also bind the APK parameter to a
`buildApp {}` function invocation shown in the previous example.
Querying the available versions of each plugin
----------------------------------------------
When using any of the previously shown functions, it may be a bit inconvenient
to find out what options are supported, since the Android SDK provides many
plugins.
A shell script in the `pkgs/development/mobile/androidenv/` sub directory can be used to retrieve all
possible options:
```bash
sh ./querypackages.sh packages build-tools
```
The above command-line instruction queries all build-tools versions in the
generated `packages.nix` expression.
Updating the generated expressions
----------------------------------
Most of the Nix expressions are generated from XML files that the Android
package manager uses. To update the expressions run the `generate.sh` script
that is stored in the `pkgs/development/mobile/androidenv/` sub directory:
```bash
sh ./generate.sh
```

View File

@@ -1,159 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-beam">
<title>BEAM Languages (Erlang, Elixir &amp; LFE)</title>
<section xml:id="beam-introduction">
<title>Introduction</title>
<para>
In this document and related Nix expressions, we use the term, <emphasis>BEAM</emphasis>, to describe the environment. BEAM is the name of the Erlang Virtual Machine and, as far as we're concerned, from a packaging perspective, all languages that run on the BEAM are interchangeable. That which varies, like the build system, is transparent to users of any given BEAM package, so we make no distinction.
</para>
</section>
<section xml:id="beam-structure">
<title>Structure</title>
<para>
All BEAM-related expressions are available via the top-level <literal>beam</literal> attribute, which includes:
</para>
<itemizedlist>
<listitem>
<para>
<literal>interpreters</literal>: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (<literal>beam.interpreters.erlangR19</literal>, etc), Elixir (<literal>beam.interpreters.elixir</literal>) and LFE (<literal>beam.interpreters.lfe</literal>).
</para>
</listitem>
<listitem>
<para>
<literal>packages</literal>: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. <literal>beam.packages.erlangR19</literal>.
</para>
</listitem>
</itemizedlist>
<para>
The default Erlang compiler, defined by <literal>beam.interpreters.erlang</literal>, is aliased as <literal>erlang</literal>. The default BEAM package set is defined by <literal>beam.packages.erlang</literal> and aliased at the top level as <literal>beamPackages</literal>.
</para>
<para>
To create a package builder built with a custom Erlang version, use the lambda, <literal>beam.packagesWith</literal>, which accepts an Erlang/OTP derivation and produces a package builder similar to <literal>beam.packages.erlang</literal>.
</para>
<para>
Many Erlang/OTP distributions available in <literal>beam.interpreters</literal> have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there's <literal>beam.interpreters.erlangR22_odbc_javac</literal>, which corresponds to <literal>beam.interpreters.erlangR22</literal> and <literal>beam.interpreters.erlangR22_nox</literal>, which corresponds to <literal>beam.interpreters.erlangR22</literal>.
</para>
</section>
<section xml:id="build-tools">
<title>Build Tools</title>
<section xml:id="build-tools-rebar3">
<title>Rebar3</title>
<para>
We provide a version of Rebar3, under <literal>rebar3</literal>. We also provide a helper to fetch Rebar3 dependencies from a lockfile under <literal>fetchRebar3Deps</literal>.
</para>
</section>
<section xml:id="build-tools-other">
<title>Mix &amp; Erlang.mk</title>
<para>
Both Mix and Erlang.mk work exactly as expected. There is a bootstrap process that needs to be run for both, however, which is supported by the <literal>buildMix</literal> and <literal>buildErlangMk</literal> derivations, respectively.
</para>
</section>
</section>
<section xml:id="how-to-install-beam-packages">
<title>How to Install BEAM Packages</title>
<para>
BEAM builders are not registered at the top level, simply because they are not relevant to the vast majority of Nix users.
To install any of those builders into your profile, refer to them by their attribute path <literal>beamPackages.rebar3</literal>:
</para>
<screen>
<prompt>$ </prompt>nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.rebar3
</screen>
</section>
<section xml:id="packaging-beam-applications">
<title>Packaging BEAM Applications</title>
<section xml:id="packaging-erlang-applications">
<title>Erlang Applications</title>
<section xml:id="rebar3-packages">
<title>Rebar3 Packages</title>
<para>
The Nix function, <literal>buildRebar3</literal>, defined in <literal>beam.packages.erlang.buildRebar3</literal> and aliased at the top level, can be used to build a derivation that understands how to build a Rebar3 project.
</para>
<para>
If a package needs to compile native code via Rebar3's port compilation mechanism, add <literal>compilePort = true;</literal> to the derivation.
</para>
</section>
<section xml:id="erlang-mk-packages">
<title>Erlang.mk Packages</title>
<para>
Erlang.mk functions similarly to Rebar3, except we use <literal>buildErlangMk</literal> instead of <literal>buildRebar3</literal>.
</para>
</section>
<section xml:id="mix-packages">
<title>Mix Packages</title>
<para>
Mix functions similarly to Rebar3, except we use <literal>buildMix</literal> instead of <literal>buildRebar3</literal>.
</para>
<para>
Alternatively, we can use <literal>buildHex</literal> as a shortcut:
</para>
</section>
</section>
</section>
<section xml:id="how-to-develop">
<title>How to Develop</title>
<section xml:id="creating-a-shell">
<title>Creating a Shell</title>
<para>
Usually, we need to create a <literal>shell.nix</literal> file and do our development inside of the environment specified therein. Just install your version of erlang and other interpreter, and then user your normal build tools.
As an example with elixir:
</para>
<programlisting>
{ pkgs ? import &quot;&lt;nixpkgs&quot;&gt; {} }:
with pkgs;
let
elixir = beam.packages.erlangR22.elixir_1_9;
in
mkShell {
buildInputs = [ elixir ];
ERL_INCLUDE_PATH="${erlang}/lib/erlang/usr/include";
}
</programlisting>
<section xml:id="building-in-a-shell">
<title>Building in a Shell (for Mix Projects)</title>
<para>
Using a <literal>shell.nix</literal> as described (see <xref
linkend="creating-a-shell"/>) should just work.
</para>
</section>
</section>
</section>
</section>

View File

@@ -1,196 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-bower">
<title>Bower</title>
<para>
<link xlink:href="http://bower.io">Bower</link> is a package manager for web site front-end components. Bower packages (comprising of build artefacts and sometimes sources) are stored in <command>git</command> repositories, typically on Github. The package registry is run by the Bower team with package metadata coming from the <filename>bower.json</filename> file within each package.
</para>
<para>
The end result of running Bower is a <filename>bower_components</filename> directory which can be included in the web app's build process.
</para>
<para>
Bower can be run interactively, by installing <varname>nodePackages.bower</varname>. More interestingly, the Bower components can be declared in a Nix derivation, with the help of <varname>nodePackages.bower2nix</varname>.
</para>
<section xml:id="ssec-bower2nix-usage">
<title><command>bower2nix</command> usage</title>
<para>
Suppose you have a <filename>bower.json</filename> with the following contents:
<example xml:id="ex-bowerJson">
<title><filename>bower.json</filename></title>
<programlisting language="json">
<![CDATA[{
"name": "my-web-app",
"dependencies": {
"angular": "~1.5.0",
"bootstrap": "~3.3.6"
}
}]]>
</programlisting>
</example>
</para>
<para>
Running <command>bower2nix</command> will produce something like the following output:
<programlisting language="nix">
<![CDATA[{ fetchbower, buildEnv }:
buildEnv { name = "bower-env"; ignoreCollisions = true; paths = [
(fetchbower "angular" "1.5.3" "~1.5.0" "1749xb0firxdra4rzadm4q9x90v6pzkbd7xmcyjk6qfza09ykk9y")
(fetchbower "bootstrap" "3.3.6" "~3.3.6" "1vvqlpbfcy0k5pncfjaiskj3y6scwifxygfqnw393sjfxiviwmbv")
(fetchbower "jquery" "2.2.2" "1.9.1 - 2" "10sp5h98sqwk90y4k6hbdviwqzvzwqf47r3r51pakch5ii2y7js1")
]; }]]>
</programlisting>
</para>
<para>
Using the <command>bower2nix</command> command line arguments, the output can be redirected to a file. A name like <filename>bower-packages.nix</filename> would be fine.
</para>
<para>
The resulting derivation is a union of all the downloaded Bower packages (and their dependencies). To use it, they still need to be linked together by Bower, which is where <varname>buildBowerComponents</varname> is useful.
</para>
</section>
<section xml:id="ssec-build-bower-components">
<title><varname>buildBowerComponents</varname> function</title>
<para>
The function is implemented in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/bower-modules/generic/default.nix"> <filename>pkgs/development/bower-modules/generic/default.nix</filename></link>. Example usage:
<example xml:id="ex-buildBowerComponents">
<title>buildBowerComponents</title>
<programlisting language="nix">
bowerComponents = buildBowerComponents {
name = "my-web-app";
generated = ./bower-packages.nix; <co xml:id="ex-buildBowerComponents-1" />
src = myWebApp; <co xml:id="ex-buildBowerComponents-2" />
};
</programlisting>
</example>
</para>
<para>
In <xref linkend="ex-buildBowerComponents" />, the following arguments are of special significance to the function:
<calloutlist>
<callout arearefs="ex-buildBowerComponents-1">
<para>
<varname>generated</varname> specifies the file which was created by <command>bower2nix</command>.
</para>
</callout>
<callout arearefs="ex-buildBowerComponents-2">
<para>
<varname>src</varname> is your project's sources. It needs to contain a <filename>bower.json</filename> file.
</para>
</callout>
</calloutlist>
</para>
<para>
<varname>buildBowerComponents</varname> will run Bower to link together the output of <command>bower2nix</command>, resulting in a <filename>bower_components</filename> directory which can be used.
</para>
<para>
Here is an example of a web frontend build process using <command>gulp</command>. You might use <command>grunt</command>, or anything else.
</para>
<example xml:id="ex-bowerGulpFile">
<title>Example build script (<filename>gulpfile.js</filename>)</title>
<programlisting language="javascript">
<![CDATA[var gulp = require('gulp');
gulp.task('default', [], function () {
gulp.start('build');
});
gulp.task('build', [], function () {
console.log("Just a dummy gulp build");
gulp
.src(["./bower_components/**/*"])
.pipe(gulp.dest("./gulpdist/"));
});]]>
</programlisting>
</example>
<example xml:id="ex-buildBowerComponentsDefaultNix">
<title>Full example — <filename>default.nix</filename></title>
<programlisting language="nix">
{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
, pkgs ? import &lt;nixpkgs&gt; {}
}:
pkgs.stdenv.mkDerivation {
name = "my-web-app-frontend";
src = myWebApp;
buildInputs = [ pkgs.nodePackages.gulp ];
bowerComponents = pkgs.buildBowerComponents { <co xml:id="ex-buildBowerComponentsDefault-1" />
name = "my-web-app";
generated = ./bower-packages.nix;
src = myWebApp;
};
buildPhase = ''
cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . <co xml:id="ex-buildBowerComponentsDefault-2" />
export HOME=$PWD <co xml:id="ex-buildBowerComponentsDefault-3" />
${pkgs.nodePackages.gulp}/bin/gulp build <co xml:id="ex-buildBowerComponentsDefault-4" />
'';
installPhase = "mv gulpdist $out";
}
</programlisting>
</example>
<para>
A few notes about <xref linkend="ex-buildBowerComponentsDefaultNix" />:
<calloutlist>
<callout arearefs="ex-buildBowerComponentsDefault-1">
<para>
The result of <varname>buildBowerComponents</varname> is an input to the frontend build.
</para>
</callout>
<callout arearefs="ex-buildBowerComponentsDefault-2">
<para>
Whether to symlink or copy the <filename>bower_components</filename> directory depends on the build tool in use. In this case a copy is used to avoid <command>gulp</command> silliness with permissions.
</para>
</callout>
<callout arearefs="ex-buildBowerComponentsDefault-3">
<para>
<command>gulp</command> requires <varname>HOME</varname> to refer to a writeable directory.
</para>
</callout>
<callout arearefs="ex-buildBowerComponentsDefault-4">
<para>
The actual build command. Other tools could be used.
</para>
</callout>
</calloutlist>
</para>
</section>
<section xml:id="ssec-bower2nix-troubleshooting">
<title>Troubleshooting</title>
<variablelist>
<varlistentry>
<term>
<literal>ENOCACHE</literal> errors from <varname>buildBowerComponents</varname>
</term>
<listitem>
<para>
This means that Bower was looking for a package version which doesn't exist in the generated <filename>bower-packages.nix</filename>.
</para>
<para>
If <filename>bower.json</filename> has been updated, then run <command>bower2nix</command> again.
</para>
<para>
It could also be a bug in <command>bower2nix</command> or <command>fetchbower</command>. If possible, try reformulating the version specification in <filename>bower.json</filename>.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>

View File

@@ -1,52 +1,41 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-coq">
<title>Coq</title>
<para>
Coq libraries should be installed in <literal>$(out)/lib/coq/${coq.coq-version}/user-contrib/</literal>. Such directories are automatically added to the <literal>$COQPATH</literal> environment variable by the hook defined in the Coq derivation.
</para>
<para>
Some extensions (plugins) might require OCaml and sometimes other OCaml packages. The <literal>coq.ocamlPackages</literal> attribute can be used to depend on the same package set Coq was built against.
</para>
<para>
Coq libraries may be compatible with some specific versions of Coq only. The <literal>compatibleCoqVersions</literal> attribute is used to precisely select those versions of Coq that are compatible with this derivation.
</para>
<para>
Here is a simple package example. It is a pure Coq library, thus it depends on Coq. It builds on the Mathematical Components library, thus it also takes <literal>mathcomp</literal> as <literal>buildInputs</literal>. Its <literal>Makefile</literal> has been generated using <literal>coq_makefile</literal> so we only have to set the <literal>$COQLIB</literal> variable at install time.
</para>
<programlisting>
{ stdenv, fetchFromGitHub, coq, mathcomp }:
stdenv.mkDerivation rec {
name = "coq${coq.coq-version}-multinomials-${version}";
version = "1.0";
src = fetchFromGitHub {
owner = "math-comp";
repo = "multinomials";
rev = version;
sha256 = "1qmbxp1h81cy3imh627pznmng0kvv37k4hrwi2faa101s6bcx55m";
<title>Coq</title>
<para>
Coq libraries should be installed in
<literal>$(out)/lib/coq/${coq.coq-version}/user-contrib/</literal>.
Such directories are automatically added to the
<literal>$COQPATH</literal> environment variable by the hook defined
in the Coq derivation.
</para>
<para>
Some libraries require OCaml and sometimes also Camlp5. The exact
versions that were used to build Coq are saved in the
<literal>coq.ocaml</literal> and <literal>coq.camlp5</literal>
attributes.
</para>
<para>
Here is a simple package example. It is a pure Coq library, thus it
only depends on Coq. Its <literal>makefile</literal> has been
generated using <literal>coq_makefile</literal> so we only have to
set the <literal>$COQLIB</literal> variable at install time.
</para>
<programlisting>
{stdenv, fetchurl, coq}:
stdenv.mkDerivation {
src = fetchurl {
url = http://coq.inria.fr/pylons/contribs/files/Karatsuba/v8.4/Karatsuba.tar.gz;
sha256 = "0ymfpv4v49k4fm63nq6gcl1hbnnxrvjjp7yzc4973n49b853c5b1";
};
name = "coq-karatsuba";
buildInputs = [ coq ];
propagatedBuildInputs = [ mathcomp ];
installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
meta = {
description = "A Coq/SSReflect Library for Monoidal Rings and Multinomials";
inherit (src.meta) homepage;
license = stdenv.lib.licenses.cecill-b;
inherit (coq.meta) platforms;
};
passthru = {
compatibleCoqVersions = v: builtins.elem v [ "8.5" "8.6" "8.7" ];
};
}
</programlisting>
</section>

View File

@@ -1,71 +0,0 @@
# Crystal
## Building a Crystal package
This section uses [Mint](https://github.com/mint-lang/mint) as an example for how to build a Crystal package.
If the Crystal project has any dependencies, the first step is to get a `shards.nix` file encoding those. Get a copy of the project and go to its root directory such that its `shard.lock` file is in the current directory, then run `crystal2nix` in it
```bash
$ git clone https://github.com/mint-lang/mint
$ cd mint
$ git checkout 0.5.0
$ nix-shell -p crystal2nix --run crystal2nix
```
This should have generated a `shards.nix` file.
Next create a Nix file for your derivation and use `pkgs.crystal.buildCrystalPackage` as follows:
```nix
with import <nixpkgs> {};
crystal.buildCrystalPackage rec {
pname = "mint";
version = "0.5.0";
src = fetchFromGitHub {
owner = "mint-lang";
repo = "mint";
rev = version;
sha256 = "0vxbx38c390rd2ysvbwgh89v2232sh5rbsp3nk9wzb70jybpslvl";
};
# Insert the path to your shards.nix file here
shardsFile = ./shards.nix;
...
}
```
This won't build anything yet, because we haven't told it what files build. We can specify a mapping from binary names to source files with the `crystalBinaries` attribute. The project's compilation instructions should show this. For Mint, the binary is called "mint", which is compiled from the source file `src/mint.cr`, so we'll specify this as follows:
```nix
crystalBinaries.mint.src = "src/mint.cr";
# ...
```
Additionally you can override the default `crystal build` options (which are currently `--release --progress --no-debug --verbose`) with
```nix
crystalBinaries.mint.options = [ "--release" "--verbose" ];
```
Depending on the project, you might need additional steps to get it to compile successfully. In Mint's case, we need to link against openssl, so in the end the Nix file looks as follows:
```nix
with import <nixpkgs> {};
crystal.buildCrystalPackage rec {
version = "0.5.0";
pname = "mint";
src = fetchFromGitHub {
owner = "mint-lang";
repo = "mint";
rev = version;
sha256 = "0vxbx38c390rd2ysvbwgh89v2232sh5rbsp3nk9wzb70jybpslvl";
};
shardsFile = ./shards.nix;
crystalBinaries.mint.src = "src/mint.cr";
buildInputs = [ openssl_1_0_2 ];
}
```

View File

@@ -1,75 +0,0 @@
# Dotnet
## Local Development Workflow
For local development, it's recommended to use nix-shell to create a dotnet environment:
```
# shell.nix
with import <nixpkgs> {};
mkShell {
name = "dotnet-env";
buildInputs = [
dotnet-sdk_3
];
}
```
### Using many sdks in a workflow
It's very likely that more than one sdk will be needed on a given project. Dotnet provides several different frameworks (E.g dotnetcore, aspnetcore, etc.) as well as many versions for a given framework. Normally, dotnet is able to fetch a framework and install it relative to the executable. However, this would mean writing to the nix store in nixpkgs, which is read-only. To support the many-sdk use case, one can compose an environment using `dotnetCorePackages.combinePackages`:
```
with import <nixpkgs> {};
mkShell {
name = "dotnet-env";
buildInputs = [
(with dotnetCorePackages; combinePackages [
sdk_3_1
sdk_3_0
sdk_2_1
])
];
}
```
This will produce a dotnet installation that has the dotnet 3.1, 3.0, and 2.1 sdk. The first sdk listed will have it's cli utility present in the resulting environment. Example info output:
```
$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.101
Commit: b377529961
...
.NET Core SDKs installed:
2.1.803 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/sdk]
3.0.102 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/sdk]
3.1.101 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.15 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.15 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.2 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.1 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.15 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.2 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.NETCore.App]
```
## dotnet-sdk vs dotnetCorePackages.sdk
The `dotnetCorePackages.sdk_X_Y` is preferred over the old dotnet-sdk as both major and minor version are very important for a dotnet environment. If a given minor version isn't present (or was changed), then this will likely break your ability to build a project.
## dotnetCorePackages.sdk vs dotnetCorePackages.netcore vs dotnetCorePackages.aspnetcore
The `dotnetCorePackages.sdk` contains both a runtime and the full sdk of a given version. The `netcore` and `aspnetcore` packages are meant to serve as minimal runtimes to deploy alongside already built applications.
## Packaging a Dotnet Application
Ideally, we would like to build against the sdk, then only have the dotnet runtime available in the runtime closure.
TODO: Create closure-friendly way to package dotnet applications

View File

@@ -1,185 +0,0 @@
# Emscripten
[Emscripten](https://github.com/kripken/emscripten): An LLVM-to-JavaScript Compiler
This section of the manual covers how to use `emscripten` in nixpkgs.
Minimal requirements:
* nix
* nixpkgs
Modes of use of `emscripten`:
* **Imperative usage** (on the command line):
If you want to work with `emcc`, `emconfigure` and `emmake` as you are used to from Ubuntu and similar distributions you can use these commands:
* `nix-env -i emscripten`
* `nix-shell -p emscripten`
* **Declarative usage**:
This mode is far more power full since this makes use of `nix` for dependency management of emscripten libraries and targets by using the `mkDerivation` which is implemented by `pkgs.emscriptenStdenv` and `pkgs.buildEmscriptenPackage`. The source for the packages is in `pkgs/top-level/emscripten-packages.nix` and the abstraction behind it in `pkgs/development/em-modules/generic/default.nix`.
* build and install all packages:
* `nix-env -iA emscriptenPackages`
* dev-shell for zlib implementation hacking:
* `nix-shell -A emscriptenPackages.zlib`
## Imperative usage
A few things to note:
* `export EMCC_DEBUG=2` is nice for debugging
* `~/.emscripten`, the build artifact cache sometimes creates issues and needs to be removed from time to time
## Declarative usage
Let's see two different examples from `pkgs/top-level/emscripten-packages.nix`:
* `pkgs.zlib.override`
* `pkgs.buildEmscriptenPackage`
Both are interesting concepts.
A special requirement of the `pkgs.buildEmscriptenPackage` is the `doCheck = true` is a default meaning that each emscriptenPackage requires a `checkPhase` implemented.
* Use `export EMCC_DEBUG=2` from within a emscriptenPackage's `phase` to get more detailed debug output what is going wrong.
* ~/.emscripten cache is requiring us to set `HOME=$TMPDIR` in individual phases. This makes compilation slower but also makes it more deterministic.
### Usage 1: pkgs.zlib.override
This example uses `zlib` from nixpkgs but instead of compiling **C** to **ELF** it compiles **C** to **JS** since we were using `pkgs.zlib.override` and changed stdenv to `pkgs.emscriptenStdenv`. A few adaptions and hacks were set in place to make it working. One advantage is that when `pkgs.zlib` is updated, it will automatically update this package as well. However, this can also be the downside...
See the `zlib` example:
zlib = (pkgs.zlib.override {
stdenv = pkgs.emscriptenStdenv;
}).overrideDerivation
(old: rec {
buildInputs = old.buildInputs ++ [ pkgconfig ];
# we need to reset this setting!
NIX_CFLAGS_COMPILE="";
configurePhase = ''
# FIXME: Some tests require writing at $HOME
HOME=$TMPDIR
runHook preConfigure
#export EMCC_DEBUG=2
emconfigure ./configure --prefix=$out --shared
runHook postConfigure
'';
dontStrip = true;
outputs = [ "out" ];
buildPhase = ''
emmake make
'';
installPhase = ''
emmake make install
'';
checkPhase = ''
echo "================= testing zlib using node ================="
echo "Compiling a custom test"
set -x
emcc -O2 -s EMULATE_FUNCTION_POINTER_CASTS=1 test/example.c -DZ_SOLO \
libz.so.${old.version} -I . -o example.js
echo "Using node to execute the test"
${pkgs.nodejs}/bin/node ./example.js
set +x
if [ $? -ne 0 ]; then
echo "test failed for some reason"
exit 1;
else
echo "it seems to work! very good."
fi
echo "================= /testing zlib using node ================="
'';
postPatch = pkgs.stdenv.lib.optionalString pkgs.stdenv.isDarwin ''
substituteInPlace configure \
--replace '/usr/bin/libtool' 'ar' \
--replace 'AR="libtool"' 'AR="ar"' \
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
'';
});
### Usage 2: pkgs.buildEmscriptenPackage
This `xmlmirror` example features a emscriptenPackage which is defined completely from this context and no `pkgs.zlib.override` is used.
xmlmirror = pkgs.buildEmscriptenPackage rec {
name = "xmlmirror";
buildInputs = [ pkgconfig autoconf automake libtool gnumake libxml2 nodejs openjdk json_c ];
nativeBuildInputs = [ pkgconfig zlib ];
src = pkgs.fetchgit {
url = "https://gitlab.com/odfplugfest/xmlmirror.git";
rev = "4fd7e86f7c9526b8f4c1733e5c8b45175860a8fd";
sha256 = "1jasdqnbdnb83wbcnyrp32f36w3xwhwp0wq8lwwmhqagxrij1r4b";
};
configurePhase = ''
rm -f fastXmlLint.js*
# a fix for ERROR:root:For asm.js, TOTAL_MEMORY must be a multiple of 16MB, was 234217728
# https://gitlab.com/odfplugfest/xmlmirror/issues/8
sed -e "s/TOTAL_MEMORY=234217728/TOTAL_MEMORY=268435456/g" -i Makefile.emEnv
# https://github.com/kripken/emscripten/issues/6344
# https://gitlab.com/odfplugfest/xmlmirror/issues/9
sed -e "s/\$(JSONC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(LIBXML20_LDFLAGS)/\$(JSONC_LDFLAGS) \$(LIBXML20_LDFLAGS) \$(ZLIB_LDFLAGS) /g" -i Makefile.emEnv
# https://gitlab.com/odfplugfest/xmlmirror/issues/11
sed -e "s/-o fastXmlLint.js/-s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -o fastXmlLint.js/g" -i Makefile.emEnv
'';
buildPhase = ''
HOME=$TMPDIR
make -f Makefile.emEnv
'';
outputs = [ "out" "doc" ];
installPhase = ''
mkdir -p $out/share
mkdir -p $doc/share/${name}
cp Demo* $out/share
cp -R codemirror-5.12 $out/share
cp fastXmlLint.js* $out/share
cp *.xsd $out/share
cp *.js $out/share
cp *.xhtml $out/share
cp *.html $out/share
cp *.json $out/share
cp *.rng $out/share
cp README.md $doc/share/${name}
'';
checkPhase = ''
'';
};
### Declarative debugging
Use `nix-shell -I nixpkgs=/some/dir/nixpkgs -A emscriptenPackages.libz` and from there you can go trough the individual steps. This makes it easy to build a good `unit test` or list the files of the project.
1. `nix-shell -I nixpkgs=/some/dir/nixpkgs -A emscriptenPackages.libz`
2. `cd /tmp/`
3. `unpackPhase`
4. cd libz-1.2.3
5. `configurePhase`
6. `buildPhase`
7. ... happy hacking...
## Summary
Using this toolchain makes it easy to leverage `nix` from NixOS, MacOSX or even Windows (WSL+ubuntu+nix). This toolchain is reproducible, behaves like the rest of the packages from nixpkgs and contains a set of well working examples to learn and adapt from.
If in trouble, ask the maintainers.

View File

@@ -1,282 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="sec-language-gnome">
<title>GNOME</title>
<section xml:id="ssec-gnome-packaging">
<title>Packaging GNOME applications</title>
<para>
Programs in the GNOME universe are written in various languages but they all use GObject-based libraries like GLib, GTK or GStreamer. These libraries are often modular, relying on looking into certain directories to find their modules. However, due to Nixs specific file system organization, this will fail without our intervention. Fortunately, the libraries usually allow overriding the directories through environment variables, either natively or thanks to a patch in nixpkgs. <link xlink:href="#fun-wrapProgram">Wrapping</link> the executables to ensure correct paths are available to the application constitutes a significant part of packaging a modern desktop application. In this section, we will describe various modules needed by such applications, environment variables needed to make the modules load, and finally a script that will do the work for us.
</para>
<section xml:id="ssec-gnome-settings">
<title>Settings</title>
<para>
<link xlink:href="https://developer.gnome.org/gio/stable/GSettings.html">GSettings</link> API is often used for storing settings. GSettings schemas are required, to know the type and other metadata of the stored values. GLib looks for <filename>glib-2.0/schemas/gschemas.compiled</filename> files inside the directories of <envar>XDG_DATA_DIRS</envar>.
</para>
<para>
On Linux, GSettings API is implemented using <link xlink:href="https://wiki.gnome.org/Projects/dconf">dconf</link> backend. You will need to add <literal>dconf</literal> GIO module to <envar>GIO_EXTRA_MODULES</envar> variable, otherwise the <literal>memory</literal> backend will be used and the saved settings will not be persistent.
</para>
<para>
Last you will need the dconf database D-Bus service itself. You can enable it using <option>programs.dconf.enable</option>.
</para>
<para>
Some applications will also require <package>gsettings-desktop-schemas</package> for things like reading proxy configuration or user interface customization. This dependency is often not mentioned by upstream, you should grep for <literal>org.gnome.desktop</literal> and <literal>org.gnome.system</literal> to see if the schemas are needed.
</para>
</section>
<section xml:id="ssec-gnome-icons">
<title>Icons</title>
<para>
When an application uses icons, an icon theme should be available in <envar>XDG_DATA_DIRS</envar> during runtime. The package for the default, icon-less <link xlink:href="https://www.freedesktop.org/wiki/Software/icon-theme/">hicolor-icon-theme</link> (should be propagated by every icon theme) contains <link linkend="ssec-gnome-hooks-hicolor-icon-theme">a setup hook</link> that will pick up icon themes from <literal>buildInputs</literal> and pass it to our wrapper. Unfortunately, relying on that would mean every user has to download the theme included in the package expression no matter their preference. For that reason, we leave the installation of icon theme on the user. If you use one of the desktop environments, you probably already have an icon theme installed.
</para>
<para>
To avoid costly file system access when locating icons, GTK, <link xlink:href="https://woboq.com/blog/qicon-reads-gtk-icon-cache-in-qt57.html">as well as Qt</link>, can rely on <filename>icon-theme.cache</filename> files from the themes top-level directories. These files are generated using <command>gtk-update-icon-cache</command>, which is expected to be run whenever an icon is added or removed to an icon theme (typically an application icon into <literal>hicolor</literal> theme) and some programs do indeed run this after icon installation. However, since packages are installed into their own prefix by Nix, this would lead to conflicts. For that reason, <package>gtk3</package> provides a <link xlink:href="#ssec-gnome-hooks-gtk-drop-icon-theme-cache">setup hook</link> that will clean the file from installation. Since most applications only ship their own icon that will be loaded on start-up, it should not affect them too much. On the other hand, icon themes are much larger and more widely used so we need to cache them. Because we recommend installing icon themes globally, we will generate the cache files from all packages in a profile using a NixOS module. You can enable the cache generation using <option>gtk.iconCache.enable</option> option if your desktop environment does not already do that.
</para>
</section>
<section xml:id="ssec-gnome-themes">
<title>GTK Themes</title>
<para>
Previously, a GTK theme needed to be in <envar>XDG_DATA_DIRS</envar>. This is no longer necessary for most programs since GTK incorporated Adwaita theme. Some programs (for example, those designed for <link xlink:href="https://elementary.io/docs/human-interface-guidelines#human-interface-guidelines">elementary HIG</link>) might require a special theme like <package>pantheon.elementary-gtk-theme</package>.
</para>
</section>
<section xml:id="ssec-gnome-typelibs">
<title>GObject introspection typelibs</title>
<para>
<link xlink:href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject introspection</link> allows applications to use C libraries in other languages easily. It does this through <literal>typelib</literal> files searched in <envar>GI_TYPELIB_PATH</envar>.
</para>
</section>
<section xml:id="ssec-gnome-plugins">
<title>Various plug-ins</title>
<para>
If your application uses <link xlink:href="https://gstreamer.freedesktop.org/">GStreamer</link> or <link xlink:href="https://wiki.gnome.org/Projects/Grilo">Grilo</link>, you should set <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar>, respectively.
</para>
</section>
</section>
<section xml:id="ssec-gnome-hooks">
<title>Onto <package>wrapGAppsHook</package></title>
<para>
Given the requirements above, the package expression would become messy quickly:
<programlisting>
preFixup = ''
for f in $(find $out/bin/ $out/libexec/ -type f -executable); do
wrapProgram "$f" \
--prefix GIO_EXTRA_MODULES : "${getLib dconf}/lib/gio/modules" \
--prefix XDG_DATA_DIRS : "$out/share" \
--prefix XDG_DATA_DIRS : "$out/share/gsettings-schemas/${name}" \
--prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
--prefix GI_TYPELIB_PATH : "${lib.makeSearchPath "lib/girepository-1.0" [ pango json-glib ]}"
done
'';
</programlisting>
Fortunately, there is <package>wrapGAppsHook</package>, that does the wrapping for us. In particular, it works in conjunction with other setup hooks that will populate the variable:
<itemizedlist>
<listitem xml:id="ssec-gnome-hooks-wrapgappshook">
<para>
<package>wrapGAppsHook</package> itself will add the packages <filename>share</filename> directory to <envar>XDG_DATA_DIRS</envar>.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-glib">
<para>
<package>glib</package> setup hook will populate <envar>GSETTINGS_SCHEMAS_PATH</envar> and then <package>wrapGAppsHook</package> will prepend it to <envar>XDG_DATA_DIRS</envar>.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-gtk-drop-icon-theme-cache">
<para>
One of <package>gtk3</package>s setup hooks will remove <filename>icon-theme.cache</filename> files from packages icon theme directories to avoid conflicts. Icon theme packages should prevent this with <code>dontDropIconThemeCache = true;</code>.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-dconf">
<para>
<package>dconf.lib</package> is a dependency of <package>wrapGAppsHook</package>, which then also adds it to the <envar>GIO_EXTRA_MODULES</envar> variable.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-hicolor-icon-theme">
<para>
<package>hicolor-icon-theme</package>s setup hook will add icon themes to <envar>XDG_ICON_DIRS</envar> which is prepended to <envar>XDG_DATA_DIRS</envar> by <package>wrapGAppsHook</package>.
</para>
</listitem>
<listitem xml:id="ssec-gnome-hooks-gobject-introspection">
<para>
<package>gobject-introspection</package> setup hook populates <envar>GI_TYPELIB_PATH</envar> variable with <filename>lib/girepository-1.0</filename> directories of dependencies, which is then added to wrapper by <package>wrapGAppsHook</package>. It also adds <filename>share</filename> directories of dependencies to <envar>XDG_DATA_DIRS</envar>, which is intended to promote GIR files but it also <link xlink:href="https://github.com/NixOS/nixpkgs/issues/32790">pollutes the closures</link> of packages using <package>wrapGAppsHook</package>.
</para>
<warning>
<para>
The setup hook <link xlink:href="https://github.com/NixOS/nixpkgs/issues/56943">currently</link> does not work in expressions with <literal>strictDeps</literal> enabled, like Python packages. In those cases, you will need to disable it with <code>strictDeps = false;</code>.
</para>
</warning>
</listitem>
<listitem xml:id="ssec-gnome-hooks-gst-grl-plugins">
<para>
Setup hooks of <package>gst_all_1.gstreamer</package> and <package>gnome3.grilo</package> will populate the <envar>GST_PLUGIN_SYSTEM_PATH_1_0</envar> and <envar>GRL_PLUGIN_PATH</envar> variables, respectively, which will then be added to the wrapper by <literal>wrapGAppsHook</literal>.
</para>
</listitem>
</itemizedlist>
</para>
<para>
You can also pass additional arguments to <literal>makeWrapper</literal> using <literal>gappsWrapperArgs</literal> in <literal>preFixup</literal> hook:
<programlisting>
preFixup = ''
gappsWrapperArgs+=(
# Thumbnailers
--prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
--prefix XDG_DATA_DIRS : "${librsvg}/share"
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
)
'';
</programlisting>
</para>
</section>
<section xml:id="ssec-gnome-updating">
<title>Updating GNOME packages</title>
<para>
Most GNOME package offer <link linkend="var-passthru-updateScript"><literal>updateScript</literal></link>, it is therefore possible to update to latest source tarball by running <command>nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus</command> or even en masse with <command>nix-shell maintainers/scripts/update.nix --argstr path gnome3</command>. Read the packages <filename>NEWS</filename> file to see what changed.
</para>
</section>
<section xml:id="ssec-gnome-common-issues">
<title>Frequently encountered issues</title>
<variablelist>
<varlistentry xml:id="ssec-gnome-common-issues-no-schemas">
<term>
<computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: No GSettings schemas are installed on the system</computeroutput>
</term>
<listitem>
<para>
There are no schemas avalable in <envar>XDG_DATA_DIRS</envar>. Temporarily add a random package containing schemas like <package>gsettings-desktop-schemas</package> to <literal>buildInputs</literal>. <link linkend="ssec-gnome-hooks-glib"><package>glib</package></link> and <link linkend="ssec-gnome-hooks-wrapgappshook"><package>wrapGAppsHook</package></link> setup hooks will take care of making the schemas available to application and you will see the actual missing schemas with the <link linkend="ssec-gnome-common-issues-missing-schema">next error</link>. Or you can try looking through the source code for the actual schemas used.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ssec-gnome-common-issues-missing-schema">
<term>
<computeroutput>GLib-GIO-ERROR **: <replaceable>06:04:50.903</replaceable>: Settings schema <replaceable>org.gnome.foo</replaceable> is not installed</computeroutput>
</term>
<listitem>
<para>
Package is missing some GSettings schemas. You can find out the package containing the schema with <command>nix-locate <replaceable>org.gnome.foo</replaceable>.gschema.xml</command> and let the hooks handle the wrapping as <link linkend="ssec-gnome-common-issues-no-schemas">above</link>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ssec-gnome-common-issues-double-wrapped">
<term>
When using <package>wrapGAppsHook</package> with special derivers you can end up with double wrapped binaries.
</term>
<listitem>
<para>
This is because derivers like <function>python.pkgs.buildPythonApplication</function> or <function>qt5.mkDerivation</function> have setup-hooks automatically added that produce wrappers with <package>makeWrapper</package>. The simplest way to workaround that is to disable the <package>wrapGAppsHook</package> automatic wrapping with <code>dontWrapGApps = true;</code> and pass the arguments it intended to pass to <package>makeWrapper</package> to another.
</para>
<para>
In the case of a Python application it could look like:
<programlisting>
python3.pkgs.buildPythonApplication {
pname = "gnome-music";
version = "3.32.2";
nativeBuildInputs = [
wrapGAppsHook
gobject-introspection
...
];
dontWrapGApps = true;
# Arguments to be passed to `makeWrapper`, only used by buildPython*
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
}
</programlisting>
And for a QT app like:
<programlisting>
mkDerivation {
pname = "calibre";
version = "3.47.0";
nativeBuildInputs = [
wrapGAppsHook
qmake
...
];
dontWrapGApps = true;
# Arguments to be passed to `makeWrapper`, only used by qt5s mkDerivation
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
}
</programlisting>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ssec-gnome-common-issues-unwrappable-package">
<term>
I am packaging a project that cannot be wrapped, like a library or GNOME Shell extension.
</term>
<listitem>
<para>
You can rely on applications depending on the library set the necessary environment variables but that it often easy to miss. Instead we recommend to patch the paths in the source code whenever possible. Here are some examples:
<itemizedlist>
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gnome-shell-ext">
<para>
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/gnome-3/core/gnome-shell-extensions/default.nix#L21-L24">Replacing a <envar>GI_TYPELIB_PATH</envar> in GNOME Shell extension</link> we are using <function>substituteAll</function> to include the path to a typelib into a patch.
</para>
</listitem>
<listitem xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings">
<para>
The following examples are hardcoding GSettings schema paths. To get the schema paths we use the functions
<itemizedlist>
<listitem>
<para>
<function>glib.getSchemaPath</function> Takes a nix package attribute as an argument.
</para>
</listitem>
<listitem>
<para>
<function>glib.makeSchemaPath</function> Takes a package output like <literal>$out</literal> and a derivation name. You should use this if the schemas you need to hardcode are in the same derivation.
</para>
</listitem>
</itemizedlist>
</para>
<para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-vala">
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/7bb8f05f12ca3cff9da72b56caa2f7472d5732bc/pkgs/desktops/pantheon/apps/elementary-files/default.nix#L78-L86">Hard-coding GSettings schema path in Vala plug-in (dynamically loaded library)</link> here, <function>substituteAll</function> cannot be used since the schema comes from the same package preventing us from pass its path to the function, probably due to a <link xlink:href="https://github.com/NixOS/nix/issues/1846">Nix bug</link>.
</para>
<para xml:id="ssec-gnome-common-issues-unwrappable-package-gsettings-c">
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/29c120c065d03b000224872251bed93932d42412/pkgs/development/libraries/glib-networking/default.nix#L31-L34">Hard-coding GSettings schema path in C library</link> nothing special other than using <link xlink:href="https://github.com/NixOS/nixpkgs/pull/67957#issuecomment-527717467">Coccinelle patch</link> to generate the patch itself.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="ssec-gnome-common-issues-weird-location">
<term>
I need to wrap a binary outside <filename>bin</filename> and <filename>libexec</filename> directories.
</term>
<listitem>
<para>
You can manually trigger the wrapping with <function>wrapGApp</function> in <literal>preFixup</literal> phase. It takes a path to a program as a first argument; the remaining arguments are passed directly to <function xlink:href="#fun-wrapProgram">wrapProgram</function> function.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>

View File

@@ -1,215 +1,124 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-go">
<title>Go</title>
<section xml:id="ssec-go-modules">
<title>Go modules</title>
<title>Go</title>
<para>
The function <varname> buildGoModule </varname> builds Go programs managed with Go modules. It builds a <link xlink:href="https://github.com/golang/go/wiki/Modules">Go modules</link> through a two phase build:
<itemizedlist>
<listitem>
<para>
An intermediate fetcher derivation. This derivation will be used to fetch all of the dependencies of the Go module.
</para>
</listitem>
<listitem>
<para>
A final derivation will use the output of the intermediate derivation to build the binaries and produce the final output.
</para>
</listitem>
</itemizedlist>
</para>
<para>The function <varname>buildGoPackage</varname> builds
standard Go packages.
</para>
<example xml:id='ex-buildGoModule'>
<title>buildGoModule</title>
<example xml:id='ex-buildGoPackage'><title>buildGoPackage</title>
<programlisting>
pet = buildGoModule rec {
pname = "pet";
version = "0.3.4";
net = buildGoPackage rec {
name = "go.net-${rev}";
goPackagePath = "golang.org/x/net"; <co xml:id='ex-buildGoPackage-1' />
subPackages = [ "ipv4" "ipv6" ]; <co xml:id='ex-buildGoPackage-2' />
rev = "e0403b4e005";
src = fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s";
inherit rev;
owner = "golang";
repo = "net";
sha256 = "1g7cjzw4g4301a3yqpbk8n1d4s97sfby2aysl275x04g0zh8jxqp";
};
modSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; <co xml:id='ex-buildGoModule-1' />
subPackages = [ "." ]; <co xml:id='ex-buildGoModule-2' />
meta = with lib; {
description = "Simple command-line snippet manager, written in Go";
homepage = https://github.com/knqyf263/pet;
license = licenses.mit;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}
goPackageAliases = [ "code.google.com/p/go.net" ]; <co xml:id='ex-buildGoPackage-3' />
propagatedBuildInputs = [ goPackages.text ]; <co xml:id='ex-buildGoPackage-4' />
buildFlags = "--tags release"; <co xml:id='ex-buildGoPackage-5' />
disabled = isGo13;<co xml:id='ex-buildGoPackage-6' />
};
</programlisting>
</example>
</example>
<para>
<xref linkend='ex-buildGoModule'/> is an example expression using buildGoModule, the following arguments are of special significance to the function:
<calloutlist>
<callout arearefs='ex-buildGoModule-1'>
<para>
<varname>modSha256</varname> is the hash of the output of the intermediate fetcher derivation.
</para>
</callout>
<callout arearefs='ex-buildGoModule-2'>
<para>
<varname>subPackages</varname> limits the builder from building child packages that have not been listed. If <varname>subPackages</varname> is not specified, all child packages will be built.
</para>
</callout>
</calloutlist>
</para>
<para><xref linkend='ex-buildGoPackage'/> is an example expression using buildGoPackage,
the following arguments are of special significance to the function:
<para>
<varname>modSha256</varname> can also take <varname>null</varname> as an input.
<calloutlist>
When `null` is used as a value, the derivation won't be a
fixed-output derivation but disable the build sandbox instead. This can be useful outside
of nixpkgs where re-generating the modSha256 on each mod.sum changes is cumbersome,
but will fail to build by Hydra, as builds with a disabled sandbox are discouraged.
</para>
</section>
<section xml:id="ssec-go-legacy">
<title>Go legacy</title>
<para>
The function <varname> buildGoPackage </varname> builds legacy Go programs, not supporting Go modules.
</para>
<example xml:id='ex-buildGoPackage'>
<title>buildGoPackage</title>
<programlisting>
deis = buildGoPackage rec {
pname = "deis";
version = "1.13.0";
goPackagePath = "github.com/deis/deis"; <co xml:id='ex-buildGoPackage-1' />
subPackages = [ "client" ]; <co xml:id='ex-buildGoPackage-2' />
src = fetchFromGitHub {
owner = "deis";
repo = "deis";
rev = "v${version}";
sha256 = "1qv9lxqx7m18029lj8cw3k7jngvxs4iciwrypdy0gd2nnghc68sw";
};
goDeps = ./deps.nix; <co xml:id='ex-buildGoPackage-3' />
buildFlags = [ "--tags" "release" ]; <co xml:id='ex-buildGoPackage-4' />
}
</programlisting>
</example>
<para>
<xref linkend='ex-buildGoPackage'/> is an example expression using buildGoPackage, the following arguments are of special significance to the function:
<calloutlist>
<callout arearefs='ex-buildGoPackage-1'>
<para>
<callout arearefs='ex-buildGoPackage-1'>
<para>
<varname>goPackagePath</varname> specifies the package's canonical Go import path.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-2'>
<para>
<varname>subPackages</varname> limits the builder from building child packages that have not been listed. If <varname>subPackages</varname> is not specified, all child packages will be built.
</para>
<para>
In this example only <literal>github.com/deis/deis/client</literal> will be built.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-3'>
<para>
<varname>goDeps</varname> is where the Go dependencies of a Go program are listed as a list of package source identified by Go import path. It could be imported as a separate <varname>deps.nix</varname> file for readability. The dependency data structure is described below.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-4'>
<para>
</para>
</callout>
<callout arearefs='ex-buildGoPackage-2'>
<para>
<varname>subPackages</varname> limits the builder from building child packages that
have not been listed. If <varname>subPackages</varname> is not specified, all child
packages will be built.
</para>
<para>
In this example only <literal>code.google.com/p/go.net/ipv4</literal> and
<literal>code.google.com/p/go.net/ipv6</literal> will be built.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-3'>
<para>
<varname>goPackageAliases</varname> is a list of alternative import paths
that are valid for this library.
Packages that depend on this library will automatically rename
import paths that match any of the aliases to <literal>goPackagePath</literal>.
</para>
<para>
In this example imports will be renamed from
<literal>code.google.com/p/go.net</literal> to
<literal>golang.org/x/net</literal> in every package that depend on the
<literal>go.net</literal> library.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-4'>
<para>
<varname>propagatedBuildInputs</varname> is where the dependencies of a Go library are
listed. Only libraries should list <varname>propagatedBuildInputs</varname>. If a standalone
program is being built instead, use <varname>buildInputs</varname>. If a library's tests require
additional dependencies that are not propagated, they should be listed in <varname>buildInputs</varname>.
</para>
</callout>
<callout arearefs='ex-buildGoPackage-5'>
<para>
<varname>buildFlags</varname> is a list of flags passed to the go build command.
</para>
</callout>
</calloutlist>
</para>
</para>
</callout>
<para>
The <varname>goDeps</varname> attribute can be imported from a separate <varname>nix</varname> file that defines which Go libraries are needed and should be included in <varname>GOPATH</varname> for <varname>buildPhase</varname>.
</para>
<callout arearefs='ex-buildGoPackage-6'>
<para>
If <varname>disabled</varname> is <literal>true</literal>,
nix will refuse to build this package.
</para>
<para>
In this example the package will not be built for go 1.3. The <literal>isGo13</literal>
is an utility function that returns <literal>true</literal> if go used to build the
package has version 1.3.x.
</para>
</callout>
<example xml:id='ex-goDeps'>
<title>deps.nix</title>
<programlisting>
[ <co xml:id='ex-goDeps-1' />
{
goPackagePath = "gopkg.in/yaml.v2"; <co xml:id='ex-goDeps-2' />
fetch = {
type = "git"; <co xml:id='ex-goDeps-3' />
url = "https://gopkg.in/yaml.v2";
rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
};
}
{
goPackagePath = "github.com/docopt/docopt-go";
fetch = {
type = "git";
url = "https://github.com/docopt/docopt-go";
rev = "784ddc588536785e7299f7272f39101f7faccc3f";
sha256 = "0wwz48jl9fvl1iknvn9dqr4gfy1qs03gxaikrxxp9gry6773v3sj";
};
}
]
</programlisting>
</example>
</calloutlist>
<para>
<calloutlist>
<callout arearefs='ex-goDeps-1'>
<para>
<varname>goDeps</varname> is a list of Go dependencies.
</para>
</callout>
<callout arearefs='ex-goDeps-2'>
<para>
<varname>goPackagePath</varname> specifies Go package import path.
</para>
</callout>
<callout arearefs='ex-goDeps-3'>
<para>
<varname>fetch type</varname> that needs to be used to get package source. If <varname>git</varname> is used there should be <varname>url</varname>, <varname>rev</varname> and <varname>sha256</varname> defined next to it.
</para>
</callout>
</calloutlist>
</para>
</para>
<para>
To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/kamilchm/go2nix">go2nix</link>. It can produce complete derivation and <varname>goDeps</varname> file for Go programs.
</para>
<para>
Reusable Go libraries may be found in the <varname>goPackages</varname> set. You can test
build a Go package as follows:
<para>
<varname>buildGoPackage</varname> produces <xref linkend='chap-multiple-output' xrefstyle="select: title" /> where <varname>bin</varname> includes program binaries. You can test build a Go binary as follows:
<screen>
<prompt>$ </prompt>nix-build -A deis.bin
$ nix-build -A goPackages.net
</screen>
or build all outputs with:
<screen>
<prompt>$ </prompt>nix-build -A deis.all
</screen>
<varname>bin</varname> output will be installed by default with <varname>nix-env -i</varname> or <varname>systemPackages</varname>.
</para>
<para>
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
</para>
<para>
You may use Go packages installed into the active Nix profiles by adding
the following to your ~/.bashrc:
<screen>
for p in $NIX_PROFILES; do
GOPATH="$p/share/go:$GOPATH"
done
</screen>
</para>
</section>
</para>
<para>To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/cstrahan/go2nix">go2nix</link>.</para>
</section>

File diff suppressed because it is too large Load Diff

View File

@@ -1,144 +0,0 @@
# Idris
## Installing Idris
The easiest way to get a working idris version is to install the `idris` attribute:
```
$ # On NixOS
$ nix-env -i nixos.idris
$ # On non-NixOS
$ nix-env -i nixpkgs.idris
```
This however only provides the `prelude` and `base` libraries. To install idris with additional libraries, you can use the `idrisPackages.with-packages` function, e.g. in an overlay in `~/.config/nixpkgs/overlays/my-idris.nix`:
```nix
self: super: {
myIdris = with self.idrisPackages; with-packages [ contrib pruviloj ];
}
```
And then:
```
$ # On NixOS
$ nix-env -iA nixos.myIdris
$ # On non-NixOS
$ nix-env -iA nixpkgs.myIdris
```
To see all available Idris packages:
```
$ # On NixOS
$ nix-env -qaPA nixos.idrisPackages
$ # On non-NixOS
$ nix-env -qaPA nixpkgs.idrisPackages
```
Similarly, entering a `nix-shell`:
```
$ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])'
```
## Starting Idris with library support
To have access to these libraries in idris, call it with an argument `-p <library name>` for each library:
```
$ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])'
[nix-shell:~]$ idris -p contrib -p pruviloj
```
A listing of all available packages the Idris binary has access to is available via `--listlibs`:
```
$ idris --listlibs
00prelude-idx.ibc
pruviloj
base
contrib
prelude
00pruviloj-idx.ibc
00base-idx.ibc
00contrib-idx.ibc
```
## Building an Idris project with Nix
As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`:
```nix
{ build-idris-package
, fetchFromGitHub
, contrib
, lightyear
, lib
}:
build-idris-package {
name = "yaml";
version = "2018-01-25";
# This is the .ipkg file that should be built, defaults to the package name
# In this case it should build `Yaml.ipkg` instead of `yaml.ipkg`
# This is only necessary because the yaml packages ipkg file is
# different from its package name here.
ipkgName = "Yaml";
# Idris dependencies to provide for the build
idrisDeps = [ contrib lightyear ];
src = fetchFromGitHub {
owner = "Heather";
repo = "Idris.Yaml";
rev = "5afa51ffc839844862b8316faba3bafa15656db4";
sha256 = "1g4pi0swmg214kndj85hj50ccmckni7piprsxfdzdfhg87s0avw7";
};
meta = {
description = "Idris YAML lib";
homepage = https://github.com/Heather/Idris.Yaml;
license = lib.licenses.mit;
maintainers = [ lib.maintainers.brainrape ];
};
}
```
Assuming this file is saved as `yaml.nix`, it's buildable using
```
$ nix-build -E '(import <nixpkgs> {}).idrisPackages.callPackage ./yaml.nix {}'
```
Or it's possible to use
```nix
with import <nixpkgs> {};
{
yaml = idrisPackages.callPackage ./yaml.nix {};
}
```
in another file (say `default.nix`) to be able to build it with
```
$ nix-build -A yaml
```
## Passing options to `idris` commands
The `build-idris-package` function provides also optional input values to set additional options for the used `idris` commands.
Specifically, you can set `idrisBuildOptions`, `idrisTestOptions`, `idrisInstallOptions` and `idrisDocOptions` to provide additional options to the `idris` command respectively when building, testing, installing and generating docs for your package.
For example you could set
```
build-idris-package {
idrisBuildOptions = [ "--log" "1" "--verbose" ]
...
}
```
to require verbose output during `idris` build phase.

View File

@@ -1,32 +1,45 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="chap-language-support">
<title>Languages and frameworks</title>
<para>
The <link linkend="chap-stdenv">standard build environment</link> makes it easy to build typical Autotools-based packages with very little code. Any other kind of package can be accomodated by overriding the appropriate phases of <literal>stdenv</literal>. However, there are specialised functions in Nixpkgs to easily build packages for other programming languages, such as Perl or Haskell. These are described in this chapter.
</para>
<xi:include href="android.section.xml" />
<xi:include href="beam.xml" />
<xi:include href="bower.xml" />
<xi:include href="coq.xml" />
<xi:include href="crystal.section.xml" />
<xi:include href="emscripten.section.xml" />
<xi:include href="gnome.xml" />
<xi:include href="go.xml" />
<xi:include href="haskell.section.xml" />
<xi:include href="idris.section.xml" />
<xi:include href="ios.section.xml" />
<xi:include href="java.xml" />
<xi:include href="lua.xml" />
<xi:include href="node.section.xml" />
<xi:include href="ocaml.xml" />
<xi:include href="perl.xml" />
<xi:include href="python.section.xml" />
<xi:include href="qt.xml" />
<xi:include href="r.section.xml" />
<xi:include href="ruby.xml" />
<xi:include href="rust.section.xml" />
<xi:include href="texlive.xml" />
<xi:include href="titanium.section.xml" />
<xi:include href="vim.section.xml" />
<title>Support for specific programming languages and frameworks</title>
<para>The <link linkend="chap-stdenv">standard build
environment</link> makes it easy to build typical Autotools-based
packages with very little code. Any other kind of package can be
accomodated by overriding the appropriate phases of
<literal>stdenv</literal>. However, there are specialised functions
in Nixpkgs to easily build packages for other programming languages,
such as Perl or Haskell. These are described in this chapter.</para>
<xi:include href="perl.xml" />
<xi:include href="python.xml" />
<xi:include href="ruby.xml" />
<xi:include href="go.xml" />
<xi:include href="java.xml" />
<xi:include href="lua.xml" />
<xi:include href="coq.xml" />
<xi:include href="idris.xml" /> <!-- generated from ../../pkgs/development/idris-modules/README.md -->
<xi:include href="r.xml" /> <!-- generated from ../../pkgs/development/r-modules/README.md -->
<xi:include href="qt.xml" />
<xi:include href="texlive.xml" />
<!--
<section><title>Haskell</title>
<para>TODO</para>
</section>
<section><title>TeX / LaTeX</title>
<para>* Special support for building TeX documents</para>
</section>
-->
</chapter>

View File

@@ -1,229 +0,0 @@
---
title: iOS
author: Sander van der Burg
date: 2019-11-10
---
# iOS
This component is basically a wrapper/workaround that makes it possible to
expose an Xcode installation as a Nix package by means of symlinking to the
relevant executables on the host system.
Since Xcode can't be packaged with Nix, nor we can publish it as a Nix package
(because of its license) this is basically the only integration strategy
making it possible to do iOS application builds that integrate with other
components of the Nix ecosystem
The primary objective of this project is to use the Nix expression language to
specify how iOS apps can be built from source code, and to automatically spawn
iOS simulator instances for testing.
This component also makes it possible to use [Hydra](http://nixos.org/hydra),
the Nix-based continuous integration server to regularly build iOS apps and to
do wireless ad-hoc installations of enterprise IPAs on iOS devices through
Hydra.
The Xcode build environment implements a number of features.
Deploying a proxy component wrapper exposing Xcode
--------------------------------------------------
The first use case is deploying a Nix package that provides symlinks to the Xcode
installation on the host system. This package can be used as a build input to
any build function implemented in the Nix expression language that requires
Xcode.
```nix
let
pkgs = import <nixpkgs> {};
xcodeenv = import ./xcodeenv {
inherit (pkgs) stdenv;
};
in
xcodeenv.composeXcodeWrapper {
version = "9.2";
xcodeBaseDir = "/Applications/Xcode.app";
}
```
By deploying the above expression with `nix-build` and inspecting its content
you will notice that several Xcode-related executables are exposed as a Nix
package:
```bash
$ ls result/bin
lrwxr-xr-x 1 sander staff 94 1 jan 1970 Simulator -> /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
lrwxr-xr-x 1 sander staff 17 1 jan 1970 codesign -> /usr/bin/codesign
lrwxr-xr-x 1 sander staff 17 1 jan 1970 security -> /usr/bin/security
lrwxr-xr-x 1 sander staff 21 1 jan 1970 xcode-select -> /usr/bin/xcode-select
lrwxr-xr-x 1 sander staff 61 1 jan 1970 xcodebuild -> /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
lrwxr-xr-x 1 sander staff 14 1 jan 1970 xcrun -> /usr/bin/xcrun
```
Building an iOS application
---------------------------
We can build an iOS app executable for the simulator, or an IPA/xcarchive file
for release purposes, e.g. ad-hoc, enterprise or store installations, by
executing the `xcodeenv.buildApp {}` function:
```nix
let
pkgs = import <nixpkgs> {};
xcodeenv = import ./xcodeenv {
inherit (pkgs) stdenv;
};
in
xcodeenv.buildApp {
name = "MyApp";
src = ./myappsources;
sdkVersion = "11.2";
target = null; # Corresponds to the name of the app by default
configuration = null; # Release for release builds, Debug for debug builds
scheme = null; # -scheme will correspond to the app name by default
sdk = null; # null will set it to 'iphonesimulator` for simulator builds or `iphoneos` to real builds
xcodeFlags = "";
release = true;
certificateFile = ./mycertificate.p12;
certificatePassword = "secret";
provisioningProfile = ./myprovisioning.profile;
signMethod = "ad-hoc"; # 'enterprise' or 'store'
generateIPA = true;
generateXCArchive = false;
enableWirelessDistribution = true;
installURL = "/installipa.php";
bundleId = "mycompany.myapp";
appVersion = "1.0";
# Supports all xcodewrapper parameters as well
xcodeBaseDir = "/Applications/Xcode.app";
}
```
The above function takes a variety of parameters:
* The `name` and `src` parameters are mandatory and specify the name of the app
and the location where the source code resides
* `sdkVersion` specifies which version of the iOS SDK to use.
It also possile to adjust the `xcodebuild` parameters. This is only needed in
rare circumstances. In most cases the default values should suffice:
* Specifies which `xcodebuild` target to build. By default it takes the target
that has the same name as the app.
* The `configuration` parameter can be overridden if desired. By default, it
will do a debug build for the simulator and a release build for real devices.
* The `scheme` parameter specifies which `-scheme` parameter to propagate to
`xcodebuild`. By default, it corresponds to the app name.
* The `sdk` parameter specifies which SDK to use. By default, it picks
`iphonesimulator` for simulator builds and `iphoneos` for release builds.
* The `xcodeFlags` parameter specifies arbitrary command line parameters that
should be propagated to `xcodebuild`.
By default, builds are carried out for the iOS simulator. To do release builds
(builds for real iOS devices), you must set the `release` parameter to `true`.
In addition, you need to set the following parameters:
* `certificateFile` refers to a P12 certificate file.
* `certificatePassword` specifies the password of the P12 certificate.
* `provisioningProfile` refers to the provision profile needed to sign the app
* `signMethod` should refer to `ad-hoc` for signing the app with an ad-hoc
certificate, `enterprise` for enterprise certificates and `app-store` for App
store certificates.
* `generateIPA` specifies that we want to produce an IPA file (this is probably
what you want)
* `generateXCArchive` specifies thet we want to produce an xcarchive file.
When building IPA files on Hydra and when it is desired to allow iOS devices to
install IPAs by browsing to the Hydra build products page, you can enable the
`enableWirelessDistribution` parameter.
When enabled, you need to configure the following options:
* The `installURL` parameter refers to the URL of a PHP script that composes the
`itms-services://` URL allowing iOS devices to install the IPA file.
* `bundleId` refers to the bundle ID value of the app
* `appVersion` refers to the app's version number
To use wireless adhoc distributions, you must also install the corresponding
PHP script on a web server (see section: 'Installing the PHP script for wireless
ad hoc installations from Hydra' for more information).
In addition to the build parameters, you can also specify any parameters that
the `xcodeenv.composeXcodeWrapper {}` function takes. For example, the
`xcodeBaseDir` parameter can be overridden to refer to a different Xcode
version.
Spawning simulator instances
----------------------------
In addition to building iOS apps, we can also automatically spawn simulator
instances:
```nix
let
pkgs = import <nixpkgs> {};
xcodeenv = import ./xcodeenv {
inherit (pkgs) stdenv;
};
in
xcode.simulateApp {
name = "simulate";
# Supports all xcodewrapper parameters as well
xcodeBaseDir = "/Applications/Xcode.app";
}
```
The above expression produces a script that starts the simulator from the
provided Xcode installation. The script can be started as follows:
```bash
./result/bin/run-test-simulator
```
By default, the script will show an overview of UDID for all available simulator
instances and asks you to pick one. You can also provide a UDID as a
command-line parameter to launch an instance automatically:
```bash
./result/bin/run-test-simulator 5C93129D-CF39-4B1A-955F-15180C3BD4B8
```
You can also extend the simulator script to automatically deploy and launch an
app in the requested simulator instance:
```nix
let
pkgs = import <nixpkgs> {};
xcodeenv = import ./xcodeenv {
inherit (pkgs) stdenv;
};
in
xcode.simulateApp {
name = "simulate";
bundleId = "mycompany.myapp";
app = xcode.buildApp {
# ...
};
# Supports all xcodewrapper parameters as well
xcodeBaseDir = "/Applications/Xcode.app";
}
```
By providing the result of an `xcode.buildApp {}` function and configuring the
app bundle id, the app gets deployed automatically and started.
Troubleshooting
---------------
In some rare cases, it may happen that after a failure, changes are not picked
up. Most likely, this is caused by a derived data cache that Xcode maintains.
To wipe it you can run:
```bash
$ rm -rf ~/Library/Developer/Xcode/DerivedData
```

View File

@@ -1,40 +1,50 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-java">
<title>Java</title>
<para>
Ant-based Java packages are typically built from source as follows:
<title>Java</title>
<para>Ant-based Java packages are typically built from source as follows:
<programlisting>
stdenv.mkDerivation {
name = "...";
src = fetchurl { ... };
nativeBuildInputs = [ jdk ant ];
buildInputs = [ jdk ant ];
buildPhase = "ant";
}
</programlisting>
Note that <varname>jdk</varname> is an alias for the OpenJDK (self-built where available, or pre-built via Zulu). Platforms with OpenJDK not (yet) in Nixpkgs (<literal>Aarch32</literal>, <literal>Aarch64</literal>) point to the (unfree) <literal>oraclejdk</literal>.
</para>
<para>
JAR files that are intended to be used by other packages should be installed in <filename>$out/share/java</filename>. JDKs have a stdenv setup hook that add any JARs in the <filename>share/java</filename> directories of the build inputs to the <envar>CLASSPATH</envar> environment variable. For instance, if the package <literal>libfoo</literal> installs a JAR named <filename>foo.jar</filename> in its <filename>share/java</filename> directory, and another package declares the attribute
Note that <varname>jdk</varname> is an alias for the OpenJDK.</para>
<para>JAR files that are intended to be used by other packages should
be installed in <filename>$out/share/java</filename>. The OpenJDK has
a stdenv setup hook that adds any JARs in the
<filename>share/java</filename> directories of the build inputs to the
<envar>CLASSPATH</envar> environment variable. For instance, if the
package <literal>libfoo</literal> installs a JAR named
<filename>foo.jar</filename> in its <filename>share/java</filename>
directory, and another package declares the attribute
<programlisting>
buildInputs = [ libfoo ];
nativeBuildInputs = [ jdk ];
buildInputs = [ jdk libfoo ];
</programlisting>
then <envar>CLASSPATH</envar> will be set to <filename>/nix/store/...-libfoo/share/java/foo.jar</filename>.
</para>
<para>
Private JARs should be installed in a location like <filename>$out/share/<replaceable>package-name</replaceable></filename>.
</para>
then <envar>CLASSPATH</envar> will be set to
<filename>/nix/store/...-libfoo/share/java/foo.jar</filename>.</para>
<para>Private JARs
should be installed in a location like
<filename>$out/share/<replaceable>package-name</replaceable></filename>.</para>
<para>If your Java package provides a program, you need to generate a
wrapper script to run it using the OpenJRE. You can use
<literal>makeWrapper</literal> for this:
<para>
If your Java package provides a program, you need to generate a wrapper script to run it using the OpenJRE. You can use <literal>makeWrapper</literal> for this:
<programlisting>
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ makeWrapper ];
installPhase =
''
@@ -43,21 +53,32 @@ installPhase =
--add-flags "-cp $out/share/java/foo.jar org.foo.Main"
'';
</programlisting>
Note the use of <literal>jre</literal>, which is the part of the OpenJDK package that contains the Java Runtime Environment. By using <literal>${jre}/bin/java</literal> instead of <literal>${jdk}/bin/java</literal>, you prevent your package from depending on the JDK at runtime.
</para>
<para>
Note all JDKs passthru <literal>home</literal>, so if your application requires environment variables like <envar>JAVA_HOME</envar> being set, that can be done in a generic fashion with the <literal>--set</literal> argument of <literal>makeWrapper</literal>:
<programlisting>
--set JAVA_HOME ${jdk.home}
</programlisting>
</para>
Note the use of <literal>jre</literal>, which is the part of the
OpenJDK package that contains the Java Runtime Environment. By using
<literal>${jre}/bin/java</literal> instead of
<literal>${jdk}/bin/java</literal>, you prevent your package from
depending on the JDK at runtime.</para>
<para>It is possible to use a different Java compiler than
<command>javac</command> from the OpenJDK. For instance, to use the
Eclipse Java Compiler:
<para>
It is possible to use a different Java compiler than <command>javac</command> from the OpenJDK. For instance, to use the GNU Java Compiler:
<programlisting>
nativeBuildInputs = [ gcj ant ];
buildInputs = [ jre ant ecj ];
</programlisting>
Here, Ant will automatically use <command>gij</command> (the GNU Java Runtime) instead of the OpenJRE.
</para>
(Note that here you dont need the full JDK as an input, but just the
JRE.) The ECJ has a stdenv setup hook that sets some environment
variables to cause Ant to use ECJ, but this doesnt work with all Ant
files. Similarly, you can use the GNU Java Compiler:
<programlisting>
buildInputs = [ gcj ant ];
</programlisting>
Here, Ant will automatically use <command>gij</command> (the GNU Java
Runtime) instead of the OpenJRE.</para>
</section>

View File

@@ -1,15 +1,24 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-lua">
<title>Lua</title>
<para>
Lua packages are built by the <varname>buildLuaPackage</varname> function. This function is implemented in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules/generic/default.nix"> <filename>pkgs/development/lua-modules/generic/default.nix</filename></link> and works similarly to <varname>buildPerlPackage</varname>. (See <xref linkend="sec-language-perl"/> for details.)
</para>
<title>Lua</title>
<para>
Lua packages are defined in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/lua-packages.nix"><filename>pkgs/top-level/lua-packages.nix</filename></link>. Most of them are simple. For example:
<programlisting>
<para>
Lua packages are built by the <varname>buildLuaPackage</varname> function. This function is
implemented
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules/generic/default.nix">
<filename>pkgs/development/lua-modules/generic/default.nix</filename></link>
and works similarly to <varname>buildPerlPackage</varname>. (See
<xref linkend="sec-language-perl"/> for details.)
</para>
<para>
Lua packages are defined
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/lua-packages.nix"><filename>pkgs/top-level/lua-packages.nix</filename></link>.
Most of them are simple. For example:
<programlisting>
fileSystem = buildLuaPackage {
name = "filesystem-1.6.2";
src = fetchurl {
@@ -22,15 +31,21 @@ fileSystem = buildLuaPackage {
maintainers = with maintainers; [ flosse ];
};
};
</programlisting>
</para>
</programlisting>
</para>
<para>
Though, more complicated package should be placed in a seperate file in <link
<para>
Though, more complicated package should be placed in a seperate file in
<link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules"><filename>pkgs/development/lua-modules</filename></link>.
</para>
</para>
<para>
Lua packages accept additional parameter <varname>disabled</varname>, which defines
the condition of disabling package from luaPackages. For example, if package has
<varname>disabled</varname> assigned to <literal>lua.luaversion != "5.1"</literal>,
it will not be included in any luaPackages except lua51Packages, making it
only be built for lua 5.1.
</para>
<para>
Lua packages accept additional parameter <varname>disabled</varname>, which defines the condition of disabling package from luaPackages. For example, if package has <varname>disabled</varname> assigned to <literal>lua.luaversion != "5.1"</literal>, it will not be included in any luaPackages except lua51Packages, making it only be built for lua 5.1.
</para>
</section>

View File

@@ -1,51 +0,0 @@
Node.js
=======
The `pkgs/development/node-packages` folder contains a generated collection of
[NPM packages](https://npmjs.com/) that can be installed with the Nix package
manager.
As a rule of thumb, the package set should only provide *end user* software
packages, such as command-line utilities. Libraries should only be added to the
package set if there is a non-NPM package that requires it.
When it is desired to use NPM libraries in a development project, use the
`node2nix` generator directly on the `package.json` configuration file of the
project.
The package set also provides support for multiple Node.js versions. The policy
is that a new package should be added to the collection for the latest stable LTS
release (which is currently 10.x), unless there is an explicit reason to support
a different release.
If your package uses native addons, you need to examine what kind of native
build system it uses. Here are some examples:
* `node-gyp`
* `node-gyp-builder`
* `node-pre-gyp`
After you have identified the correct system, you need to override your package
expression while adding in build system as a build input. For example, `dat`
requires `node-gyp-build`, so we override its expression in `default-v10.nix`:
```nix
dat = nodePackages.dat.override (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [ nodePackages.node-gyp-build ];
});
```
To add a package from NPM to nixpkgs:
1. Modify `pkgs/development/node-packages/node-packages-v10.json` to add, update
or remove package entries. (Or `pkgs/development/node-packages/node-packages-v8.json`
for packages depending on Node.js 8.x)
2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
3. Build your new package to test your changes:
`cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
To build against a specific Node.js version (e.g. 10.x):
`nix-build -A nodePackages_10_x.<new-or-updated-package>`
4. Add and commit all modified and generated files.
For more information about the generation process, consult the
[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
tool.

View File

@@ -1,73 +0,0 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-ocaml">
<title>OCaml</title>
<para>
OCaml libraries should be installed in <literal>$(out)/lib/ocaml/${ocaml.version}/site-lib/</literal>. Such directories are automatically added to the <literal>$OCAMLPATH</literal> environment variable when building another package that depends on them or when opening a <literal>nix-shell</literal>.
</para>
<para>
Given that most of the OCaml ecosystem is now built with dune, nixpkgs includes a convenience build support function called <literal>buildDunePackage</literal> that will build an OCaml package using dune, OCaml and findlib and any additional dependencies provided as <literal>buildInputs</literal> or <literal>propagatedBuildInputs</literal>.
</para>
<para>
Here is a simple package example. It defines an (optional) attribute <literal>minimumOCamlVersion</literal> that will be used to throw a descriptive evaluation error if building with an older OCaml is attempted. It uses the <literal>fetchFromGitHub</literal> fetcher to get its source. It sets the <literal>doCheck</literal> (optional) attribute to <literal>true</literal> which means that tests will be run with <literal>dune runtest -p angstrom</literal> after the build (<literal>dune build -p angstrom</literal>) is complete. It uses <literal>alcotest</literal> as a build input (because it is needed to run the tests) and <literal>bigstringaf</literal> and <literal>result</literal> as propagated build inputs (thus they will also be available to libraries depending on this library). The library will be installed using the <literal>angstrom.install</literal> file that dune generates.
</para>
<programlisting>
{ stdenv, fetchFromGitHub, buildDunePackage, alcotest, result, bigstringaf }:
buildDunePackage rec {
pname = "angstrom";
version = "0.10.0";
minimumOCamlVersion = "4.03";
src = fetchFromGitHub {
owner = "inhabitedtype";
repo = pname;
rev = version;
sha256 = "0lh6024yf9ds0nh9i93r9m6p5psi8nvrqxl5x7jwl13zb0r9xfpw";
};
buildInputs = [ alcotest ];
propagatedBuildInputs = [ bigstringaf result ];
doCheck = true;
meta = {
homepage = https://github.com/inhabitedtype/angstrom;
description = "OCaml parser combinators built for speed and memory efficiency";
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
};
}
</programlisting>
<para>
Here is a second example, this time using a source archive generated with <literal>dune-release</literal>. It is a good idea to use this archive when it is available as it will usually contain substituted variables such as a <literal>%%VERSION%%</literal> field. This library does not depend on any other OCaml library and no tests are run after building it.
</para>
<programlisting>
{ stdenv, fetchurl, buildDunePackage }:
buildDunePackage rec {
pname = "wtf8";
version = "1.0.1";
minimumOCamlVersion = "4.01";
src = fetchurl {
url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
sha256 = "1msg3vycd3k8qqj61sc23qks541cxpb97vrnrvrhjnqxsqnh6ygq";
};
meta = with stdenv.lib; {
homepage = https://github.com/flowtype/ocaml-wtf8;
description = "WTF-8 is a superset of UTF-8 that allows unpaired surrogates.";
license = licenses.mit;
maintainers = [ maintainers.eqyiel ];
};
}
</programlisting>
</section>

View File

@@ -1,16 +1,24 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-perl">
<title>Perl</title>
<para>
Nixpkgs provides a function <varname>buildPerlPackage</varname>, a generic package builder function for any Perl package that has a standard <varname>Makefile.PL</varname>. Its implemented in <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/generic"><filename>pkgs/development/perl-modules/generic</filename></link>.
</para>
<title>Perl</title>
<para>Nixpkgs provides a function <varname>buildPerlPackage</varname>,
a generic package builder function for any Perl package that has a
standard <varname>Makefile.PL</varname>. Its implemented in <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/generic"><filename>pkgs/development/perl-modules/generic</filename></link>.</para>
<para>Perl packages from CPAN are defined in <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>,
rather than <filename>pkgs/all-packages.nix</filename>. Most Perl
packages are so straight-forward to build that they are defined here
directly, rather than having a separate function for each package
called from <filename>perl-packages.nix</filename>. However, more
complicated packages should be put in a separate file, typically in
<filename>pkgs/development/perl-modules</filename>. Here is an
example of the former:
<para>
Perl packages from CPAN are defined in <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>, rather than <filename>pkgs/all-packages.nix</filename>. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from <filename>perl-packages.nix</filename>. However, more complicated packages should be put in a separate file, typically in <filename>pkgs/development/perl-modules</filename>. Here is an example of the former:
<programlisting>
ClassC3 = buildPerlPackage rec {
name = "Class-C3-0.21";
@@ -20,47 +28,74 @@ ClassC3 = buildPerlPackage rec {
};
};
</programlisting>
Note the use of <literal>mirror://cpan/</literal>, and the <literal>${name}</literal> in the URL definition to ensure that the name attribute is consistent with the source that were actually downloading. Perl packages are made available in <filename>all-packages.nix</filename> through the variable <varname>perlPackages</varname>. For instance, if you have a package that needs <varname>ClassC3</varname>, you would typically write
Note the use of <literal>mirror://cpan/</literal>, and the
<literal>${name}</literal> in the URL definition to ensure that the
name attribute is consistent with the source that were actually
downloading. Perl packages are made available in
<filename>all-packages.nix</filename> through the variable
<varname>perlPackages</varname>. For instance, if you have a package
that needs <varname>ClassC3</varname>, you would typically write
<programlisting>
foo = import ../path/to/foo.nix {
inherit stdenv fetchurl ...;
inherit (perlPackages) ClassC3;
};
</programlisting>
in <filename>all-packages.nix</filename>. You can test building a Perl package as follows:
<screen>
<prompt>$ </prompt>nix-build -A perlPackages.ClassC3
</screen>
<varname>buildPerlPackage</varname> adds <literal>perl-</literal> to the start of the name attribute, so the package above is actually called <literal>perl-Class-C3-0.21</literal>. So to install it, you can say:
<screen>
<prompt>$ </prompt>nix-env -i perl-Class-C3
</screen>
(Of course you can also install using the attribute name: <literal>nix-env -i -A perlPackages.ClassC3</literal>.)
</para>
<para>
So what does <varname>buildPerlPackage</varname> do? It does the following:
<orderedlist>
<listitem>
<para>
In the configure phase, it calls <literal>perl Makefile.PL</literal> to generate a Makefile. You can set the variable <varname>makeMakerFlags</varname> to pass flags to <filename>Makefile.PL</filename>
</para>
</listitem>
<listitem>
<para>
It adds the contents of the <envar>PERL5LIB</envar> environment variable to <literal>#! .../bin/perl</literal> line of Perl scripts as <literal>-I<replaceable>dir</replaceable></literal> flags. This ensures that a script can find its dependencies. (This can cause this shebang line to become too long for Darwin to handle; see the note below.)
</para>
</listitem>
<listitem>
<para>
In the fixup phase, it writes the propagated build inputs (<varname>propagatedBuildInputs</varname>) to the file <filename>$out/nix-support/propagated-user-env-packages</filename>. <command>nix-env</command> recursively installs all packages listed in this file when you install a package that has it. This ensures that a Perl package can find its dependencies.
</para>
</listitem>
</orderedlist>
</para>
in <filename>all-packages.nix</filename>. You can test building a
Perl package as follows:
<screen>
$ nix-build -A perlPackages.ClassC3
</screen>
<varname>buildPerlPackage</varname> adds <literal>perl-</literal> to
the start of the name attribute, so the package above is actually
called <literal>perl-Class-C3-0.21</literal>. So to install it, you
can say:
<screen>
$ nix-env -i perl-Class-C3
</screen>
(Of course you can also install using the attribute name:
<literal>nix-env -i -A perlPackages.ClassC3</literal>.)</para>
<para>So what does <varname>buildPerlPackage</varname> do? It does
the following:
<orderedlist>
<listitem><para>In the configure phase, it calls <literal>perl
Makefile.PL</literal> to generate a Makefile. You can set the
variable <varname>makeMakerFlags</varname> to pass flags to
<filename>Makefile.PL</filename></para></listitem>
<listitem><para>It adds the contents of the <envar>PERL5LIB</envar>
environment variable to <literal>#! .../bin/perl</literal> line of
Perl scripts as <literal>-I<replaceable>dir</replaceable></literal>
flags. This ensures that a script can find its
dependencies.</para></listitem>
<listitem><para>In the fixup phase, it writes the propagated build
inputs (<varname>propagatedBuildInputs</varname>) to the file
<filename>$out/nix-support/propagated-user-env-packages</filename>.
<command>nix-env</command> recursively installs all packages listed
in this file when you install a package that has it. This ensures
that a Perl package can find its dependencies.</para></listitem>
</orderedlist>
</para>
<para><varname>buildPerlPackage</varname> is built on top of
<varname>stdenv</varname>, so everything can be customised in the
usual way. For instance, the <literal>BerkeleyDB</literal> module has
a <varname>preConfigure</varname> hook to generate a configuration
file used by <filename>Makefile.PL</filename>:
<para>
<varname>buildPerlPackage</varname> is built on top of <varname>stdenv</varname>, so everything can be customised in the usual way. For instance, the <literal>BerkeleyDB</literal> module has a <varname>preConfigure</varname> hook to generate a configuration file used by <filename>Makefile.PL</filename>:
<programlisting>
{ buildPerlPackage, fetchurl, db }:
@@ -73,15 +108,23 @@ buildPerlPackage rec {
};
preConfigure = ''
echo "LIB = ${db.out}/lib" > config.in
echo "INCLUDE = ${db.dev}/include" >> config.in
echo "LIB = ${db}/lib" > config.in
echo "INCLUDE = ${db}/include" >> config.in
'';
}
</programlisting>
</para>
<para>
Dependencies on other Perl packages can be specified in the <varname>buildInputs</varname> and <varname>propagatedBuildInputs</varname> attributes. If something is exclusively a build-time dependency, use <varname>buildInputs</varname>; if its (also) a runtime dependency, use <varname>propagatedBuildInputs</varname>. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
</para>
<para>Dependencies on other Perl packages can be specified in the
<varname>buildInputs</varname> and
<varname>propagatedBuildInputs</varname> attributes. If something is
exclusively a build-time dependency, use
<varname>buildInputs</varname>; if its (also) a runtime dependency,
use <varname>propagatedBuildInputs</varname>. For instance, this
builds a Perl module that has runtime dependencies on a bunch of other
modules:
<programlisting>
ClassC3Componentised = buildPerlPackage rec {
name = "Class-C3-Componentised-1.0004";
@@ -94,68 +137,45 @@ ClassC3Componentised = buildPerlPackage rec {
];
};
</programlisting>
</para>
<para>
On Darwin, if a script has too many <literal>-I<replaceable>dir</replaceable></literal> flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the <literal>shortenPerlShebang</literal> function from the <literal>postInstall</literal> phase:
<programlisting>
{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
</para>
ImageExifTool = buildPerlPackage {
pname = "Image-ExifTool";
version = "11.50";
<section xml:id="ssec-generation-from-CPAN"><title>Generation from CPAN</title>
src = fetchurl {
url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
};
buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
postInstall = stdenv.lib.optional stdenv.isDarwin ''
shortenPerlShebang $out/bin/exiftool
'';
};
</programlisting>
This will remove the <literal>-I</literal> flags from the shebang line, rewrite them in the <literal>use lib</literal> form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
</para>
<section xml:id="ssec-generation-from-CPAN">
<title>Generation from CPAN</title>
<para>
Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program <command>nix-generate-from-cpan</command>, which can be installed as follows:
</para>
<para>Nix expressions for Perl packages can be generated (almost)
automatically from CPAN. This is done by the program
<command>nix-generate-from-cpan</command>, which can be installed
as follows:</para>
<screen>
<prompt>$ </prompt>nix-env -i nix-generate-from-cpan
$ nix-env -i nix-generate-from-cpan
</screen>
<para>
This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
<para>This program takes a Perl module name, looks it up on CPAN,
fetches and unpacks the corresponding package, and prints a Nix
expression on standard output. For example:
<screen>
<prompt>$ </prompt>nix-generate-from-cpan XML::Simple
XMLSimple = buildPerlPackage rec {
name = "XML-Simple-2.22";
$ nix-generate-from-cpan XML::Simple
XMLSimple = buildPerlPackage {
name = "XML-Simple-2.20";
src = fetchurl {
url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
url = mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-2.20.tar.gz;
sha256 = "5cff13d0802792da1eb45895ce1be461903d98ec97c9c953bc8406af7294434a";
};
propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
meta = {
description = "An API for simple XML files";
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
description = "Easily read/write XML (esp config files)";
license = "perl";
};
};
</screen>
The output can be pasted into <filename>pkgs/top-level/perl-packages.nix</filename> or wherever else you need it.
</para>
</section>
<section xml:id="ssec-perl-cross-compilation">
<title>Cross-compiling modules</title>
The output can be pasted into
<filename>pkgs/top-level/perl-packages.nix</filename> or wherever else
you need it.</para>
<para>
Nixpkgs has experimental support for cross-compiling Perl modules. In many cases, it will just work out of the box, even for modules with native extensions. Sometimes, however, the Makefile.PL for a module may (indirectly) import a native module. In that case, you will need to make a stub for that module that will satisfy the Makefile.PL and install it into <filename>lib/perl5/site_perl/cross_perl/${perl.version}</filename>. See the <varname>postInstall</varname> for <varname>DBI</varname> for an example.
</para>
</section>
</section>
</section>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,447 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-python">
<title>Python</title>
<para>
Currently supported interpreters are <varname>python26</varname>, <varname>python27</varname>,
<varname>python33</varname>, <varname>python34</varname>, <varname>python35</varname>
and <varname>pypy</varname>.
</para>
<para>
<varname>python</varname> is an alias to <varname>python27</varname> and <varname>python3</varname> is an alias to <varname>python34</varname>.
</para>
<para>
<varname>python26</varname> and <varname>python27</varname> do not include modules that require
external dependencies (to reduce dependency bloat). Following modules need to be added as
<varname>buildInput</varname> explicitly:
</para>
<itemizedlist>
<listitem><para><varname>python.modules.bsddb</varname></para></listitem>
<listitem><para><varname>python.modules.curses</varname></para></listitem>
<listitem><para><varname>python.modules.curses_panel</varname></para></listitem>
<listitem><para><varname>python.modules.crypt</varname></para></listitem>
<listitem><para><varname>python.modules.gdbm</varname></para></listitem>
<listitem><para><varname>python.modules.sqlite3</varname></para></listitem>
<listitem><para><varname>python.modules.tkinter</varname></para></listitem>
<listitem><para><varname>python.modules.readline</varname></para></listitem>
</itemizedlist>
<para>For convenience <varname>python27Full</varname> and <varname>python26Full</varname>
are provided with all modules included.</para>
<para>
Python packages that
use <link xlink:href="http://pypi.python.org/pypi/setuptools/"><literal>setuptools</literal></link> or <literal>distutils</literal>,
can be built using the <varname>buildPythonPackage</varname> function as documented below.
</para>
<para>
All packages depending on any Python interpreter get appended <varname>$out/${python.sitePackages}</varname>
to <literal>$PYTHONPATH</literal> if such directory exists.
</para>
<variablelist>
<title>
Useful attributes on interpreters packages:
</title>
<varlistentry>
<term><varname>libPrefix</varname></term>
<listitem><para>
Name of the folder in <literal>${python}/lib/</literal> for corresponding interpreter.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>interpreter</varname></term>
<listitem><para>
Alias for <literal>${python}/bin/${executable}.</literal>
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>buildEnv</varname></term>
<listitem><para>
Function to build python interpreter environments with extra packages bundled together.
See <xref linkend="ssec-python-build-env" /> for usage and documentation.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>sitePackages</varname></term>
<listitem><para>
Alias for <literal>lib/${libPrefix}/site-packages</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>executable</varname></term>
<listitem><para>
Name of the interpreter executable, ie <literal>python3.4</literal>.
</para></listitem>
</varlistentry>
</variablelist>
<section xml:id="ssec-build-python-package"><title><varname>buildPythonPackage</varname> function</title>
<para>
The function is implemented in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix">
<filename>pkgs/development/python-modules/generic/default.nix</filename></link>.
Example usage:
<programlisting language="nix">
twisted = buildPythonPackage {
name = "twisted-8.1.0";
src = pkgs.fetchurl {
url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2;
sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl";
};
propagatedBuildInputs = [ self.ZopeInterface ];
meta = {
homepage = http://twistedmatrix.com/;
description = "Twisted, an event-driven networking engine written in Python";
license = stdenv.lib.licenses.mit;
};
};
</programlisting>
Most of Python packages that use <varname>buildPythonPackage</varname> are defined
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix"><filename>pkgs/top-level/python-packages.nix</filename></link>
and generated for each python interpreter separately into attribute sets <varname>python26Packages</varname>,
<varname>python27Packages</varname>, <varname>python35Packages</varname>, <varname>python33Packages</varname>,
<varname>python34Packages</varname> and <varname>pypyPackages</varname>.
</para>
<para>
<function>buildPythonPackage</function> mainly does four things:
<orderedlist>
<listitem><para>
In the <varname>buildPhase</varname>, it calls
<literal>${python.interpreter} setup.py bdist_wheel</literal> to build a wheel binary zipfile.
</para></listitem>
<listitem><para>
In the <varname>installPhase</varname>, it installs the wheel file using
<literal>pip install *.whl</literal>.
</para></listitem>
<listitem><para>
In the <varname>postFixup</varname> phase, <literal>wrapPythonPrograms</literal>
bash function is called to wrap all programs in <filename>$out/bin/*</filename>
directory to include <literal>$PYTHONPATH</literal> and <literal>$PATH</literal>
environment variables.
</para></listitem>
<listitem><para>
In the <varname>installCheck</varname> phase, <literal>${python.interpreter} setup.py test</literal>
is ran.
</para></listitem>
</orderedlist>
</para>
<para>By default <varname>doCheck = true</varname> is set</para>
<para>
As in Perl, dependencies on other Python packages can be specified in the
<varname>buildInputs</varname> and
<varname>propagatedBuildInputs</varname> attributes. If something is
exclusively a build-time dependency, use
<varname>buildInputs</varname>; if its (also) a runtime dependency,
use <varname>propagatedBuildInputs</varname>.
</para>
<para>
By default <varname>meta.platforms</varname> is set to the same value
as the interpreter unless overriden otherwise.
</para>
<variablelist>
<title>
<varname>buildPythonPackage</varname> parameters
(all parameters from <varname>mkDerivation</varname> function are still supported)
</title>
<varlistentry>
<term><varname>namePrefix</varname></term>
<listitem><para>
Prepended text to <varname>${name}</varname> parameter.
Defaults to <literal>"python3.3-"</literal> for Python 3.3, etc. Set it to
<literal>""</literal>
if you're packaging an application or a command line tool.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>disabled</varname></term>
<listitem><para>
If <varname>true</varname>, package is not build for
particular python interpreter version. Grep around
<filename>pkgs/top-level/python-packages.nix</filename>
for examples.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>setupPyBuildFlags</varname></term>
<listitem><para>
List of flags passed to <command>setup.py build_ext</command> command.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>pythonPath</varname></term>
<listitem><para>
List of packages to be added into <literal>$PYTHONPATH</literal>.
Packages in <varname>pythonPath</varname> are not propagated
(contrary to <varname>propagatedBuildInputs</varname>).
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>preShellHook</varname></term>
<listitem><para>
Hook to execute commands before <varname>shellHook</varname>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>postShellHook</varname></term>
<listitem><para>
Hook to execute commands after <varname>shellHook</varname>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>makeWrapperArgs</varname></term>
<listitem><para>
A list of strings. Arguments to be passed to
<varname>makeWrapper</varname>, which wraps generated binaries. By
default, the arguments to <varname>makeWrapper</varname> set
<varname>PATH</varname> and <varname>PYTHONPATH</varname> environment
variables before calling the binary. Additional arguments here can
allow a developer to set environment variables which will be
available when the binary is run. For example,
<varname>makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]</varname>.
</para></listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="ssec-python-build-env"><title><function>python.buildEnv</function> function</title>
<para>
Create Python environments using low-level <function>pkgs.buildEnv</function> function. Example <filename>default.nix</filename>:
<programlisting language="nix">
<![CDATA[with import <nixpkgs> {};
python.buildEnv.override {
extraLibs = [ pkgs.pythonPackages.pyramid ];
ignoreCollisions = true;
}]]>
</programlisting>
Running <command>nix-build</command> will create
<filename>/nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env</filename>
with wrapped binaries in <filename>bin/</filename>.
</para>
<para>
You can also use <varname>env</varname> attribute to create local
environments with needed packages installed (somewhat comparable to
<literal>virtualenv</literal>). For example, with the following
<filename>shell.nix</filename>:
<programlisting language="nix">
<![CDATA[with import <nixpkgs> {};
(python3.buildEnv.override {
extraLibs = with python3Packages;
[ numpy
requests
];
}).env]]>
</programlisting>
Running <command>nix-shell</command> will drop you into a shell where
<command>python</command> will have specified packages in its path.
</para>
<variablelist>
<title>
<function>python.buildEnv</function> arguments
</title>
<varlistentry>
<term><varname>extraLibs</varname></term>
<listitem><para>
List of packages installed inside the environment.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>postBuild</varname></term>
<listitem><para>
Shell command executed after the build of environment.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ignoreCollisions</varname></term>
<listitem><para>
Ignore file collisions inside the environment (default is <varname>false</varname>).
</para></listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="ssec-python-tools"><title>Tools</title>
<para>Packages inside nixpkgs are written by hand. However many tools
exist in community to help save time. No tool is preferred at the moment.
</para>
<itemizedlist>
<listitem><para>
<link xlink:href="https://github.com/proger/python2nix">python2nix</link>
by Vladimir Kirillov
</para></listitem>
<listitem><para>
<link xlink:href="https://github.com/garbas/pypi2nix">pypi2nix</link>
by Rok Garbas
</para></listitem>
<listitem><para>
<link xlink:href="https://github.com/offlinehacker/pypi2nix">pypi2nix</link>
by Jaka Hudoklin
</para></listitem>
</itemizedlist>
</section>
<section xml:id="ssec-python-development"><title>Development</title>
<para>
To develop Python packages <function>buildPythonPackage</function> has
additional logic inside <varname>shellPhase</varname> to run
<command>pip install -e . --prefix $TMPDIR/</command> for the package.
</para>
<warning><para><varname>shellPhase</varname> is executed only if <filename>setup.py</filename>
exists.</para></warning>
<para>
Given a <filename>default.nix</filename>:
<programlisting language="nix">
<![CDATA[with import <nixpkgs> {};
buildPythonPackage {
name = "myproject";
buildInputs = with pkgs.pythonPackages; [ pyramid ];
src = ./.;
}]]>
</programlisting>
Running <command>nix-shell</command> with no arguments should give you
the environment in which the package would be build with
<command>nix-build</command>.
</para>
<para>
Shortcut to setup environments with C headers/libraries and python packages:
<programlisting language="bash">$ nix-shell -p pythonPackages.pyramid zlib libjpeg git</programlisting>
</para>
<note><para>
There is a boolean value <varname>lib.inNixShell</varname> set to
<varname>true</varname> if nix-shell is invoked.
</para></note>
</section>
<section xml:id="ssec-python-faq"><title>FAQ</title>
<variablelist>
<varlistentry>
<term>How to solve circular dependencies?</term>
<listitem><para>
If you have packages <varname>A</varname> and <varname>B</varname> that
depend on each other, when packaging <varname>B</varname> override package
<varname>A</varname> not to depend on <varname>B</varname> as input
(and also the other way around).
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>install_data / data_files</varname> problems resulting into <literal>error: could not create '/nix/store/6l1bvljpy8gazlsw2aw9skwwp4pmvyxw-python-2.7.8/etc': Permission denied</literal></term>
<listitem><para>
<link xlink:href="https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix">
Known bug in setuptools <varname>install_data</varname> does not respect --prefix</link>. Example of
such package using the feature is <filename>pkgs/tools/X11/xpra/default.nix</filename>. As workaround
install it as an extra <varname>preInstall</varname> step:
<programlisting>${python.interpreter} setup.py install_data --install-dir=$out --root=$out
sed -i '/ = data_files/d' setup.py</programlisting>
</para></listitem>
</varlistentry>
<varlistentry>
<term>Rationale of non-existent global site-packages</term>
<listitem><para>
There is no need to have global site-packages in Nix. Each package has isolated
dependency tree and installing any python package will only populate <varname>$PATH</varname>
inside user environment. See <xref linkend="ssec-python-build-env" /> to create self-contained
interpreter with a set of packages.
</para></listitem>
</varlistentry>
</variablelist>
</section>
<section xml:id="ssec-python-contrib"><title>Contributing guidelines</title>
<para>
Following rules are desired to be respected:
</para>
<itemizedlist>
<listitem><para>
Make sure package builds for all python interpreters. Use <varname>disabled</varname> argument to
<function>buildPythonPackage</function> to set unsupported interpreters.
</para></listitem>
<listitem><para>
If tests need to be disabled for a package, make sure you leave a comment about reasoning.
</para></listitem>
<listitem><para>
Packages in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix"><filename>pkgs/top-level/python-packages.nix</filename></link>
are sorted quasi-alphabetically to avoid merge conflicts.
</para></listitem>
</itemizedlist>
</section>
</section>

View File

@@ -1,149 +1,70 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-qt">
<title>Qt</title>
<para>
This section describes the differences between Nix expressions for Qt libraries and applications and Nix expressions for other C++ software. Some knowledge of the latter is assumed. There are primarily two problems which the Qt infrastructure is designed to address: ensuring consistent versioning of all dependencies and finding dependencies at runtime.
</para>
<title>Qt</title>
<example xml:id='qt-default-nix'>
<title>Nix expression for a Qt package (<filename>default.nix</filename>)</title>
<programlisting>
{ mkDerivation, lib, qtbase }: <co xml:id='qt-default-nix-co-1' />
<para>The information in this section applies to Qt 5.5 and later.</para>
mkDerivation { <co xml:id='qt-default-nix-co-2' />
pname = "myapp";
version = "1.0";
<para>Qt is an application development toolkit for C++. Although it is
not a distinct programming language, there are special considerations
for packaging Qt-based programs and libraries. A small set of tools
and conventions has grown out of these considerations.</para>
buildInputs = [ qtbase ]; <co xml:id='qt-default-nix-co-3' />
}
</programlisting>
</example>
<section xml:id="ssec-qt-libraries"><title>Libraries</title>
<calloutlist>
<callout arearefs='qt-default-nix-co-1'>
<para>
Import <literal>mkDerivation</literal> and Qt (such as <literal>qtbase</literal> modules directly. <emphasis>Do not</emphasis> import Qt package sets; the Qt versions of dependencies may not be coherent, causing build and runtime failures.
</para>
</callout>
<callout arearefs='qt-default-nix-co-2'>
<para>
Use <literal>mkDerivation</literal> instead of <literal>stdenv.mkDerivation</literal>. <literal>mkDerivation</literal> is a wrapper around <literal>stdenv.mkDerivation</literal> which applies some Qt-specific settings. This deriver accepts the same arguments as <literal>stdenv.mkDerivation</literal>; refer to <xref linkend='chap-stdenv' /> for details.
</para>
<para>
To use another deriver instead of <literal>stdenv.mkDerivation</literal>, use <literal>mkDerivationWith</literal>:
<programlisting>
mkDerivationWith myDeriver {
# ...
}
</programlisting>
If you cannot use <literal>mkDerivationWith</literal>, please refer to <xref linkend='qt-runtime-dependencies' />.
</para>
</callout>
<callout arearefs='qt-default-nix-co-3'>
<para>
<literal>mkDerivation</literal> accepts the same arguments as <literal>stdenv.mkDerivation</literal>, such as <literal>buildInputs</literal>.
</para>
</callout>
</calloutlist>
<para>Packages that provide libraries should be listed in
<varname>qt5LibsFun</varname> so that the library is built with each
Qt version. A set of packages is provided for each version of Qt; for
example, <varname>qt5Libs</varname> always provides libraries built
with the latest version, <varname>qt55Libs</varname> provides
libraries built with Qt 5.5, and so on. To avoid version conflicts, no
top-level attributes are created for these packages.</para>
<formalpara xml:id='qt-runtime-dependencies'>
<title>Locating runtime dependencies</title>
<para>
Qt applications need to be wrapped to find runtime dependencies. If you cannot use <literal>mkDerivation</literal> or <literal>mkDerivationWith</literal> above, include <literal>wrapQtAppsHook</literal> in <literal>nativeBuildInputs</literal>:
<programlisting>
stdenv.mkDerivation {
# ...
nativeBuildInputs = [ wrapQtAppsHook ];
}
</programlisting>
</para>
</formalpara>
<para>
Entries added to <literal>qtWrapperArgs</literal> are used to modify the wrappers created by <literal>wrapQtAppsHook</literal>. The entries are passed as arguments to <xref linkend='fun-wrapProgram' />.
<programlisting>
mkDerivation {
# ...
qtWrapperArgs = [ ''--prefix PATH : /path/to/bin'' ];
}
</programlisting>
</para>
<para>
Set <literal>dontWrapQtApps</literal> to stop applications from being wrapped automatically. It is required to wrap applications manually with <literal>wrapQtApp</literal>, using the syntax of <xref linkend='fun-wrapProgram' />:
<programlisting>
mkDerivation {
# ...
dontWrapQtApps = true;
preFixup = ''
wrapQtApp "$out/bin/myapp" --prefix PATH : /path/to/bin
'';
}
</programlisting>
</para>
<note>
<para>
<literal>wrapQtAppsHook</literal> ignores files that are non-ELF executables. This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned. An example of when you'd always need to do this is with Python applications that use PyQT.
</para>
</note>
<para>
Libraries are built with every available version of Qt. Use the <literal>meta.broken</literal> attribute to disable the package for unsupported Qt versions:
<programlisting>
mkDerivation {
# ...
# Disable this library with Qt &lt; 5.9.0
meta.broken = builtins.compareVersions qtbase.version "5.9.0" &lt; 0;
}
</programlisting>
</para>
<formalpara>
<title>Adding a library to Nixpkgs</title>
<para>
Add a Qt library to <filename>all-packages.nix</filename> by adding it to the collection inside <literal>mkLibsForQt5</literal>. This ensures that the library is built with every available version of Qt as needed.
<example xml:id='qt-library-all-packages-nix'>
<title>Adding a Qt library to <filename>all-packages.nix</filename></title>
<programlisting>
{
# ...
mkLibsForQt5 = self: with self; {
# ...
mylib = callPackage ../path/to/mylib {};
};
# ...
}
</programlisting>
</example>
</para>
</formalpara>
<formalpara>
<title>Adding an application to Nixpkgs</title>
<para>
Add a Qt application to <filename>all-packages.nix</filename> using <literal>libsForQt5.callPackage</literal> instead of the usual <literal>callPackage</literal>. The former ensures that all dependencies are built with the same version of Qt.
<example xml:id='qt-application-all-packages-nix'>
<title>Adding a Qt application to <filename>all-packages.nix</filename></title>
<programlisting>
{
# ...
myapp = libsForQt5.callPackage ../path/to/myapp/ {};
# ...
}
</programlisting>
</example>
</para>
</formalpara>
</section>
<section xml:id="ssec-qt-programs"><title>Programs</title>
<para>Application packages do not need to be built with every Qt
version. To ensure consistency between the package's dependencies,
call the package with <literal>qt5Libs.callPackage</literal> instead
of the usual <literal>callPackage</literal>. An older version may be
selected in case of incompatibility. For example, to build with Qt
5.5, call the package with
<literal>qt55Libs.callPackage</literal>.</para>
<para>Several environment variables must be set at runtime for Qt
applications to function correctly, including:</para>
<itemizedlist>
<listitem><para><envar>QT_PLUGIN_PATH</envar></para></listitem>
<listitem><para><envar>QML_IMPORT_PATH</envar></para></listitem>
<listitem><para><envar>QML2_IMPORT_PATH</envar></para></listitem>
<listitem><para><envar>XDG_DATA_DIRS</envar></para></listitem>
</itemizedlist>
<para>To ensure that these are set correctly, the program must be wrapped by
invoking <literal>wrapQtProgram <replaceable>program</replaceable></literal>
during installation (for example, during
<literal>fixupPhase</literal>). <literal>wrapQtProgram</literal>
accepts the same options as <literal>makeWrapper</literal>.
</para>
</section>
<section xml:id="ssec-qt-kde"><title>KDE</title>
<para>Many of the considerations above also apply to KDE packages,
especially the need to set the correct environment variables at
runtime. To ensure that this is done, invoke <literal>wrapKDEProgram
<replaceable>program</replaceable></literal> during
installation. <literal>wrapKDEProgram</literal> also generates a
<literal>ksycoca</literal> database so that required data and services
can be found. Like its Qt counterpart,
<literal>wrapKDEProgram</literal> accepts the same options as
<literal>makeWrapper</literal>.</para>
</section>
</section>

View File

@@ -1,120 +0,0 @@
R
=
## Installation
Define an environment for R that contains all the libraries that you'd like to
use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix file:
```nix
{
packageOverrides = super: let self = super.pkgs; in
{
rEnv = super.rWrapper.override {
packages = with self.rPackages; [
devtools
ggplot2
reshape2
yaml
optparse
];
};
};
}
```
Then you can use `nix-env -f "<nixpkgs>" -iA rEnv` to install it into your user
profile. The set of available libraries can be discovered by running the
command `nix-env -f "<nixpkgs>" -qaP -A rPackages`. The first column from that
output is the name that has to be passed to rWrapper in the code snipped above.
However, if you'd like to add a file to your project source to make the
environment available for other contributors, you can create a `default.nix`
file like so:
```nix
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
in with pkgs; {
myProject = stdenv.mkDerivation {
name = "myProject";
version = "1";
src = if pkgs.lib.inNixShell then null else nix;
buildInputs = with rPackages; [
R
ggplot2
knitr
];
};
}
```
and then run `nix-shell .` to be dropped into a shell with those packages
available.
## RStudio
RStudio uses a standard set of packages and ignores any custom R
environments or installed packages you may have. To create a custom
environment, see `rstudioWrapper`, which functions similarly to
`rWrapper`:
```nix
{
packageOverrides = super: let self = super.pkgs; in
{
rstudioEnv = super.rstudioWrapper.override {
packages = with self.rPackages; [
dplyr
ggplot2
reshape2
];
};
};
}
```
Then like above, `nix-env -f "<nixpkgs>" -iA rstudioEnv` will install
this into your user profile.
Alternatively, you can create a self-contained `shell.nix` without the need to
modify any configuration files:
```nix
{ pkgs ? import <nixpkgs> {}
}:
pkgs.rstudioWrapper.override {
packages = with pkgs.rPackages; [ dplyr ggplot2 reshape2 ];
}
```
Executing `nix-shell` will then drop you into an environment equivalent to the
one above. If you need additional packages just add them to the list and
re-enter the shell.
## Updating the package set
```bash
nix-shell generate-shell.nix
Rscript generate-r-packages.R cran > cran-packages.nix.new
mv cran-packages.nix.new cran-packages.nix
Rscript generate-r-packages.R bioc > bioc-packages.nix.new
mv bioc-packages.nix.new bioc-packages.nix
```
`generate-r-packages.R <repo>` reads `<repo>-packages.nix`, therefor the renaming.
## Testing if the Nix-expression could be evaluated
```bash
nix-build test-evaluation.nix --dry-run
```
If this exits fine, the expression is ok. If not, you have to edit `default.nix`

View File

@@ -1,365 +0,0 @@
---
title: Ruby
author: Michael Fellinger
date: 2019-05-23
---
# Ruby
## User Guide
### Using Ruby
#### Overview
Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby.
The attribute `ruby` refers to the default Ruby interpreter, which is currently
MRI 2.5. It's also possible to refer to specific versions, e.g. `ruby_2_6`, `jruby`, or `mruby`.
In the nixpkgs tree, Ruby packages can be found throughout, depending on what
they do, and are called from the main package set. Ruby gems, however are
separate sets, and there's one default set for each interpreter (currently MRI
only).
There are two main approaches for using Ruby with gems.
One is to use a specifically locked `Gemfile` for an application that has very strict dependencies.
The other is to depend on the common gems, which we'll explain further down, and
rely on them being updated regularly.
The interpreters have common attributes, namely `gems`, and `withPackages`. So
you can refer to `ruby.gems.nokogiri`, or `ruby_2_5.gems.nokogiri` to get the
Nokogiri gem already compiled and ready to use.
Since not all gems have executables like `nokogiri`, it's usually more
convenient to use the `withPackages` function like this:
`ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the
Ruby in your environment will be able to find the gem and it can be used in your
Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"`
as usual.
#### Temporary Ruby environment with `nix-shell`
Rather than having a single Ruby environment shared by all Ruby
development projects on a system, Nix allows you to create separate
environments per project. `nix-shell` gives you the possibility to
temporarily load another environment akin to a combined `chruby` or
`rvm` and `bundle exec`.
There are two methods for loading a shell with Ruby packages. The first and
recommended method is to create an environment with `ruby.withPackages` and load
that.
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])"
```
The other method, which is not recommended, is to create an environment and list
all the packages directly.
```shell
nix-shell -p ruby.gems.nokogiri ruby.gems.pry
```
Again, it's possible to launch the interpreter from the shell. The Ruby
interpreter has the attribute `gems` which contains all Ruby gems for that
specific interpreter.
##### Load environment from `.nix` expression
As explained in the Nix manual, `nix-shell` can also load an expression from a
`.nix` file. Say we want to have Ruby 2.5, `nokogori`, and `pry`. Consider a
`shell.nix` file with:
```nix
with import <nixpkgs> {};
ruby.withPackages (ps: with ps; [ nokogiri pry ])
```
What's happening here?
1. We begin with importing the Nix Packages collections. `import <nixpkgs>`
imports the `<nixpkgs>` function, `{}` calls it and the `with` statement
brings all attributes of `nixpkgs` in the local scope. These attributes form
the main package set.
2. Then we create a Ruby environment with the `withPackages` function.
3. The `withPackages` function expects us to provide a function as an argument
that takes the set of all ruby gems and returns a list of packages to include
in the environment. Here, we select the packages `nokogiri` and `pry` from
the package set.
##### Execute command with `--run`
A convenient flag for `nix-shell` is `--run`. It executes a command in the
`nix-shell`. We can e.g. directly open a `pry` REPL:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry"
```
Or immediately require `nokogiri` in pry:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "pry -rnokogiri"
```
Or run a script using this environment:
```shell
nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
```
##### Using `nix-shell` as shebang
In fact, for the last case, there is a more convenient method. You can add a
[shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) to your script
specifying which dependencies `nix-shell` needs. With the following shebang, you
can just execute `./example.rb`, and it will run with all dependencies.
```ruby
#! /usr/bin/env nix-shell
#! nix-shell -i ruby -p "ruby.withPackages (ps: with ps; [ nokogiri rest-client ])"
require 'nokogiri'
require 'rest-client'
body = RestClient.get('http://example.com').body
puts Nokogiri::HTML(body).at('h1').text
```
### Developing with Ruby
#### Using an existing Gemfile
In most cases, you'll already have a `Gemfile.lock` listing all your dependencies.
This can be used to generate a `gemset.nix` which is used to fetch the gems and
combine them into a single environment.
The reason why you need to have a separate file for this, is that Nix requires
you to have a checksum for each input to your build.
Since the `Gemfile.lock` that `bundler` generates doesn't provide us with
checksums, we have to first download each gem, calculate its SHA256, and store
it in this separate file.
So the steps from having just a `Gemfile` to a `gemset.nix` are:
```shell
bundle lock
bundix
```
If you already have a `Gemfile.lock`, you can simply run `bundix` and it will
work the same.
To update the gems in your `Gemfile.lock`, you may use the `bundix -l` flag,
which will create a new `Gemfile.lock` in case the `Gemfile` has a more recent
time of modification.
Once the `gemset.nix` is generated, it can be used in a
`bundlerEnv` derivation. Here is an example you could use for your `shell.nix`:
```nix
# ...
let
gems = bundlerEnv {
name = "gems-for-some-project";
gemdir = ./.;
};
in mkShell { buildInputs = [ gems gems.wrappedRuby ]; }
```
With this file in your directory, you can run `nix-shell` to build and use the gems.
The important parts here are `bundlerEnv` and `wrappedRuby`.
The `bundlerEnv` is a wrapper over all the gems in your gemset. This means that
all the `/lib` and `/bin` directories will be available, and the executables of
all gems (even of indirect dependencies) will end up in your `$PATH`.
The `wrappedRuby` provides you with all executables that come with Ruby itself,
but wrapped so they can easily find the gems in your gemset.
One common issue that you might have is that you have Ruby 2.6, but also
`bundler` in your gemset. That leads to a conflict for `/bin/bundle` and
`/bin/bundler`. You can resolve this by wrapping either your Ruby or your gems
in a `lowPrio` call. So in order to give the `bundler` from your gemset
priority, it would be used like this:
```nix
# ...
mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; }
```
#### Gem-specific configurations and workarounds
In some cases, especially if the gem has native extensions, you might need to
modify the way the gem is built.
This is done via a common configuration file that includes all of the
workarounds for each gem.
This file lives at `/pkgs/development/ruby-modules/gem-config/default.nix`,
since it already contains a lot of entries, it should be pretty easy to add the
modifications you need for your needs.
In the meanwhile, or if the modification is for a private gem, you can also add
the configuration to only your own environment.
Two places that allow this modification are the `ruby` derivation, or `bundlerEnv`.
Here's the `ruby` one:
```nix
{ pg_version ? "10", pkgs ? import <nixpkgs> { } }:
let
myRuby = pkgs.ruby.override {
defaultGemConfig = pkgs.defaultGemConfig // {
pg = attrs: {
buildFlags =
[ "--with-pg-config=${pkgs."postgresql_${pg_version}"}/bin/pg_config" ];
};
};
};
in myRuby.withPackages (ps: with ps; [ pg ])
```
And an example with `bundlerEnv`:
```nix
{ pg_version ? "10", pkgs ? import <nixpkgs> { } }:
let
gems = pkgs.bundlerEnv {
name = "gems-for-some-project";
gemdir = ./.;
gemConfig = pkgs.defaultGemConfig // {
pg = attrs: {
buildFlags =
[ "--with-pg-config=${pkgs."postgresql_${pg_version}"}/bin/pg_config" ];
};
};
};
in mkShell { buildInputs = [ gems gems.wrappedRuby ]; }
```
And finally via overlays:
```nix
{ pg_version ? "10" }:
let
pkgs = import <nixpkgs> {
overlays = [
(self: super: {
defaultGemConfig = super.defaultGemConfig // {
pg = attrs: {
buildFlags = [
"--with-pg-config=${
pkgs."postgresql_${pg_version}"
}/bin/pg_config"
];
};
};
})
];
};
in pkgs.ruby.withPackages (ps: with ps; [ pg ])
```
Then we can get whichever postgresql version we desire and the `pg` gem will
always reference it correctly:
```shell
$ nix-shell --argstr pg_version 9_4 --run 'ruby -rpg -e "puts PG.library_version"'
90421
$ nix-shell --run 'ruby -rpg -e "puts PG.library_version"'
100007
```
Of course for this use-case one could also use overlays since the configuration
for `pg` depends on the `postgresql` alias, but for demonstration purposes this
has to suffice.
#### Adding a gem to the default gemset
Now that you know how to get a working Ruby environment with Nix, it's time to
go forward and start actually developing with Ruby.
We will first have a look at how Ruby gems are packaged on Nix. Then, we will
look at how you can use development mode with your code.
All gems in the standard set are automatically generated from a single
`Gemfile`. The dependency resolution is done with `bundler` and makes it more
likely that all gems are compatible to each other.
In order to add a new gem to nixpkgs, you can put it into the
`/pkgs/development/ruby-modules/with-packages/Gemfile` and run
`./maintainers/scripts/update-ruby-packages`.
To test that it works, you can then try using the gem with:
```shell
NIX_PATH=nixpkgs=$PWD nix-shell -p "ruby.withPackages (ps: with ps; [ name-of-your-gem ])"
```
#### Packaging applications
A common task is to add a ruby executable to nixpkgs, popular examples would be
`chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp`
function, that allows you to make a package that only exposes the listed
executables, otherwise the package may cause conflicts through common paths like
`bin/rake` or `bin/bundler` that aren't meant to be used.
The absolute easiest way to do that is to write a
`Gemfile` along these lines:
```ruby
source 'https://rubygems.org' do
gem 'mdl'
end
```
If you want to package a specific version, you can use the standard Gemfile
syntax for that, e.g. `gem 'mdl', '0.5.0'`, but if you want the latest stable
version anyway, it's easier to update by simply running the `bundle lock` and
`bundix` steps again.
Now you can also also make a `default.nix` that looks like this:
```nix
{ lib, bundlerApp }:
bundlerApp {
pname = "mdl";
gemdir = ./.;
exes = [ "mdl" ];
}
```
All that's left to do is to generate the corresponding `Gemfile.lock` and
`gemset.nix` as described above in the `Using an existing Gemfile` section.
##### Packaging executables that require wrapping
Sometimes your app will depend on other executables at runtime, and tries to
find it through the `PATH` environment variable.
In this case, you can provide a `postBuild` hook to `bundlerApp` that wraps the
gem in another script that prefixes the `PATH`.
Of course you could also make a custom `gemConfig` if you know exactly how to
patch it, but it's usually much easier to maintain with a simple wrapper so the
patch doesn't have to be adjusted for each version.
Here's another example:
```nix
{ lib, bundlerApp, makeWrapper, git, gnutar, gzip }:
bundlerApp {
pname = "r10k";
gemdir = ./.;
exes = [ "r10k" ];
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/r10k --prefix PATH : ${lib.makeBinPath [ git gnutar gzip ]}
'';
}
```

View File

@@ -1,37 +1,36 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-ruby">
<title>Ruby</title>
<para>
There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a <filename>Gemfile</filename>, let bundler create a <filename>Gemfile.lock</filename>, and then convert this into a nix expression that contains all Gem dependencies automatically.
</para>
<title>Ruby</title>
<para>
For example, to package sensu, we did:
</para>
<para>There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a <filename>Gemfile</filename>, let bundler create a <filename>Gemfile.lock</filename>, and then convert
this into a nix expression that contains all Gem dependencies automatically.</para>
<para>For example, to package sensu, we did:</para>
<screen>
<![CDATA[$ cd pkgs/servers/monitoring
$ mkdir sensu
$ cd sensu
$ cat > Gemfile
source 'https://rubygems.org'
gem 'sensu'
$ $(nix-build '<nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
$ bundler package --path /tmp/vendor/bundle
$ $(nix-build '<nixpkgs>' -A bundix)/bin/bundix
$ cat > default.nix
{ lib, bundlerEnv, ruby }:
bundlerEnv rec {
name = "sensu-${version}";
bundlerEnv {
name = "sensu-0.17.1";
version = (import gemset).sensu.version;
inherit ruby;
# expects Gemfile, Gemfile.lock and gemset.nix in the same directory
gemdir = ./.;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
meta = with lib; {
description = "A monitoring framework that aims to be simple, malleable, and scalable";
description = "A monitoring framework that aims to be simple, malleable,
and scalable";
homepage = http://sensuapp.org/;
license = with licenses; mit;
maintainers = with maintainers; [ theuni ];
@@ -40,50 +39,15 @@ bundlerEnv rec {
}]]>
</screen>
<para>
Please check in the <filename>Gemfile</filename>, <filename>Gemfile.lock</filename> and the <filename>gemset.nix</filename> so future updates can be run easily.
</para>
<para>Please check in the <filename>Gemfile</filename>, <filename>Gemfile.lock</filename> and the <filename>gemset.nix</filename> so future updates can be run easily.
</para>
<para>
Updating Ruby packages can then be done like this:
</para>
<screen>
<![CDATA[$ cd pkgs/servers/monitoring/sensu
$ nix-shell -p bundler --run 'bundle lock --update'
$ nix-shell -p bundix --run 'bundix'
]]>
</screen>
<para>
For tools written in Ruby - i.e. where the desire is to install a package and then execute e.g. <command>rake</command> at the command line, there is an alternative builder called <literal>bundlerApp</literal>. Set up the <filename>gemset.nix</filename> the same way, and then, for example:
</para>
<screen>
<![CDATA[{ lib, bundlerApp }:
bundlerApp {
pname = "corundum";
gemdir = ./.;
exes = [ "corundum-skel" ];
meta = with lib; {
description = "Tool and libraries for maintaining Ruby gems.";
homepage = https://github.com/nyarly/corundum;
license = licenses.mit;
maintainers = [ maintainers.nyarly ];
platforms = platforms.unix;
};
}]]>
</screen>
<para>
The chief advantage of <literal>bundlerApp</literal> over <literal>bundlerEnv</literal> is the executables introduced in the environment are precisely those selected in the <literal>exes</literal> list, as opposed to <literal>bundlerEnv</literal> which adds all the executables made available by gems in the gemset, which can mean e.g. <command>rspec</command> or <command>rake</command> in unpredictable versions available from various packages.
</para>
<para>
Resulting derivations for both builders also have two helpful attributes, <literal>env</literal> and <literal>wrappedRuby</literal>. The first one allows one to quickly drop into <command>nix-shell</command> with the specified environment present. E.g. <command>nix-shell -A sensu.env</command> would give you an environment with Ruby preset so it has all the libraries necessary for <literal>sensu</literal> in its paths. The second one can be used to make derivations from custom Ruby scripts which have <filename>Gemfile</filename>s with their dependencies specified. It is a derivation with <command>ruby</command> wrapped so it can find all the needed dependencies. For example, to make a derivation <literal>my-script</literal> for a <filename>my-script.rb</filename> (which should be placed in <filename>bin</filename>) you should run <command>bundix</command> as specified above and then use <literal>bundlerEnv</literal> like this:
</para>
<para>Resulting derivations also have two helpful items, <literal>env</literal> and <literal>wrapper</literal>. The first one allows one to quickly drop into
<command>nix-shell</command> with the specified environment present. E.g. <command>nix-shell -A sensu.env</command> would give you an environment with Ruby preset
so it has all the libraries necessary for <literal>sensu</literal> in its paths. The second one can be used to make derivations from custom Ruby scripts which have
<filename>Gemfile</filename>s with their dependencies specified. It is a derivation with <command>ruby</command> wrapped so it can find all the needed dependencies.
For example, to make a derivation <literal>my-script</literal> for a <filename>my-script.rb</filename> (which should be placed in <filename>bin</filename>) you should
run <command>bundix</command> as specified above and then use <literal>bundlerEnv</literal> lile this:</para>
<programlisting>
<![CDATA[let env = bundlerEnv {
@@ -97,12 +61,18 @@ bundlerApp {
in stdenv.mkDerivation {
name = "my-script";
buildInputs = [ env.wrappedRuby ];
buildInputs = [ env.wrapper ];
script = ./my-script.rb;
buildCommand = ''
mkdir -p $out/bin
install -D -m755 $script $out/bin/my-script
patchShebangs $out/bin/my-script
'';
}]]>
</programlisting>
</section>

View File

@@ -1,412 +0,0 @@
---
title: Rust
author: Matthias Beyer
date: 2017-03-05
---
# Rust
To install the rust compiler and cargo put
```
rustc
cargo
```
into the `environment.systemPackages` or bring them into
scope with `nix-shell -p rustc cargo`.
For daily builds (beta and nightly) use either rustup from
nixpkgs or use the [Rust nightlies
overlay](#using-the-rust-nightlies-overlay).
## Compiling Rust applications with Cargo
Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
```
rustPlatform.buildRustPackage rec {
pname = "ripgrep";
version = "11.0.2";
src = fetchFromGitHub {
owner = "BurntSushi";
repo = pname;
rev = version;
sha256 = "1iga3320mgi7m853la55xip514a3chqsdi1a1rwv25lr9b1p7vd3";
};
cargoSha256 = "17ldqr3asrdcsh4l29m3b5r37r5d0b3npq1lrgjmxb6vlx6a36qh";
verifyCargoDeps = true;
meta = with stdenv.lib; {
description = "A fast line-oriented regex search tool, similar to ag and ack";
homepage = https://github.com/BurntSushi/ripgrep;
license = licenses.unlicense;
maintainers = [ maintainers.tailhook ];
platforms = platforms.all;
};
}
```
`buildRustPackage` requires a `cargoSha256` attribute which is computed over
all crate sources of this package. Currently it is obtained by inserting a
fake checksum into the expression and building the package once. The correct
checksum can be then take from the failed build.
When the `Cargo.lock`, provided by upstream, is not in sync with the
`Cargo.toml`, it is possible to use `cargoPatches` to update it. All patches
added in `cargoPatches` will also be prepended to the patches in `patches` at
build-time.
When `verifyCargoDeps` is set to `true`, the build will also verify that the
`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the
`cargoDeps` and `src`. Note that this option changes the value of `cargoSha256`
since it also copies the `Cargo.lock` in it. To avoid breaking
backward-compatibility this option is not enabled by default but hopefully will
be in the future.
### Building a crate for a different target
To build your crate with a different cargo `--target` simply specify the `target` attribute:
```nix
pkgs.rustPlatform.buildRustPackage {
(...)
target = "x86_64-fortanix-unknown-sgx";
}
```
## Compiling Rust crates using Nix instead of Cargo
### Simple operation
When run, `cargo build` produces a file called `Cargo.lock`,
containing pinned versions of all dependencies. Nixpkgs contains a
tool called `carnix` (`nix-env -iA nixos.carnix`), which can be used
to turn a `Cargo.lock` into a Nix expression.
That Nix expression calls `rustc` directly (hence bypassing Cargo),
and can be used to compile a crate and all its dependencies. Here is
an example for a minimal `hello` crate:
$ cargo new hello
$ cd hello
$ cargo build
Compiling hello v0.1.0 (file:///tmp/hello)
Finished dev [unoptimized + debuginfo] target(s) in 0.20 secs
$ carnix -o hello.nix --src ./. Cargo.lock --standalone
$ nix-build hello.nix -A hello_0_1_0
Now, the file produced by the call to `carnix`, called `hello.nix`, looks like:
```
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
{ lib, stdenv, buildRustCrate, fetchgit }:
let kernel = stdenv.buildPlatform.parsed.kernel.name;
# ... (content skipped)
in
rec {
hello = f: hello_0_1_0 { features = hello_0_1_0_features { hello_0_1_0 = f; }; };
hello_0_1_0_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
crateName = "hello";
version = "0.1.0";
authors = [ "pe@pijul.org <pe@pijul.org>" ];
src = ./.;
inherit dependencies buildDependencies features;
};
hello_0_1_0 = { features?(hello_0_1_0_features {}) }: hello_0_1_0_ {};
hello_0_1_0_features = f: updateFeatures f (rec {
hello_0_1_0.default = (f.hello_0_1_0.default or true);
}) [ ];
}
```
In particular, note that the argument given as `--src` is copied
verbatim to the source. If we look at a more complicated
dependencies, for instance by adding a single line `libc="*"` to our
`Cargo.toml`, we first need to run `cargo build` to update the
`Cargo.lock`. Then, `carnix` needs to be run again, and produces the
following nix file:
```
# Generated by carnix 0.6.5: carnix -o hello.nix --src ./. Cargo.lock --standalone
{ lib, stdenv, buildRustCrate, fetchgit }:
let kernel = stdenv.buildPlatform.parsed.kernel.name;
# ... (content skipped)
in
rec {
hello = f: hello_0_1_0 { features = hello_0_1_0_features { hello_0_1_0 = f; }; };
hello_0_1_0_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
crateName = "hello";
version = "0.1.0";
authors = [ "pe@pijul.org <pe@pijul.org>" ];
src = ./.;
inherit dependencies buildDependencies features;
};
libc_0_2_36_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
crateName = "libc";
version = "0.2.36";
authors = [ "The Rust Project Developers" ];
sha256 = "01633h4yfqm0s302fm0dlba469bx8y6cs4nqc8bqrmjqxfxn515l";
inherit dependencies buildDependencies features;
};
hello_0_1_0 = { features?(hello_0_1_0_features {}) }: hello_0_1_0_ {
dependencies = mapFeatures features ([ libc_0_2_36 ]);
};
hello_0_1_0_features = f: updateFeatures f (rec {
hello_0_1_0.default = (f.hello_0_1_0.default or true);
libc_0_2_36.default = true;
}) [ libc_0_2_36_features ];
libc_0_2_36 = { features?(libc_0_2_36_features {}) }: libc_0_2_36_ {
features = mkFeatures (features.libc_0_2_36 or {});
};
libc_0_2_36_features = f: updateFeatures f (rec {
libc_0_2_36.default = (f.libc_0_2_36.default or true);
libc_0_2_36.use_std =
(f.libc_0_2_36.use_std or false) ||
(f.libc_0_2_36.default or false) ||
(libc_0_2_36.default or false);
}) [];
}
```
Here, the `libc` crate has no `src` attribute, so `buildRustCrate`
will fetch it from [crates.io](https://crates.io). A `sha256`
attribute is still needed for Nix purity.
### Handling external dependencies
Some crates require external libraries. For crates from
[crates.io](https://crates.io), such libraries can be specified in
`defaultCrateOverrides` package in nixpkgs itself.
Starting from that file, one can add more overrides, to add features
or build inputs by overriding the hello crate in a seperate file.
```
with import <nixpkgs> {};
((import ./hello.nix).hello {}).override {
crateOverrides = defaultCrateOverrides // {
hello = attrs: { buildInputs = [ openssl ]; };
};
}
```
Here, `crateOverrides` is expected to be a attribute set, where the
key is the crate name without version number and the value a function.
The function gets all attributes passed to `buildRustCrate` as first
argument and returns a set that contains all attribute that should be
overwritten.
For more complicated cases, such as when parts of the crate's
derivation depend on the crate's version, the `attrs` argument of
the override above can be read, as in the following example, which
patches the derivation:
```
with import <nixpkgs> {};
((import ./hello.nix).hello {}).override {
crateOverrides = defaultCrateOverrides // {
hello = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") {
postPatch = ''
substituteInPlace lib/zoneinfo.rs \
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
'';
};
};
}
```
Another situation is when we want to override a nested
dependency. This actually works in the exact same way, since the
`crateOverrides` parameter is forwarded to the crate's
dependencies. For instance, to override the build inputs for crate
`libc` in the example above, where `libc` is a dependency of the main
crate, we could do:
```
with import <nixpkgs> {};
((import hello.nix).hello {}).override {
crateOverrides = defaultCrateOverrides // {
libc = attrs: { buildInputs = []; };
};
}
```
### Options and phases configuration
Actually, the overrides introduced in the previous section are more
general. A number of other parameters can be overridden:
- The version of rustc used to compile the crate:
```
(hello {}).override { rust = pkgs.rust; };
```
- Whether to build in release mode or debug mode (release mode by
default):
```
(hello {}).override { release = false; };
```
- Whether to print the commands sent to rustc when building
(equivalent to `--verbose` in cargo:
```
(hello {}).override { verbose = false; };
```
- Extra arguments to be passed to `rustc`:
```
(hello {}).override { extraRustcOpts = "-Z debuginfo=2"; };
```
- Phases, just like in any other derivation, can be specified using
the following attributes: `preUnpack`, `postUnpack`, `prePatch`,
`patches`, `postPatch`, `preConfigure` (in the case of a Rust crate,
this is run before calling the "build" script), `postConfigure`
(after the "build" script),`preBuild`, `postBuild`, `preInstall` and
`postInstall`. As an example, here is how to create a new module
before running the build script:
```
(hello {}).override {
preConfigure = ''
echo "pub const PATH=\"${hi.out}\";" >> src/path.rs"
'';
};
```
### Features
One can also supply features switches. For example, if we want to
compile `diesel_cli` only with the `postgres` feature, and no default
features, we would write:
```
(callPackage ./diesel.nix {}).diesel {
default = false;
postgres = true;
}
```
Where `diesel.nix` is the file generated by Carnix, as explained above.
## Setting Up `nix-shell`
Oftentimes you want to develop code from within `nix-shell`. Unfortunately
`buildRustCrate` does not support common `nix-shell` operations directly
(see [this issue](https://github.com/NixOS/nixpkgs/issues/37945))
so we will use `stdenv.mkDerivation` instead.
Using the example `hello` project above, we want to do the following:
- Have access to `cargo` and `rustc`
- Have the `openssl` library available to a crate through it's _normal_
compilation mechanism (`pkg-config`).
A typical `shell.nix` might look like:
```
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "rust-env";
nativeBuildInputs = [
rustc cargo
# Example Build-time Additional Dependencies
pkgconfig
];
buildInputs = [
# Example Run-time Additional Dependencies
openssl
];
# Set Environment Variables
RUST_BACKTRACE = 1;
}
```
You should now be able to run the following:
```
$ nix-shell --pure
$ cargo build
$ cargo test
```
### Controlling Rust Version Inside `nix-shell`
To control your rust version (i.e. use nightly) from within `shell.nix` (or
other nix expressions) you can use the following `shell.nix`
```
# Latest Nightly
with import <nixpkgs> {};
let src = fetchFromGitHub {
owner = "mozilla";
repo = "nixpkgs-mozilla";
# commit from: 2019-05-15
rev = "9f35c4b09fd44a77227e79ff0c1b4b6a69dff533";
sha256 = "18h0nvh55b5an4gmlgfbvwbyqj91bklf1zymis6lbdh75571qaz0";
};
in
with import "${src.out}/rust-overlay.nix" pkgs pkgs;
stdenv.mkDerivation {
name = "rust-env";
buildInputs = [
# Note: to use use stable, just replace `nightly` with `stable`
latest.rustChannels.nightly.rust
# Add some extra dependencies from `pkgs`
pkgconfig openssl
];
# Set Environment Variables
RUST_BACKTRACE = 1;
}
```
Now run:
```
$ rustc --version
rustc 1.26.0-nightly (188e693b3 2018-03-26)
```
To see that you are using nightly.
## Using the Rust nightlies overlay
Mozilla provides an overlay for nixpkgs to bring a nightly version of Rust into scope.
This overlay can _also_ be used to install recent unstable or stable versions
of Rust, if desired.
To use this overlay, clone
[nixpkgs-mozilla](https://github.com/mozilla/nixpkgs-mozilla),
and create a symbolic link to the file
[rust-overlay.nix](https://github.com/mozilla/nixpkgs-mozilla/blob/master/rust-overlay.nix)
in the `~/.config/nixpkgs/overlays` directory.
$ git clone https://github.com/mozilla/nixpkgs-mozilla.git
$ mkdir -p ~/.config/nixpkgs/overlays
$ ln -s $(pwd)/nixpkgs-mozilla/rust-overlay.nix ~/.config/nixpkgs/overlays/rust-overlay.nix
The latest version can be installed with the following command:
$ nix-env -Ai nixos.latest.rustChannels.stable.rust
Or using the attribute with nix-shell:
$ nix-shell -p nixos.latest.rustChannels.stable.rust
To install the beta or nightly channel, "stable" should be substituted by
"nightly" or "beta", or
use the function provided by this overlay to pull a version based on a
build date.
The overlay automatically updates itself as it uses the same source as
[rustup](https://www.rustup.rs/).

View File

@@ -1,36 +1,27 @@
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-language-texlive">
<title>TeX Live</title>
<para>
Since release 15.09 there is a new TeX Live packaging that lives entirely under attribute <varname>texlive</varname>.
</para>
<section xml:id="sec-language-texlive-users-guide">
<title>User's guide</title>
<title>TeX Live</title>
<para>Since release 15.09 there is a new TeX Live packaging that lives entirely under attribute <varname>texlive</varname>.</para>
<section><title>User's guide</title>
<itemizedlist>
<listitem>
<para>
For basic usage just pull <varname>texlive.combined.scheme-basic</varname> for an environment with basic LaTeX support.
</para>
</listitem>
<listitem>
<para>
It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this:
<programlisting>
<listitem><para>
For basic usage just pull <varname>texlive.combined.scheme-basic</varname> for an environment with basic LaTeX support.</para></listitem>
<listitem><para>
It typically won't work to use separately installed packages together.
Instead, you can build a custom set of packages like this:
<programlisting>
texlive.combine {
inherit (texlive) scheme-small collection-langkorean algorithms cm-super;
}
</programlisting>
There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
</para>
</listitem>
<listitem>
<para>
By default you only get executables and files needed during runtime, and a little documentation for the core packages. To change that, you need to add <varname>pkgFilter</varname> function to <varname>combine</varname>.
<programlisting>
</programlisting>
There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
</para></listitem>
<listitem><para>
By default you only get executables and files needed during runtime, and a little documentation for the core packages. To change that, you need to add <varname>pkgFilter</varname> function to <varname>combine</varname>.
<programlisting>
texlive.combine {
# inherit (texlive) whatever-you-want;
pkgFilter = pkg:
@@ -38,142 +29,31 @@ texlive.combine {
# elem tlType [ "run" "bin" "doc" "source" ]
# there are also other attributes: version, name
}
</programlisting>
</para>
</listitem>
<listitem>
<para>
You can list packages e.g. by <command>nix repl</command>.
<programlisting><![CDATA[
$ nix repl
nix-repl> :l <nixpkgs>
nix-repl> texlive.collection-<TAB>
]]></programlisting>
</para>
</listitem>
<listitem>
<para>
Note that the wrapper assumes that the result has a chance to be useful. For example, the core executables should be present, as well as some core data files. The supported way of ensuring this is by including some scheme, for example <varname>scheme-basic</varname>, into the combination.
</para>
</listitem>
</programlisting>
</para></listitem>
<listitem><para>
You can list packages e.g. by <command>nix-repl</command>.
<programlisting>
$ nix-repl
nix-repl> texlive.collection-&lt;TAB>
</programlisting>
</para></listitem>
</itemizedlist>
</section>
<section xml:id="sec-language-texlive-custom-packages">
<title>Custom packages</title>
<para>
You may find that you need to use an external TeX package. A derivation for such package has to provide contents of the "texmf" directory in its output and provide the <varname>tlType</varname> attribute. Here is a (very verbose) example:
<programlisting><![CDATA[
with import <nixpkgs> {};
let
foiltex_run = stdenvNoCC.mkDerivation {
pname = "latex-foiltex";
version = "2.1.4b";
passthru.tlType = "run";
srcs = [
(fetchurl {
url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.dtx";
sha256 = "07frz0krpz7kkcwlayrwrj2a2pixmv0icbngyw92srp9fp23cqpz";
})
(fetchurl {
url = "http://mirrors.ctan.org/macros/latex/contrib/foiltex/foiltex.ins";
sha256 = "09wkyidxk3n3zvqxfs61wlypmbhi1pxmjdi1kns9n2ky8ykbff99";
})
];
unpackPhase = ''
runHook preUnpack
for _src in $srcs; do
cp "$_src" $(stripHash "$_src")
done
runHook postUnpack
'';
nativeBuildInputs = [ texlive.combined.scheme-small ];
dontConfigure = true;
buildPhase = ''
runHook preBuild
# Generate the style files
latex foiltex.ins
runHook postBuild
'';
installPhase = ''
runHook preInstall
path="$out/tex/latex/foiltex"
mkdir -p "$path"
cp *.{cls,def,clo} "$path/"
runHook postInstall
'';
meta = with lib; {
description = "A LaTeX2e class for overhead transparencies";
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ veprbl ];
platforms = platforms.all;
};
};
foiltex = { pkgs = [ foiltex_run ]; };
latex_with_foiltex = texlive.combine {
inherit (texlive) scheme-small;
inherit foiltex;
};
in
runCommand "test.pdf" {
nativeBuildInputs = [ latex_with_foiltex ];
} ''
cat >test.tex <<EOF
\documentclass{foils}
\title{Presentation title}
\date{}
\begin{document}
\maketitle
\end{document}
EOF
pdflatex test.tex
cp test.pdf $out
''
]]></programlisting>
</para>
</section>
<section xml:id="sec-language-texlive-known-problems">
<title>Known problems</title>
<itemizedlist>
<listitem>
<para>
Some tools are still missing, e.g. luajittex;
</para>
</listitem>
<listitem>
<para>
some apps aren't packaged/tested yet (asymptote, biber, etc.);
</para>
</listitem>
<listitem>
<para>
feature/bug: when a package is rejected by <varname>pkgFilter</varname>, its dependencies are still propagated;
</para>
</listitem>
<listitem>
<para>
in case of any bugs or feature requests, file a github issue or better a pull request and /cc @vcunat.
</para>
</listitem>
</itemizedlist>
</section>
</section>
<section><title>Known problems</title>
<itemizedlist>
<listitem><para>
Some tools are still missing, e.g. luajittex;</para></listitem>
<listitem><para>
some apps aren't packaged/tested yet (asymptote, biber, etc.);</para></listitem>
<listitem><para>
feature/bug: when a package is rejected by <varname>pkgFilter</varname>, its dependencies are still propagated;</para></listitem>
<listitem><para>
in case of any bugs or feature requests, file a github issue or better a pull request and /cc @vcunat.</para></listitem>
</itemizedlist>
</section>
</section>

View File

@@ -1,115 +0,0 @@
---
title: Titanium
author: Sander van der Burg
date: 2018-11-18
---
# Titanium
The Nixpkgs repository contains facilities to deploy a variety of versions of
the [Titanium SDK](https://www.appcelerator.com) versions, a cross-platform
mobile app development framework using JavaScript as an implementation language,
and includes a function abstraction making it possible to build Titanium
applications for Android and iOS devices from source code.
Not all Titanium features supported -- currently, it can only be used to build
Android and iOS apps.
Building a Titanium app
-----------------------
We can build a Titanium app from source for Android or iOS and for debugging or
release purposes by invoking the `titaniumenv.buildApp {}` function:
```nix
titaniumenv.buildApp {
name = "myapp";
src = ./myappsource;
preBuild = "";
target = "android"; # or 'iphone'
tiVersion = "7.1.0.GA";
release = true;
androidsdkArgs = {
platformVersions = [ "25" "26" ];
};
androidKeyStore = ./keystore;
androidKeyAlias = "myfirstapp";
androidKeyStorePassword = "secret";
xcodeBaseDir = "/Applications/Xcode.app";
xcodewrapperArgs = {
version = "9.3";
};
iosMobileProvisioningProfile = ./myprovisioning.profile;
iosCertificateName = "My Company";
iosCertificate = ./mycertificate.p12;
iosCertificatePassword = "secret";
iosVersion = "11.3";
iosBuildStore = false;
enableWirelessDistribution = true;
installURL = "/installipa.php";
}
```
The `titaniumenv.buildApp {}` function takes the following parameters:
* The `name` parameter refers to the name in the Nix store.
* The `src` parameter refers to the source code location of the app that needs
to be built.
* `preRebuild` contains optional build instructions that are carried out before
the build starts.
* `target` indicates for which device the app must be built. Currently only
'android' and 'iphone' (for iOS) are supported.
* `tiVersion` can be used to optionally override the requested Titanium version
in `tiapp.xml`. If not specified, it will use the version in `tiapp.xml`.
* `release` should be set to true when building an app for submission to the
Google Playstore or Apple Appstore. Otherwise, it should be false.
When the `target` has been set to `android`, we can configure the following
parameters:
* The `androidSdkArgs` parameter refers to an attribute set that propagates all
parameters to the `androidenv.composeAndroidPackages {}` function. This can
be used to install all relevant Android plugins that may be needed to perform
the Android build. If no parameters are given, it will deploy the platform
SDKs for API-levels 25 and 26 by default.
When the `release` parameter has been set to true, you need to provide
parameters to sign the app:
* `androidKeyStore` is the path to the keystore file
* `androidKeyAlias` is the key alias
* `androidKeyStorePassword` refers to the password to open the keystore file.
When the `target` has been set to `iphone`, we can configure the following
parameters:
* The `xcodeBaseDir` parameter refers to the location where Xcode has been
installed. When none value is given, the above value is the default.
* The `xcodewrapperArgs` parameter passes arbitrary parameters to the
`xcodeenv.composeXcodeWrapper {}` function. This can, for example, be used
to adjust the default version of Xcode.
When `release` has been set to true, you also need to provide the following
parameters:
* `iosMobileProvisioningProfile` refers to a mobile provisioning profile needed
for signing.
* `iosCertificateName` refers to the company name in the P12 certificate.
* `iosCertificate` refers to the path to the P12 file.
* `iosCertificatePassword` contains the password to open the P12 file.
* `iosVersion` refers to the iOS SDK version to use. It defaults to the latest
version.
* `iosBuildStore` should be set to `true` when building for the Apple Appstore
submission. For enterprise or ad-hoc builds it should be set to `false`.
When `enableWirelessDistribution` has been enabled, you must also provide the
path of the PHP script (`installURL`) (that is included with the iOS build
environment) to enable wireless ad-hoc installations.
Emulating or simulating the app
-------------------------------
It is also possible to simulate the correspond iOS simulator build by using
`xcodeenv.simulateApp {}` and emulate an Android APK by using
`androidenv.emulateApp {}`.

View File

@@ -1,277 +0,0 @@
---
title: User's Guide for Vim in Nixpkgs
author: Marc Weber
date: 2016-06-25
---
# Vim
Both Neovim and Vim can be configured to include your favorite plugins
and additional libraries.
Loading can be deferred; see examples.
At the moment we support three different methods for managing plugins:
- Vim packages (*recommend*)
- VAM (=vim-addon-manager)
- Pathogen
- vim-plug
## Custom configuration
Adding custom .vimrc lines can be done using the following code:
```nix
vim_configurable.customize {
# `name` specifies the name of the executable and package
name = "vim-with-plugins";
vimrcConfig.customRC = ''
set hidden
'';
}
```
This configuration is used when Vim is invoked with the command specified as name, in this case `vim-with-plugins`.
For Neovim the `configure` argument can be overridden to achieve the same:
```nix
neovim.override {
configure = {
customRC = ''
# here your custom configuration goes!
'';
};
}
```
If you want to use `neovim-qt` as a graphical editor, you can configure it by overriding Neovim in an overlay
or passing it an overridden Neovimn:
```nix
neovim-qt.override {
neovim = neovim.override {
configure = {
customRC = ''
# your custom configuration
'';
};
};
}
```
## Managing plugins with Vim packages
To store you plugins in Vim packages (the native Vim plugin manager, see `:help packages`) the following example can be used:
```nix
vim_configurable.customize {
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
start = [ youcompleteme fugitive ];
# manually loadable by calling `:packadd $plugin-name`
# however, if a Vim plugin has a dependency that is not explicitly listed in
# opt that dependency will always be added to start to avoid confusion.
opt = [ phpCompletion elm-vim ];
# To automatically load a plugin when opening a filetype, add vimrc lines like:
# autocmd FileType php :packadd phpCompletion
};
}
```
`myVimPackage` is an arbitrary name for the generated package. You can choose any name you like.
For Neovim the syntax is:
```nix
neovim.override {
configure = {
customRC = ''
# here your custom configuration goes!
'';
packages.myVimPackage = with pkgs.vimPlugins; {
# see examples below how to use custom packages
start = [ ];
# If a Vim plugin has a dependency that is not explicitly listed in
# opt that dependency will always be added to start to avoid confusion.
opt = [ ];
};
};
}
```
The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.nix` to make it installable:
```nix
{
packageOverrides = pkgs: with pkgs; {
myVim = vim_configurable.customize {
# `name` specifies the name of the executable and package
name = "vim-with-plugins";
# add here code from the example section
};
myNeovim = neovim.override {
configure = {
# add here code from the example section
};
};
};
}
```
After that you can install your special grafted `myVim` or `myNeovim` packages.
## Managing plugins with vim-plug
To use [vim-plug](https://github.com/junegunn/vim-plug) to manage your Vim
plugins the following example can be used:
```nix
vim_configurable.customize {
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
# loaded on launch
plug.plugins = [ youcompleteme fugitive phpCompletion elm-vim ];
};
}
```
For Neovim the syntax is:
```nix
neovim.override {
configure = {
customRC = ''
# here your custom configuration goes!
'';
plug.plugins = with pkgs.vimPlugins; [
vim-go
];
};
}
```
## Managing plugins with VAM
### Handling dependencies of Vim plugins
VAM introduced .json files supporting dependencies without versioning
assuming that "using latest version" is ok most of the time.
### Example
First create a vim-scripts file having one plugin name per line. Example:
```
"tlib"
{'name': 'vim-addon-sql'}
{'filetype_regex': '\%(vim)$', 'names': ['reload', 'vim-dev-plugin']}
```
Such vim-scripts file can be read by VAM as well like this:
```vim
call vam#Scripts(expand('~/.vim-scripts'), {})
```
Create a default.nix file:
```nix
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc7102" }:
nixpkgs.vim_configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; }
```
Create a generate.vim file:
```vim
ActivateAddons vim-addon-vim2nix
let vim_scripts = "vim-scripts"
call nix#ExportPluginsForNix({
\ 'path_to_nixpkgs': eval('{"'.substitute(substitute(substitute($NIX_PATH, ':', ',', 'g'), '=',':', 'g'), '\([:,]\)', '"\1"',"g").'"}')["nixpkgs"],
\ 'cache_file': '/tmp/vim2nix-cache',
\ 'try_catch': 0,
\ 'plugin_dictionaries': ["vim-addon-manager"]+map(readfile(vim_scripts), 'eval(v:val)')
\ })
```
Then run
```bash
nix-shell -p vimUtils.vim_with_vim2nix --command "vim -c 'source generate.vim'"
```
You should get a Vim buffer with the nix derivations (output1) and vam.pluginDictionaries (output2).
You can add your Vim to your system's configuration file like this and start it by "vim-my":
```
my-vim =
let plugins = let inherit (vimUtils) buildVimPluginFrom2Nix; in {
copy paste output1 here
}; in vim_configurable.customize {
name = "vim-my";
vimrcConfig.vam.knownPlugins = plugins; # optional
vimrcConfig.vam.pluginDictionaries = [
copy paste output2 here
];
# Pathogen would be
# vimrcConfig.pathogen.knownPlugins = plugins; # plugins
# vimrcConfig.pathogen.pluginNames = ["tlib"];
};
```
Sample output1:
```
"reload" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "reload";
src = fetchgit {
url = "git://github.com/xolox/vim-reload";
rev = "0a601a668727f5b675cb1ddc19f6861f3f7ab9e1";
sha256 = "0vb832l9yxj919f5hfg6qj6bn9ni57gnjd3bj7zpq7d4iv2s4wdh";
};
dependencies = ["nim-misc"];
};
[...]
```
Sample output2:
```nix
[
''vim-addon-manager''
''tlib''
{ "name" = ''vim-addon-sql''; }
{ "filetype_regex" = ''\%(vim)$$''; "names" = [ ''reload'' ''vim-dev-plugin'' ]; }
]
```
## Adding new plugins to nixpkgs
Nix expressions for Vim plugins are stored in [pkgs/misc/vim-plugins](/pkgs/misc/vim-plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](/pkgs/misc/vim-plugins/update.py). This creates a [generated.nix](/pkgs/misc/vim-plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
Some plugins require overrides in order to function properly. Overrides are placed in [overrides.nix](/pkgs/misc/vim-plugins/overrides.nix). Overrides are most often required when a plugin requires some dependencies, or extra steps are required during the build process. For example `deoplete-fish` requires both `deoplete-nvim` and `vim-fish`, and so the following override was added:
```
deoplete-fish = super.deoplete-fish.overrideAttrs(old: {
dependencies = with super; [ deoplete-nvim vim-fish ];
});
```
Sometimes plugins require an override that must be changed when the plugin is updated. This can cause issues when Vim plugins are auto-updated but the associated override isn't updated. For these plugins, the override should be written so that it specifies all information required to install the plugin, and running `./update.py` doesn't change the derivation for the plugin. Manually updating the override is required to update these types of plugins. An example of such a plugin is `LanguageClient-neovim`.
To add a new plugin:
1. run `./update.py` and create a commit named "vimPlugins: Update",
2. add the new plugin to [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names) and add overrides if required to [overrides.nix](/pkgs/misc/vim-plugins/overrides.nix),
3. run `./update.py` again and create a commit named "vimPlugins.[name]: init at [version]" (where `name` and `version` can be found in [generated.nix](/pkgs/misc/vim-plugins/generated.nix)), and
4. create a pull request.
## Important repositories
- [vim-pi](https://bitbucket.org/vimcommunity/vim-pi) is a plugin repository
from VAM plugin manager meant to be used by others as well used by
- [vim2nix](https://github.com/MarcWeber/vim-addon-vim2nix) which generates the
.nix code

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