Compare commits

..

849 Commits
diff ... 17.03

Author SHA1 Message Date
Robin Gloster
1849e695b0 Release Notes 17.03: add some visual structure 2017-03-30 18:32:09 +02:00
Robin Gloster
e005c15647 qt-gstreamer: fix build and do not mark wrong pkgs as broken
(cherry picked from commit f9a1060199)
2017-03-30 18:32:09 +02:00
Robin Gloster
47d758081e docs: 16.09 -> 17.03
(cherry picked from commit 80c916b6ce)
2017-03-30 18:32:08 +02:00
Robin Gloster
569d45d060 Release Notes 17.03: update 2017-03-30 18:32:08 +02:00
Michal Rus
23fdea4c73 bitlbee-facebook: 2015-08-27 → 1.1.0
(cherry picked from commit 2cef2c58ea)

backported because not functional due protocol changes: https://github.com/NixOS/nixpkgs/pull/24454#issue-218024169
2017-03-30 18:08:02 +02:00
Robin Gloster
d94e3739bb wxmupen64plus: fix eval
(cherry picked from commit f0512f4ceb)
2017-03-30 17:37:59 +02:00
Robin Gloster
ef1801048a zeroad: do not build on i686
(cherry picked from commit 520ce40bb3)
2017-03-30 16:25:00 +02:00
Robin Gloster
e369cb866c wxmupen64plus: mark as broken
(cherry picked from commit 5c04b32b6c)
2017-03-30 16:24:59 +02:00
Robin Gloster
15b9666d7d vimiv: mark as broken
cc @aszlig

(cherry picked from commit 62303628ce)
2017-03-30 16:24:59 +02:00
Robin Gloster
9a0751c519 ultrastardx: mark as broken
(cherry picked from commit c38d6b493e)
2017-03-30 16:24:59 +02:00
Robin Gloster
608f739334 telepathy_rakia: remove
(cherry picked from commit 9330991a37)
2017-03-30 16:24:58 +02:00
Robin Gloster
956bf9832d tclgpg: remove
(cherry picked from commit 4a702e8b74)
2017-03-30 16:24:58 +02:00
Robin Gloster
22214577c9 tkabber: remove
(cherry picked from commit 8e3a595eb1)
2017-03-30 16:24:58 +02:00
Robin Gloster
63541f6a90 rustc: don't build on i686
(cherry picked from commit 9f86136cef)
2017-03-30 16:24:57 +02:00
Robin Gloster
f7dc710f23 qt-gstreamer: fix build
(cherry picked from commit c47cc7e163)
2017-03-30 16:24:57 +02:00
Robin Gloster
530a293559 nix-exec: fix build
(cherry picked from commit 84db2dffe9)
2017-03-30 16:24:57 +02:00
Robin Gloster
28f1a2e8e4 ncbi_tools: mark as broken and remove -fPIC
PIC is used by default since 16.09

(cherry picked from commit b9948fedc6)
2017-03-30 16:24:56 +02:00
Robin Gloster
d4e72d4809 murmur_git: mark as broken
(cherry picked from commit 9b89d68ef0)
2017-03-30 16:24:56 +02:00
Robin Gloster
d5569e7cb1 maxima-ecl: mark as broken
(cherry picked from commit 13ab07d95a)
2017-03-30 16:24:56 +02:00
Robin Gloster
cf4c7fa932 libsingular: does not build on i686
(cherry picked from commit 536b782450)
2017-03-30 16:24:56 +02:00
Robin Gloster
a7d95c8eb1 freestyle: mark as broken
(cherry picked from commit cc82423366)
2017-03-30 16:24:55 +02:00
Robin Gloster
f8d7f40a67 boomerang: mark as broken
(cherry picked from commit 877aaeff61)
2017-03-30 16:24:55 +02:00
Robin Gloster
1327728a75 quagga service: disable
(cherry picked from commit 8a18e1f7f1)
2017-03-30 16:24:55 +02:00
Robin Gloster
34f34f1e17 panomatic: remove
(cherry picked from commit ce953d0bc9)
2017-03-30 16:24:54 +02:00
Joachim Fasting
fb614a239a aliceml: mark as broken
Tried fixing it, but gave up ... Has likely been non-functional for a
while, without anybody noticing.

(cherry picked from commit ad902fbba1)
2017-03-30 14:18:25 +02:00
Joachim Fasting
10528867bd rl-notes 17.03: notes about changes to torbrowser user state 2017-03-30 14:18:18 +02:00
Joachim Fasting
9d3ef695da nixos/dnscrypt-proxy test: exercise plugin loading
(cherry picked from commit 543f5263d2)
2017-03-30 13:36:43 +02:00
Joachim Fasting
9613677176 rl-notes 17.03: add notes about changes to the dnscrypt-proxy interface 2017-03-30 13:30:01 +02:00
Joachim Fasting
e72a0a36b8 nixos/dnscrypt-proxy: remove the resolverList option
This option was initially added to make it easier to use an
up-to-date list, but now that we always use an up-to-date list
from upstream, there's no point to the option.

From now on, you can either use a resolver listed by dnscrypt
upstream or a custom resolver.

(cherry picked from commit 472002f216)
2017-03-30 13:29:58 +02:00
Joachim Fasting
f1f6c70411 nixos/dnscrypt-proxy: add example of how to use the cache plugin
(cherry picked from commit 540740598e)
2017-03-30 13:29:57 +02:00
Joachim Fasting
57621032b1 nixos/dnscrypt-proxy: replace unimportant options with extraArgs
Removes tcpOnly and ephemeralKeys: reifying them as nixos
options adds little beyond improved discoverability.  Until
17.09 we'll automatically translate these options into extraArgs
for convenience.

Unless reifying an option is necessary for conditional
computation or greatly simplifies configuration/reduces risk of
misconfiguration, it should go into extraArgs instead.

(cherry picked from commit 719813caf6)
2017-03-30 13:29:56 +02:00
Joachim Fasting
4bce01f198 nixos/dnscrypt-proxy: grant daemon access to load plugins
(cherry picked from commit bb6361b81a)
2017-03-30 13:29:55 +02:00
Joachim Fasting
e8515db770 nixos/dnscrypt-proxy docs: reword section on forwarding
Newer versions of DNSCrypt proxy *can* cache lookups (via
plugin); make the wording more neutral wrt. why one might want
to run the proxy in a forwarding setup.

(cherry picked from commit 5279ec111f)
2017-03-30 13:29:50 +02:00
Robin Gloster
30581300d7 sitecopy: remove
(cherry picked from commit a79891f6b2)
2017-03-30 12:08:38 +02:00
Robin Gloster
915863eeb8 sage: mark as broken
(cherry picked from commit f87de53883)
2017-03-30 12:08:37 +02:00
Robin Gloster
7dd7bd45b2 jclasslib: remove
(cherry picked from commit 2b7128808d)
2017-03-30 12:08:37 +02:00
Robin Gloster
5614ef4ff2 hawkthorne: mark as broken
(cherry picked from commit b5ad5c3d80)
2017-03-30 12:08:37 +02:00
Peter Hoeg
4d6c02daee gcalcli: fix notifications on linux
Couple of things:

 - fix the path to notify-send
 - add a standard icon to the notification
 - rename the notification from "gcalcli" to "Calendar"

Lastly, there are no tests, so do not try to run them.

(cherry picked from commit f67ec45de6)
2017-03-30 12:08:37 +02:00
Vasiliy Solovey
335c15e1bc webstorm: 2016.3.3 -> 2017.1
(cherry picked from commit 97941b54f9)
2017-03-30 12:08:36 +02:00
Aleksey Zhukov
202cc67311 pycharm-professional: 2016.3.2 -> 2017.1
(cherry picked from commit 43dc7604c1)
2017-03-30 12:08:36 +02:00
Aleksey Zhukov
867267989e pycharm-community: 2016.3.2 -> 2017.1
(cherry picked from commit 5030fafdee)
2017-03-30 12:08:36 +02:00
NWDD
c15756b2bb add xnwdd <Guillermo NWDD> as a maintainer
(cherry picked from commit 0f72dee000)
2017-03-30 00:16:02 -04:00
Robin Gloster
6e0cd0281f guileLint: mark as broken 2017-03-30 01:17:47 +02:00
Robin Gloster
a3a984d2cc rXrs: mark as broken (X ∈ {3, 4, 5}) 2017-03-29 23:00:09 +02:00
Eelco Dolstra
1447e55906 update-users-groups.pl: Keep track of deallocated UIDs/GIDs
When a user or group is revived, this allows it to be allocated the
UID/GID it had before.

A consequence is that UIDs and GIDs are no longer reused.

Fixes #24010.

(cherry picked from commit a57bcd38b4)
2017-03-29 20:36:52 +02:00
Frederik Rietdijk
f164d27053 spotify: unbreak
after the upgrade in 3c090f0e5a

(cherry picked from commit ffd29517dd)
2017-03-29 18:05:24 +02:00
Dan Peebles
e38604916e libuv: disable tests (temporarily) on Darwin
They're flaky, break Hydra builds regularly, and lots of stuff depends
transitively on libuv.
(cherry picked from commit 15a1743d87)
2017-03-29 15:06:17 +00:00
Rob Vermaas
f79be2cfa3 dd-agent: fix by adding uptime as dependency. 2017-03-29 14:55:26 +00:00
Thomas Tuegel
d477193029 dropbox: patch all files in output
(cherry picked from commit 97518649fb)
2017-03-29 07:41:09 -05:00
Thomas Tuegel
bf66a181fe dropbox: leave RPATH-shrinking to patchelf setup hook
(cherry picked from commit 2e591bac0d)
2017-03-29 07:41:02 -05:00
Thomas Tuegel
152c9ed87f dropbox: set INTERP for some DYN objects
(cherry picked from commit 096c72e255)
2017-03-29 07:40:55 -05:00
Thomas Tuegel
a2dc26262c dropbox: remove more useless vendored libraries
(cherry picked from commit c076b9326f)
2017-03-29 07:40:46 -05:00
Thomas Tuegel
65d994fd06 dropbox: wrap as any other Qt application
(cherry picked from commit 3c96a53608)
2017-03-29 07:40:36 -05:00
Thomas Tuegel
2afbc4e014 Revert "dropbox: use vendored Qt 5 libraries"
This reverts commit 9125bab708.

The vendored libraries have a problem with xkbcommon.

(cherry picked from commit 1d8d6d564d)
2017-03-29 07:40:20 -05:00
Frederik Rietdijk
474273d860 pythonPackages.pyudev: fix package
- the function loading the udev library was moved to another file
- the test runner did not work correctly, causing it to fail on Python
3.
- the test runner now works correctly, but there's a bunch of tests
failing and therefore tests are disabled. The package does seem to
function (as in, it can load the library again).

(cherry picked from commit 078412521e)
2017-03-29 08:37:27 +02:00
Joachim Fasting
f7a4b7ea49 pythonPackages.pyudev: 0.20.0 -> 0.21.0
Also move expression

(cherry picked from commit 61edb1cb2e)
2017-03-29 08:37:19 +02:00
Marius Bakke
035534973b pythonPackages.pyudev: 0.16.1 -> 0.20.0
(cherry picked from commit 3051dafeb6)
2017-03-29 08:37:08 +02:00
Joachim Fasting
3d37289023 torbrowser: support obfs and fte transports
meek still broken, but then, sending all your traffic to Amazon seems like
something you'd do only if everything else fails.

(cherry picked from commit 6911ae7c0c)
2017-03-29 00:02:44 +02:00
Joachim Fasting
2c310a86ca torbrowser: hard-code path to wrapper in desktop file
(cherry picked from commit f2cf8ffdcb)
2017-03-29 00:02:41 +02:00
Joachim Fasting
e0e237ebaa torbrowser: correct internal note about geoip
(cherry picked from commit 2ad44935f1)
2017-03-29 00:02:40 +02:00
Joachim Fasting
6dd0750423 torbrowser: reduce risk of stale Nix store references
This patch restructures the expression and wrapper to minimize Nix store
references captured by the user's state directory.

The previous version would write lots of references to the Nix store into
the user's state directory, resulting in synchronization issues between
the Store and the local state directory.  At best, this would cause TBB to
stop working when the version used to instantiate the local state was
garbage collected; at worst, a user would continue to use the old version
even after an upgrade.

To solve the issue, hard-code as much as possible at the Store side and
minimize the amount of stuff being copied into the local state dir.
Currently, only a few files generated at firefox startup and fontconfig
cache files end up capturing store paths; these files are simply removed
upon every startup.  Otherwise, no capture should occur and the user
should always be using the TBB associated with the tor-browser wrapper
script.

To check for stale Store paths, do
   `grep -Ero '/nix/store/[^/]+' ~/.local/share/tor-browser`
This command should *never* return any other store path than the one
associated with the current tor-browser wrapper script, even after an
update (assuming you've run tor-browser at least once after updating).
Deviations from this general rule are considered bugs from now on.

Note that no attempt has been made to support pluggable transports; they
are still broken with this patch (to be fixed in a follow-up patch).

User visible changes:
- Wrapper retains only environment variables required for TBB to work
- pulseaudioSupport can be toggled independently of mediaSupport (the
  latter weakly implies the former).
- Store local state under $TBB_HOME.  Defaults to $XDG_DATA_HOME/tor-browser
- Stop obnoxious first-run stuff (NoScript redirect, in particular)
- Set desktop item GenericName to Web Browser

Some minor enhancements:
- Disable Hydra builds
- Specify system -> source mapping to make it easier to
  extend supported platforms.

(cherry picked from commit ecd0e1a2c7)
2017-03-29 00:02:39 +02:00
Joachim Fasting
ed44bb70ec torbrowser: callPackage can fill in missing params from xorg
(cherry picked from commit 116953ffc9)
2017-03-29 00:02:38 +02:00
Joachim Fasting
6e04800f25 surf-webkit2: 2017-03-06 -> 2017-03-22
Fixes a race condition

(cherry picked from commit 101cb04b6a)
2017-03-29 00:02:37 +02:00
Joachim Fasting
a26c5e5c43 surf-webkit2: init at 2017-03-06
(cherry picked from commit 69ce1ed526)
2017-03-29 00:02:36 +02:00
Joachim Fasting
de5d4dc147 rl-notes 17.03: add note about pre-NSS dnscrypt-proxy 2017-03-29 00:02:35 +02:00
Joachim Fasting
4030549d01 nixos/dnscrypt-proxy: log resolver list verification failure
Otherwise, the service unit just fails for no discernable
reason.  Verifcation failure is bad so it ought to be easily
discoverable.

(cherry picked from commit f122f0147b)
2017-03-29 00:02:34 +02:00
Joachim Fasting
7e4d99d7da nixos/dnscrypt-proxy: get resolver list from github
The list has disappeared from its ordinary location at
download.dnscrypt.org.

(cherry picked from commit de15e7894b)
2017-03-29 00:02:29 +02:00
Franz Pletz
743dbcc888 jool: 3.5.2 -> 3.5.3
(cherry picked from commit c4b2f9f784)
2017-03-28 20:14:55 +02:00
Franz Pletz
7082b7da86 libvirt packages: fix & clean up dependencies
(cherry picked from commit 0018cd5a2d)
2017-03-28 19:48:21 +02:00
Volth
3500a892b5 virt-viewer: 2.0 -> 5.0
(cherry picked from commit d4294265fd)
2017-03-28 19:48:21 +02:00
Domen Kožar
7dcd3c471f Merge branch 'staging-17.03' into release-17.03 2017-03-28 16:06:57 +02:00
Rob Vermaas
e4b09922cf nixUnstable: update to 1.12pre5122_c60715e
(cherry picked from commit 4da11d7c9b)
2017-03-28 11:32:07 +00:00
Kosyrev Serge
38b2e27c15 virtualbox: a more maintenance-free way of patching refs to dlopen()-affected dependencies
(cherry picked from commit 0c3138e602)
2017-03-28 01:32:31 +03:00
Nikolay Amiantov
1ad1fa4547 virtualbox: wrap with Qt dependencies
Fixes GTK file open dialogs. Also make sure that linked applications really
exist, and update their list.

(cherry picked from commit 52451067c7)
2017-03-28 00:30:30 +03:00
Daiderd Jordan
c59b7f8194 Merge pull request #24303 from ljli/emacs-mac
emacsMacport: name change and description
(cherry picked from commit c476cc3c3d)
2017-03-27 22:09:21 +02:00
Vladimír Čunát
1731c07ffb treewide: purge maintainers.urkud
It's sad, but he's been inactive for the last five years.
Keeping such people in meta.maintainers is counter-productive.

(cherry picked from commit 96d41e393d)
There were just a few trivial conflicts.
2017-03-27 19:55:01 +02:00
Domen Kožar
83492ec47e Nix, Hydra: bump to 2017-03-21 2017-03-27 18:21:03 +02:00
Nikolay Amiantov
ab0b179da4 buildDotnetPackage: don't depend on invalid quoting in makeWrapper
Fixes #24387.

(cherry picked from commit 50adc53207)
2017-03-27 17:26:52 +02:00
Robin Gloster
3a00742421 Revert "Revert "gdm module: only make xserver args overrideable""
This reverts commit 4e57e7f7c6.

This actually broke gnome3 and didn't fix anything, I failed bisecting.

(cherry picked from commit d1228f95e9)
2017-03-27 17:21:32 +02:00
Franz Pletz
0d3b0920a9 libvirt: 3.0.0 -> 3.1.0
Missing in 1cca97cf18.

(cherry picked from commit d8dd2fb9e5)
2017-03-27 17:09:31 +02:00
Eelco Dolstra
05a2866f2d systemd: Include https://github.com/NixOS/systemd/pull/8
(cherry picked from commit 6ef630a125)
2017-03-27 15:39:51 +02:00
Benjamin Staffin
21c69b132c dropbox-cli: include dropbox icon (#24368)
(cherry picked from commit 6c116b86eb)
2017-03-27 12:31:11 +02:00
Jiri Danek
86e363d11e idea-community: 2016.3.5 -> 2017.1
(cherry picked from commit da13619591)
2017-03-27 12:31:09 +02:00
Maximilian Bosch
9628a71e8c idea.phpstorm: 2016.3.2 -> 2017.1
(cherry picked from commit bde3acbd2a)
2017-03-27 12:30:40 +02:00
Franz Pletz
fc77d48fd6 libvirt: make guest suspend work, use upstream units
(cherry picked from commit d545772640)
2017-03-27 12:30:39 +02:00
Franz Pletz
a3406d19f6 libvirt: build with attr and apparmor
(cherry picked from commit ddb608814a)
2017-03-27 12:30:39 +02:00
Franz Pletz
0d0d419eeb virt-manager: needs file for building translations
(cherry picked from commit 160fd7231e)
2017-03-27 12:30:39 +02:00
Volth
c0bc736733 libvirt: 3.0.0 -> 3.1.0
(cherry picked from commit 1cca97cf18)
2017-03-27 12:30:38 +02:00
aszlig
d3ef98182d nixos/tests/virtualbox: Fix @shell@ expansion
This has surfaced since f803270b7e.

The commit bumped bash to version 4.4, which caused to change the order
of --subst-var flags in substituteAll, which this test was relying on,
because it added a @shell@ to boot.initrd.postMountCommands.

Our substituter is currently working a bit like this:

original.replace('@var1@', 'val1').replace('@var2@', 'val2')...

Unfortunately, this means that if @var2@ occurs within @var1@ it is
replaced by the new value, so the order of the substvars actually
matter. I highly doubt that we want a behaviour like this and I'm
wondering why it didn't occur to me as a problem while writing the
initial implementation of the VirtualBox tests.

Whether to get rid of this and disallowing substitution of substvars
within substvars is another topic which I think needs discussion in a
different place.

As for now, I'm using stdenv.shell, because the closure size of this
should fit within the initrd, so it's fine especially because it's just
a test.

Tested with the net-hostonlyif and systemd-detect-virt tests and they
both succeed with this change.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Reported-by: @globin on IRC
(cherry picked from commit ee39d4b98a)
2017-03-27 12:29:08 +02:00
Tim Steinbach
3108fdf75f linux: 4.11-rc3 -> 4.11-rc4
(cherry picked from commit 310bb3e6bb)
2017-03-27 12:28:57 +02:00
Joachim Fasting
4d3929019c grsecurity: 4.9.17-201703221829 -> 4.9.18-201703261106
(cherry picked from commit 5fe81c1bdb)
2017-03-27 12:28:39 +02:00
c74d
8d45eda4a2 google-compute-image: fix Yama LSM option conflict
Having fixed the Google Compute Engine image build process's copying
of store paths in PR #24264, I ran `nixos-rebuild --upgrade switch`...
and the GCE image broke again, because it sets the NixOS configuration
option for the sysctl variable `kernel.yama.ptrace_scope` to
`mkDefault "1"`, i.e., with override priority 1000, and now the
`sysctl` module sets the same option to `mkDefault "0"` (this was
changed in commit 86721a5f78).

This patch raises the override priority of the Google Compute Engine
image configuration's definition of the Yama sysctl option to 500
(still lower than the priority of an unmodified option definition).

I have tested that this patch allows the Google Compute Engine image
to again build successfully for me.

(cherry picked from commit a4ac5506f5)
2017-03-27 12:28:27 +02:00
Arnold Krille
2bd74c578e network-interfaces: reload bridges on conf changes
And adopt the tests to add an interface and remove it again.

It should work when deactivating rstp, it will not work when activating
rstp for the first bridge as then the userspace daemon is not yet
available. But once one bridge is active with stp, it should work with
the reload for any further bridge.

Fixes #21745. Also see #22547.

(cherry picked from commit 68729958e8)
2017-03-27 12:27:40 +02:00
Lancelot SIX
099a2917b0 pythonPackages.django: 1.10.5 -> 1.10.6
This is a bugfix release.

(cherry picked from commit d284e37a59)
2017-03-27 10:02:53 +02:00
Thomas Tuegel
1d3e218c5c dropbox: 21.4.25 -> 22.4.24
(cherry picked from commit 84b768456a)
2017-03-26 13:17:54 -05:00
Robin Gloster
b1e7e94fd7 pcre2: 10.22 -> 10.23 + security fix
CVE-2017-7186

refs nixos/security#57 #24319

(cherry picked from commit 0aaa77eca2d52865e81f30602ae5bd6108835ebb)
2017-03-26 17:13:13 +02:00
Robin Gloster
90dee08531 pcre: 8.39 -> 8.40 + security fix
CVE-2017-7186

refs nixos/security#57 #24319

(cherry picked from commit 6b9c81aa18)
2017-03-26 16:42:10 +02:00
Thomas Tuegel
7674887ed5 Merge branch 'release-17.03--drop-qt-5.7' into release-17.03 2017-03-26 09:36:08 -05:00
Thomas Tuegel
83237d0ef3 dropbox: use vendored Qt 5 libraries 2017-03-26 09:34:11 -05:00
Thomas Tuegel
6e86883688 rapcad: mark broken with Qt 5.6 2017-03-26 09:34:03 -05:00
Thomas Tuegel
75d8638f79 Remove zoom-us
This package needs maintenance, but has no maintainer: proprietary Qt-based
packages should use the vendor-provided Qt libraries.
2017-03-26 09:23:01 -05:00
Thomas Tuegel
21c09cca98 Remove Qt 5.5
The community support window for Qt 5.5 has ended. All packages should

- update to Qt 5.8, or
- pin to Qt 5.6 (the 3-year long-term support release), or
- for proprietary software, use the vendored libraries.
2017-03-26 09:23:01 -05:00
Thomas Tuegel
34f7fed023 openshot-qt: correct packaging errors and pin to Qt 5.6 2017-03-26 09:22:49 -05:00
Thomas Tuegel
7840d2fb79 supercollider: pin to Qt 5.6 2017-03-26 09:22:49 -05:00
Thomas Tuegel
acc9ee33ad zoom-us: pin to Qt 5.6 2017-03-26 09:22:48 -05:00
Thomas Tuegel
754eee12c0 redis-desktop-manager: pin to Qt 5.6 2017-03-26 09:22:48 -05:00
Thomas Tuegel
469668b560 trojita: pin to Qt 5.6 2017-03-26 09:22:48 -05:00
Thomas Tuegel
9725174fd9 teamspeak_client: pin to Qt 5.6 2017-03-26 09:22:48 -05:00
Thomas Tuegel
ef89c4f132 ricochet: pin to Qt 5.6 2017-03-26 09:22:48 -05:00
Thomas Tuegel
867bb060de rapcad: broken on Qt 5.6 2017-03-26 09:22:47 -05:00
Thomas Tuegel
2e4e63df71 qgroundcontrol: broken on Qt 5.6 2017-03-26 09:22:47 -05:00
Thomas Tuegel
5392c0f612 notepadqq: correct packaging errors and pin to Qt 5.6 2017-03-26 09:22:47 -05:00
Thomas Tuegel
4d4511d769 smtube: pin to Qt 5.6 2017-03-26 09:22:47 -05:00
Thomas Tuegel
78ca07180e musescore: broken with Qt 5.6 2017-03-26 09:22:47 -05:00
Thomas Tuegel
ee1f473424 mumble: pin to Qt 5.6 2017-03-26 09:22:11 -05:00
Thomas Tuegel
b53e833660 luminanceHDR: pin to Qt 5.6 2017-03-26 09:22:11 -05:00
Thomas Tuegel
8e9b6e7c44 goldendict: pin to Qt 5.6 2017-03-26 09:22:11 -05:00
Thomas Tuegel
5f34c8f260 cutegram: broken with Qt 5.6 2017-03-26 09:22:11 -05:00
Thomas Tuegel
2a3cc28b6c sigil: pin to Qt 5.6 2017-03-26 09:22:10 -05:00
Thomas Tuegel
21cbf20ad2 cool-retro-term: pin to Qt 5.6 2017-03-26 09:22:10 -05:00
Thomas Tuegel
49c63cbb98 apitrace: pin to Qt 5.6 2017-03-26 09:22:10 -05:00
Thomas Tuegel
4ddd8910d4 Remove Qt 5.7
The community support window for Qt 5.7 has ended. All packages should

- update to Qt 5.8, or
- pin to Qt 5.6 (the 3-year long-term support release), or
- for proprietary software, use the vendored libraries.
2017-03-26 09:22:10 -05:00
Thomas Tuegel
bd97dd48de fdr: pin to Qt 5.6 2017-03-26 09:20:21 -05:00
Tim Steinbach
8d5a2e4e9c linux: 4.4.56 -> 4.4.57
(cherry picked from commit 23d0f01e95)
2017-03-26 10:09:19 -04:00
Tim Steinbach
244c9a9712 linux: 4.10.5 -> 4.10.6
(cherry picked from commit c0411ea229)
2017-03-26 10:05:41 -04:00
Tim Steinbach
0d0f427f37 linux: 4.9.17 -> 4.9.18
(cherry picked from commit 422a8b9cd1)
2017-03-26 10:01:25 -04:00
Dmitry Kalinkin
8c6e9177a4 citrix-receiver: fix wrapper, direct dl url, $PWD needs escaping
(edited by @obadz, closes #24320)

(cherry picked from commit 7035325c62)
2017-03-26 14:37:11 +01:00
ndowens
beab3073c9 jasper: 2.0.10 -> 2.0.12
(cherry picked from commit 6c17ad677c)
2017-03-26 08:25:27 -04:00
Leon Isenberg
8a30429bc8 libguestfs: add qemu to wrapped PATH
virt-df doesn't find qemu-img otherwise.

(cherry picked from commit 65029beb38)
2017-03-26 14:10:49 +02:00
Edward Tjörnhammar
eacd671c2e nixos, openafs-client: correct serviceConfig
(cherry picked from commit 958668ab80)
2017-03-26 13:46:57 +02:00
Christine Koppelt
ab1078806e NixOS Manual: Update version numbers
(cherry picked from commit e5c927cb8d)
2017-03-26 11:24:59 +02:00
Willi Butz
9d96d30497 spotify: 1.0.49.125.g72ee7853-111 -> 1.0.52.717.g2f08534a-47
(cherry picked from commit 3c090f0e5a)
2017-03-26 10:35:37 +02:00
Nikolay Amiantov
50cc86cc07 ibus-engines: use wrapPythonPrograms
This is needed now that PYTHONPATH is not propagated. Also several packages
with additional dependencies are now properly wrapped.

(cherry picked from commit 66b05cd4e6)
2017-03-26 02:43:36 +03:00
Nikolay Amiantov
bb271fb141 ibus: wrap with GTK dependencies
Without this ibus can't load its settings.
Also don't propagate PYTHONPATH.

(cherry picked from commit 99434abff7)
2017-03-26 02:43:33 +03:00
Vladimír Čunát
02694562ee texlive: fix CVE-2016-10243
https://github.com/NixOS/security/issues/104
(cherry picked from commit 8c4339a9dc)
2017-03-25 23:04:19 +01:00
ndowens
41894d5632 potrace: 1.13 -> 1.14
(cherry picked from commit 56504fcb2c)
2017-03-25 22:59:49 +01:00
Jörg Thalheim
8ce595fcd1 keepassx-community: 2.1.2 -> 2.1.3
fixes https://github.com/NixOS/security/issues/105

(cherry picked from commit 5e0cbbbdb6)
2017-03-25 21:40:15 +01:00
Michael Raskin
a8baac668f graphicsmagick: patch for CVE-2017-6335
(cherry picked from commit 7b706900e7)
2017-03-25 21:09:35 +01:00
Franz Pletz
d3124a5259 irssi: 1.0.1 -> 1.0.2 for CVE-2017-7191
See https://irssi.org/security/irssi_sa_2017_03.txt.

(cherry picked from commit b00cfd49d5)
2017-03-25 20:45:46 +01:00
Willi Butz
fc7b87af70 manticore: fix compiling pml sources
Compiler depends on sources that weren't present in the output.

(cherry picked from commit 53dde42153)
2017-03-25 20:14:47 +01:00
Guillaume Maudoux
77243451fe wrapFirefox: fix default-browser update
Set MOZ_APP_LAUNCHER for firefox as per [1] (see [2] for detailed discussion).
Firefox will recognise itself across verions, skipping the 'not-the-default-browser' prompt.
Firefox will also write sane paths to the generated desktop file, should someone ever set it as default through the 'not-the-default-browser' prompt.
Also removed the unnecessary libtrick cruft.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=611953
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=593948

(cherry picked from commit 816beccf50)
2017-03-25 17:37:48 +01:00
Dan Peebles
ea5800bd4b minikube: switch to build from source & fix on Darwin
Linux behavior should be largely unchanged but we now build minikube
ourselves. Unfortunately localkube is still tricky to build so I pull in
a binary version from upstream.

(cherry picked from commit fe339d281b)
2017-03-25 16:49:14 +01:00
Peter Hoeg
6e6af33ec4 minikube: 0.16.0 -> 0.17.1
(cherry picked from commit 35dbe4d0f1)
2017-03-25 16:49:09 +01:00
Richard Zetterberg
70426c48e8 nftables: adds information regarding nftables and Docker (#24326)
(cherry picked from commit dc10688edb)
2017-03-25 16:35:24 +01:00
Shea Levy
818c0e2d98 nix-buffer support: Make process-environment changes actually local
(cherry picked from commit f087b75941)
2017-03-25 11:13:35 -04:00
Willi Butz
3a0a58ce5d manticore: fix build, remove builder.sh (see #23253)
(cherry picked from commit 55d21cad95)
2017-03-25 17:06:43 +02:00
Tim Steinbach
338afb9a54 Merge pull request #24323 from NeQuissimus/git_2_12_2
git: 2.12.0 -> 2.12.2
2017-03-25 11:02:32 -04:00
Nikolay Amiantov
082666f48c phpfpm service: don't use private /tmp
This breaks local PostgreSQL connections.

(cherry picked from commit 417844b596)
2017-03-25 14:53:16 +01:00
Robin Gloster
c2ad3e4f70 networkd: fix setting both defaultGateway{,6}
(cherry picked from commit 6b8ad8b581)
2017-03-25 14:31:06 +01:00
Maximilian Bosch
0e494727a7 phpPackages.composer: 1.3.2 -> 1.4.1
(cherry picked from commit 73edc1d5f8)
2017-03-25 14:31:06 +01:00
Robin Gloster
2f1f9b1213 gitkraken: clean-up
(cherry picked from commit 4f9e590c06)
2017-03-25 12:52:52 +01:00
NWDD
7b5ef78f18 gitkraken: 2.1.0 -> 2.2.0
also added myself as a maintainer
(cherry picked from commit a8f269d014)
2017-03-25 12:45:18 +01:00
NWDD
68a0fa8436 gitkraken: init at 2.1.0
(cherry picked from commit 0aa29fa4d8)
2017-03-25 12:45:12 +01:00
Nikolay Amiantov
39326c645d zenity: fix for non-GNOME 3
(cherry picked from commit a381ee89cd)
2017-03-25 14:40:28 +03:00
Maximilian Bosch
8183006443 geogebra: 5-0-338-0 -> 5-0-346-0
(cherry picked from commit 9787b2b808)
2017-03-25 00:09:27 +01:00
Maximilian Bosch
8cdf7b3893 geogebra: 5-0-331-0 -> 5-0-338-0
(cherry picked from commit 2df3b5ca7f)
2017-03-25 00:09:20 +01:00
Peter Simons
16b894028e Merge pull request #24279 from LumiGuide/ghcjsHEAD-upgrade-to-latest-LTS
ghcjsHEAD: upgrade ghcjs-boot packages(cherry picked from commit 011466857b)
2017-03-24 23:14:47 +01:00
Thomas Tuegel
ba554d8382 Revert "qt5: 5.6.2 -> 5.7.1"
This reverts commit 6542ea7f31.

I included this commit from master by accident. The stable release should use
the Qt 5.6 long-term support release by default because Qt 5.7 is already out of
its support window.
2017-03-24 15:17:46 -05:00
Shea Levy
34c645ba20 Add setupSystemdUnits function.
Allows setting up and managing a set of systemd units on any systemd distribution.

(cherry picked from commit 9a777013d1)
2017-03-24 15:48:04 -04:00
Bjørn Forsman
b94092c301 perlPackages.OpenGL: 0.6703 -> 0.70
Fixes https://github.com/NixOS/nixpkgs/issues/19271 ("slic3r gui
fails").
2017-03-24 19:19:32 +01:00
Joachim Fasting
3e4130e7c9 dnscrypt-proxy service: systemd notification under apparmor
(cherry picked from commit f815a7697e)
2017-03-24 18:43:30 +01:00
Thomas Tuegel
1dbb9628c8 Merge branch 'release-17.03--plasma-5' into release-17.03 2017-03-24 09:43:25 -05:00
Thomas Tuegel
c6195b6b28 plasma-workspace: propagate Qt-based inputs 2017-03-24 09:44:49 -05:00
Thomas Tuegel
60c9bf91e1 sddm: fix wrapper
When I reduced the closure size, I broke the built-in theme. When I reverted
that fix, the built-in theme worked but the Plasma theme was broken. Now the
wrapper is fixed so that both themes work.
2017-03-24 08:02:53 -05:00
Thomas Tuegel
ccc1042f76 nixos/plasma5: also test SDDM theme 2017-03-24 08:02:24 -05:00
Nikolay Amiantov
03c07ac02e octoprint-plugins.m33-fio: fix incompatibility with new OctoPrint
(cherry picked from commit 8c98df0136)
2017-03-24 15:53:23 +03:00
Tim Steinbach
4367e3e249 Merge pull request #24262 from peterhoeg/u/kodi_stable
kodi: 17.0 -> 17.1
2017-03-24 08:36:18 -04:00
Peter Hoeg
d1619fefcb kodi: 17.0 -> 17.1
(cherry picked from commit 7833436098)
2017-03-24 13:24:00 +01:00
Robin Gloster
f83f09411c Revert "gdm module: only make xserver args overrideable"
This reverts commit a5aa926902.

This allows gdm to run again, the test is still failing.

(cherry picked from commit 4e57e7f7c6)
2017-03-24 10:37:29 +01:00
c74d
d370e5fa22 google-compute-image: copy store paths with rsync
In `nixos/modules/virtualisation/google-compute-image.nix`, copy store
paths with `rsync -a` rather than `cp -prd`, because `rsync` seems
better able to handle the hard-links that may be present in the store,
whereas `cp` may fail to copy them.

I have tested that the Google Compute Engine image builds successfully
for me with this patch, whereas it did not without this patch.

This is the same fix applied for Azure images in commit
097ef6e435d5b3fcde92e67abbaaaaaf05c0723d.

Fixes #23973.

(cherry picked from commit e0e520a519)
2017-03-24 02:16:24 +01:00
Robin Gloster
3a368d7629 wrapGAppsHook: fix eval 2017-03-24 01:39:10 +01:00
Robin Gloster
d8f297d4d4 makeQtWrapper: fix eval 2017-03-24 01:28:40 +01:00
Peter Hoeg
c1b5643bcd kodi: 17.0 -> 17.1
(cherry picked from commit 7833436098)
2017-03-24 08:22:26 +08:00
Thomas Tuegel
056db1c725 Revert "sddm: propagate qtbase input"
This reverts commit 40db6380f6.

Despite testing this in QEMU on my own machine, it breaks SDDM for everyone
else.
2017-03-23 18:56:39 -05:00
Robin Gloster
3ff736b9a8 kdeWrapper: fix eval 2017-03-24 00:20:42 +01:00
Nikolay Amiantov
310e6ef791 antimicro: wrap Qt application
(cherry picked from commit 82f7f8ad9a)
2017-03-24 01:51:54 +03:00
Nikolay Amiantov
0d9f47f265 makeQtWrapper, kdeWrapper: add GTK3 dependencies
(cherry picked from commit a40b7d07e9)
2017-03-24 01:51:31 +03:00
Nikolay Amiantov
0bd1b026d1 wrapGAppsHook: propagate dconf
It's effectively required for GTK3 applications because various parts of the library use GIO to store settings.

Also propagate GTK for clarity (it should be there anyway).

(cherry picked from commit 670744e1fa)
2017-03-24 01:50:20 +03:00
ndowens
9b2970fc30 awesomewm: 4.0 -> 4.1
(cherry picked from commit 6a851cde94)
2017-03-23 23:23:52 +01:00
Robin Gloster
6b9a2f6e8c mpd: fix i686-linux build
See upstream https://github.com/MaxKellermann/MPD/pull/24, not clear if
this will be merged upstream as the author has been quite uncooperative.

Github patch URL (https://github.com/MaxKellermann/MPD/pull/24.patch)
sadly does not work for this.

(cherry picked from commit d6e2366b1c)
2017-03-23 23:17:05 +01:00
Robin Gloster
2ae4257b0b linux: drop 3.12 and 4.1
Support ends before 17.09 is released:
https://www.kernel.org/category/releases.html

(cherry picked from commit 37f7470269)
2017-03-23 22:08:02 +01:00
romildo
9f8df21635 awesome: menubar should take XDG_HOME_DIR and XDG_DATA_DIRS into account
(cherry picked from commit b1a9bcfb16)
2017-03-23 22:07:06 +01:00
Benjamin Staffin
be6d5c672b nixos: Use xkbDir consistently so it has an effect
(cherry picked from commit b79c284952)
2017-03-23 22:07:05 +01:00
Tim Steinbach
b1097b9cb3 linux: 4.10.4 -> 4.10.5 2017-03-23 16:43:47 -04:00
Tim Steinbach
e9c35e0a02 linux: 4.4.55 -> 4.4.56 2017-03-23 16:39:45 -04:00
Vladimír Čunát
61e3a58274 knot-dns: maintenance 2.4.1 -> 2.4.2
(cherry picked from commit 070ae18422)
2017-03-23 16:36:37 +01:00
Robin Gloster
1394a0c0a2 security-wrapper: link old wrapper dir to new one
This makes setuid wrappers not fail after upgrading.

references #23641, #22914, #19862, #16654

(cherry picked from commit e82baf043e)
2017-03-23 16:21:19 +01:00
Robin Gloster
3bfeceb6a6 Revert "security-wrapper: Don't remove the old paths yet as that can create migration pain"
This reverts commit 4c751ced37.

This does not fix the issue as /run is now mounted with nosuid.

(cherry picked from commit 45f486f096)
2017-03-23 16:21:12 +01:00
Symphorien Gibol
b51de57928 grub module: fix useOSProber when installing grub as EFI
(cherry picked from commit a6665adde8)
2017-03-23 13:38:37 +01:00
Joachim Fasting
587030466a tribler: fixup revision
Using `rev = "v${revision}"` results in a "bad reference" error;
use the plain revision instead.

(cherry picked from commit a49df2a894)
2017-03-23 12:57:46 +01:00
Nikolay Amiantov
30c7678e8f qt5.qtwebengine: add proprietary codecs support
(cherry picked from commit 3a948e6b07)
2017-03-23 14:53:43 +03:00
Nikolay Amiantov
d5bd98e192 qt5.qtwebengine: use system libraries where possible
Fixes #23987.

(cherry picked from commit 040b86a96e)
2017-03-23 14:53:43 +03:00
Nikolay Amiantov
15fdfa9296 srtp: build as shared library
(cherry picked from commit 5a04d38ca6)
2017-03-23 14:53:43 +03:00
Nikolay Amiantov
64d459302b nss: propagate nspr
(cherry picked from commit 1715e3643b)
2017-03-23 14:53:43 +03:00
Nikolay Amiantov
9cc4b2f8d8 qt5.qtwebengine: patch more library paths
Adapted from chromium derivation. Fixes qutebrowser crash.

(cherry picked from commit a7a858aa52)
2017-03-23 14:53:43 +03:00
ndowens
73a85de298 gpa: 0.9.9 -> 0.9.10
(cherry picked from commit 2477196fb1)

Bug fixes
2017-03-23 12:27:28 +01:00
Joachim Fasting
a78916e790 electrum: 2.8.1 -> 2.8.2
Release 2.8.2
  * show paid invoices in history tab
  * improve CPFP dialog
  * fixes for trezor, keepkey
  * other minor bugfixes
https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES

(cherry picked from commit c6322a28d4)
2017-03-23 12:27:25 +01:00
Joachim Fasting
c88b345193 electrum: 2.7.18 -> 2.8.1
See https://github.com/spesmilo/electrum/blob/master/RELEASE-NOTES

Also
- patch .desktop file to include full path to electrum
- add dep on pysocks
- remove dep on pyasn; per the changelog, it has not been used since v2.1
- replace dep on slowaes with pyaes

(cherry picked from commit d575efc5f0)
2017-03-23 12:27:24 +01:00
Joachim Fasting
5d7139bc33 pythonPackages.pyaes: init at 1.6.0
(cherry picked from commit 617d8af325)

For electrum
2017-03-23 12:27:19 +01:00
Joachim Fasting
1a1d365351 pythonPackages.mnemonic: 0.12 -> 0.17
(cherry picked from commit 9cc2083dac)

For electrum
2017-03-23 12:27:12 +01:00
Joachim Fasting
040b9f4aae pythonPackages.trezor: 0.7.4 -> 0.7.12
(cherry picked from commit 10a0f1c2af)

For electrum
2017-03-23 12:27:01 +01:00
Robin Gloster
6b3a77ac51 Revert "Revert "kmod-blacklist-ubuntu: 9.3 -> 22.1""
This reverts commit 8c410f4b18 with a fix
to make the tests run correctly. bochs-drm must not be blacklisted for
that.

(cherry picked from commit 785e45ac06)
2017-03-23 10:14:29 +01:00
Joachim Fasting
ea4a1b403c grsecurity: 4.9.16-201703180820 -> 4.9.17-201703221829
(cherry picked from commit 94ab4932ae)
2017-03-23 10:04:21 +01:00
Joachim Fasting
027d0f0244 linux_4_9: 4.9.16 -> 4.9.17
(cherry picked from commit a2fdf72ec4)
2017-03-23 10:04:16 +01:00
Vladimír Čunát
ec281ca1bc Merge #24236: remove bbenoist from maintainers
(cherry picked from commit e0bf35f0e5)
2017-03-23 08:54:42 +01:00
Jörg Thalheim
0f99379863 munin: fix tests by replacing cron with systemd timer
(cherry picked from commit b4169bb8dd)
2017-03-22 22:26:24 +01:00
ndowens
be4f0f1688 munin: 2.0.30 -> 2.0.33; for CVE-2017-6188
(cherry picked from commit 2e06a585bc)
2017-03-22 22:26:12 +01:00
Jörg Thalheim
bd67d5ddfa pythonPackages.libnacl: enable tests
(cherry picked from commit 597865725f)
2017-03-22 16:52:48 +01:00
Marti Serra
ed593f2472 pythonPackages.libnacl: init at 1.5.0
(cherry picked from commit c883cefc6f)
2017-03-22 16:52:33 +01:00
Marti Serra
56ee190671 tribler: from 6.4.3 to 7.0.0-beta
removed old unused dependencies,
changed enablePlayer to true by default,
added myself as maintainer.

(cherry picked from commit ad75bffb06)
2017-03-22 15:46:58 +01:00
Robin Gloster
6c36f10bb0 Revert "php: Add a dev output"
This reverts commit bccb9366a7.

This breaks phpPackages.*

cc @edolstra
2017-03-22 15:46:39 +01:00
Guillaume Maudoux
9387019eae openssl: default to default profile CA on darwin
(cherry picked from commit c86f05e7ce)
2017-03-22 15:45:06 +01:00
Guillaume Maudoux
d1e15d6e0a curl: Use default trust store of TLS backend
Having curl fall back to openssl's CA means that we need not patch curl
to respect NIX_SSL_CERT_FILE. It will work in all the cases.

This reverts commit fb4c43dd8a "curl: Use CA bundle in nix default profile by default"
If we want to reintroduce that feature, this needs to go inside openssl

(cherry picked from commit 8ecb94bb97)
2017-03-22 15:44:59 +01:00
Guillaume Maudoux
c1401e1e4c curl, git: Fix curl default CA, let git use it
Improve patching of curl to use NIX_SSL_CERT_FILE as default CA
Remove patches from git, as git uses curl and passes its environment
variables to curl.

(cherry picked from commit 525a663174)
2017-03-22 15:44:20 +01:00
Vladimír Čunát
5954e76282 Merge branch 'staging-17.03' into release-17.03 2017-03-22 15:20:52 +01:00
Robin Gloster
acefaff33d nixos-container: check for correct path for chattr
Could fail on destroy if the container wasn't created correctly

(cherry picked from commit 91e74ed3b2)
2017-03-22 15:16:05 +01:00
Robin Gloster
443c7c0713 nixos-container: allow _ in container name
fixes #15089

(cherry picked from commit 3ac02dfc40)
2017-03-22 15:16:04 +01:00
Robin Gloster
26db09a5f0 nixos-container: don't use host's $NIXOS_CONFIG
fixes #22948

(cherry picked from commit 9b9416cca4)
2017-03-22 15:16:04 +01:00
Franz Pletz
05b0d31e97 matrix-synapse: 0.19.2 -> 0.19.3
(cherry picked from commit 28a4c998fa)
2017-03-22 15:14:16 +01:00
Robin Gloster
f3a9cccdad mailcore2: fix build with newer icu
(cherry picked from commit 66c384ab4a)
2017-03-22 14:07:40 +01:00
Thomas Tuegel
9fe20dd70a nixos/sddm: replace themes option with package option
(cherry picked from commit a96e047b31)
2017-03-22 07:48:51 -05:00
Thomas Tuegel
e94a1d922b sddmPlasma5: provide top-level package for theme
(cherry picked from commit 203c4926e3)
2017-03-22 07:48:44 -05:00
Thomas Tuegel
4e3a21a287 nixos/plasma5: do not include extra-cmake-modules in sddm
Fixes #24126.

(cherry picked from commit 7ca62935bb)
2017-03-22 07:48:36 -05:00
Thomas Tuegel
40db6380f6 sddm: propagate qtbase input
(cherry picked from commit 3de6ccd5b2)
2017-03-22 07:48:26 -05:00
Thomas Tuegel
df60c426d2 makeQtWrapper: wrap with runtime XDG dirs
(cherry picked from commit 7aee677a10)
2017-03-22 07:48:19 -05:00
Eelco Dolstra
bccb9366a7 php: Add a dev output
This reduces the closure size from 438 to 174 MiB.

(cherry picked from commit b751036a74)
2017-03-22 13:34:37 +01:00
Eelco Dolstra
f056e4e67c php: Strip modules
This reduces the closure size from 566 to 438 MiB.

(cherry picked from commit 3ff08d6f13)
2017-03-22 13:34:37 +01:00
Eelco Dolstra
b048479758 system-config-printer: Strip binaries in $out/etc
This reduces its closure size from 484 to 281 MiB.

(cherry picked from commit 6dd5846f1b)
2017-03-22 13:34:37 +01:00
Eelco Dolstra
006d9380bb ibus: Use dev output
This removes glib.dev from the runtime closure, reducing its size from
357 to 253 MiB.

(cherry picked from commit 7c60ba1d41)
2017-03-22 13:34:37 +01:00
Eelco Dolstra
2351b0d047 subversion: Clean up more *.la files
This removes some -dev paths from the closure of subversionClient and
gitFull.

(cherry picked from commit f6c73f1e37)
2017-03-22 13:34:37 +01:00
Eelco Dolstra
2cc62aece8 rtmpdump: Use multiple outputs
This reduces the runtime closure size from 80 to 23 MiB.

(cherry picked from commit 1824832e17)
2017-03-22 13:34:37 +01:00
Eelco Dolstra
b593afbbc9 gconf: Use a dev output
This reduces the closure size of gconf from 225 to 63 MiB.

(cherry picked from commit 3ab897c6cf)
2017-03-22 13:34:36 +01:00
Eelco Dolstra
b8b4646e6d diffoscope: Don't propagate build inputs
This reduces the runtime closure size from 297 to 132 MiB.

(cherry picked from commit 96d7f35e96)
2017-03-22 13:34:36 +01:00
Eelco Dolstra
e884561b0f apache-httpd: Strip modules
We did this for 2.2 (cc61d31902) but
lost this for 2.4. This reduces the Apache closure size from 312 MiB
to 102 MiB (primarily by getting rid of -dev outputs).

(cherry picked from commit 4e5461127d)
2017-03-22 13:34:33 +01:00
Michael Raskin
e94a9dc960 oneteam: remove
(cherry picked from commit d2cd304ad7)
2017-03-22 13:17:57 +01:00
Michael Raskin
a5711eba3c oneteam: fix fixable problems, mark broken as it fell behind Firefox too much
(cherry picked from commit ede70972a4)
2017-03-22 13:17:56 +01:00
Herwig Hochleitner
3fef0e72ff chromium: 57.0.2987.98 -> 57.0.2987.110
(cherry picked from commit 92985364e1)
2017-03-22 13:03:39 +01:00
Joachim Fasting
37e11e50e4 pax-utils: meta cleanups
- Description from upstream
- A more informative homepage
- Per upstream, pax-utils should work for unix-likes beyond linux

(cherry picked from commit 41e2ffa1d7)
2017-03-22 13:01:53 +01:00
Joachim Fasting
27ce71c702 nixos/tor: add missing option type
(cherry picked from commit 95eaa3aec3)
2017-03-22 13:01:32 +01:00
Frederik Rietdijk
aee4063076 Python docs: small fixes
(cherry picked from commit ce6cd33c65)
2017-03-22 12:56:37 +01:00
Tim Steinbach
399fa5b27f linux: 4.11-rc2 -> 4.11-rc3 2017-03-21 20:33:06 -04:00
Robin Gloster
c458d7cf94 haskellPackages.yi-keymap-vim: dontCheck
Tries to access path outside of sandbox.

(cherry picked from commit 693d0e7fea)
2017-03-22 01:27:48 +01:00
ndowens
552f6b3341 enginepkcs11: libp11 version 0.4.0 and above contain enginepkcs11
enginepkcs11: Removed from all-packages.nix
(cherry picked from commit 112a91c2f7)
2017-03-22 00:52:38 +01:00
Robin Gloster
97aff04826 elvis: fix build
(cherry picked from commit c5f818f74d)
2017-03-22 00:47:27 +01:00
Robin Gloster
fb4dced1c8 mutter: fix on i686-linux
(cherry picked from commit 242031a34e)
2017-03-21 23:58:19 +01:00
Nikolay Amiantov
844c4fac3f qt5.qtwebengine: fix library paths
Without this it would try to find files in qtbase.

(cherry picked from commit 7eb9a85b90)
2017-03-22 01:40:31 +03:00
ndowens
9b6a6cff6c tnef: 1.4.12 - > 1.4.14; Advisory X41-2017-004
(cherry picked from commit 41abf78fc0)
2017-03-21 23:25:37 +01:00
Frederik Rietdijk
7e224746b6 pythonPackages.pygobject2: fixup conversation to buildPythonPackage
(cherry picked from commit 8143413e59)
2017-03-21 21:59:41 +01:00
Domen Kožar
56196a6c10 haskell: use new justStaticExecutables and add purescript
(cherry picked from commit f67a89e248)
Signed-off-by: Domen Kožar <domen@dev.si>
2017-03-21 21:27:37 +01:00
Domen Kožar
548e2671c5 haskell: add justStaticExecutables combinator
(cherry picked from commit db23fe1581)
Signed-off-by: Domen Kožar <domen@dev.si>
2017-03-21 21:27:32 +01:00
Vladimír Čunát
cd3fb4605a mesa: maintenance 17.0.1 -> 17.0.2
(cherry picked from commit 39eda57d2a)
2017-03-21 20:24:06 +01:00
Nikolay Amiantov
ef94c6dc1d mesa: enable texture floats only for drivers
To be on more safe side. This shouldn't matter theoretically as nothing in core
Mesa depends on them.

(cherry picked from commit 328bcdae25)
2017-03-21 20:23:49 +01:00
Nikolay Amiantov
0c06c488f3 mesa: enable texture floats for drivers
(cherry-picked from 261d7caed7 and 328bcdae25)
2017-03-21 22:22:53 +03:00
Thomas Tuegel
3a4038a594 mesa: allow overriding driver compilation
(cherry picked from commit eccc1fa9bb)
This is to sync expression code with master/staging;
the derivations evaluate the same, at least on x86_64-linux.
2017-03-21 20:22:36 +01:00
Nikolay Amiantov
d648522aef udev module: filter duplicate udev paths
Fixes #24174

(cherry picked from commit 6555ec03c3)
2017-03-21 21:29:51 +03:00
Nikolay Amiantov
ebca84224a octoprint: 1.3.1 -> 1.3.2
Fix startup wizard and cleanup dependencies.

(cherry picked from commit d3e2957c90)
2017-03-21 21:29:40 +03:00
Nikolay Amiantov
f4f55a8192 python.pkgs.websocket_client: 0.32.0 -> 0.40.0
(cherry picked from commit 6f884349e6)
2017-03-21 21:29:29 +03:00
Nikolay Amiantov
ae43118b2b python.pkgs.sockjs-tornado: init at 1.0.3
(cherry picked from commit c7ee41bc13)
2017-03-21 21:29:18 +03:00
Eelco Dolstra
1e8c01784a Allow attaching to non-child processes by default
The inability to run strace or gdb is the kind of
developer-unfriendliness that we're used to from OS X, let's not do it
on NixOS.

This restriction can be re-enabled by setting

  boot.kernel.sysctl."kernel.yama.ptrace_scope" = 1;

It might be nice to have a NixOS module for enabling hardened defaults.

Xref #14392.

Thanks @abbradar.

(cherry picked from commit 86721a5f78)
2017-03-21 20:52:05 +03:00
Eelco Dolstra
dffc300e56 nix-daemon.nix: Make the 1.12 check less strict
(cherry picked from commit 78bb734452)
2017-03-21 20:51:58 +03:00
Carlos D
128837a584 Expand on creating USB bootable for OS X
(cherry picked from commit e6a02918ce)
2017-03-21 17:57:50 +01:00
Nikolay Amiantov
80888e21e9 mesa: enable texture floats by default
(cherry picked from commit 261d7caed7)
2017-03-21 17:57:13 +01:00
HeeL
47051c876a Fix mkdir for fetchgx to not throw an exception
(cherry picked from commit cd2627da0d)
2017-03-21 17:55:43 +01:00
Eelco Dolstra
5acae6d484 Revert "nixos-container: Use machinectl shell (#18825)"
This reverts commit
c37e76b4d2. Unfortunately, using
"machinectl shell" has two bad side effects:

* It sends the command's stderr to stdout.

* It doesn't propagate the command's exit status.

This broke NixOps.

PR #18825.

(cherry picked from commit cb49c14324)
2017-03-21 17:55:35 +01:00
Evan Danaher
84561b005c nginx: disallow alias directive on server level; it doesn't work.
(cherry picked from commit a09246948c)
2017-03-21 17:55:27 +01:00
Evan Danaher
4bea988a7e nginx: Assert that either root or alias is null.
If both are set, nginx won't start.  More error checking is certainly in
order, but this seems like a reasonable start.

(cherry picked from commit e7358b192a)
2017-03-21 17:55:27 +01:00
Evan Danaher
6448a3e113 nginx: Add alias configuration option for hosts and locations.
It's like root, but doesn't keep the prefix.

(cherry picked from commit ff2e2e82cc)
2017-03-21 17:55:27 +01:00
Eelco Dolstra
a0134b9622 nix: 1.11.7 -> 1.11.8
(cherry picked from commit 2cb25f8b59)
2017-03-21 11:57:44 -04:00
Domen Kožar
b9608a9a2e git, openssl, curl: Respect $NIX_SSL_CERT_FILE
Slightly modified version of 942dbf89c6

Signed-off-by: Domen Kožar <domen@dev.si>
2017-03-21 16:04:24 +01:00
Parnell Springmeyer
cbbb8897e3 security-wrapper: Don't remove the old paths yet as that can create migration pain
(cherry picked from commit 4c751ced37)
2017-03-21 13:40:43 +01:00
Robin Gloster
36262fc9cb fetch-*: add md5 support removal to rl-notes
(cherry picked from commit c066dc8416)
2017-03-21 13:39:10 +01:00
Robin Gloster
7ea9cdfa96 fetch-*: remove md5 support
fixes #4491

(cherry picked from commit f57185db95)
2017-03-21 13:38:19 +01:00
Franz Pletz
fc2214900c gitlab: add rake task to delete tokens
The information disclosure was caued by CVE-2017-0882.

(cherry picked from commit 219e91b4c6)
2017-03-21 13:17:54 +01:00
Franz Pletz
049c9d4617 gitlab module: explicitely create pages shared path
Fixes creation of backups.

(cherry picked from commit 4bd12fa7b2)
2017-03-21 13:17:54 +01:00
Franz Pletz
cce54583d4 gitlab: 8.16.6 -> 8.17.4 for CVE-2017-0882
(cherry picked from commit 29f57ac447)
2017-03-21 13:17:54 +01:00
Robin Gloster
777bf85013 ponyc: segfaults on i686
(cherry picked from commit 37c31c635d)
2017-03-21 13:13:12 +01:00
Frederik Rietdijk
504323c928 Python: replace mkPythonDerivation with buildPythonPackage and format="other";
This way all Python packages use the same function,
`buildPythonPackage`.

(cherry picked from commit 3760c8c7fd)
2017-03-21 13:10:02 +01:00
Frederik Rietdijk
5d25fd14f8 Python changelog
(cherry picked from commit 4263c53f66)
2017-03-21 11:06:39 +01:00
Robin Gloster
7c65cc8f12 clooj: fix url
(cherry picked from commit 9c730bc40b)
2017-03-21 11:01:26 +01:00
Franz Pletz
0b6812ee9a nixos/treewide: systemd.time is in manvolume 7
cc #23396

(cherry picked from commit fb50cde71e)
2017-03-21 08:33:48 +01:00
Franz Pletz
21cb5af4ec zfs.autoScrub service: init
(cherry picked from commit 7566b36259)
2017-03-21 08:33:44 +01:00
Joachim Schiele
1afee76d45 Update python.md (#23669)
* Update python.md

this makes it clear how to alter `attributes` by using `packageOverrides`

* Update python.md

* Update python.md

* Update python.md

* Update python.md

* Update python.md

* Update python.md

(cherry picked from commit 91debcb482)
2017-03-21 02:17:52 +01:00
Robin Gloster
e87e108146 nix-daemon: fix autoOptimiseStore option
(cherry picked from commit c808801937)
2017-03-21 02:17:39 +01:00
Jörg Thalheim
a334a1737b wireguard: 0.0.20170223 -> 0.0.20170320.1
(cherry picked from commit 818a37598c)
2017-03-21 01:48:00 +01:00
Robin Gloster
b2a5f4f0c2 rl-notes 17.03: info on python module location
closes #11567

(cherry picked from commit 5e0f932de0)
2017-03-20 23:29:18 +01:00
Vladimír Čunát
2722b1cedc Merge #23983: update kmod and kmod-blacklist-ubuntu 2017-03-20 23:15:53 +01:00
Robin Gloster
758f85e113 packetbeat: 5.2.1 -> 5.2.2, build from source
(cherry picked from commit 10239a084f)
2017-03-20 23:10:04 +01:00
Robin Gloster
df435d394c metricbeat: 5.2.1 -> 5.2.2, build from source
(cherry picked from commit 4d08d1aa8f)
2017-03-20 23:10:04 +01:00
Robin Gloster
6e3827d2d6 heartbeat: 5.2.1 -> 5.2.2, build from source
(cherry picked from commit 66d0c4b1bd)
2017-03-20 23:10:04 +01:00
Robin Gloster
b38224a245 filebeat: 5.2.1 -> 5.2.2, build from source
(cherry picked from commit a0d087b6fe)
2017-03-20 23:10:03 +01:00
Tristan Helmich
07b67e65e9 packetbeat: init at 5.2.1
(cherry picked from commit 8338506abe)
2017-03-20 23:10:03 +01:00
Tristan Helmich
2de49241d9 filebeat: init at 5.2.1
(cherry picked from commit 9fe3b0eb13)
2017-03-20 23:10:03 +01:00
Tristan Helmich
7e097d9ab7 metricbeat: init at 5.2.1
(cherry picked from commit 9fce67264d)
2017-03-20 23:10:03 +01:00
Tristan Helmich
2ef4093a35 heartbeat: init at 5.2.1
(cherry picked from commit 9dfb7e42ad)
2017-03-20 23:10:03 +01:00
Benno Fünfstück
6204045f4e drbd: fix output file location (#23541)
drbd was installing files into $out/nix/store/... due to the usage of DESTDIR
(setting both DESTDIR + prefix to $out will cause files to be installed into $out/$out/...)
(cherry picked from commit 8c0074dd9f)
2017-03-20 23:10:03 +01:00
Willi Butz
b3c5d0d9ef martyr: fixed build, removed build.sh, added meta (see #23253)
(cherry picked from commit 4bfde8f5b4)
2017-03-21 00:04:47 +02:00
Nikolay Amiantov
47dd221e05 makeTest: don't rely on makeWrapper not quoting newlines
(cherry picked from commit 1f0ce0eaf8)
2017-03-20 22:10:11 +01:00
Robin Gloster
183a48e99f jdepend: 2.9.0 -> 2.9.1, fix build
(cherry picked from commit 1c3308e9c1)
2017-03-20 21:34:44 +01:00
Robin Gloster
14a28e3ebf doc: remove double space
(cherry picked from commit 72a5cf11cc)
2017-03-20 20:59:57 +01:00
Robin Gloster
147934ea61 Revert "doc: remove double space"
This reverts commit 6393d43380.

Commit added too much changes.

(cherry picked from commit 88341c4d2b)
2017-03-20 20:58:47 +01:00
Robin Gloster
f8f111c9f1 doc: remove double space
(cherry picked from commit 6393d43380)
2017-03-20 20:47:43 +01:00
Matthias Beyer
b69de8c001 doc: Add rust documentation (#23510)
(cherry picked from commit 315e1a23c0)
2017-03-20 20:45:14 +01:00
Philipp Steinpass
d5978c0f48 Added option and description for nix store auto-optimisation.
(cherry picked from commit 68c6d90417)
2017-03-20 20:45:01 +01:00
Franz Pletz
5e4b43df13 nginx: explicitly use stable version
Also updates the documention of the NixOS option `services.nginx.package`
that upstream recommends using the mainline version instead.

Fixes #21665.

(cherry picked from commit c13922f012)
2017-03-20 20:05:47 +01:00
Franz Pletz
a535c14363 nixos: enable nginx test
cc #23279

(cherry picked from commit 7151e74883)
2017-03-20 20:05:39 +01:00
Susan Potter
77641e8d1f nginx service: add commonHttpConfig option
(cherry picked from commit 251b9ca0e7)

cc #23279
2017-03-20 20:05:21 +01:00
Thomas Tuegel
9f4e6cda67 nixos/plasma5: do not set kimpanel as default IBus panel
kimpanel does not show installed IBus engines or allow switching input
methods. kimpanel does show configured keyboard layouts through kxkb, so I
believe there is some problem communicating with IBus. No error messages are
produced in the log and I have been unable to discover the cause. I have no
intention of continuing to work on kimpanel at this time, so it should be
disabled. The GTK+ 3-based panel provided by IBus is perfectly serviceable in
the interim.

(cherry picked from commit d709cdd829)
2017-03-20 10:24:33 -05:00
Robin Gloster
96d99cca00 virtualbox: 5.1.14 -> 5.1.18
(cherry picked from commit 07252dc83b)
2017-03-20 16:06:03 +01:00
Robin Gloster
94125831e7 fast-neural-doodle: mark as broken
(cherry picked from commit ed59de18b5)
2017-03-20 15:09:49 +01:00
romildo
98d2ac5c7c lumina: fix kwindowsystem and oxygen-icons5 attributes
(cherry picked from commit 501d9c7186)
2017-03-20 15:09:49 +01:00
rnhmjoj
17c1e13ed7 firefox: reenable ALSA backend
(cherry picked from commit 918f331104)
2017-03-20 15:09:49 +01:00
Franz Pletz
6db771b77e wireshark: 2.2.4 -> 2.2.5 for multiple CVEs
Fixes:

  * CVE-2017-5596
  * CVE-2017-5597
  * CVE-2017-6467
  * CVE-2017-6468
  * CVE-2017-6469
  * CVE-2017-6470
  * CVE-2017-6471
  * CVE-2017-6472
  * CVE-2017-6473
  * CVE-2017-6474

(cherry picked from commit 7b27e1c3c9)
2017-03-20 14:46:36 +01:00
Nikolay Amiantov
fe5da114ca makeTest: don't rely on makeWrapper not quoting newlines
(cherry picked from commit 1f0ce0eaf8)
2017-03-20 16:16:08 +03:00
Nikolay Amiantov
ec5b12b2e6 samba: enable parallel building
(cherry picked from commit 21439ef416)
2017-03-20 15:31:09 +03:00
Sander van der Burg
7185762996 dd-agent: bind to pymongo 2.9.1 to fix the MongoDB monitoring
(cherry picked from commit 20194e2696)
2017-03-20 10:43:55 +01:00
Daiderd Jordan
980ded0b29 znc: 1.6.4 -> 1.6.5
(cherry picked from commit 908e3ffd65)

Bugfix release
2017-03-20 01:48:06 +01:00
ndowens
d0b600ac12 feh: 2.18.1 -> 2.18.2
(cherry picked from commit 705b2d9b66)

Bugfix release
2017-03-20 01:48:00 +01:00
Will Dietz
8de060ba40 neo4j service: neo4j-wrapper is deprecated, merge into neo4j.conf
(cherry picked from commit cb73cb9e62)
2017-03-20 00:29:07 +01:00
Will Dietz
943d10e4f7 neo4j service: fix package installed into env to match running service
(cherry picked from commit 515fc22263)
2017-03-20 00:29:05 +01:00
Will Dietz
34a110c620 neo4j: 3.1.1 -> 3.1.2
(cherry picked from commit 5d849c72f1)
2017-03-20 00:29:04 +01:00
ndowens
10347d7918 mg: 20110905 -> 20161005; Remove un-needed configure patch
mg: 20110905 -> 20161005
(cherry picked from commit d6114f6c6b)
2017-03-20 00:29:03 +01:00
ndowens
a336fb8831 nano: 2.7.3 -> 2.7.5
(cherry picked from commit 685ac5287b)
2017-03-20 00:29:02 +01:00
Mikhail Volkhov
85d91b3eb9 sage: fix build at 6.8
(cherry picked from commit 78c0cecc5f)
2017-03-20 00:28:56 +01:00
Jan Malakhovski
6a0155d2b7 nixos: torify: disable by default, add some documentation as of why
This `tsocks` wrapper leaks DNS requests to clearnet, meanwhile Tor comes with
`torsocks` which doesn't.

Previous commits to this file state that all of this still useful somehow.
Assuming that it's true, at least let's not confuse users with two different tools
and don't clash with the `tsocks` binary from nixpkgs by disabling this by default.

(cherry picked from commit a04782581a)
2017-03-19 20:51:58 +01:00
Jan Malakhovski
2022882677 nixos: tor: add enableGeoIP
(cherry picked from commit 6d25f77a64)
2017-03-19 20:51:55 +01:00
Joachim Fasting
046ae1f6f2 nixos/dnscrypt-proxy: simplify module logic related to apparmor
(cherry picked from commit 9325c3a616)
2017-03-19 20:51:54 +01:00
Joachim Fasting
77916a4a94 nixos/dnscrypt-proxy: support reload
(cherry picked from commit 83052ef9db)
2017-03-19 20:51:53 +01:00
Joachim Fasting
7f60074823 nixos/dnscrypt-proxy: inline option renamings
In an effort to make the module more self-contained.

(cherry picked from commit c0a8a9205b)
2017-03-19 20:51:52 +01:00
Joachim Fasting
482a7a667b nixos/dnscrypt-proxy: inline top-level binding (cleanup)
(cherry picked from commit 563c8e1496)
2017-03-19 20:51:51 +01:00
Joachim Fasting
8c6b6b7064 nixos/dnscrypt-proxy: use example.com in example values
It is the canonical example domain after all.

(cherry picked from commit c6da2c7c2b)
2017-03-19 20:51:50 +01:00
Joachim Fasting
b40b58febf nixos/dnscrypt-proxy: indicate update status
Make it easier for the user to tell when the list is updated
and, at their option, see what changed.

(cherry picked from commit 06520c7fb7)
2017-03-19 20:51:49 +01:00
Joachim Fasting
c3cff5f762 nixos/dnscrypt-proxy: more fs isolation for the updater
It'd be better to do the update as an unprivileged user; for
now, we do our best to minimize the surface available.  We
filter mount syscalls to prevent the process from undoing the fs
isolation.

(cherry picked from commit 5f27abec23)
2017-03-19 20:51:48 +01:00
Joachim Fasting
4c1bdf24d3 nixos/dnscrypt-proxy: support updating before nss is up
Resolve download.dnscrypt.org using hostip with a bootstrap
resolver (hard-coded to Google Public DNS for now), to ensure
that we can get an up-to-date resolver list without working name
service lookups. This makes us more robust to the upstream
resolver list getting out of date and other DNS configuration
problems.

We use the curl --resolver switch to allow https cert validation
(we'd need to do --insecure if using just the ip addr). Note
that we don't rely on https for security but it's nice to have
it ...

(cherry picked from commit e72aaa73ea)
2017-03-19 20:51:47 +01:00
Joachim Fasting
9b767f19c6 nixos/dnscrypt-proxy: refactoring
Use mkMerge to make the code a little more ergonomic and easier
to follow (to my eyes, anyway ...).  Also take the opportunity
to do some minor cleanups & tweaks, but no functional changes.

(cherry picked from commit adf044e1fb)
2017-03-19 20:51:41 +01:00
Nikolay Amiantov
bcea7502ed steamPackages.steam-runtime-wrapped: override vulkan-loader
This way we get /run/opengl-driver as a search path.
Fixes #24056.

(cherry picked from commit 9748828e78)
2017-03-19 22:01:35 +03:00
Jörg Thalheim
d1d930e8e6 createrepo_c: fix build
(cc: @copumpkin)

(cherry picked from commit d21c647ddb)
2017-03-19 17:30:19 +01:00
Jörg Thalheim
312bae9e2d createrepo_c: add missing patches
(cherry picked from commit a4c5fc068a)
2017-03-19 17:29:17 +01:00
Tim Steinbach
2e61020220 linux: 4.4.54 -> 4.4.55 2017-03-19 12:19:03 -04:00
Tim Steinbach
adcecdd46e linux: 4.10.3 -> 4.10.4 2017-03-19 12:14:00 -04:00
Kosyrev Serge
80cff1f3ca nvidia-x11: $bin can be empty
(cherry picked from commit d860a68fd0)
2017-03-19 18:54:19 +03:00
Kosyrev Serge
b2a97cadd1 nvidia-x11: don't patch things if libsOnly requested
(cherry picked from commit d18f55269c)
2017-03-19 18:54:12 +03:00
Cray Elliott
7b200151e6 nvidia_x11_beta: add patch to support Linux 4.10.x
thanks to bendlas for the review for pointing out a way to grab the patch remotely!

(cherry picked from commit 8799254eac)
2017-03-19 18:54:02 +03:00
Cray Elliott
2841d8b2b9 nvidia_x11: 375.26 -> 375.39
nvidia_x11_beta: 378.09 -> 378.13

(cherry picked from commit 12083de992)
2017-03-19 18:53:53 +03:00
Robin Gloster
39332aaecf rapidsvn: fix build
(cherry picked from commit 9c7b771a6e)
2017-03-19 15:57:38 +01:00
Ben Darwin
acb79583e2 mark old seg3d as broken for now since it no longer builds with stock gcc version and flags
(cherry picked from commit f02ac9588f)
2017-03-19 15:27:40 +01:00
Nikolay Amiantov
0bd37b4da9 makeWrapper: quote paths (#23511)
Fixes https://github.com/NixOS/nixpkgs/pull/22962#commitcomment-21144939

Also run ShellCheck.

(cherry picked from commit 7ff6eec5fd)
For ZHF #23253 to fix e.g. blink.
2017-03-19 13:59:12 +01:00
Vladimír Čunát
fc0d67b507 Merge branch 'release-17.03' into staging-17.03 2017-03-19 13:58:41 +01:00
Frederik Rietdijk
0b93d2b9e3 pythonPackages.pytest-django: fix hash patch setuptools_scm
Do the files change over time..?

(cherry picked from commit 48deda9f36)
2017-03-19 10:15:11 +01:00
Frederik Rietdijk
b4edc0b53a pythonPackages.django_guardian: fix eval
(cherry picked from commit 2e72372c05)
2017-03-19 09:45:30 +01:00
Frederik Rietdijk
a2e1c15654 pythonPackages.pytest-django: unpin setuptools_scm
- unpin setuptools_scm
- move to file in folder following guidelines
- use PyPI/upstream name

(cherry picked from commit 645c2189d1)
2017-03-19 09:44:54 +01:00
Domen Kožar
c11c1ac24d setuptools_scm: 1.11.1 -> 1.15.0
(cherry picked from commit f32fc9b03e)
2017-03-19 09:39:05 +01:00
Frederik Rietdijk
d685191d1d kdelibs: remove sanitize patch
because its included in 4.14.30 which was part of Applications 16.12.3.
https://github.com/NixOS/nixpkgs/pull/23992#issuecomment-287553865

(cherry picked from commit 2478f7b92c)
2017-03-19 09:25:06 +01:00
Joachim Fasting
35e6ef8066 linux_4_9: 4.9.15 -> 4.9.16
(cherry picked from commit b5da6ca213)
2017-03-19 01:54:18 +01:00
Joachim Fasting
07c2541594 grsecurity: 4.9.15-201703150049 -> 4.9.16-201703180820
(cherry picked from commit d4409817a6)
2017-03-19 01:54:10 +01:00
Vladimír Čunát
b249f7f1a8 Merge branch 'staging-17.03' into release-17.03 2017-03-18 22:08:50 +01:00
Robin Gloster
f7fcede7c2 gnome_mplayer: fix src and build
(cherry picked from commit 4e2f802ce8)
2017-03-18 12:48:55 +01:00
Joachim Schiele
23391146e0 nixos/release.nix: added tests.wordpress
(cherry picked from commit 6022a79cbc)
2017-03-18 12:21:51 +01:00
Nick Hu
244d44e7fe tvheadend: fix typo in package description
(cherry picked from commit ff7506d665)
2017-03-18 12:21:35 +01:00
Joachim Fasting
e10f141541 libsodium: 1.0.11 -> 1.0.12
(cherry picked from commit 3fac05b951)
2017-03-18 12:20:21 +01:00
Benno Fünfstück
69427c7143 atom: avoid using LD_PRELOAD. Fixes glibc compat issues
The wrapper for Atom was loading libraries via LD_PRELOAD, for example
libxkbfile. Now, if you installed atom via nix-env and happened to use a newer
nixpkgs for that than what your system environment is build against, you could
end up with an error like this:

```
uname: relocation error:
/nix/store/68sa3m89shpfaqq1b9xp5p1360vqhwx6-glibc-2.25/lib/libdl.so.2:
symbol _dl_catch_error, version GLIBC_PRIVATE not defined in file libc.so.6
with link time reference
```

This happens because atom calls the `uname` executable from the system to
determine the platform. Because that inherits the `LD_PRELOAD` environment
variable, so the libxkbfile library that the `atom` wrapper was build against
is loaded into `uname`. But since `atom` comes from `nix-env`, the `libxkbfile`
it was built with might be compiled against a newer version of `glibc` than
`uname`, which comes from the system, was! Having two versions of glibc loaded
into the same processes results in chaos.

To fix this, we avoid setting `LD_PRELOAD` and instead use patchelf to set the
correct RPATH. RPATH is not inherited by child processes, so the above issue
can no longer occur.

The only small complication here is that the library that actually loads
libxkbfile is not the atom binary itself, but a node extension that atom uses.
So instead of setting the RPATH on `atom` only, we also set the `rpath` on all
node extensions (`*.node`) the output.

(cherry picked from commit a4d6e2cf16)
2017-03-18 12:19:28 +01:00
Will Dietz
24c5f09b9a neo4j service: increase file limit, per warning emitted at startup (#23961)
(cherry picked from commit 63f1a14ae5)
2017-03-18 12:18:47 +01:00
Franz Pletz
2105794eec nixos/treewide: remove boolean examples for options
They contain no useful information and increase the length of the
autogenerated options documentation.

See discussion in #18816.

(cherry picked from commit 9536169074)
2017-03-18 12:18:33 +01:00
Vladimír Čunát
d9a5fa5780 Merge branch 'release-17.03' into staging-17.03
Solving firefox conflicts (parallel updates).
2017-03-18 10:50:54 +01:00
Lluís Batlle i Rossell
b288f0529c amule: 2.3.1 -> 2.3.2
(cherry picked from commit f77ae4e726)
2017-03-18 09:36:56 +01:00
obadz
f9458bae63 citrix-receiver: add link to webpage with all versions and adjust to change in nix-prefetch-url
Helps with #23975

(cherry picked from commit 17bfb6a08a)
2017-03-18 02:19:10 +00:00
taku0
1f984c0e05 firefox-esr: 52.0esr -> 52.0.1esr
(cherry picked from commit a038f91871)
2017-03-18 02:44:09 +01:00
taku0
a30906fd9c firefox, firefox-bin: 52.0 -> 52.0.1
(cherry picked from commit 3f175876e8)
2017-03-18 02:44:06 +01:00
taku0
4b140619b4 firefox, firefox-bin: 51.0.1 -> 52.0, firefox-esr: 45.7esr -> 52.0esr
(cherry picked from commit a24aaae602)
2017-03-18 02:44:05 +01:00
Nikolay Amiantov
b944312eb5 emacs: fix runtime GTK3 dependencies
Fixes #23845.

(cherry picked from commit a8785daf0e)
2017-03-18 01:33:16 +03:00
Thomas Tuegel
25d450c067 KDE Applications: 16.12.2 -> 16.12.3
(cherry picked from commit 06ece41778)
2017-03-17 16:46:27 -05:00
Tim Steinbach
ca750a5320 linux: 4.4.53 -> 4.4.54 2017-03-17 17:26:01 -04:00
Tim Steinbach
5579e81783 linux: 4.10.2 -> 4.10.3 2017-03-17 17:23:14 -04:00
Robin Gloster
9bfa7c9c3b robomongo: mark as broken
(cherry picked from commit 427edf1e5d)
2017-03-17 17:28:32 +01:00
Pascal Bach
ca4ae433db prometheus-unifi-exporter: init at 0.4.0
(cherry picked from commit 3728143cbc)
2017-03-17 15:44:48 +01:00
Kamil Chmielewski
fadb858e88 ponyc: 0.11.0 -> 0.11.3
(cherry picked from commit 017fddb4be)
2017-03-17 15:36:57 +01:00
Michael Raskin
7b401c71ce nixos: tests: firefox: make more comprehensive
Run Firefox inside an XTerm, it doesn't crash mysteriously this way.
Also try opening developer tools and checking that Firefox doesn't
crash in the process.

(cherry picked from commit 14a3412048)
2017-03-17 15:24:48 +01:00
Linus Heckemann
8cff9b9ccf renpy: mark as broken
(cherry picked from commit 9b62e41c1e)
2017-03-17 15:24:37 +01:00
Léo Gaspard
05fcddf977 dhparams module: condition on enable option (#23661)
Hence, the init/cleanup service only runs when the dhparams module is enabled.
(cherry picked from commit 66e54f25a1)
2017-03-17 15:23:59 +01:00
Profpatsch
0786d9f4ad modules/mlmmj: fix a typo in listaddress folder
(cherry picked from commit 6da60bb101)
2017-03-17 15:22:26 +01:00
Volth
15cc795817 icewm: fix CFGDIR
(cherry picked from commit fd61a33d2b)
2017-03-17 15:21:10 +01:00
Michael Raskin
df5a4710ff Merge pull request #23924 from 7c6f434c/improve-firefox-test
nixos: tests: firefox: make more comprehensive

(cherry picked from commit f9fb38fcae)
The test will block the channel without the xterm change.
2017-03-17 13:10:51 +01:00
Vladimír Čunát
fa39bc1f60 Merge #23917: fix firefox crashes
(cherry picked from commit 9adcebb1a9)
2017-03-17 12:35:40 +01:00
Vladimír Čunát
cbec258044 Merge branch 'release-17.03' into staging-17.03 2017-03-17 12:34:44 +01:00
Peter Hoeg
c4ff11220b kmod: 23 -> 24
(cherry picked from commit 89724f152a)
2017-03-17 16:05:30 +08:00
Peter Hoeg
820b0966ca kmod-blacklist-ubuntu: 9.3 -> 22.1
(cherry picked from commit 0c262a639e)
2017-03-17 16:05:24 +08:00
Will Dietz
3879491de2 timewarrior: patch to install all themes; use default install target.
(cherry picked from commit dc32b87082)
2017-03-16 18:53:11 +01:00
Jörg Thalheim
3913327e09 taskjuggler: remove 2.x series
The version was released 8 years ago and does not build anymore

(cherry picked from commit 61f20c94ca)
2017-03-16 18:42:35 +01:00
Daniel Brockman
112e07c234 jshon: fix null termination in read_stream.
This fixes a somewhat critical (security?) bug.

We are trying to get it merged upstream but have had no response from
the ordinary maintainer in over a week.

(See <https://github.com/keenerd/jshon/issues/53>.)

fixes #23727

(cherry picked from commit 5d6ea2d64e)
2017-03-16 18:35:05 +01:00
Joachim Fasting
b86fd7db88 travis: send emails iff commit caused the build to start failing
This setting should ensure that email notifications are sent
*only* when the commit caused the build to start failing.  That
is, no more "the build is still failing" spam.

As an alternative we could consider disabling email
notifications outright and possibly enable IRC notifications
instead.

(cherry picked from commit 541b3ec1bc)
2017-03-16 15:57:33 +01:00
Kamil Chmielewski
98cc721bc4 chromium: flashplayer: 24.0.0.221 -> 25.0.0.127
[Critical security fix]
https://github.com/NixOS/nixpkgs/pull/23889
2017-03-16 13:51:33 +01:00
Kamil Chmielewski
1f87bd6d3e go2nix: 1.1.1 -> 1.2.0
(cherry picked from commit d16b08ac85)
2017-03-16 12:55:59 +01:00
Kranium Gikos Mendoza
86252115c7 sipp: 3.4-beta2 -> 3.5.1
fixes #23945
2017-03-16 11:31:31 +01:00
Shea Levy
55da471ae5 buildGoModule: share the buildFlagsArray with the parallel subprocesses
(cherry picked from commit d6c3e74425)
2017-03-15 23:39:56 +01:00
Nikolay Amiantov
186bd52fe2 wireshark-gtk: wrap properly
(cherry picked from commit 545e267adf)
2017-03-16 00:58:50 +03:00
Renaud
7e46b92f28 JBoss AS: list known vulnerability
CVE-2015-7501

Warning in JBoss module

(cherry picked from commit 72619a86c9)
2017-03-15 17:34:19 -04:00
Joachim Fasting
893a539fcd linux_4_9: 4.9.14 -> 4.9.15
(cherry picked from commit 12648a455b)
2017-03-15 20:16:12 +01:00
Volth
d588913bae lxc: ensure directory /var/lib/lxc/rootfs
(cherry picked from commit bcc4c261be)
2017-03-15 12:44:20 +01:00
Bart Brouns
fdff442c50 physlock: fix issue 21935
(cherry picked from commit bb3ef8a95c)
2017-03-15 12:01:31 +01:00
Mogria
15e0502f99 sublime3: fix hardcoded /bin/bash when executing commands for build systems (#23561)
* sublime3: replace hardcoded /bin/bash with /usr/bin/env

exec.py in Default.package-sublime calls /bin/bash with subprocess.
See Issue #12011. Because of this builds could not be started from
withtin Sublime Text.

* sublime3: use wrapped of bash to fix internal build system

Without the wrapped version of bash (a symlink to $bash/bin/bash)
with LD_PRELOAD to glibc an relocation error occurs when trying
to run builds from within Sublime Text 3.  See Issue #12011.

(cherry picked from commit 1893ed54dc)
2017-03-15 11:40:00 +01:00
Jörg Thalheim
8ab704359b mpd: 0.20.5 -> 0.20.6
(cherry picked from commit 53d6b64a37cb1f57008c8074d32182ed0dad98c3)
2017-03-15 09:43:01 +01:00
Benjamin Staffin
b1b4653c64 nixos: Add a menu launcher for the NixOS manual
(cherry picked from commit 638e1b8243)
2017-03-15 04:40:38 -04:00
Lancelot SIX
073a8e8ba5 pythonPackages.celery_3: drop
(cherry picked from commit 1ca372e4d2)
2017-03-15 09:10:21 +01:00
Lancelot SIX
3e88ef2cb0 pythonPackages.django-raster: 0.3 -> 0.3.1
(cherry picked from commit 9041f0d8d9)
2017-03-15 09:10:04 +01:00
Nikolay Amiantov
02187c0319 python.pkgs.bleach: 1.5.0 -> 2.0.0
Fixes #23854.

(cherry picked from commit 648db95651)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
c5506e6868 pythonPackages.pywatchman: disable python 3.x and disable tests
(cherry picked from commit 4a615d90af)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
9dd8320d8d pythonPackages.dateparser: mark as broken
(cherry picked from commit 6a6d48be4e)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
6a3674d87b pythonPackages.pygal: 2.0.10 -> 2.3.1
(cherry picked from commit fd68cd4ed7)
2017-03-15 08:54:30 +01:00
Herwig Hochleitner
3d2e995abb pythonPackages.parsedatetime: 2.1 -> 2.3
(cherry picked from commit b27dfdbe66)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
bd776c33ec pythonPackages.configparser: fix with namespace packages
(cherry picked from commit d7378da028)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
04d8f8912b pythonPackages.pytest-virtualenv: 1.1.0 -> 1.2.7
(cherry picked from commit 4bfa709562)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
ec2d55c595 pythonPackages.pytest-shutil: 1.1.1 -> 1.2.8
(cherry picked from commit c9d9f072e5)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
53ebd7a2ce pythonPackages.ipython_genutils: 0.1.0 -> 0.2.0
(cherry picked from commit fc55e80ee7)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
95975a7009 pythonPackages.pyzmq: 15.2.0 -> 16.0.2
(cherry picked from commit 88a3861c7b)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
9c444a2b2b pythonPackages.prompt_toolkit: 1.0.9 -> 1.0.13
(cherry picked from commit db512addef)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
e38ceac67c pythonPackages.pickleshare: 0.5 -> 0.7.4
(cherry picked from commit c7268fa2a9)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
8eebf546dc pythonPackages.pathpy: 8.1.2 -> 10.1
(cherry picked from commit 47f77d6104)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
2880b669fb pythonPackages.pathlib2: 2.1.0 -> 2.2.1
(cherry picked from commit bd0a0c7908)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
e2f73955c2 pythonPackages.notebook: 4.3.2 -> 4.4.1
(cherry picked from commit 0c11ce6541)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
23c4eed888 pythonPackages.nbformat: 4.2.0 -> 4.3.0
(cherry picked from commit 044014826b)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
c1bbd2a30d pythonPackages.jupyter_core: 4.2.1 -> 4.3.0
(cherry picked from commit fbb30ee46f)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
1ea43b1809 pythonPackages.jupyter_client: 4.4.0 -> 5.0.0
(cherry picked from commit 2a1cceac16)
2017-03-15 08:54:30 +01:00
Frederik Rietdijk
ac7cd6d9ea pythonPackages.ipython: 5.2.1 -> 5.3.0
(cherry picked from commit 065383cde8)
2017-03-15 08:54:30 +01:00
Bjørn Forsman
5028bbaba7 qt57.full: add missing modules
qtquickcontrols2, qtwebchannel, qtwebengine, qtwebkit.

Added in the same order as the modules are listed in default.nix (and
then reformatted the block).

(cherry picked from commit db937b9d60)
2017-03-15 08:39:00 +01:00
Bjørn Forsman
7b710ef6d0 qt56.full: add missing modules
qtquickcontrols2, qtwebkit.

Added in the same order as the modules are listed in default.nix (and
then reformatted the block).

(The qt55 expression already has all modules in *full.)

(cherry picked from commit 961c73a78c)
2017-03-15 08:39:00 +01:00
Bas van Dijk
bc56929a89 wordpress: security upgrade: 4.7.2 -> 4.7.3 & other improvements (#23837)
* Moved the wordpress sources derivation to the attribute pkgs.wordpress. This
  makes it easier to override.

* Also introduce the `package` option for the wordpress virtual host config which
  defaults to pkgs.wordpress.

* Also fixed the test in nixos/tests/wordpress.nix.
(cherry picked from commit 308c09d41f)
2017-03-15 08:38:28 +01:00
Herwig Hochleitner
dc857403dd chromium: 56.0.2924.87 -> 57.0.2987.98 [Security]
(cherry picked from commit 49207a62f3)
2017-03-15 07:29:20 +01:00
Joachim Fasting
a6ef71693d grsecurity: 4.9.14-201703121245 -> 4.9.15-201703150049
Contains a fix for the n_hdlc double free bug.

(cherry picked from commit 9e60a17cb8)
2017-03-15 07:29:17 +01:00
Sander van der Burg
d9c1a77b89 disnix: 0.6 -> 0.7
(cherry picked from commit a26c51116d)
2017-03-14 23:19:53 +01:00
Franz Pletz
863deb36ff atlassian-crowd: 2.10.1 -> 2.11.1
(cherry picked from commit 5b946fdafc)
2017-03-14 23:10:54 +01:00
Franz Pletz
06165365f7 linux_4_10: 4.10.1 -> 4.10.2
(cherry picked from commit 44bd7c45dc)
2017-03-14 23:10:54 +01:00
Franz Pletz
b54314296d linux_testing: 4.11-rc1 -> 4.11-rc2
(cherry picked from commit a691c06556)
2017-03-14 23:10:53 +01:00
Franz Pletz
36854bb855 nixos/users-groups: chown home on createHome
Fixes #23619.

(cherry picked from commit 9ea35eae7a)
2017-03-14 23:10:53 +01:00
Robert Helgesson
3905792c94 eclipses: add dependencies as build inputs
Having `glib` in the build inputs will allow its build hook to
trigger. Also adds `gsettings_desktop_schemas` as a dependency since
Eclipse appears to need the schemas under certain circumstances.

(cherry picked from commit 5228bc9f2e)
2017-03-14 20:59:15 +01:00
taku0
3c61bc12b0 flashplayer: 24.0.0.221 -> 25.0.0.127 (#23889)
(cherry picked from commit c3772678e9)
2017-03-14 16:03:00 +01:00
Robin Gloster
adaf48857b refind: mark as broken
(cherry picked from commit c555556af5)
2017-03-14 15:37:16 +01:00
Robin Gloster
118011a090 hol: mark as broken
(cherry picked from commit f70a896094)
2017-03-14 15:37:16 +01:00
Robin Gloster
1ed93035fe urt: remove
(cherry picked from commit 770794cbfe)
2017-03-14 14:42:06 +01:00
Willi Butz
73fdfb5422 spotify: get source via https instead of plain http
(cherry picked from commit e4eb46129d)
2017-03-14 14:33:53 +01:00
Wei-Ming Yang
33793389ba fix the incorrect elasticsearch plugin name
elasticsearch_analisys_lemmagen -> elasticsearch_analysis_lemmagen
(cherry picked from commit 330c7e4a5f)
2017-03-14 14:33:16 +01:00
Peter Simons
235e798fc8 esniper: 2.32.0 -> 2.33.0
(cherry picked from commit 58807f75bc)
2017-03-14 14:16:04 +01:00
Frederik Rietdijk
3c6777a1c9 hypothesis: disabled for Python 3.3
(cherry picked from commit a312abedeb)
2017-03-14 10:50:15 +01:00
Tim Steinbach
57e0f0da8f linux: 4.1.38 -> 4.1.39
(cherry picked from commit 18684a4892)
2017-03-13 20:16:47 -04:00
Tim Steinbach
591d91b358 linux: 4.4.52 -> 4.4.53
(cherry picked from commit 9ac82a773c)
2017-03-13 20:16:44 -04:00
Vladimír Čunát
1c6cb9cb05 Merge #23860: llvmPackages_4: rc3 -> release
(cherry picked from commit bfed19cfaa)
2017-03-14 00:05:17 +01:00
Tim Steinbach
d4465f80a8 Merge pull request #23846 from mayflower/jenkins_2.49
jenkins: 2.44 -> 2.49(cherry picked from commit bc1f692e49)
2017-03-13 18:10:14 -04:00
Frederik Rietdijk
197b247e6b hypothesis: 3.6.0 -> 3.6.1
(cherry picked from commit 57e768f58e)
2017-03-13 16:39:17 +01:00
Frederik Rietdijk
eca54d99c6 pythonPackages.traitlets: 4.3.1 -> 4.3.2
(cherry picked from commit 8aee2b5c4f)
2017-03-13 16:39:17 +01:00
Frederik Rietdijk
019350ac01 ipython_genutils: fix for python 3.3 and 3.4
(cherry picked from commit 891a051df1)
2017-03-13 16:39:17 +01:00
Frederik Rietdijk
b095c99989 pythonPackages.hypothesis: fix for python 3.3
(cherry picked from commit 6f90badeac)
2017-03-13 16:39:17 +01:00
Robin Gloster
2d817a37e0 emboss: fix build
(cherry picked from commit e2a13af49c)
2017-03-13 13:16:20 +01:00
Robin Gloster
fec49efc98 ispc: fix build
(cherry picked from commit dbbdccdd65)
2017-03-13 12:08:29 +01:00
Robin Gloster
82b389fcfc ponyc: 0.10.0 -> 0.11.0
(cherry picked from commit 80bd50a6e4)
2017-03-13 11:44:04 +01:00
Robin Gloster
64f3d0c1be purePackages.octave: 0.7 -> 0.9
(cherry picked from commit c836651084)
2017-03-13 11:04:09 +01:00
Vladimír Čunát
ed509de913 Merge branch 'release-17.03' into staging-17.03 2017-03-13 10:38:23 +01:00
Vladimír Čunát
63ae3f061a gnutls: bugfix+security 3.5.9 -> 3.5.10
http://gnutls.org/security.html#GNUTLS-SA-2017-3
(cherry picked from commit b264486cf1)
2017-03-13 10:37:58 +01:00
Joachim Fasting
a83862ef10 tinycc: 0.9.27pre-20170220 -> 20170225
Contains a fix for x86-64 asm gen and unified cross-compilation.

(cherry picked from commit 3c37edb928)
2017-03-13 09:26:48 +01:00
Jörg Thalheim
f7cbccbf42 pump.io: fix tests
fixes #23568

(cherry picked from commit 41625dcab6)
2017-03-13 09:24:51 +01:00
Rodney Lorrimar
b5009c2cf1 pumpio service: don't keep secrets in nix store
Added extra config options to allow reading passwords from file rather
than the world-readable nix store.

The full config.json file is created at service startup.

Relevant to #18881

(cherry picked from commit f488b1811b)
2017-03-13 09:24:41 +01:00
Rodney Lorrimar
bb8dd2f2d0 pumpio service: adjust upload directory config for 3.0.0
These changes are backwards compatible.

(cherry picked from commit f1a1490135)
2017-03-13 09:24:24 +01:00
Rodney Lorrimar
6866170eaa pump.io: 1.0.0 -> 3.0.0
The package stopped building for some unknown reason (npm could no
longer fetch a module).

This is one of the build failures listed in #23253.

    http://hydra.nixos.org/build/49551309
    http://hydra.nixos.org/build/49548753

Easiest fix is to upgrade to latest stable version and regenerate
packages with node2nix.

The databank-memcached dependency needed to be dropped due to
dependency failures.

(cherry picked from commit 252e58a95e)
2017-03-13 09:20:24 +01:00
Rodney Lorrimar
321481b4d5 nodePackages: support github:owner/repo scheme for package deps
JS devs found a new way to be annoying - adjust code accordingly.

Have also put this change in PR svanderburg/node2nix#40

(cherry picked from commit 453529bd60)
2017-03-13 09:17:38 +01:00
José Romildo Malaquias
80345b551a enlightenment: 0.21.5 -> 0.21.7 (#23791)
(cherry picked from commit 16023ef598)
Bug fix/stability release for 0.21.x
2017-03-13 01:19:43 +01:00
José Romildo Malaquias
08381c07e0 qbittorrent: 3.3.10 -> 3.3.11 (#23703)
(cherry picked from commit 196f64d675)
Fixes a number of bugs, including some security issues with the
web interface.
2017-03-13 01:19:41 +01:00
tv
0af596f21e exim: 4.88 -> 4.89 (#23670)
(cherry picked from commit ba0b527456)
Contains multiple bug fixes.
2017-03-13 01:19:34 +01:00
Kranium Gikos Mendoza
e47b819ef1 asterisk: use fetchsvn for vendored library
(cherry picked from commit ac61ddef8f)
/cc #23124, #23253.  It failed to build otherwise.
2017-03-12 23:36:03 +01:00
Vladimír Čunát
a3939d186d clisp-tip: make the build more reliable
Hydra shows it sometimes fails without autoconf:
http://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.clisp-tip.x86_64-linux
I can't say I understand why this happened.

(cherry picked from commit 848423f223)
/cc #23253 and maintainers @7c6f434c, @tohl.
2017-03-12 23:11:36 +01:00
obadz
9037001880 coreclr: mark broken
(cherry picked from commit 1dd16a9374)
2017-03-12 21:32:42 +00:00
c74d
d44bf4c937 ripgrep: install man-page
Modify the `ripgrep` package to install the tool's manual page.

I have tested this commit per nixpkgs manual section 11.1 ("Making
patches").

(cherry picked from commit a856dd50b5e9d7f4de1acd158c4ae548f6de86be)
2017-03-12 22:12:48 +01:00
Rodney Lorrimar
a99e4f28e9 scala: put docs in correct subdirectory
Under NixOS, /run/current-system/sw/share/doc was getting the license
file, etc.

(cherry picked from commit e333a71478)
2017-03-12 20:33:48 +01:00
Nikolay Amiantov
03938aa359 makeDBusConf: re-add XDG directories for session bus
Fixes #23770.

(cherry picked from commit c05ac3ea12)
2017-03-12 22:17:33 +03:00
Joachim Fasting
74c77fa944 linux_4_9: 4.9.13 -> 4.9.14
(cherry picked from commit 8091c1b208)
2017-03-12 19:59:19 +01:00
Joachim Fasting
537aa63248 grsecurity: 4.9.13-201703052141 -> 4.9.14-201703121245
(cherry picked from commit 4c211bdc63)
2017-03-12 19:59:13 +01:00
ndowens
463eb1649f drumstick: 1.0.2 -> 1.1.0
(cherry picked from commit 45cfd3969a)
2017-03-12 20:24:12 +02:00
Thomas Tuegel
b45aee491f Merge pull request #23766 from orivej/kcachegrind-kdelibs
kcachegrind: init at 16.2.2

(cherry picked from commit 28e78fd3dc)
It's just adding a new package (back).
2017-03-12 19:05:29 +01:00
Vladimír Čunát
1f86d1d5bb haskellPackages.llvm-general-darwin: fix #23794
by hiding under llvm-general.  There seems no use in a separately named
attribute.  The derivations are unchanged.

(cherry picked from commit 69448187a4)
2017-03-12 18:22:42 +01:00
zetok
4d25eaafa7 gresecurity docs: fix incorrect option (#23789)
(cherry picked from commit 4ca17dd6c0)
2017-03-12 15:06:50 +01:00
Tuomas Tynkkynen
68cc97d306 linux_testing: 4.10-rc7 -> 4.11-rc1
Some config options got removed, so conditionalize them.

(cherry picked from commit 77c49794cd)
2017-03-11 16:11:42 +02:00
Franz Pletz
907a1f03b2 firmwareLinuxNonfree: 2017-02-06 -> 2017-03-11
Fixes #22365.

(cherry picked from commit c3c69535aa)
2017-03-11 15:09:29 +01:00
Robin Gloster
56f3c6b10a msilbc: fix build
(cherry picked from commit 330b0d194600001251170f66b335c2ef89b7a432)
2017-03-11 15:07:26 +01:00
Robin Gloster
e60ab0c2aa lightdm_qt: fix build
(cherry picked from commit d6d796812a)
2017-03-11 14:53:43 +01:00
Robin Gloster
1712e583e7 suil-qt5: fix build
(cherry picked from commit 91bbd73ffa)
2017-03-11 14:48:05 +01:00
Joachim Fasting
ead8fb7e8a vndr: meta.licence -> license
(cherry picked from commit 5bf3b4c7ff)
2017-03-11 14:43:00 +01:00
Joachim Fasting
8106e0f3a2 pythonPackages.pep257: meta.lecense -> license
(cherry picked from commit ba499aa845)
2017-03-11 14:42:46 +01:00
Gregor Kleen
ae81e79c10 das_watchdog: fix service type
(cherry picked from commit 899fd868ea)
2017-03-11 14:36:14 +01:00
Franz Pletz
543eeae23d qemu_test: don't apply patch for CVE-2016-9602
Both patches are conflicting. Keeping the vulnerability unpatched in qemu
binaries used for nixos test is tolerable.

(cherry picked from commit 3a4e2376e4)
2017-03-11 13:45:24 +01:00
Franz Pletz
f2c121f3ff batman-adv: 2016.5 -> 2017.0.1
(cherry picked from commit 71161443b4)
2017-03-11 09:42:13 +01:00
Franz Pletz
55e094c482 phpfpm module: set correct nixos sendmail path
(cherry picked from commit 323d0fdd5a)
2017-03-11 09:42:12 +01:00
Franz Pletz
8be6bebec1 qemu: fetch vnc bugfix patch from debian
This version of the patch applies cleanly to the 2.8.0 release.

(cherry picked from commit 621e7a9945)
2017-03-11 09:42:12 +01:00
Franz Pletz
c554cbf8c2 wget: add patch for CVE-2017-6508
(cherry picked from commit 39e8db7849)
2017-03-11 09:15:15 +01:00
Franz Pletz
641ad2e922 qemu: add patches for multiple CVEs
New upstream patch function and patches for fixing a bug in the patch for
CVE-2017-5667 and the following security issues:

  * CVE-2016-7907
  * CVE-2016-9602
  * CVE-2016-10155
  * CVE-2017-2620
  * CVE-2017-2630
  * CVE-2017-5525
  * CVE-2017-5526
  * CVE-2017-5579
  * CVE-2017-5856
  * CVE-2017-5857
  * CVE-2017-5987
  * CVE-2017-6058

(cherry picked from commit c512180f9c)
2017-03-11 09:15:14 +01:00
Franz Pletz
50586f2441 linux: 3.12.70 -> 3.12.71
(cherry picked from commit ff2313a6c6)
2017-03-11 09:15:14 +01:00
Franz Pletz
57e693ca43 lxc: add patch for CVE-2017-5985
(cherry picked from commit 3bd44428cf)
2017-03-11 09:15:14 +01:00
Franz Pletz
952e7f3910 pidgin: 2.11.0 -> 2.12.0 for CVE-2017-2640
Also removes unmaintained plugins.

See https://bitbucket.org/pidgin/www/src/tip/htdocs/ChangeLog.

(cherry picked from commit 4e0375cb59)
2017-03-11 09:15:13 +01:00
Michael Raskin
328eb9da7c libreoffice-still: apply the patch for ICU 58
see #17126

(cherry picked from commit f3a4f31554)
2017-03-10 22:41:52 +01:00
Susan Potter
a0ccb7019c dd-agent: 5.5.2 -> 5.11.2
(cherry picked from commit 35f9f63a39)
2017-03-10 17:47:57 +01:00
Susan Potter
ac6baf242e dd-agent: fix Python missing dependencies and versions
(cherry picked from commit 17a8d19032)
2017-03-10 17:47:47 +01:00
Raymond Gauthier
f51f167008 brscan4: 0.4.3-4 -> 0.4.4-2
Also add missing linux32 support.

(cherry picked from commit c7d9032b51)
2017-03-10 16:27:43 +02:00
Nikolay Amiantov
39691e1c39 networkmanagerapplet: add dconf and glib_networking
Fixes #23700.

(cherry picked from commit 7dcc40b674)
2017-03-10 16:15:09 +03:00
Peter Hoeg
064cda9b1a dropbox: 20.4.19 -> 21.4.25
(cherry picked from commit bb1496332ed66dbbd851fa13bf52929e384d1e32)
2017-03-10 14:23:49 +08:00
Vladimír Čunát
ab0824edf8 Merge #23663: thunderbird*: security 45.7.1 -> 45.8.0
(cherry picked from commit 7b7496a256)
2017-03-10 01:07:54 +01:00
Tuomas Tynkkynen
d2a52af05c simavr: Disable parallel build
http://hydra.nixos.org/build/49945319/nixlog/1/raw
(cherry picked from commit 5bb99ca0f6)
2017-03-10 01:59:52 +02:00
Tuomas Tynkkynen
8af59cfa04 john: Disable parallel build
http://hydra.nixos.org/build/49940032/nixlog/1/raw
(cherry picked from commit e7ce27f9ce)
2017-03-10 01:49:53 +02:00
Tuomas Tynkkynen
b8df6bebb0 pshs: 0.3 -> 0.3.1, fix source location
(cherry picked from commit fe20a32751)
2017-03-10 01:21:11 +02:00
Vladimír Čunát
1d92624ec2 Merge older staging-17.03 into release-17.03
Done more testing of the mesa bump; Hydra looks OK.
2017-03-09 22:24:23 +01:00
Lancelot SIX
804329a5ab qgis: 2.18.3 -> 2.18.4
(cherry picked from commit be20195704)
2017-03-09 21:38:14 +01:00
rnhmjoj
a7e26c9d9b ostinato: refactor
(cherry picked from commit 1665102688)
2017-03-09 22:28:59 +02:00
rnhmjoj
b77a47dbef libpcap: fix missing remote-ext.h error
(cherry picked from commit 4c33ea35b7)
2017-03-09 22:28:59 +02:00
Vladimír Čunát
0dd1ecef35 knot-resolver: maintenance 1.2.3 -> 1.2.4
(cherry picked from commit 74f92e9556)
2017-03-09 21:26:28 +01:00
edef
f84dcaa9d2 verilator: fix Perl shebangs
(cherry picked from commit 2c02c84cdc)
2017-03-09 18:27:26 +01:00
Orivej Desh
7f172a4c57 nixos/iso-image: support boot from USB disks
(cherry picked from commit 838051e9cd)
2017-03-09 16:05:53 +02:00
taku0
4c58afd1a2 firefox, firefox-bin: 51.0.1 -> 52.0, firefox-esr: 45.7esr -> 52.0esr
(cherry picked from commit a24aaae602)
2017-03-09 14:40:09 +01:00
Alexey Shmalko
ebdb5431c0 nss: 3.28.1 -> 3.28.3
This should fix firefox build, which fails due to nss being too old.

(cherry picked from commit cb670556c5)
2017-03-09 14:39:55 +01:00
Alexey Shmalko
feb38d4d54 sqlite: 3.16.2 -> 3.17.0
Firefox requires the latest sqlite to build:
```
checking for sqlite3 >= 3.17.0... Requested 'sqlite3 >= 3.17.0' but version of SQLite is 3.16.2
configure: error: Library requirements (sqlite3 >= 3.17.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
```

(cherry picked from commit d4bb1c786f)
2017-03-09 14:39:55 +01:00
Alexey Shmalko
b602a308ab icu: 57.1 -> 58.2
Firefox requires new version of the icu to build:
```
checking for icu-i18n >= 58.1... Requested 'icu-i18n >= 58.1' but version of icu-i18n is 57.1
configure: error: Library requirements (icu-i18n >= 58.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
```

(cherry picked from commit 28598c01e7)
2017-03-09 14:39:54 +01:00
Robin Gloster
5bef185ce0 Merge branch 'release-17.03' into staging-17.03 2017-03-09 14:35:53 +01:00
Joachim Fasting
b9e4091687 torbrowser: 6.5 -> 6.5.1
(cherry picked from commit 74f8e0fd7a)
2017-03-09 14:25:44 +01:00
Nikolay Amiantov
1478639ab0 primus: fix if nvidia is not used
Fixes #23628

(cherry picked from commit f36b72107c)
2017-03-09 14:38:40 +03:00
Shea Levy
08b49cfc54 stripDirs: Silence annoying 'File format not recognized' errors
(cherry picked from commit d39be63a10)
2017-03-08 19:19:18 -05:00
Jens Grunert
74af3800ad missing dconf in buildInput
(cherry picked from commit 6fb645037d)
2017-03-09 00:59:57 +01:00
Jens Grunert
1efa074939 corebird: missing dependencies (glib_networking)
(cherry picked from commit 7771db2eb6)
2017-03-09 00:59:32 +01:00
Tuomas Tynkkynen
cdd5709e45 raspberrypifw, linux_rpi: 1.20161020 -> 1.20170303
(cherry picked from commit 5f5b87107f)
2017-03-08 21:36:24 +02:00
Tuomas Tynkkynen
b89623e936 gtkglextmm: Mark as broken
No release since 2010. Build broken. Sounds like a library, but no
users. GNOME 2 stuff.

http://hydra.nixos.org/build/49554500/nixlog/3
(cherry picked from commit 8dce538640)
2017-03-08 20:16:51 +02:00
Tuomas Tynkkynen
6c0b2366e8 delve: Disable on i686
(cherry picked from commit a3a21a7245)
2017-03-08 20:10:24 +02:00
Rickard Nilsson
a6209c29be haskellPackages.streaming-eversion: dontCheck
(cherry picked from commit fb5369dbe9)
2017-03-08 17:21:48 +01:00
Jörg Thalheim
c554a0c97f purple-facebook: 2016-04-09 -> 0.9.0
(cherry picked from commit 2df1d3f828)
2017-03-08 15:31:57 +01:00
Profpatsch
9dc3f75b0b networking/bonds: fix examples
After the change of the bonding options, the examples were not quite correct.
The diff is over-the top because the new `let` needs everything indented.

Also add a small docstring to the `networkd` attr in the networking test.

(cherry picked from commit 22c265182f)
2017-03-08 15:21:23 +01:00
Tuomas Tynkkynen
2461c2977f mess: Mark broken
Even fixing the source urls doesn't make it build.

(cherry picked from commit 413bc03986)
2017-03-08 16:14:52 +02:00
Tuomas Tynkkynen
c5a10ac56f libp11: Fetch src from GitHub
(cherry picked from commit c8402dde15)
2017-03-08 15:35:07 +02:00
Ricardo Ardissone
ade5837350 gplates: use boost 160
update 161 changed reference parameters for optional
https://hydra.nixos.org/build/49707856/nixlog/1
http://www.boost.org/doc/libs/1_61_0/libs/optional/doc/html/boost_ooptional/relnotes.html

(cherry picked from commit e17d3d4ef1)
2017-03-08 13:05:36 +02:00
Tuomas Tynkkynen
0ccfb448f3 grub2: Make EFI grub work on aarch64
(cherry picked from commit a9a706770a)
2017-03-08 00:34:56 +02:00
Vladimír Čunát
f2a123c66e mesa: maintenance 17.0.0 -> 17.0.1
(cherry picked from commit 17b64e8929)
2017-03-07 22:00:50 +01:00
Vladimír Čunát
f9489cc540 Merge #23583: inetutils: fix whois for canadian domains
(cherry picked from commit 09c7601c20)
2017-03-07 21:33:34 +01:00
ndowens
ee0e856a47 scanmem: 0.15.6 -> 0.16
(cherry picked from commit cc9b960f48)
2017-03-07 17:27:46 +01:00
Peter Simons
83ba40c369 haskell-QuickCheck: fix build with ghc-7.6.x
(cherry picked from commit e0908699ff)
2017-03-07 15:44:36 +01:00
Robin Gloster
7206060114 memtest86Plus: fix runtime errors with fortify hardening
fixes #6630

(cherry picked from commit 32eecf9877)
2017-03-07 15:41:56 +01:00
Joachim Fasting
3007826374 grsecurity: 4.9.13-201702270729 -> 201703052141
(cherry picked from commit 17d80c49fa)
2017-03-07 15:19:08 +01:00
Joachim Fasting
3df572e156 btsync module: remove redundant example
The default value already gives a good example of what values to
put here.

(cherry picked from commit f278793fdb)
2017-03-07 15:19:03 +01:00
Tristan Helmich
b28a514e7e graylog: 2.2.1 -> 2.2.2
(cherry picked from commit 1af3a9854f)
2017-03-07 15:13:46 +01:00
Franz Pletz
d37b68dee3 phpfpm service: fix phpOptions
Broken due to #23216.

(cherry picked from commit d7674dabba)
2017-03-07 15:09:43 +01:00
Peter Simons
37ea115baf Synchronize R infrastructure with 'master'. 2017-03-07 14:58:21 +01:00
Robin Gloster
1fc9116c48 kiwix: remove unused param
(cherry picked from commit b94e253e69)
2017-03-07 14:16:43 +01:00
Robin Gloster
74541fc6af kiwix: fix eval and build
(cherry picked from commit 09d7f7dfbd)
2017-03-07 14:16:43 +01:00
Jan Malakhovski
50394ae5b9 kiwix: fix the build by using custom ctpp2
(cherry picked from commit 8698782554)
2017-03-07 14:16:43 +01:00
Jan Malakhovski
bf2a7853d0 kiwix: refactor expression, push pugixml into its own derivation
(cherry picked from commit 659fb3b757)
2017-03-07 14:16:42 +01:00
Joachim Fasting
68bf6ef61e nixos/modules: use defaultText/literalExample where applicable
Primarily to fix rendering of default values/examples but also
to avoid unnecessary work.

(cherry picked from commit 15da23d5c1)
2017-03-07 14:16:31 +01:00
Joachim Fasting
ad65b288e8 search module: add missing types
(cherry picked from commit 540163e4a4)
2017-03-07 14:15:52 +01:00
Eelco Dolstra
fc5d50ed58 Remove nixFallback
This causes unintended schema upgrades, and is no longer needed now
that we have nixos/modules/installer/tools/nix-fallback-paths.nix.

(cherry picked from commit d72a34311a)
2017-03-07 13:04:35 +01:00
Benno Fünfstück
24472d433c mpdris2: install locale files to correct location
The package included outdated intltool makefiles, resulting in installation of
local files to `$out/'@DATADIRNAME'`. Running `intltoolize -f` forces
regeneration of the Makefile and fixes the issue.

(cherry picked from commit f9b08c9dbb)
2017-03-07 13:02:45 +01:00
Benno Fünfstück
906cea1196 dvdisaster: fix $out variable expansion (makeFlags)
Make requires variables with more than one letter to be surrounded by parentheses,
like `$(out)`. Just writing `$out` will be interpreted as `$o` followed by `ut`, so
the package installed its documentaion to `ut/share/doc`.

/cc maintainers @jgeerds @nckx

(cherry picked from commit 3449107d68)
2017-03-07 13:02:35 +01:00
Jörg Thalheim
e95acf6e81 xfstests: set correct echo binary
(cherry picked from commit 13ed7e6631)
2017-03-07 13:01:48 +01:00
Matthias Beyer
431893ccfb Wrap command in <command>
(cherry picked from commit 87f57de8e5)
2017-03-07 12:56:35 +01:00
Matthias Beyer
edb47a364e nixos doc xfce: Tabs -> spaces
(cherry picked from commit 0a18a56375)
2017-03-07 12:56:21 +01:00
Matthias Beyer
cd6c5976eb doc: Remove indention from program listings
(cherry picked from commit c56587eb30)
2017-03-07 12:56:07 +01:00
Matthias Beyer
0cb1e29ebe nixos doc xfce: Fix missing space
(cherry picked from commit 1e3dec3baa)
2017-03-07 12:55:55 +01:00
Joachim Schiele
94fcc17b94 nixos/tests/leaps.nix: fixed race condition
(cherry picked from commit f8ad48ea1d)
2017-03-07 12:54:34 +01:00
Peter Simons
502892f563 leksah: mark build as broken to fix evaluation error 2017-03-07 12:22:55 +01:00
Peter Simons
5612f7e7b1 haskell-lol-cpp: disable build on i686 to avoid https://github.com/cpeikert/Lol/issues/29 2017-03-07 11:25:39 +01:00
Peter Simons
23fea89e18 Disable integer-simple variant of GHC 7.6.3 due to http://hydra.nixos.org/build/49538087.
Cc: @basvandijk
2017-03-07 11:21:37 +01:00
Jörg Thalheim
64c6df5e24 lxcfs: 2.0.4 -> unstable-2017-03-02
(cherry picked from commit 94497a0ef3)
2017-03-07 10:53:23 +01:00
Will Dietz
08a4888c3a mendeley: 1.16.3 -> 1.17.8, multiple improvements
* don't use bundled qt
* fix link-handler script, autorun as 'normal'
* fix execution on grsec kernels

(cherry picked from commit 37315d65a0)
2017-03-07 10:23:43 +01:00
Jan Malakhovski
586e9598ef nixos: network-interfaces-scripted: don't require mstpd when rstp is off
(cherry picked from commit 55996b8daf)
2017-03-06 20:43:34 -05:00
Daiderd Jordan
f518d5e6cf znc: 1.6.3 -> 1.6.4
(cherry picked from commit 6f88f8ca1b)
2017-03-06 20:11:08 -05:00
Graham Christensen
6111f6a756 mailpile: mark as insecure, pending removal
(cherry picked from commit 85b47bbd5e)
2017-03-06 18:03:15 -05:00
Robert Helgesson
9279742eed photivo: fix build with lensfun >= 0.3
(cherry picked from commit 747b62f909)
2017-03-06 17:46:06 -05:00
Robert Helgesson
7618a9f481 javasvn: remove
Upstream URL is invalid and the package has not had direct attention
since June 2006.

(cherry picked from commit a3e6b41d36)
2017-03-06 23:36:37 +01:00
Bart Brouns
3cce70d3ab kdenlive: phonon-backend-vlc -> phonon-backend-gstreamer
(cherry picked from commit abc0421c46)
2017-03-06 23:01:21 +01:00
Franz Pletz
fbab9a9622 youtubeDL: 2017.02.27 -> 2017.03.07
(cherry picked from commit 3fa2a5dc23)
2017-03-06 22:46:14 +01:00
Jörg Thalheim
0b43cdf03e dmtcp: 2.3.1 -> 2.5.0
(cherry picked from commit 46ba5acd82)
2017-03-06 22:02:17 +01:00
Jörg Thalheim
cdc3eb0745 xapian-ruby: link against correct xapian
(cherry picked from commit b10fb4624b)
2017-03-06 20:25:02 +01:00
Ricardo Ardissone
fa63a32348 tome4: 1.4.6 -> 1.4.9 2017-03-06 19:45:46 +01:00
Bart Brouns
606c50e9fe guitarix: remove webkit, add compile flags (#23455)
as recomended by the author: https://sourceforge.net/p/guitarix/mailman/message/33688855/

(cherry picked from commit 00ffbf060c)
2017-03-06 19:30:39 +01:00
Benno Fünfstück
84cb907ca1 phonon-backend-gstreamer: don't create $out/$out/share/icons
The build system tries to update the mtime of the icons directory if
`DESTDIR` is unset. That code has bug though that does not deal well
with absolute `CMAKE_SHARE_PREFIX` resulting a double prefix bug.

Setting `DESTDIR=/` (should be a no-op) fixes this.

(cherry picked from commit 128901e09f)
2017-03-06 18:22:41 +01:00
Benno Fünfstück
eb4c867506 ocamlgraph: fix binary location (binaries had double prefix path)
Due to setting `DESTDIR` *and* `exec_prefix` (defaulted to `$prefix`), binaries
ended up in `$out/$out/bin` instead of just $out/bin. Not setting `DESTDIR` and adapting
the `LIBDIR` patch a little fixes this issue.

(cherry picked from commit dd23d08b90)
2017-03-06 18:22:41 +01:00
Benno Fünfstück
60ddd43610 hhvm: fix location of include files in $out
Fixes a "double prefix" issue, where parts of the include files
for hhvm where located in `$out/$out/include` instead of `$out/include`.

(cherry picked from commit 029c3f917e)
2017-03-06 18:22:40 +01:00
Benno Fünfstück
72727f90bb opensc: remove obsolete DESTDIR patch
This patch was actively causing harm, because it lead to a "double prefix"
issue where the etc files were installed into $out/$out/etc instead of just
$out/etc.

(cherry picked from commit c0bfcdf3a6)
2017-03-06 18:22:40 +01:00
Peter Hoeg
fa2539bb81 xca: build against qt 5.6 as 5.7 segfaults
(cherry picked from commit 3f34000358)
2017-03-06 18:22:40 +01:00
Peter Hoeg
5bbc3e5c70 qsyncthing: build against qt 5.6 as 5.7 segfaults
(cherry picked from commit 4618585e5e)
2017-03-06 18:22:40 +01:00
Jaka Hudoklin
632f979869 pulseaudio module: set cookie env variable if running in systen wide mode
(cherry picked from commit c5607ceec5)
2017-03-06 18:22:40 +01:00
Eric Sagnes
77f498780e fcitx: fix fcitx-qt5 attribute path
(cherry picked from commit acb1032968)
2017-03-06 18:22:40 +01:00
Thomas Strobel
b8306929ef improve: modules/virtualisation/qemu-vm.nix
disk image for qemu VM with bootloader:
* remove redundant command
* improve readability
* improve execution speed
* make output more reproducible

(cherry picked from commit b9a7aacef7)
2017-03-06 18:22:40 +01:00
Anderson Torres
cb2c5caf13 sound-of-sorting: 0.6.5 -> 20150721 (#23549)
* sound-of-sorting: 0.6.5 -> 20150721

* sound-of-sorting: correct unstable version format

(cherry picked from commit e96a2f8450)
2017-03-06 18:01:04 +01:00
Alexey Muranov
91fe20cad0 doc: fix code highlighting, use valid Nix syntax
Fix code syntax highlighting by specifying language in every code block
and adding some context to Nix code blocks to make them valid
expressions.  Use the same markup style for all code blocks.  Reformat
some code blocks.

fixes #23535

(cherry picked from commit 34afc31c49)
2017-03-06 17:52:14 +01:00
Alexey Muranov
1fdaa6620c doc: cleanup whitespace in python.md
(cherry picked from commit 97c9ed0ba1)
2017-03-06 17:51:35 +01:00
Thomas Strobel
ad24ba30d3 fix: "nixos-rebuild build-vm-with-bootloader"
(cherry picked from commit 0a8d9779c5)
2017-03-06 17:43:40 +01:00
Eelco Dolstra
17f6e7bfde nix-daemon: Remove a bunch of unnecessary environment variables
(cherry picked from commit 3971876585)
2017-03-06 16:54:59 +01:00
Eelco Dolstra
630e3809a1 Fix incorrect $NIX_BUILD_HOOK on Nix 1.12
(cherry picked from commit 3070c88798)
2017-03-06 16:54:59 +01:00
Eelco Dolstra
02546ff817 nixos-rebuild: Sync /nix/store only
We only care about /nix/store because its contents might be out of
sync with /nix/var/nix/db. Syncing other filesystems might cause
unnecessary delays or hangs (e.g. I encountered a case where an NFS
mount was taking a very long time to sync).

(cherry picked from commit 136f77b7b9)
2017-03-06 16:54:59 +01:00
Thomas Tuegel
3cc2a33d9b nixos/doc/manual: rename plasma5 desktop
(cherry picked from commit ecb65eceaa)
2017-03-06 16:54:00 +01:00
Thomas Tuegel
cf74cb2b7c nixos-generate-config: rename plasma5 desktop
(cherry picked from commit d91637c546)
2017-03-06 16:54:00 +01:00
Thomas Tuegel
5a1ff8cf05 nixos: fix renaming warning in graphical profile
(cherry picked from commit 8e6bdcc731)
2017-03-06 16:54:00 +01:00
Thomas Tuegel
8df2ea5217 nixos/tests/trac: fix renaming warning
(cherry picked from commit 60817e4715)
2017-03-06 16:54:00 +01:00
Thomas Tuegel
6502e9ffe0 nixos/tests/phabricator: fix renaming warning
(cherry picked from commit e7b0b2bb66)
2017-03-06 16:53:59 +01:00
Thomas Tuegel
f6cd3bda44 nixos/tests/plasma5: fix test name
(cherry picked from commit dcee54c935)
2017-03-06 16:53:59 +01:00
Thomas Tuegel
8dc7f7d508 nixos: fix renaming warning in KDE closure
(cherry picked from commit 7755fcd543)
2017-03-06 16:53:09 +01:00
Thomas Tuegel
f769c470cf nixos/tests: fix Plasma 5 test
(cherry picked from commit 0da421ce17)
2017-03-06 16:47:54 +01:00
Thomas Tuegel
d1ed241f42 iso_graphical: fix warning about Plasma 5 desktop module name
(cherry picked from commit 80e883a7c3)
2017-03-06 16:47:12 +01:00
Thomas Tuegel
678f5dde01 fricas: 1.2.2 -> 1.3.1
(cherry picked from commit 28cb067600)
2017-03-06 16:45:49 +01:00
Tuomas Tynkkynen
befc166834 sbagen: Fix build
(cherry picked from commit 064a1e09ad)
2017-03-06 17:13:55 +02:00
Peter Simons
c0ecd3109f Synchronize Haskell package set from 'master'. 2017-03-06 14:39:41 +01:00
Rob Vermaas
fce036d164 Update nixUnstable 2017-03-06 13:31:06 +00:00
ndowens
6c2e2556b6 flacon: 2.0.1 -> 2.1.1
fixes #23529

(cherry picked from commit 4ae0e8c9a9)
2017-03-06 10:47:18 +01:00
Ricardo Ardissone
4e6a5b57cd pcsxr: remove name conflict with zlib 1.2.9
(cherry picked from commit 92d8680785)
2017-03-06 09:01:06 +01:00
Renaud
c7509af0fb uriparser: 0.8.2 -> 0.8.4
Fixed the Makefile for the doc : there is no .map files to install in
this release since dot outputs images in PNG and SVG

fixes #23456

(cherry picked from commit f39e718cab)
2017-03-06 08:44:09 +01:00
Jörg Thalheim
19746a1dcc Merge pull request #23284 from veprbl/release-17.03_herwig_fix
herwig: disable i686-linux
2017-03-06 08:32:44 +01:00
Jörg Thalheim
e5a4ad8de3 alliance: mark as broken
there is no maintainer for this package and even debian looks
for a new maintainer.

(cherry picked from commit 99e74e9509)
2017-03-06 08:29:27 +01:00
Jörg Thalheim
f100d4d049 fcron: add missing meta.platforms
(cherry picked from commit 82fda65c8a)
2017-03-05 23:43:48 +01:00
Henry Till
0cac30f534 racket: disable i686 builds
ref #23253

(cherry picked from commit 6ed6731e36)
2017-03-05 23:28:49 +01:00
Jörg Thalheim
6bc2d872aa fcron: 3.1.2 -> 3.2.1
fixes #23320 #23413

(cherry picked from commit 947815f59f)
2017-03-05 22:46:11 +01:00
Vladimír Čunát
5c1fdb1df4 Merge #22562: xfce4-mailwatch-plugin: init at 1.2.0
(cherry picked from commit 8bcbd4fca3)
2017-03-05 21:12:55 +01:00
Matthias Beyer
2fbc8a970d xfce4-mpc-plugin: init at 0.4.5 (#22560)
(cherry picked from commit 20c2f51967)
2017-03-05 21:12:48 +01:00
Matthias Beyer
028aa8b556 xfce-timer-plugin: init at 1.6.0 (#22563)
(cherry picked from commit 21c51c570e)
2017-03-05 21:12:44 +01:00
Jesper Geertsen Jonsson
7c767a3cab grsecurity docs: fix syntax and indentation errors
Closes https://github.com/NixOS/nixpkgs/pull/23515

(cherry picked from commit 056e57678d)
2017-03-05 16:09:06 +01:00
Alistair Bill
4ff9732b6a msgpack-tools: fix sandbox build
(cherry picked from commit fa5ecc2d1a)
2017-03-05 15:17:48 +01:00
Théo Zimmermann
7d1f0c2f69 coq: default version 8.4pl6 -> 8.6 2017-03-05 13:15:54 +00:00
Théo Zimmermann
855c488115 coq_8_4: ocaml dependency 4.01 -> 4.02 2017-03-05 13:15:40 +00:00
Bjørn Forsman
77777e6d45 nixos/nix-daemon: doc: use literalExample
Makes the example more readable by not squashed everything onto one
single line.

(cherry picked from commit 316e7d6764)
2017-03-05 14:08:19 +01:00
zraexy
3cafb672b2 eclipse: Do not use webkitgtk2 by default
Tell callPackage to not include webkitgtk2 due to the fact that it has
multiple vulnerabilities.

(cherry picked from commit 49ea0e2736)
2017-03-05 11:35:58 +01:00
zraexy
9bc2992d97 eclipse: import builder instead of callPackage
Switched from callPackage to import so that dependencies are passed
instead of being grabbed from pkgs.

[Bjørn: wrap overlong line.]

(cherry picked from commit 7582da5d8b)
2017-03-05 11:35:57 +01:00
Bjørn Forsman
a9d2aaa66b eclipse: add aliases for "latest" versions
Add aliases like "eclipse-cpp = eclipse-cpp-46" so that user
configurations can point to "eclipse-cpp" and have it not regularly
break as nixpkgs is updated.

(cherry picked from commit 81de55118d)
2017-03-05 11:35:57 +01:00
rnhmjoj
29332b43ea libchop: fix package
(cherry picked from commit fc12998c3a)
2017-03-05 07:47:49 +01:00
Shea Levy
8e72857c55 Add locateDominatingFile lib function
(cherry picked from commit 56e71f62dc)
2017-03-04 13:17:17 -05:00
Joachim Fasting
5de841bf9f mu: leave mug off by default
This unbreaks the package after marking legacy webkit as
insecure.  Per upstream, mug is a toy.

(cherry picked from commit 7b914b2986)
2017-03-04 19:16:16 +01:00
Graham Christensen
84deb2205c jitsi: 2.8.5426 -> 2.10.5550 for CVE-2017-5603
(cherry picked from commit 6011e3ea93)
2017-03-04 09:10:08 -05:00
Frederik Rietdijk
75fc482ee4 pythonPackages.sympy: disable tests
(cherry picked from commit dc2bf68d7b)
2017-03-04 14:29:55 +01:00
Peter Simons
cb1af9fd4f haskell-arithmoi: test suite fails on i686 2017-03-04 14:11:06 +01:00
Vincent Laporte
08a31de873 solc: fix build
Prevent the download of jsoncpp to happen at build time.
Don’t treat warnings as errors, since there is a warning about the major() macros in GNU libc.
2017-03-04 14:05:54 +01:00
Vincent Laporte
f891d53896 ocamlPackages.core_extended_p4: fix build on linux 2017-03-04 14:05:35 +01:00
Peter Simons
3e3dfdd085 haskell-diagrams-lib: test suite fails on i686 2017-03-04 14:03:24 +01:00
Léo Gaspard
2f95a293c3 openldap module: fix paths for example includes
(cherry picked from commit 0e2bd7e248)
2017-03-04 13:31:08 +01:00
Daiderd Jordan
994a373001 vim-plugins: add some more plugins
(cherry picked from commit 5262f5e3a2)
2017-03-04 13:24:17 +01:00
Daiderd Jordan
936a6c0f8f vim-plugins: update with https sources
(cherry picked from commit f14b001e27)
2017-03-04 13:24:16 +01:00
Daiderd Jordan
f7636f9d96 vim-plugins: use https for github repositories
(cherry picked from commit 8977b1f2ee)
2017-03-04 13:24:06 +01:00
ndowens
996ea7dcee smc: 6.3.0 -> 6.6.0
(cherry picked from commit d8a7b507d9)
2017-03-04 13:10:24 +01:00
mimadrid
51b53fd8a3 gparted: 0.26.1 -> 0.28.1
(cherry picked from commit 04283047a5)
2017-03-04 12:58:57 +01:00
mimadrid
e5e3cec6a2 qshowdiff: fix build
(cherry picked from commit 2b38cbb329)
2017-03-04 12:48:59 +01:00
rnhmjoj
d0088e29ad mitmproxy: 1.0.2 -> 2.0.6
(cherry picked from commit 6c08b145ab)
2017-03-04 12:59:07 +02:00
rnhmjoj
e81caaa513 kaitaistruct: init at 0.6
(cherry picked from commit 9b6164ffb9)
2017-03-04 12:59:01 +02:00
Tuomas Tynkkynen
16bd655eee kernel config: Enable IP_MULTICAST
This is lacking on ARM and causes libuv tests to fail.

(cherry picked from commit 57c6fac3e9)
2017-03-04 12:58:56 +02:00
Vladimír Čunát
25c590f910 xorg.xorgserver: security 1.19.1 -> 1.19.2
Various bugfixes including CVE-2017-2624.
It seems to run without any problems for me.

(cherry picked from commit da3c0ac19c)
2017-03-04 09:06:13 +01:00
Frederik Rietdijk
d0a7bce84b pythonPackages.jupyter: set priority
in order to prevent a collision.

(cherry picked from commit f8e5b8dbe2)
2017-03-04 08:19:40 +01:00
Nikolay Amiantov
40284858de liferea: add libnotify
I've accidentially removed it from build inputs.

Notice that GNOME 3 icons weren't removed accidentially -- it works without
them for me on XFCE.

(cherry picked from commit fe265f129e)
2017-03-04 01:16:21 +03:00
Nikolay Amiantov
e8291b381d liferea: 1.10.19 -> 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:16:17 +03:00
Joachim Fasting
5436f4d63e torchat: mark as broken
Looks abandoned by upstream (last commit 2014, no response on
issue tracker).  For an application of this nature it seems
prudent to simply mark the package as broken instead of
attempting to fix the build.

Prospective users can check out richochet or tor messenger.

(cherry picked from commit db2f87a998)
2017-03-03 23:08:32 +01:00
Michael Raskin
20512381c5 vim_configurable: enable ximSupport by default
(cherry picked from commit 8eccd34f10)
It seems a realtively useful tiny change and 17.03 is only beta ATM.
2017-03-03 21:36:04 +01:00
ndowens
4668318706 trash-cli: 0.12.9.14 -> 0.17.1.14
(cherry picked from commit 477014fd6a)
2017-03-03 21:11:43 +01:00
Franz Pletz
ed26f005e1 xca: fix build
cc #23253

(cherry picked from commit 3d2e118a55)
2017-03-03 21:04:39 +01:00
Bart Brouns
1b52b27929 beast: mark as broken
(cherry picked from commit 0297fdc764)
2017-03-03 20:17:57 +01:00
Joachim Fasting
86f6b49f1f Revert "guitarix: webkitgtk2 -> webkitgtk (#23390)"
This reverts commit fbfb1017b7.

See c48f6b152fbdc29c1379d681ee916485c81f53c1
2017-03-03 17:22:46 +01:00
Bart Brouns
fbfb1017b7 guitarix: webkitgtk2 -> webkitgtk (#23390)
(cherry picked from commit 0e2a8cd01c)
2017-03-03 17:01:32 +01:00
Bart Brouns
d56cbf6780 VoiceOfFaust: fix pitchTracker (#23394)
(cherry picked from commit 3d3096b229)
2017-03-03 17:01:26 +01:00
Tom Hunger
6431f49ddc pandas: Mark broken in i686.See #23253.
(cherry picked from commit 59036096b7)
2017-03-03 16:36:25 +01:00
Frederik Rietdijk
c7808fd50c Python 3.6 fixup expat and libffi, fixes #23406
(cherry picked from commit a1f6b8b5fc)
2017-03-03 16:28:55 +01:00
Frederik Rietdijk
9e11df2b95 Python 3.4: fixup expat and libffi, fixes #23325
(cherry picked from commit b588ed95b9)
2017-03-03 16:28:19 +01:00
Robin Gloster
75e9a4973f scid: fix build
(cherry picked from commit fc57e634f3)
2017-03-03 15:18:15 +01:00
Vladimír Čunát
5b0c9d4f92 luajitPackages.mpack.meta.broken = true
It seems only to link succesfully to vanilla lua.
http://hydra.nixos.org/build/49554613

(cherry picked from commit 913aae40ba)
2017-03-03 14:12:03 +01:00
Robin Gloster
872ef22924 ikarus: remove
unmaintained, only works on 32 bit

(cherry picked from commit bb9a37a2a5)
2017-03-03 13:44:20 +01:00
Benno Fünfstück
f3dcb1a92c xrectsel: remove unnecessary DESTDIR=$out
This avoids files being installed to $out/nix/store

(cherry picked from commit ac592121b9)
2017-03-03 13:44:14 +01:00
Benno Fünfstück
a561b2176a ffcast: remove unnecessary DESTDIR=$out
This avoids files being installed to $out/nix/store

(cherry picked from commit a8458bb506)
2017-03-03 13:44:13 +01:00
Benno Fünfstück
cdffb1771e boinc: fix location of /etc in $out
Looks like the latest version no longer requires the patch, and the patch instead resulted in
/etc files being installed to `$out/$out/etc` instead of `$out/etc`

(cherry picked from commit 253d736398)
2017-03-03 13:44:13 +01:00
Robin Gloster
4f4994412f libclc: fix evaluation
(cherry picked from commit 75c3f00971)
2017-03-03 12:40:50 +01:00
Benno Fünfstück
e13f6d34de libbladeRF: fix udev rule location in $out
Shell variables in cmakeFlags are not expanded, so the rules instead ended up
in `$out/'$out'/etc/udev/rules.d`.
2017-03-03 12:31:54 +01:00
Benno Fünfstück
e2773cd699 vbam: fix location of etc in output
Shell variables are not expanded in cmakeFlags, so the etc files ended up in
`$out/'$out'/etc` instead of the expected `$out/etc`.
2017-03-03 12:31:52 +01:00
Carles Pagès
026cca444c hexen: mark as broken
Does not build and is not maintained.

(cherry picked from commit 0f9517eb9e)
2017-03-03 12:05:12 +01:00
Domen Kožar
2f4003b561 haskellPackages.http-api-data: dontCheck 2017-03-03 11:45:47 +01:00
Eric Bailey
e7af40894c erlangR19: 19.2 -> 19.2.3
This fixes dialyzer for me.

- http://erlang.org/pipermail/erlang-bugs/2017-January/005213.html
- e27119948f

(cherry picked from commit 6e9133fec1)
2017-03-03 10:53:46 +01:00
Carles Pagès
1e95b664ec pfixtools: fix build with unbound-1.6.1
(cherry picked from commit 86a1d6f4aa)
2017-03-03 10:24:58 +01:00
Peter Simons
e42bc77fd4 Drop obsolete, unmaintained haskell.packages.lts-x_y package sets.
Stack no longer uses them since a long time: https://github.com/commercialhaskell/stack/issues/2259.

(cherry picked from commit 09a593b3de)
2017-03-03 09:28:44 +01:00
Vladimír Čunát
8639a3eac7 Merge #23408: llvm: 4.0rc2 -> 4rc3
and rename attributes 4.0 -> 4

(cherry picked from commit 92f454e73c)
2017-03-03 08:27:06 +01:00
Joachim Fasting
0efeb766e4 nvidiabl: mark as broken on kernels >4.4
All builds on kernels >4.4 fail.

(cherry picked from commit c5785dc3eb)
2017-03-03 00:24:31 +01:00
Joachim Fasting
637337f1e0 cryptodev: mark as broken for kernels >4.4
All builds for kernels above 4.4 fail; there is no newer
upstream version.

(cherry picked from commit 7f31a8e359)
2017-03-03 00:24:29 +01:00
Joachim Fasting
60a64b2933 tor: split out geoip data
Saves about 5.2 MiB.

To use geoip, add something like
```
GeoIPFile ${tor.geoip}/share/tor/geoip
GeoIPv6File ${tor.geoip}/share/tor/geoip6
```
to torrc

(cherry picked from commit c44a41c73f)
2017-03-03 00:24:28 +01:00
Bart Brouns
8874e3fce5 synthv1: 0.7.6 -> 0.8.0
(cherry picked from commit 33e23934a7)
2017-03-03 01:13:35 +02:00
Tuomas Tynkkynen
79b276acb8 gf2x: Disable i686 build
http://hydra.nixos.org/build/49552136/nixlog/3/raw
(cherry picked from commit 1254f1a46a)
2017-03-03 00:23:30 +02:00
Spencer Janssen
c586ecba37 cockatrice: 2015-09-24 -> 2017-01-20
(cherry picked from commit b67ce6baf9)
2017-03-03 00:16:22 +02:00
Peter Simons
aa4a99c48c Synchronize Haskell infrastructure with 'master' at b923fd5253. 2017-03-02 23:03:43 +01:00
rnhmjoj
5435ad7f68 gitfs: 0.2.5 -> 0.4.5.1
(cherry picked from commit 1b9875220f)
2017-03-02 23:52:04 +02:00
Itai Zukerman
b12aacc7c1 bazel: add gcc to PATH and simplify patch
Removed patches that are purely for testing.
Removed dependencies that seemed to not be needed.
Expand all instances of #!/bin/bash, not just those at the start of scripts.

(cherry picked from commit 1f709ad136)
2017-03-02 16:13:50 +01:00
Maximilian Güntner
b8ae045cac ipfs: 0.4.5 -> 0.4.6
(cherry picked from commit aa429e6775)
2017-03-02 16:13:50 +01:00
Gauthier POGAM--LE MONTAGNER
b42688d7f5 atom: 1.14.3 -> 1.14.4
(cherry picked from commit 869bc1c07e)
2017-03-02 16:13:50 +01:00
Graham Christensen
17a3e979a4 kdeApplications.kdelibs: patch for insecure URL passing
(cherry picked from commit 7abda54bbb)
2017-03-02 08:34:43 -05:00
Graham Christensen
9daae5bb85 kdeFrameworks.kio: patch for insecure URL passing
(cherry picked from commit 5ce06263a3)
2017-03-02 08:28:25 -05:00
Robin Gloster
0bbcbd2679 btrfs-dedupe: dependency is broken on i686
(cherry picked from commit 6034d429fc)
2017-03-02 14:24:19 +01:00
Robin Gloster
c0d8c6ec84 libsForQt5.qmltermwidget: fix build
(cherry picked from commit c1866cade9)
2017-03-02 14:14:10 +01:00
Katona László
a0296b2683 cytoscape: fixed issue with startup script
(cherry picked from commit 085502dd80)
2017-03-02 14:14:10 +01:00
Gregor Kleen
bd265c553a locate: fix security.wrappers
(cherry picked from commit 3deb85bc63)
2017-03-02 13:42:16 +01:00
Anders Papitto
ac396e9aeb Revert "buildRustPackage: fix deprecated use of registry.index config key"
This reverts commit e8aa8cc94be45103fcd32b5f0bfee4a55eae4080.

(cherry picked from commit 095cf1b903)
2017-03-02 13:40:55 +01:00
Robin Gloster
1b9e238057 d4x: remove
removed in debian in 2010

(cherry picked from commit 306eb6ded0)
2017-03-02 13:21:44 +01:00
Robin Gloster
8b646305ce cuter: fix build
(cherry picked from commit feffa1aabf)
2017-03-02 13:02:25 +01:00
Robin Gloster
042b815b4f cuter: fix indentation
(cherry picked from commit eebb5f20a3)
2017-03-02 13:02:25 +01:00
Domen Kožar
7f31bf388f electron: 1.4.13 -> 1.4.15 2017-03-02 12:57:06 +01:00
Robin Gloster
594651e713 maintainers/hydra-eval-failures: flush stdout more often
(cherry picked from commit c5367a4409)
2017-03-02 11:46:53 +01:00
Andreas Herrmann
481630a5f6 blitz: switch back to boost-1.60
The build fails with boost-1.62.
More specifically, the test of the boost-serialization integration fails
due to the protected destructor in the class template `MemoryBlock`.

(cherry picked from commit 5a68d5484e)
2017-03-02 11:41:13 +01:00
Robin Gloster
c50d41189c haskellPackages.cabal-lenses: add comment to upstream issue 2017-03-02 11:04:46 +01:00
ndowens
df3a82dc1e speedtest-cli: 0.3.4 -> 1.0.2
(cherry picked from commit 32cf5c4d02)
2017-03-02 11:02:34 +01:00
ndowens
2b5141ccef enca: 1.16 -> 1.19
(cherry picked from commit 775e8eb4a4)
2017-03-02 11:02:34 +01:00
ndowens
ceea1b8fd0 highlight: 3.28 -> 3.35
(cherry picked from commit 9655567c09)
2017-03-02 11:02:34 +01:00
ndowens
ac1bb0d36d kytea: 0.4.6 -> 0.4.7; source was still pointing to version 0.4.6
(cherry picked from commit 8f29ca2104)
2017-03-02 11:02:33 +01:00
ndowens
cb5208851a swaks:20130209.0 -> 20170101.0
(cherry picked from commit 021046a72e)
2017-03-02 11:02:33 +01:00
ndowens
8d9d4122e2 quicktun: 2.2.4 -> 2.2.5
(cherry picked from commit d072ac28f8)
2017-03-02 11:02:33 +01:00
Vladimír Čunát
bfca6a9e5f tested job: drop the hibernate test on i686 for now
/cc #23107.

(cherry picked from commit 45344fdf19)
2017-03-02 11:02:32 +01:00
ndowens
46ff3c037f discount: 2.2.0 -> 2.2.2
Discount: added missing update
(cherry picked from commit 3df8bef60e)
2017-03-02 11:02:22 +01:00
Charles Strahan
b47d680763 mesos: fix build with latest gcc/glibc
/cc #23253

(cherry picked from commit 2c0225add6)
2017-03-02 11:02:22 +01:00
Tobias Geerinckx-Rice
a9c8a484d1 phc-intel: 0.4.0-rev22 -> 0.4.0-rev24
Fixes Hydra failures on kernel >= 4.10 by only supporting kernel >= 4.10.

(cherry picked from commit b12b4eaca6)
2017-03-02 11:02:15 +01:00
ndowens
e005041cab di: 4.42 -> 4.43
(cherry picked from commit 204850c975)
2017-03-02 11:02:15 +01:00
Eelco Dolstra
acddebc840 nixUnstable: 1.12pre4997_1351b0d -> 1.12pre5060_fa125b9
(cherry picked from commit f5e53aea5d)
2017-03-02 10:54:35 +01:00
Peter Hoeg
fba286ec64 dropbox: 19.4.13 -> 20.4.19
(cherry picked from commit 1fbcce4448)
2017-03-02 11:47:04 +08:00
rnhmjoj
78d80da512 eztrace: add missing dependency
(cherry picked from commit 83462da296)
2017-03-02 04:01:26 +02:00
Tuomas Tynkkynen
ed0dd35025 lkl: Broken on i686
http://hydra.nixos.org/build/49534265
(cherry picked from commit 439facec2a)
2017-03-02 04:01:06 +02:00
Tuomas Tynkkynen
5a2b3c38e6 radeontools: Mark as broken
The upstream release is from 2004. The website of this software talks
about configuring XFree86. I *highly* doubt this software is of any use
nowadays.

(cherry picked from commit 256e764226)
2017-03-02 02:30:21 +02:00
Joachim Fasting
f90e5baa92 tor: 0.2.9.9 -> 0.2.9.10
The 0.2.9 series is now a long-term support release, which will
receive backported security fixes until at least 2020.

tor should now build against libressl, as in
```nix
tor.override { openssl = libressl; }
```

Also re-enable the test-suite; works fine on my end.

(cherry picked from commit 05054e34c0)
2017-03-02 00:14:22 +01:00
Joachim Fasting
fe132d2645 openisns: fix empty lib output
Looks like enable-shared defaults to false, so we actually
ended up with no usable object files in the lib output.

This also appears to have broken open-iscsi, as evinced by

/nix/store/[...]-binutils-2.27/bin/ld: cannot find -lisns
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:57: iscsid] Error 1

https://hydra.nixos.org/build/49437400/log/raw

With this patch, open-iscsi builds fine here.

(cherry picked from commit ab6d358ebf)
2017-03-01 21:42:56 +01:00
Tuomas Tynkkynen
923aaf88bb memtest86: Mark as broken
It fails with hardening-related errors like:

reloc.o: In function `.L41':
reloc.c:(.text+0x452): undefined reference to `__stack_chk_fail_local'

... and several others as well!

Since nobody has noticed that this package has been broken the entire
16.09 release, it's probably not worth to try fixing it.

(Note that this is a different package from memtest86plus!)

(cherry picked from commit 8dcfa44a53)
2017-03-01 22:26:45 +02:00
ndowens
589a4ecaae catdoc: 0.94.2 -> 0.95
(cherry picked from commit c393512809)
2017-03-01 19:26:42 +01:00
Shea Levy
c73744f419 haskell generic-builder: Pass through the list of haskell build inputs.
Useful for building custom envs.

(cherry picked from commit c153036525)
2017-03-01 13:01:20 -05:00
Bjørn Forsman
2ebc198933 simavr: 1.3 -> 1.5 (fixes build)
(cherry picked from commit 96d774747b)
2017-03-01 18:12:20 +01:00
ndowens
d60e77f1c8 hwinfo: 21.23 -> 21.38
(cherry picked from commit d12030d175)
2017-03-01 17:58:40 +01:00
Robin Gloster
cd9edfbcf6 haskellPackages.cabal-lenses: fix build
(cherry picked from commit b2919b454f)
2017-03-01 17:27:24 +01:00
Tuomas Tynkkynen
4569de16d8 trinity: Apply upstream commit as a patch to fix build
Needed since glibc 2.25.

(cherry picked from commit 0495b34782)
2017-03-01 17:13:00 +01:00
Shea Levy
9a9c0282d5 Merge branch 'release-17.03' of github.com:NixOS/nixpkgs into release-17.03 2017-03-01 11:11:57 -05:00
Robin Gloster
d6f06f8584 haskellPackages.rank1dynamic: fix build
(cherry picked from commit a3e4321297)
2017-03-01 17:10:29 +01:00
Robin Gloster
8e1aca5e8c haskellPackages.OrderedBits: fix build
(cherry picked from commit fd770dd176)
2017-03-01 17:10:28 +01:00
Shea Levy
4cbf067425 haskell generic-builder: Pass through the ghcEnv.
Will be useful for nix-buffer

(cherry picked from commit a27bc8b317)
2017-03-01 11:10:19 -05:00
Shea Levy
fcfc629c2f nixBufferBuilders.withPackages: Fix buffer count logic
(cherry picked from commit bae77363c3)
2017-03-01 11:10:17 -05:00
Christoph Hrdinka
730d675ef3 retroarch.beetle-saturn: set platforms to x86_64-linux
cc #23253.

Signed-off-by: Christoph Hrdinka <c.github@hrdinka.at>
2017-03-01 16:19:57 +01:00
Robin Gloster
c3a8685fcf haskellPackages.machines: fix build
(cherry picked from commit 12ca09d14e)
2017-03-01 15:56:52 +01:00
Robin Gloster
86292f517e haskellPackages.gl: fix build
(cherry picked from commit eea7819af8)
2017-03-01 15:51:43 +01:00
Robin Gloster
c66cbafdbb haskellPackages.DPutils: fix build 2017-03-01 15:40:09 +01:00
Michael Raskin
14b680a698 profanity: 0.5.0 -> 0.5.1
(cherry picked from commit b8812dfeac)
2017-03-01 15:40:03 +01:00
Jörg Thalheim
7b61c6aef0 cockatrice: add unstable version prefix
(cherry picked from commit fb81abdc7d)
2017-03-01 14:10:41 +01:00
Nikolay Amiantov
8c80d71781 kmscon service: disable systemd-vconsole-setup
cc #22470.

(cherry picked from commit 516a7fc7bd)
2017-03-01 13:48:19 +03:00
Vladimír Čunát
c29b34d1f0 ploticus: fixup a manual-page symlink
With new man compression this caused a build error.

(cherry picked from commit 64d4bfd139)
2017-03-01 11:43:21 +01:00
Vladimír Čunát
6b31dbd7ef unbound: only use the two-phase build on Linux
Hydra shows some problems on Darwin with structure defns/decls.
http://hydra.nixos.org/build/49463873/nixlog/1/raw

(cherry picked from commit 5c89ab7cb6)
2017-03-01 11:43:21 +01:00
Gabriel Ebner
fdf0adf4ea qt5.qttools: fix path to qhelpgenerator
(cherry picked from commit ffcc897090)
2017-03-01 11:43:21 +01:00
Vladimír Čunát
7934c12dab libuv: disable a problematic test on Darwin
(cherry picked from commit e6541423b6)
2017-03-01 11:43:21 +01:00
Vladimír Čunát
09a8feb709 xorg.libX11: 1.6.4 -> 1.6.5
It seems like a maintenance release.

(cherry picked from commit 59d1ce1c7a)
2017-03-01 11:43:20 +01:00
Vladimír Čunát
cfcfd11443 Merge #23245: break gnutls -> openssl dependency
(cherry picked from commit 18bd007714)
2017-03-01 11:42:52 +01:00
Vladimír Čunát
8ffb8b783a Merge #22854: mesa: 13.0.x -> 17.0.0
The versioning scheme is changing to start with the year.

(cherry picked from commit a9c7610874)
2017-03-01 11:42:51 +01:00
Vladimír Čunát
2755f490a5 binutils: drop the $dev/bin symlink
Fixes #18839.  I suspect I once added this just because of some
deficiencies in an early development version of the multiple-output
framework in stdenv.

(cherry picked from commit e2e270d1e2)
2017-03-01 11:42:42 +01:00
Vladimír Čunát
74ccd31491 compress-man-pages: skip compressed manpages
Because of bash 4.4 the semantics GLOBIGNORE changed.
This resulted in already compressed manpages to be compressed twice.
Also be careful about symlinks to fix #21777, e.g. the ledger example.

(cherry picked from commit 20ffc3cd73)
2017-03-01 11:42:41 +01:00
Frederik Rietdijk
d40b604b59 Python 2.7: increase priority - fixup
From the manual:

> This attribute should be a number, with a higher value denoting a
lower priority. The default priority is 0.

Just passing -5 or -10 wasn't sufficient, so let's make it -100.

(cherry picked from commit 079353e208)
2017-03-01 11:42:41 +01:00
Frederik Rietdijk
9d2594813e pythonPackages.packaging: 16.7 -> 16.8
(cherry picked from commit 57afc0f5ef)
2017-03-01 11:42:41 +01:00
Frederik Rietdijk
53fd4bc07e pythonPackages.pyparsing: 2.1.8 -> 2.1.10
(cherry picked from commit 1b66b6a5ff)
2017-03-01 11:42:40 +01:00
Frederik Rietdijk
92105f8212 Python 2.7: increase priority
Higher priority than Python 3.x so that `/bin/python` points to
`/bin/python2` in case both 2 and 3 are installed.

(cherry picked from commit 4bc1d02698)
2017-03-01 11:42:40 +01:00
Frederik Rietdijk
bee7854032 Merge pull request #22585 from FRidh/repr
Python: deterministic interpreters
(cherry picked from commit 04c41e753b)
2017-03-01 11:42:17 +01:00
Vladimír Čunát
7f8f848128 findutils: add the forgotten file (I'm sorry)
/cc #23152.

(cherry picked from commit f157956266)
2017-03-01 11:42:12 +01:00
Vladimír Čunát
851b93c427 Merge #23171: curl: 7.53.0 -> 7.53.1
(cherry picked from commit 39e736b3d9)
2017-03-01 11:42:05 +01:00
Vladimír Čunát
d0bc55412d findutils: fixup sandboxed build after #23152
(cherry picked from commit 2f726fed9f)
2017-03-01 11:41:50 +01:00
Franz Pletz
9117d57d84 utillinux: 2.29 -> 2.29.2 for CVE-2017-2616
cc #23072

(cherry picked from commit 9d14ea4295)
2017-03-01 11:41:48 +01:00
Eelco Dolstra
ac54ef17e4 Merge pull request #23152 from mogria/updatedb-standalone
findutils: updatedb now uses writable database outside of /nix/store by default
(cherry picked from commit 0081c6a04c)
2017-03-01 11:41:36 +01:00
Frederik Rietdijk
58286f1876 Merge pull request #22863 from romildo/upd.pygments
pygments: 2.1.3 -> 2.2.0
(cherry picked from commit 4810677227)
2017-03-01 11:41:34 +01:00
Peter Hoeg
d8df9a7983 libbsd: 0.8.2 -> 0.8.3
(cherry picked from commit fa03b8279f)
2017-03-01 09:10:26 +01:00
Joachim Fasting
c4e5b084c6 pan: sha1 -> sha256
(cherry picked from commit 026366b00b)
2017-03-01 09:10:26 +01:00
Joachim Fasting
38ad03ffaa rhash: sha1 -> sha256
(cherry picked from commit 56ae1e25af)
2017-03-01 09:10:26 +01:00
Joachim Fasting
3f53158cab cdparanoia: sha1 -> sha256
(cherry picked from commit a6ee264f1b)
2017-03-01 09:10:26 +01:00
Jörg Thalheim
9aee654160 cheat: 2.1.27 -> 2.1.28
(cherry picked from commit f876ae4b92)
2017-03-01 09:10:22 +01:00
Benjamin Staffin
0546ba6748 bazel: Wrap so java is present at runtime
Bazel can't start up without javac in $PATH.

(cherry picked from commit 7c17c10bab)
2017-03-01 09:09:19 +01:00
Benjamin Staffin
e2efc8abdb bazel: consolidate bazel test invocations
This way it can run them in parallel.

(cherry picked from commit 14ef7c0c59)
2017-03-01 09:08:42 +01:00
Nikolay Amiantov
2e189e0378 samba test: fix race condition
(cherry picked from commit a6c6d08430)
2017-03-01 03:18:10 +03:00
Eelco Dolstra
24e0d444f6 blender: 2.78b -> 2.78c
(cherry picked from commit ffb0fb51d4)

To fix build with CUDA support.
2017-03-01 03:18:10 +03:00
Nikolay Amiantov
dd07dbf254 opensubdiv: 3.0.5 -> 3.2.0
Also remove cudatoolkit override as we have cudatoolkit = cudatoolkit8 now.

(cherry picked from commit d7ecf89580)

Fixes build with CUDA support, as we are early in the testing cycle it's easier
to just backport the new version.
2017-03-01 03:18:09 +03:00
Nikolay Amiantov
63da2b3975 blender: fix libOpenCL path
(cherry picked from commit fe33c28ec9)
2017-03-01 03:18:09 +03:00
Joachim Fasting
126ea604ea tinycc: restrict platforms to x86_64-linux
(cherry picked from commit 3c178fe769)

cc https://github.com/NixOS/nixpkgs/issues/23253
2017-03-01 00:51:02 +01:00
rnhmjoj
228e6db7da arx-libertatis: 2016-07-27 -> 2017-02-26
(cherry picked from commit d35ff57b4e)
2017-03-01 02:25:24 +03:00
Nikolay Amiantov
0157385807 networkmanagerapplet: add librsvg
Fix tray icon. Also use wrapGAppsHook instead of custom wrapper.

(cherry picked from commit 8aa73bbf55)
2017-03-01 02:21:47 +03:00
Nikolay Amiantov
99750797ab python3.pkgs.protobuf3_0: fix build
I spent some time trying to fix tests instead but have no idea what happens.

(cherry picked from commit 6c5cbfd091)
2017-03-01 02:15:26 +03:00
Bart Brouns
910393215a qmidinet: 0.4.1 -> 0.4.2
(cherry picked from commit 1e74a156c3)
2017-03-01 00:05:12 +01:00
Robert Helgesson
78f4270714 gpsbabel: 1.5.2 -> 1.5.3
(cherry picked from commit 61237e1738)
2017-03-01 00:02:46 +01:00
Robert Helgesson
981681c703 gpsbabel: require qt4 rather than qtbase
(cherry picked from commit cf9cb1bac3)
2017-03-01 00:02:32 +01:00
Bart Brouns
abe0f09bbf drumkv1: 0.7.6 -> 0.8.0
(cherry picked from commit 9dabf88e72)
2017-02-28 23:43:55 +01:00
Bart Brouns
1f619485b7 samplv1: 0.7.6 -> 0.8.0
(cherry picked from commit 40d47d457e)
2017-02-28 23:43:54 +01:00
Bart Brouns
4802a3d72a qjackctl: 0.4.3 -> 0.4.4
(cherry picked from commit 3e8c302525)
2017-02-28 23:43:53 +01:00
ndowens
e025c02430 wgetpaste: 2.25 -> 2.28
(cherry picked from commit d02209edf2)
2017-02-28 23:37:16 +01:00
ndowens
bf30a8c192 fop: 1.1 -> 2.1
(cherry picked from commit 0e0af18b57)
2017-02-28 23:30:39 +01:00
Jörg Thalheim
9be1331512 keepassxc: 2.1.0 -> 2.1.2
also enable http plugin again. Readme mention using the protocol be a
security risk because it is unencrypted, but the connections stays local
(127.0.0.1) and the plugins has to explicitly enabled in settings
(disabled by default).

(cherry picked from commit 61785c5531)
2017-02-28 21:52:54 +01:00
rnhmjoj
2f8055bd03 palemoon: 27.0.3 -> 27.1.1
(cherry picked from commit 62c5f68847)
2017-02-28 20:35:44 +01:00
Franz Pletz
2edf4a0870 multisync: remove, no release in > 10 years
Upstream suggests to use opensync.

cc #23253

(cherry picked from commit bfa067179e)
2017-02-28 19:18:22 +01:00
Franz Pletz
5e9c8332b1 youtubeDL: 2017.02.24.1 -> 2017.02.27
(cherry picked from commit a36e1e2c35)
2017-02-28 18:36:20 +01:00
Franz Pletz
3e3f051ae0 phpPackages.redis22: not supported with php >= 7
cc #23253

(cherry picked from commit c4fd85a451)
2017-02-28 18:36:20 +01:00
Thomas Tuegel
b377ba33e3 qt57: update community releases automatically
(cherry picked from commit 0e5cce32d8)
2017-02-28 11:15:47 -06:00
Jörg Thalheim
94ff97c19f gpodder: disable iPodSupport by default
gpodder has an indirect dependency on libplist (pulled by libgpod),
which has known security vulnerabilities.

(cherry picked from 49f9c202f6)
2017-02-28 18:07:02 +01:00
Jörg Thalheim
9a6de5e9c1 haka: replace sha1 with sha256
(cherry picked from commit be23e983ae)
2017-02-28 18:05:26 +01:00
Jörg Thalheim
07ee46d114 lua5_{2,3}: replace sha1 with sha256
(cherry picked from commit a6e2d5fcbb)
2017-02-28 18:05:25 +01:00
Bjørn Forsman
9bc7d2797f sysdig: give the source tarball a meaningful name
(cherry picked from commit fc8e0ccc2e)
2017-02-28 18:05:25 +01:00
Willi Butz
616643c176 openconnect_openssl: added missing dependecy gmp
(cherry picked from commit b13378c479)
2017-02-28 17:58:09 +01:00
Dmitry Kalinkin
e24dde9a44 herwig: disable i686-linux 2017-02-28 11:52:26 -05:00
Jörg Thalheim
d7519e9b46 cantata: 1.5.1 -> 2.0.1
(cherry picked from commit 6405bbe867)
2017-02-28 17:51:25 +01:00
Itai Zukerman
aa51bf9dfc bazel: replace patch with patchShebangs and substituteInPlace
(cherry picked from commit 17835f14c5)
2017-02-28 17:42:06 +01:00
Robin Gloster
f20fa1a0b0 lincity: fix build
(cherry picked from commit 75707b748c)
2017-02-28 17:34:11 +01:00
Robin Gloster
c64c26af8c libjson_rpc_cpp_0_2_1: remove
(cherry picked from commit 8ddfbe34bc)
2017-02-28 17:16:39 +01:00
Robin Gloster
3c17e2ca00 libjson-rpc-cpp: 0.6.0 -> 0.7.0, fix build
(cherry picked from commit efd9331333)
2017-02-28 17:16:39 +01:00
Robin Gloster
64f8593551 libclc: 2015-08-07 -> 2017-02-25
(cherry picked from commit 4c04d4e6e2)
2017-02-28 17:16:39 +01:00
makefu
7a5d245712 exfat-nofuse: exclude 4.1 kernel build
(cherry picked from commit b4ff1ba4a9)
2017-02-28 17:01:54 +01:00
Jörg Thalheim
cefbfffee1 sysdig: 0.14.0 -> 0.15.0
(cherry picked from 479c6c1ef0)
2017-02-28 16:45:11 +01:00
Bart Brouns
267037590f ardour: 5.6 -> 5.8
(cherry picked from commit 3fc79cb5ac)
2017-02-28 16:12:14 +01:00
Robin Gloster
4d044529e7 libcm: remove
umaintained, broken and not used for 10 years

(cherry picked from commit be84f410cd)
2017-02-28 16:10:45 +01:00
makefu
a7e3c70aa0 exfat-nofuse: build only for kernels < 4.10
(cherry picked from commit af7ccaf8c8)
2017-02-28 16:10:45 +01:00
Felix Richter
64f4235f01 mhddfs: fix-format-security (#23276)
* mhddfs: fix-format-security

* mhddfs: use fputs instead of fprintf

(cherry picked from commit e748e18dde)
2017-02-28 16:10:45 +01:00
Franz Pletz
f7c76321a3 bzflag: 2.4.2 -> 2.4.8
(cherry picked from commit e0b04b4c37)
2017-02-28 16:02:52 +01:00
Franz Pletz
168d60715b linuxPackages.ixgbevf: 3.2.2 -> 4.0.3
cc #23253

(cherry picked from commit 40e84506ec)
2017-02-28 16:02:52 +01:00
Franz Pletz
e4d93872df linuxPackages.e1000e: 3.3.1 -> 3.3.5.3
cc #23253

(cherry picked from commit 163db1bbf9)
2017-02-28 16:02:51 +01:00
Robin Gloster
0fa7ce86fa btanks: fix build
(cherry picked from commit 768fac6c36)
2017-02-28 15:52:24 +01:00
Robin Gloster
3f15b3bbc2 clearsilver: fix build
fixes CVE-2011-4357
cc @grahamc, @fpletz, @domenkozar, @rbvermaa

(cherry picked from commit 6784a44296)
2017-02-28 15:19:32 +01:00
Thomas Tuegel
a639a2b214 kwindowsystem: mark broken on Qt 5.5
(cherry picked from commit cff0e06ed7)
2017-02-28 15:19:12 +01:00
Thomas Tuegel
5b12b22b53 attica: mark broken on Qt 5.5
(cherry picked from commit a7d3a084b9)
2017-02-28 15:19:12 +01:00
Thomas Tuegel
128d7624e4 sonnet: mark broken on Qt 5.5
(cherry picked from commit a821be7a06)
2017-02-28 15:19:12 +01:00
Thomas Tuegel
a67116cf1b kconfig: mark broken on Qt 5.5
(cherry picked from commit a8cc6d909b)
2017-02-28 15:19:11 +01:00
Thomas Tuegel
2e92561a3f karchive: mark broken on Qt 5.5
(cherry picked from commit 9cd0754191)
2017-02-28 15:19:11 +01:00
Thomas Tuegel
40ddafe1d6 kwidgetsaddons: mark broken on Qt 5.5
(cherry picked from commit b682464f4e)
2017-02-28 15:19:11 +01:00
Thomas Tuegel
07806156de kcoreaddons: mark broken on Qt 5.5
(cherry picked from commit 49f554aae0)
2017-02-28 15:19:11 +01:00
Thomas Tuegel
25b8455669 ki18n: mark broken on Qt 5.5
(cherry picked from commit eb340b5753)
2017-02-28 15:19:10 +01:00
Thomas Tuegel
7949fad41f kitemviews: mark broken on Qt 5.5
(cherry picked from commit 4208845583)
2017-02-28 15:19:10 +01:00
Thomas Tuegel
a3e2cc0fda kdbusaddons: mark broken on Qt 5.5
(cherry picked from commit c1630b5337)
2017-02-28 15:19:10 +01:00
Thomas Tuegel
da684ca5f6 kguiaddons: mark broken on Qt 5.5
(cherry picked from commit ffa8be8a0a)
2017-02-28 15:19:10 +01:00
Thomas Tuegel
4a11f7aa81 kcodecs: mark broken on Qt 5.5
(cherry picked from commit be580f91d8)
2017-02-28 15:19:09 +01:00
Thomas Tuegel
e749f36b88 solid: mark broken on Qt 5.5
(cherry picked from commit 6ddaa3f746)
2017-02-28 15:19:09 +01:00
Thomas Tuegel
08cdd06f5c syntax-highlighting: mark broken on Qt 5.5
(cherry picked from commit e1bd5c96ea)
2017-02-28 15:19:09 +01:00
Thomas Tuegel
c7a902454a kwayland: mark broken on Qt 5.5
(cherry picked from commit 78b6a1ad14)
2017-02-28 15:19:08 +01:00
Thomas Tuegel
2e7ccc379b bluez-qt: mark broken on Qt 5.5
(cherry picked from commit 34df5c5684)
2017-02-28 15:19:08 +01:00
Thomas Tuegel
131d78008b kplotting: mark broken on Qt 5.5
(cherry picked from commit 29d0bf7434)
2017-02-28 15:19:08 +01:00
Thomas Tuegel
98099c148e kitemmodels: mark broken on Qt 5.5
(cherry picked from commit e77114e72b)
2017-02-28 15:19:08 +01:00
Thomas Tuegel
9da0a0699b ipe: build with C++11 for Qt 5.7
(cherry picked from commit fca36b617d)
2017-02-28 15:19:07 +01:00
Thomas Tuegel
67fb814852 kidletime: mark broken on Qt 5.5
(cherry picked from commit 5f372535cd)
2017-02-28 15:19:07 +01:00
Thomas Tuegel
5461879752 kdnssd: mark broken on Qt 5.5
(cherry picked from commit e5283531c4)
2017-02-28 15:19:07 +01:00
Thomas Tuegel
19850cda15 networkmanager-qt: mark broken on Qt 5.5
(cherry picked from commit 3acf24e67e)
2017-02-28 15:19:07 +01:00
Thomas Tuegel
7771d8b98f threadweaver: mark broken on Qt 5.5
(cherry picked from commit e7b2300a0c)
2017-02-28 15:19:06 +01:00
Thomas Tuegel
80584e11a1 modemmanager-qt: mark broken on Qt 5.5
(cherry picked from commit a0b0dd2a32)
2017-02-28 15:19:06 +01:00
Thomas Tuegel
867236a297 pinentry_qt5: build with C++11 for Qt 5.7
(cherry picked from commit b31a63d2e5)
2017-02-28 15:19:06 +01:00
Robin Gloster
0d4e06e546 maintainers/hydra-eval-failures.py: default to 17.03 2017-02-28 15:16:27 +01:00
Franz Pletz
2aec643bed linuxPackages.jool: only supported on linux < 4.10
cc #23253

(cherry picked from commit d733d36cc6)
2017-02-28 14:50:15 +01:00
Franz Pletz
1b1d168623 linuxPackages.sch_cake: only supported in linux >= 4.4
cc #23253

(cherry picked from commit 616e5c1953)
2017-02-28 14:50:14 +01:00
Herwig Hochleitner
78998c5be2 gnome-22: drop bijiben due to dependency on webkitgtk24x
(cherry picked from commit 4f981cb3f4)
2017-02-28 07:55:03 -05:00
Rommel M. Martinez
c5bbee7534 emem: 0.2.28 -> 0.2.29
(cherry picked from commit ac9c40643c)
2017-02-28 13:48:17 +01:00
Joachim Fasting
fd7679b607 tinycc: 0.9.27pre-20170108 -> 20170220
tinycc has been relicensed to MIT.

(cherry picked from commit bcdbd637fc)
2017-02-28 13:14:33 +01:00
Peter Hoeg
cdf779e8d0 s3fs: minor cleanups
(cherry picked from commit 23004ec6dc)
2017-02-28 13:14:33 +01:00
Lancelot SIX
810fc81107 screen: 4.5.0 -> 4.5.1 for CVE-2017-5618
See https://lists.gnu.org/archive/html/info-gnu/2017-02/msg00010.html
for release announcement
(cherry picked from commit 6d9a3f0dcd)
2017-02-28 13:12:06 +01:00
Tristan Helmich
61046285a9 matrix-synapse: 0.19.1 -> 0.19.2
(cherry picked from commit 0cb62ab661)

cc #23267
2017-02-28 13:04:06 +01:00
Bart Brouns
111c02a1e1 ranger: 1.8.0 -> 1.8.1
(cherry picked from commit 2cfa9c6af2)

cc #23268
2017-02-28 13:01:11 +01:00
Tristan Helmich
38609b2d0b micropolis: fix build (patch changed)
(cherry picked from commit 3c16812acf)

cc #23269 #23253
2017-02-28 12:54:28 +01:00
Alexey Shmalko
b3418d5b22 virtualbox: fix build
The issue was caused by upgrading `qt` from `qt56` to `qt57`, which
now requires C++11.

For more info, see https://github.com/NixOS/nixpkgs/issues/23257.

(cherry picked from commit 0d31a76813)
2017-02-28 09:46:12 +01:00
Benjamin Staffin
95ec60a3f3 bazel: Log test errors to stderr during checkPhase
Otherwise it's difficult or impossible to retrieve them, particularly
from a hydra build.

(cherry picked from commit d348b80f31)
2017-02-28 09:46:12 +01:00
Franz Pletz
3433c1af01 phpfpm service: add target and slice
(cherry picked from commit ec4ead0bfe)
2017-02-28 00:08:02 +01:00
Franz Pletz
f0e9dd541a phpfpm service: one service per pool for isolation
(cherry picked from commit e3d58dae7f)
2017-02-28 00:08:02 +01:00
Leon Isenberg
f969b1c816 haskell: add semigroups dependency to optparse-applicative for GHC < 8
(cherry picked from commit 386ddc739c)
2017-02-28 00:00:45 +01:00
Leon Isenberg
1e72bec881 haskell: break dependency cycle between QuickCheck and semigroups for GHC < 8
The cycle:
QuickCheck -> semigroups
semigroups -> hashable
semigroups -> unordered-containers
unordered-containers -> hashable
unordered-containers -> QuickCheck # test suite only
hashable -> QuickCheck # test suite only

(cherry picked from commit 24c93619e9)
2017-02-28 00:00:45 +01:00
Leon Isenberg
13d29e7d7a haskell: add semigroups dependency to Quickcheck for GHC < 8
(cherry picked from commit 1aa6d77af4)
2017-02-28 00:00:44 +01:00
Leon Isenberg
919bc48fc0 haskell: ghc710x packages: remove obsolete configurations
(cherry picked from commit 172a2bbeaf)
2017-02-28 00:00:44 +01:00
Shea Levy
1ad7e1d3a1 fwupd: Fix localstatedir
(cherry picked from commit e292d166e8)
2017-02-28 00:00:39 +01:00
Robin Gloster
69d75ce207 release-notes: add new services for 17.03 + misc additions 2017-02-27 21:50:24 +01:00
Robin Gloster
6c9fb36526 release 17.03-beta 2017-02-27 20:12:01 +01:00
40794 changed files with 875218 additions and 3944770 deletions

View File

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

View File

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

18
.gitattributes vendored
View File

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

329
.github/CODEOWNERS vendored
View File

@@ -1,329 +0,0 @@
# CODEOWNERS file
#
# This file is used to describe who owns what in this repository. This file does not
# replace `meta.maintainers` but is instead used for other things than derivations
# and modules, like documentation, package sets, and other assets.
#
# For documentation on this file, see https://help.github.com/articles/about-codeowners/
# Mentioned users will get code review requests.
#
# IMPORTANT NOTE: in order to actually get pinged, commit access is required.
# This also holds true for GitHub teams. Since almost none of our teams have write
# permissions, you need to list all members of the team with commit access individually.
# This file
/.github/CODEOWNERS @edolstra
# GitHub actions
/.github/workflows @NixOS/Security @Mic92 @zowoq
/.github/workflows/merge-staging @FRidh
# EditorConfig
/.editorconfig @Mic92 @zowoq
# Libraries
/lib @edolstra @infinisil
/lib/systems @alyssais @ericson2314 @matthewbauer @amjoseph-nixpkgs
/lib/generators.nix @edolstra @Profpatsch
/lib/cli.nix @edolstra @Profpatsch
/lib/debug.nix @edolstra @Profpatsch
/lib/asserts.nix @edolstra @Profpatsch
/lib/path.* @infinisil @fricklerhandwerk
/lib/fileset @infinisil
/doc/functions/fileset.section.md @infinisil
# Nixpkgs Internals
/default.nix @Ericson2314
/pkgs/top-level/default.nix @Ericson2314
/pkgs/top-level/impure.nix @Ericson2314
/pkgs/top-level/stage.nix @Ericson2314 @matthewbauer
/pkgs/top-level/splice.nix @Ericson2314 @matthewbauer
/pkgs/top-level/release-cross.nix @Ericson2314 @matthewbauer
/pkgs/stdenv/generic @Ericson2314 @matthewbauer @amjoseph-nixpkgs
/pkgs/stdenv/generic/check-meta.nix @Ericson2314 @matthewbauer @piegamesde
/pkgs/stdenv/cross @Ericson2314 @matthewbauer @amjoseph-nixpkgs
/pkgs/build-support/cc-wrapper @Ericson2314 @amjoseph-nixpkgs
/pkgs/build-support/bintools-wrapper @Ericson2314
/pkgs/build-support/setup-hooks @Ericson2314
/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
/pkgs/build-support/setup-hooks/auto-patchelf.py @layus
/pkgs/pkgs-lib @infinisil
# pkgs/by-name
/pkgs/test/nixpkgs-check-by-name @infinisil
# Nixpkgs build-support
/pkgs/build-support/writers @lassulus @Profpatsch
# Nixpkgs make-disk-image
/doc/builders/images/makediskimage.section.md @raitobezarius
/nixos/lib/make-disk-image.nix @raitobezarius
# Nixpkgs documentation
/maintainers/scripts/db-to-md.sh @jtojnar @ryantm
/maintainers/scripts/doc @jtojnar @ryantm
# Contributor documentation
/CONTRIBUTING.md @infinisil
/.github/PULL_REQUEST_TEMPLATE.md @infinisil
/doc/contributing/ @fricklerhandwerk @infinisil
/doc/contributing/contributing-to-documentation.chapter.md @jtojnar @fricklerhandwerk @infinisil
/lib/README.md @infinisil
/doc/README.md @infinisil
/nixos/README.md @infinisil
/pkgs/README.md @infinisil
/maintainers/README.md @infinisil
# User-facing development documentation
/doc/development.md @infinisil
/doc/development @infinisil
# NixOS Internals
/nixos/default.nix @infinisil
/nixos/lib/from-env.nix @infinisil
/nixos/lib/eval-config.nix @infinisil
/nixos/modules/system @dasJ
/nixos/modules/system/activation/bootspec.nix @grahamc @cole-h @raitobezarius
/nixos/modules/system/activation/bootspec.cue @grahamc @cole-h @raitobezarius
# NixOS integration test driver
/nixos/lib/test-driver @tfc
# NixOS QEMU virtualisation
/nixos/virtualisation/qemu-vm.nix @raitobezarius
# Systemd
/nixos/modules/system/boot/systemd.nix @NixOS/systemd
/nixos/modules/system/boot/systemd @NixOS/systemd
/nixos/lib/systemd-*.nix @NixOS/systemd
/pkgs/os-specific/linux/systemd @NixOS/systemd
# Updaters
## update.nix
/maintainers/scripts/update.nix @jtojnar
/maintainers/scripts/update.py @jtojnar
## common-updater-scripts
/pkgs/common-updater/scripts/update-source-version @jtojnar
# Python-related code and docs
/maintainers/scripts/update-python-libraries @FRidh
/pkgs/development/interpreters/python @FRidh
/doc/languages-frameworks/python.section.md @FRidh @mweinelt
/pkgs/development/tools/poetry2nix @adisbladis
/pkgs/development/interpreters/python/hooks @FRidh @jonringer
# Haskell
/doc/languages-frameworks/haskell.section.md @cdepillabout @sternenseemann @maralorn
/maintainers/scripts/haskell @cdepillabout @sternenseemann @maralorn
/pkgs/development/compilers/ghc @cdepillabout @sternenseemann @maralorn
/pkgs/development/haskell-modules @cdepillabout @sternenseemann @maralorn
/pkgs/test/haskell @cdepillabout @sternenseemann @maralorn
/pkgs/top-level/release-haskell.nix @cdepillabout @sternenseemann @maralorn
/pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn
# Perl
/pkgs/development/interpreters/perl @stigtsp @zakame @dasJ
/pkgs/top-level/perl-packages.nix @stigtsp @zakame @dasJ
/pkgs/development/perl-modules @stigtsp @zakame @dasJ
# R
/pkgs/applications/science/math/R @jbedo
/pkgs/development/r-modules @jbedo
# Ruby
/pkgs/development/interpreters/ruby @marsam
/pkgs/development/ruby-modules @marsam
# Rust
/pkgs/development/compilers/rust @Mic92 @zowoq @winterqt @figsoda
/pkgs/build-support/rust @zowoq @winterqt @figsoda
/doc/languages-frameworks/rust.section.md @zowoq @winterqt @figsoda
# C compilers
/pkgs/development/compilers/gcc @matthewbauer @amjoseph-nixpkgs
/pkgs/development/compilers/llvm @matthewbauer @RaitoBezarius
# Compatibility stuff
/pkgs/top-level/unix-tools.nix @matthewbauer
/pkgs/development/tools/xcbuild @matthewbauer
# Audio
/nixos/modules/services/audio/botamusique.nix @mweinelt
/nixos/modules/services/audio/snapserver.nix @mweinelt
/nixos/tests/modules/services/audio/botamusique.nix @mweinelt
/nixos/tests/snapcast.nix @mweinelt
# Browsers
/pkgs/applications/networking/browsers/firefox @mweinelt
# Certificate Authorities
pkgs/data/misc/cacert/ @ajs124 @lukegb @mweinelt
pkgs/development/libraries/nss/ @ajs124 @lukegb @mweinelt
pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
# Jetbrains
/pkgs/applications/editors/jetbrains @edwtjo
# Licenses
/lib/licenses.nix @alyssais
# Qt / KDE
/pkgs/applications/kde @ttuegel
/pkgs/desktops/plasma-5 @ttuegel
/pkgs/development/libraries/kde-frameworks @ttuegel
/pkgs/development/libraries/qt-5 @ttuegel
# PostgreSQL and related stuff
/pkgs/servers/sql/postgresql @thoughtpolice @marsam
/nixos/modules/services/databases/postgresql.xml @thoughtpolice
/nixos/modules/services/databases/postgresql.nix @thoughtpolice
/nixos/tests/postgresql.nix @thoughtpolice
# Hardened profile & related modules
/nixos/modules/profiles/hardened.nix @joachifm
/nixos/modules/security/hidepid.nix @joachifm
/nixos/modules/security/lock-kernel-modules.nix @joachifm
/nixos/modules/security/misc.nix @joachifm
/nixos/tests/hardened.nix @joachifm
/pkgs/os-specific/linux/kernel/hardened-config.nix @joachifm
# Home Automation
/nixos/modules/services/misc/home-assistant.nix @mweinelt
/nixos/modules/services/misc/zigbee2mqtt.nix @mweinelt
/nixos/tests/home-assistant.nix @mweinelt
/nixos/tests/zigbee2mqtt.nix @mweinelt
/pkgs/servers/home-assistant @mweinelt
/pkgs/tools/misc/esphome @mweinelt
# Network Time Daemons
/pkgs/tools/networking/chrony @thoughtpolice
/pkgs/tools/networking/ntp @thoughtpolice
/pkgs/tools/networking/openntpd @thoughtpolice
/nixos/modules/services/networking/ntp @thoughtpolice
# Network
/pkgs/tools/networking/kea/default.nix @mweinelt
/pkgs/tools/networking/babeld/default.nix @mweinelt
/nixos/modules/services/networking/babeld.nix @mweinelt
/nixos/modules/services/networking/kea.nix @mweinelt
/nixos/modules/services/networking/knot.nix @mweinelt
/nixos/modules/services/monitoring/prometheus/exporters/kea.nix @mweinelt
/nixos/tests/babeld.nix @mweinelt
/nixos/tests/kea.nix @mweinelt
/nixos/tests/knot.nix @mweinelt
# Web servers
/doc/builders/packages/nginx.section.md @raitobezarius
/pkgs/servers/http/nginx/ @raitobezarius
/nixos/modules/services/web-servers/nginx/ @raitobezarius
# Dhall
/pkgs/development/dhall-modules @Gabriella439 @Profpatsch @ehmry
/pkgs/development/interpreters/dhall @Gabriella439 @Profpatsch @ehmry
# Idris
/pkgs/development/idris-modules @Infinisil
# Bazel
/pkgs/development/tools/build-managers/bazel @Profpatsch
# NixOS modules for e-mail and dns services
/nixos/modules/services/mail/mailman.nix @peti
/nixos/modules/services/mail/postfix.nix @peti
/nixos/modules/services/networking/bind.nix @peti
/nixos/modules/services/mail/rspamd.nix @peti
# Emacs
/pkgs/applications/editors/emacs/elisp-packages @adisbladis
/pkgs/applications/editors/emacs @adisbladis
/pkgs/top-level/emacs-packages.nix @adisbladis
# Neovim
/pkgs/applications/editors/neovim @figsoda @jonringer @teto
# VimPlugins
/pkgs/applications/editors/vim/plugins @figsoda @jonringer
# VsCode Extensions
/pkgs/applications/editors/vscode/extensions @jonringer
# PHP interpreter, packages, extensions, tests and documentation
/doc/languages-frameworks/php.section.md @aanderse @drupol @etu @globin @ma27 @talyz
/nixos/tests/php @aanderse @drupol @etu @globin @ma27 @talyz
/pkgs/build-support/build-pecl.nix @aanderse @drupol @etu @globin @ma27 @talyz
/pkgs/development/interpreters/php @jtojnar @aanderse @drupol @etu @globin @ma27 @talyz
/pkgs/development/php-packages @aanderse @drupol @etu @globin @ma27 @talyz
/pkgs/top-level/php-packages.nix @jtojnar @aanderse @drupol @etu @globin @ma27 @talyz
# Podman, CRI-O modules and related
/nixos/modules/virtualisation/containers.nix @adisbladis
/nixos/modules/virtualisation/cri-o.nix @adisbladis
/nixos/modules/virtualisation/podman @adisbladis
/nixos/tests/cri-o.nix @adisbladis
/nixos/tests/podman @adisbladis
# Docker tools
/pkgs/build-support/docker @roberth
/nixos/tests/docker-tools* @roberth
/doc/builders/images/dockertools.section.md @roberth
# Blockchains
/pkgs/applications/blockchains @mmahut @RaghavSood
# Go
/doc/languages-frameworks/go.section.md @kalbasit @Mic92 @zowoq
/pkgs/build-support/go @kalbasit @Mic92 @zowoq
/pkgs/development/compilers/go @kalbasit @Mic92 @zowoq
# GNOME
/pkgs/desktops/gnome @jtojnar
/pkgs/desktops/gnome/extensions @piegamesde @jtojnar
/pkgs/build-support/make-hardcode-gsettings-patch @jtojnar
# Cinnamon
/pkgs/desktops/cinnamon @mkg20001
# nim
/pkgs/development/compilers/nim @ehmry
/pkgs/development/nim-packages @ehmry
/pkgs/top-level/nim-packages.nix @ehmry
# terraform providers
/pkgs/applications/networking/cluster/terraform-providers @zowoq
# Matrix
/pkgs/servers/heisenbridge @piegamesde
/pkgs/servers/matrix-conduit @piegamesde
/nixos/modules/services/misc/heisenbridge.nix @piegamesde
/nixos/modules/services/misc/matrix-conduit.nix @piegamesde
/nixos/tests/matrix-conduit.nix @piegamesde
# Dotnet
/pkgs/build-support/dotnet @IvarWithoutBones
/pkgs/development/compilers/dotnet @IvarWithoutBones
/pkgs/test/dotnet @IvarWithoutBones
/doc/languages-frameworks/dotnet.section.md @IvarWithoutBones
# Node.js
/pkgs/build-support/node/build-npm-package @lilyinstarlight @winterqt
/pkgs/build-support/node/fetch-npm-deps @lilyinstarlight @winterqt
/doc/languages-frameworks/javascript.section.md @lilyinstarlight @winterqt
# OCaml
/pkgs/build-support/ocaml @ulrikstrid
/pkgs/development/compilers/ocaml @ulrikstrid
/pkgs/development/ocaml-modules @ulrikstrid
# ZFS
pkgs/os-specific/linux/zfs @raitobezarius
nixos/lib/make-single-disk-zfs-image.nix @raitobezarius
nixos/lib/make-multi-disk-zfs-image.nix @raitobezarius
nixos/modules/tasks/filesystems/zfs.nix @raitobezarius
nixos/tests/zfs.nix @raitobezarius
# Zig
/pkgs/development/compilers/zig @AndersonTorres @figsoda
/doc/hooks/zig.section.md @AndersonTorres @figsoda
# Linux Kernel
pkgs/os-specific/linux/kernel/manual-config.nix @amjoseph-nixpkgs

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

@@ -0,0 +1,49 @@
# How to contribute
Note: contributing implies licensing those contributions
under the terms of [COPYING](../COPYING), which is an MIT-like license.
## Opening issues
* Make sure you have a [GitHub account](https://github.com/signup/free)
* [Submit an issue](https://github.com/NixOS/nixpkgs/issues) - assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Include information what version of nixpkgs and Nix are you using (nixos-version or git revision).
## Submitting changes
* Format the commits in the following way:
```
(pkg-name | service-name): (from -> to | init at version | refactor | etc)
(Motivation for change. Additional information.)
```
Examples:
* nginx: init at 2.0.1
* firefox: 3.0 -> 3.1.1
* hydra service: add bazBaz option
Dual baz behavior is needed to do foo.
* nginx service: 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 dot at the end
See the nixpkgs manual for more details on how to [Submit changes to nixpkgs](https://nixos.org/nixpkgs/manual/#chap-submitting-changes).
## Writing good commit messages
In addition to writing properly formatted commit messages, it's important to include relevant information so other developers can later understand *why* a change was made. While this information usually can be found by digging code, mailing list archives, pull request discussions or upstream changes, it may require a lot of work.
For package version upgrades and such a one-line commit message is usually sufficient.
## Reviewing contributions
See the nixpkgs manual for more details on how to [Review contributions](https://nixos.org/nixpkgs/manual/#sec-reviewing-contributions).

13
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,13 @@
## Issue description
### Steps to reproduce
## Technical details
* 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`)

View File

@@ -1,40 +1,19 @@
## Description of changes
###### Motivation for this change
<!--
For package updates please link to a changelog or describe changes, this helps your fellow maintainers discover breaking updates.
For new packages please briefly describe the package or provide a link to its homepage.
-->
## Things done
<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->
###### Things done
- [ ] Tested using sandboxing
([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS,
or option `build-use-sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file)
on non-NixOS)
- Built on platform(s)
- [ ] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- [ ] For non-Linux: Is `sandbox = true` set in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [23.11 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) (or backporting [23.05 Release notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2305.section.md))
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
- [ ] NixOS
- [ ] macOS
- [ ] 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/`)
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
<!--
To help with the large amounts of pull requests, we would appreciate your
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
---
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://nixos.org/manual/nixpkgs/unstable/#chap-reviewing-contributions
-->

204
.github/labeler.yml vendored
View File

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

View File

@@ -1,69 +0,0 @@
name: "Update terraform-providers"
on:
#schedule:
# - cron: "0 3 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
tf-providers:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
if: github.repository_owner == 'NixOS' && github.ref == 'refs/heads/master' # ensure workflow_dispatch only runs on master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: setup
id: setup
run: |
echo "title=terraform-providers: update $(date -u +"%Y-%m-%d")" >> $GITHUB_OUTPUT
- name: update terraform-providers
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
echo | nix-shell \
maintainers/scripts/update.nix \
--argstr commit true \
--argstr keep-going true \
--argstr max-workers 2 \
--argstr path terraform-providers
- name: get failed updates
run: |
echo 'FAILED<<EOF' >> $GITHUB_ENV
git ls-files --others >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# cleanup logs of failed updates so they aren't included in the PR
- name: clean repo
run: |
git clean -f
- name: create PR
uses: peter-evans/create-pull-request@v5
with:
body: |
Automatic update by [update-terraform-providers](https://github.com/NixOS/nixpkgs/blob/master/.github/workflows/update-terraform-providers.yml) action.
https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}
These providers failed to update:
```
${{ env.FAILED }}
```
Check that all providers build with:
```
@ofborg build terraform.full
```
If there is more than ten commits in the PR `ofborg` won't build it automatically and you will need to use the above command.
branch: terraform-providers-update
delete-branch: false
title: ${{ steps.setup.outputs.title }}
token: ${{ secrets.GITHUB_TOKEN }}

22
.gitignore vendored
View File

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

View File

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

14
.mention-bot Normal file
View File

@@ -0,0 +1,14 @@
{
"userBlacklist": [
"civodul",
"jhasse",
"shlevy",
"bbenoist"
],
"alwaysNotifyForPaths": [
{ "name": "FRidh", "files": ["pkgs/top-level/python-packages.nix", "pkgs/development/interpreters/python/*", "pkgs/development/python-modules/*" ] },
{ "name": "LnL7", "files": ["pkgs/stdenv/darwin/*", "pkgs/os-specific/darwin/*"] },
{ "name": "copumpkin", "files": ["pkgs/stdenv/darwin/*", "pkgs/os-specific/darwin/apple-source-releases/*"] }
],
"fileBlacklist": ["pkgs/top-level/all-packages.nix"]
}

25
.travis.yml Normal file
View File

@@ -0,0 +1,25 @@
language: nix
matrix:
include:
- os: linux
sudo: false
script:
- ./maintainers/scripts/travis-nox-review-pr.sh nixpkgs-verify nixpkgs-manual nixpkgs-tarball nixpkgs-unstable
- ./maintainers/scripts/travis-nox-review-pr.sh nixos-options nixos-manual
- os: linux
sudo: required
dist: trusty
before_script:
- sudo mount -o remount,exec,size=2G,mode=755 /run/user
script: ./maintainers/scripts/travis-nox-review-pr.sh nox pr
- os: osx
osx_image: xcode7.3
script: ./maintainers/scripts/travis-nox-review-pr.sh nox pr
env:
global:
- GITHUB_TOKEN=5edaaf1017f691ed34e7f80878f8f5fbd071603f
notifications:
email:
on_success: never
on_failure: change

View File

@@ -1 +1 @@
23.11
17.03

View File

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

13
COPYING
View File

@@ -1,4 +1,4 @@
Copyright (c) 2003-2023 Eelco Dolstra and the Nixpkgs/NixOS contributors
Copyright (c) 2003-2017 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.

134
README.md
View File

@@ -1,116 +1,42 @@
Modified for personal use, mainly for compiling natively on Alderlake.
[<img src="http://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />](https://nixos.org/nixos)
The following files were modified:
[![Build Status](https://travis-ci.org/NixOS/nixpkgs.svg?branch=master)](https://travis-ci.org/NixOS/nixpkgs)
[![Code Triagers Badge](https://www.codetriage.com/nixos/nixpkgs/badges/users.svg)](https://www.codetriage.com/nixos/nixpkgs)
* `lib/systems/architectures.nix`
* `pkgs/development`:
* `haskell-modules/default.nix`
* `libraries`:
* `thrift/default.nix`
* `openexr`:
* `3.nix`
* `fix_nan_compare.patch`
* `python-modules`:
* `debugpy/default.nix`
* `aiohttp/default.nix`
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:
<p align="center">
<a href="https://nixos.org#gh-light-mode-only">
<img src="https://raw.githubusercontent.com/NixOS/nixos-homepage/master/logo/nixos-hires.png" width="500px" alt="NixOS logo"/>
</a>
<a href="https://nixos.org#gh-dark-mode-only">
<img src="https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nixos-white.png" width="500px" alt="NixOS logo"/>
</a>
</p>
```
% git remote add channels git://github.com/NixOS/nixpkgs-channels.git
```
<p align="center">
<a href="https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md"><img src="https://img.shields.io/github/contributors-anon/NixOS/nixpkgs" alt="Contributors badge" /></a>
<a href="https://opencollective.com/nixos"><img src="https://opencollective.com/nixos/tiers/supporter/badge.svg?label=supporters&color=brightgreen" alt="Open Collective supporters" /></a>
</p>
For stability and maximum binary package support, it is recommended to maintain
custom changes on top of one of the channels, e.g. `nixos-17.03` for the latest
release and `nixos-unstable` for the latest successful build of master:
[Nixpkgs](https://github.com/nixos/nixpkgs) is a collection of over
80,000 software packages that can be installed with the
[Nix](https://nixos.org/nix/) package manager. It also implements
[NixOS](https://nixos.org/nixos/), a purely-functional Linux distribution.
```
% git remote update channels
% git rebase channels/nixos-17.03
```
# Manuals
For pull-requests, please rebase onto nixpkgs `master`.
* [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution
* [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions
* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expressions (programs), and how to use Nix command line tools
# Community
* [Discourse Forum](https://discourse.nixos.org/)
* [Matrix Chat](https://matrix.to/#/#community:nixos.org)
* [NixOS Weekly](https://weekly.nixos.org/)
* [Community-maintained wiki](https://nixos.wiki/)
* [Community-maintained list of ways to get in touch](https://nixos.wiki/wiki/Get_In_Touch#Chat) (Discord, Telegram, IRC, etc.)
# Other Project Repositories
The sources of all official Nix-related projects are in the [NixOS
organization on GitHub](https://github.com/NixOS/). Here are some of
the main ones:
* [Nix](https://github.com/NixOS/nix) - the purely functional package manager
* [NixOps](https://github.com/NixOS/nixops) - the tool to remotely deploy NixOS machines
* [nixos-hardware](https://github.com/NixOS/nixos-hardware) - NixOS profiles to optimize settings for different hardware
* [Nix RFCs](https://github.com/NixOS/rfcs) - the formal process for making substantial changes to the community
* [NixOS homepage](https://github.com/NixOS/nixos-homepage) - the [NixOS.org](https://nixos.org) website
* [hydra](https://github.com/NixOS/hydra) - our continuous integration system
* [NixOS Artwork](https://github.com/NixOS/nixos-artwork) - NixOS artwork
# Continuous Integration and Distribution
Nixpkgs and NixOS are built and tested by our continuous integration
system, [Hydra](https://hydra.nixos.org/).
[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/) (deprecated, see milestone ["Move the Wiki!"](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Move+the+wiki%21%22))
* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined)
* [Continuous package builds for the NixOS 23.05 release](https://hydra.nixos.org/jobset/nixos/release-23.05)
* [Continuous package builds for 17.03 release](https://hydra.nixos.org/jobset/nixos/release-17.03)
* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents)
* [Tests for the NixOS 23.05 release](https://hydra.nixos.org/job/nixos/release-23.05/tested#tabs-constituents)
* [Tests for 17.03 release](https://hydra.nixos.org/job/nixos/release-17.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/manual/nix/stable/package-management/channels.html).
Communication:
# Contributing
Nixpkgs is among the most active projects on GitHub. While thousands
of open issues and pull requests might seem a lot at first, it helps
consider it in the context of the scope of the project. Nixpkgs
describes how to build tens of thousands of pieces of software and implements a
Linux distribution. The [GitHub Insights](https://github.com/NixOS/nixpkgs/pulse)
page gives a sense of the project activity.
Community contributions are always welcome through GitHub Issues and
Pull Requests.
For more information about contributing to the project, please visit
the [contributing page](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
# Donations
The infrastructure for NixOS and related projects is maintained by a
nonprofit organization, the [NixOS
Foundation](https://nixos.org/nixos/foundation.html). To ensure the
continuity and expansion of the NixOS infrastructure, we are looking
for donations to our organization.
You can donate to the NixOS foundation through [SEPA bank
transfers](https://nixos.org/donate.html) or by using Open Collective:
<a href="https://opencollective.com/nixos#support"><img src="https://opencollective.com/nixos/tiers/supporter.svg?width=890" /></a>
# License
Nixpkgs is licensed under the [MIT License](COPYING).
Note: MIT license does not apply to the packages built by Nixpkgs,
merely to the files in this repository (the Nix expressions, build
scripts, NixOS modules, etc.). It also might not apply to patches
included in Nixpkgs, which may be derivative works of the packages to
which they apply. The aforementioned artifacts are all covered by the
licenses of the respective packages.
* [Mailing list](http://lists.science.uu.nl/mailman/listinfo/nix-dev)
* [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos)

View File

@@ -2,26 +2,7 @@ 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 -L https://nixos.org/nix/install | sh
For more information, please see the NixOS release notes at
https://nixos.org/nixos/manual or locally at
${toString ./nixos/doc/manual/release-notes}.
If you need further help, see https://nixos.org/nixos/support.html
''
abort "This version of Nixpkgs requires Nix >= ${requiredVersion}, please upgrade! See https://nixos.org/wiki/How_to_update_when_Nix_is_too_old_to_evaluate_Nixpkgs"
else

View File

@@ -1,115 +0,0 @@
# Contributing to the Nixpkgs manual
This directory houses the sources files for the Nixpkgs manual.
You can find the [rendered documentation for Nixpkgs `unstable` on nixos.org](https://nixos.org/manual/nixpkgs/unstable/).
[Docs for Nixpkgs stable](https://nixos.org/manual/nixpkgs/stable/) are also available.
If you're only getting started with Nix, go to [nixos.org/learn](https://nixos.org/learn).
## Contributing to this documentation
You can quickly check your edits with `nix-build`:
```ShellSession
$ cd /path/to/nixpkgs
$ nix-build doc
```
If the build succeeds, the manual will be in `./result/share/doc/nixpkgs/manual.html`.
### devmode
The shell in the manual source directory makes available a command, `devmode`.
It is a daemon, that:
1. watches the manual's source for changes and when they occur — rebuilds
2. HTTP serves the manual, injecting a script that triggers reload on changes
3. opens the manual in the default browser
## Syntax
As per [RFC 0072](https://github.com/NixOS/rfcs/pull/72), all new documentation content should be written in [CommonMark](https://commonmark.org/) Markdown dialect.
Additional syntax extensions are available, all of which can be used in NixOS option documentation. The following extensions are currently used:
#### Tables
Tables, using the [GitHub-flavored Markdown syntax](https://github.github.com/gfm/#tables-extension-).
#### Anchors
Explicitly defined **anchors** on headings, to allow linking to sections. These should be always used, to ensure the anchors can be linked even when the heading text changes, and to prevent conflicts between [automatically assigned identifiers](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/auto_identifiers.md).
It uses the widely compatible [header attributes](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/attributes.md) syntax:
```markdown
## Syntax {#sec-contributing-markup}
```
> **Note**
> NixOS option documentation does not support headings in general.
#### Inline Anchors
Allow linking arbitrary place in the text (e.g. individual list items, sentences…).
They are defined using a hybrid of the link syntax with the attributes syntax known from headings, called [bracketed spans](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/bracketed_spans.md):
```markdown
- []{#ssec-gnome-hooks-glib} `glib` setup hook will populate `GSETTINGS_SCHEMAS_PATH` and then `wrapGAppsHook` will prepend it to `XDG_DATA_DIRS`.
```
#### Automatic links
If you **omit a link text** for a link pointing to a section, the text will be substituted automatically. For example `[](#chap-contributing)`.
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/using/syntax.html#targets-and-cross-referencing).
#### Roles
If you want to link to a man page, you can use `` {manpage}`nix.conf(5)` ``. The references will turn into links when a mapping exists in [`doc/manpage-urls.json`](./manpage-urls.json).
A few markups for other kinds of literals are also available:
- `` {command}`rm -rfi` ``
- `` {env}`XDG_DATA_DIRS` ``
- `` {file}`/etc/passwd` ``
- `` {option}`networking.useDHCP` ``
- `` {var}`/etc/passwd` ``
These literal kinds are used mostly in NixOS option documentation.
This syntax is taken from [MyST](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#roles-an-in-line-extension-point). Though, the feature originates from [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-manpage) with slightly different syntax.
#### Admonitions
Set off from the text to bring attention to something.
It uses pandocs [fenced `div`s syntax](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/fenced_divs.md):
```markdown
::: {.warning}
This is a warning
:::
```
The following are supported:
- [`caution`](https://tdg.docbook.org/tdg/5.0/caution.html)
- [`important`](https://tdg.docbook.org/tdg/5.0/important.html)
- [`note`](https://tdg.docbook.org/tdg/5.0/note.html)
- [`tip`](https://tdg.docbook.org/tdg/5.0/tip.html)
- [`warning`](https://tdg.docbook.org/tdg/5.0/warning.html)
#### [Definition lists](https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/definition_lists.md)
For defining a group of terms:
```markdown
pear
: green or yellow bulbous fruit
watermelon
: green fruit with red flesh
```

View File

@@ -1,12 +0,0 @@
# Builders {#part-builders}
```{=include=} chapters
builders/fetchers.chapter.md
builders/trivial-builders.chapter.md
builders/testers.chapter.md
builders/special.md
builders/images.md
hooks/index.md
languages-frameworks/index.md
builders/packages/index.md
```

View File

@@ -1,245 +0,0 @@
# Fetchers {#chap-pkgs-fetchers}
Building software with Nix often requires downloading source code and other files from the internet.
`nixpkgs` provides *fetchers* for different protocols and services. Fetchers are functions that simplify downloading files.
## Caveats {#chap-pkgs-fetchers-caveats}
Fetchers create [fixed output derivations](https://nixos.org/manual/nix/stable/#fixed-output-drvs) from downloaded files.
Nix can reuse the downloaded files via the hash of the resulting derivation.
The fact that the hash belongs to the Nix derivation output and not the file itself can lead to confusion.
For example, consider the following fetcher:
```nix
fetchurl {
url = "http://www.example.org/hello-1.0.tar.gz";
hash = "sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=";
};
```
A common mistake is to update a fetchers URL, or a version parameter, without updating the hash.
```nix
fetchurl {
url = "http://www.example.org/hello-1.1.tar.gz";
hash = "sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=";
};
```
**This will reuse the old contents**.
Remember to invalidate the hash argument, in this case by setting the `hash` attribute to an empty string.
```nix
fetchurl {
url = "http://www.example.org/hello-1.1.tar.gz";
hash = "";
};
```
Use the resulting error message to determine the correct hash.
```
error: hash mismatch in fixed-output derivation '/path/to/my.drv':
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
got: sha256-lTeyxzJNQeMdu1IVdovNMtgn77jRIhSybLdMbTkf2Ww=
```
A similar problem arises while testing changes to a fetcher's implementation. If the output of the derivation already exists in the Nix store, test failures can go undetected. The [`invalidateFetcherByDrvHash`](#tester-invalidateFetcherByDrvHash) function helps prevent reusing cached derivations.
## `fetchurl` and `fetchzip` {#fetchurl}
Two basic fetchers are `fetchurl` and `fetchzip`. Both of these have two required arguments, a URL and a hash. The hash is typically `hash`, although many more hash algorithms are supported. Nixpkgs contributors are currently recommended to use `hash`. This hash will be used by Nix to identify your source. A typical usage of `fetchurl` is provided below.
```nix
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "hello";
src = fetchurl {
url = "http://www.example.org/hello.tar.gz";
hash = "sha256-BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=";
};
}
```
The main difference between `fetchurl` and `fetchzip` is in how they store the contents. `fetchurl` will store the unaltered contents of the URL within the Nix store. `fetchzip` on the other hand, will decompress the archive for you, making files and directories directly accessible in the future. `fetchzip` can only be used with archives. Despite the name, `fetchzip` is not limited to .zip files and can also be used with any tarball.
## `fetchpatch` {#fetchpatch}
`fetchpatch` works very similarly to `fetchurl` with the same arguments expected. It expects patch files as a source and performs normalization on them before computing the checksum. For example, it will remove comments or other unstable parts that are sometimes added by version control systems and can change over time.
- `relative`: Similar to using `git-diff`'s `--relative` flag, only keep changes inside the specified directory, making paths relative to it.
- `stripLen`: Remove the first `stripLen` components of pathnames in the patch.
- `decode`: Pipe the downloaded data through this command before processing it as a patch.
- `extraPrefix`: Prefix pathnames by this string.
- `excludes`: Exclude files matching these patterns (applies after the above arguments).
- `includes`: Include only files matching these patterns (applies after the above arguments).
- `revert`: Revert the patch.
Note that because the checksum is computed after applying these effects, using or modifying these arguments will have no effect unless the `hash` argument is changed as well.
Most other fetchers return a directory rather than a single file.
## `fetchDebianPatch` {#fetchdebianpatch}
A wrapper around `fetchpatch`, which takes:
- `patch` and `hash`: the patch's filename without the `.patch` suffix,
and its hash after normalization by `fetchpatch` ;
- `pname`: the Debian source package's name ;
- `version`: the upstream version number ;
- `debianRevision`: the [Debian revision number] if applicable ;
- the `area` of the Debian archive: `main` (default), `contrib`, or `non-free`.
Here is an example of `fetchDebianPatch` in action:
```nix
{ lib
, fetchDebianPatch
, buildPythonPackage
}:
buildPythonPackage rec {
pname = "pysimplesoap";
version = "1.16.2";
src = ...;
patches = [
(fetchDebianPatch {
inherit pname version;
debianRevision = "5";
name = "Add-quotes-to-SOAPAction-header-in-SoapClient";
hash = "sha256-xA8Wnrpr31H8wy3zHSNfezFNjUJt1HbSXn3qUMzeKc0=";
})
];
...
}
```
Patches are fetched from `sources.debian.org`, and so must come from a
package version that was uploaded to the Debian archive. Packages may
be removed from there once that specific version isn't in any suite
anymore (stable, testing, unstable, etc.), so maintainers should use
`copy-tarballs.pl` to archive the patch if it needs to be available
longer-term.
[Debian revision number]: https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
## `fetchsvn` {#fetchsvn}
Used with Subversion. Expects `url` to a Subversion directory, `rev`, and `hash`.
## `fetchgit` {#fetchgit}
Used with Git. Expects `url` to a Git repo, `rev`, and `hash`. `rev` in this case can be full the git commit id (SHA1 hash) or a tag name like `refs/tags/v1.0`.
Additionally, the following optional arguments can be given: `fetchSubmodules = true` makes `fetchgit` also fetch the submodules of a repository. If `deepClone` is set to true, the entire repository is cloned as opposing to just creating a shallow clone. `deepClone = true` also implies `leaveDotGit = true` which means that the `.git` directory of the clone won't be removed after checkout.
If only parts of the repository are needed, `sparseCheckout` can be used. This will prevent git from fetching unnecessary blobs from server, see [git sparse-checkout](https://git-scm.com/docs/git-sparse-checkout) for more information:
```nix
{ stdenv, fetchgit }:
stdenv.mkDerivation {
name = "hello";
src = fetchgit {
url = "https://...";
sparseCheckout = [
"directory/to/be/included"
"another/directory"
];
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
}
```
## `fetchfossil` {#fetchfossil}
Used with Fossil. Expects `url` to a Fossil archive, `rev`, and `hash`.
## `fetchcvs` {#fetchcvs}
Used with CVS. Expects `cvsRoot`, `tag`, and `hash`.
## `fetchhg` {#fetchhg}
Used with Mercurial. Expects `url`, `rev`, and `hash`.
A number of fetcher functions wrap part of `fetchurl` and `fetchzip`. They are mainly convenience functions intended for commonly used destinations of source code in Nixpkgs. These wrapper fetchers are listed below.
## `fetchFromGitea` {#fetchfromgitea}
`fetchFromGitea` expects five arguments. `domain` is the gitea server name. `owner` is a string corresponding to the Gitea user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every Gitea HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `hash` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available but `hash` is currently preferred.
## `fetchFromGitHub` {#fetchfromgithub}
`fetchFromGitHub` expects four arguments. `owner` is a string corresponding to the GitHub user or organization that controls this repository. `repo` corresponds to the name of the software repository. These are located at the top of every GitHub HTML page as `owner`/`repo`. `rev` corresponds to the Git commit hash or tag (e.g `v1.0`) that will be downloaded from Git. Finally, `hash` corresponds to the hash of the extracted directory. Again, other hash algorithms are also available, but `hash` is currently preferred.
To use a different GitHub instance, use `githubBase` (defaults to `"github.com"`).
`fetchFromGitHub` uses `fetchzip` to download the source archive generated by GitHub for the specified revision. If `leaveDotGit`, `deepClone` or `fetchSubmodules` are set to `true`, `fetchFromGitHub` will use `fetchgit` instead. Refer to its section for documentation of these options.
## `fetchFromGitLab` {#fetchfromgitlab}
This is used with GitLab repositories. It behaves similarly to `fetchFromGitHub`, and expects `owner`, `repo`, `rev`, and `hash`.
To use a specific GitLab instance, use `domain` (defaults to `"gitlab.com"`).
## `fetchFromGitiles` {#fetchfromgitiles}
This is used with Gitiles repositories. The arguments expected are similar to `fetchgit`.
## `fetchFromBitbucket` {#fetchfrombitbucket}
This is used with BitBucket repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromSavannah` {#fetchfromsavannah}
This is used with Savannah repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromRepoOrCz` {#fetchfromrepoorcz}
This is used with repo.or.cz repositories. The arguments expected are very similar to `fetchFromGitHub` above.
## `fetchFromSourcehut` {#fetchfromsourcehut}
This is used with sourcehut repositories. Similar to `fetchFromGitHub` above,
it expects `owner`, `repo`, `rev` and `hash`, but don't forget the tilde (~)
in front of the username! Expected arguments also include `vc` ("git" (default)
or "hg"), `domain` and `fetchSubmodules`.
If `fetchSubmodules` is `true`, `fetchFromSourcehut` uses `fetchgit`
or `fetchhg` with `fetchSubmodules` or `fetchSubrepos` set to `true`,
respectively. Otherwise, the fetcher uses `fetchzip`.
## `requireFile` {#requirefile}
`requireFile` allows requesting files that cannot be fetched automatically, but whose content is known.
This is a useful last-resort workaround for license restrictions that prohibit redistribution, or for downloads that are only accessible after authenticating interactively in a browser.
If the requested file is present in the Nix store, the resulting derivation will not be built, because its expected output is already available.
Otherwise, the builder will run, but fail with a message explaining to the user how to provide the file. The following code, for example:
```
requireFile {
name = "jdk-${version}_linux-x64_bin.tar.gz";
url = "https://www.oracle.com/java/technologies/javase-jdk11-downloads.html";
sha256 = "94bd34f85ee38d3ef59e5289ec7450b9443b924c55625661fffe66b03f2c8de2";
}
```
results in this error message:
```
***
Unfortunately, we cannot download file jdk-11.0.10_linux-x64_bin.tar.gz automatically.
Please go to https://www.oracle.com/java/technologies/javase-jdk11-downloads.html to download it yourself, and add it to the Nix store
using either
nix-store --add-fixed sha256 jdk-11.0.10_linux-x64_bin.tar.gz
or
nix-prefetch-url --type sha256 file:///path/to/jdk-11.0.10_linux-x64_bin.tar.gz
***
```

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,27 +0,0 @@
# Packages {#chap-packages}
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.
```{=include=} sections
citrix.section.md
dlib.section.md
eclipse.section.md
elm.section.md
emacs.section.md
firefox.section.md
fish.section.md
fuse.section.md
ibus.section.md
kakoune.section.md
linux.section.md
locales.section.md
etc-files.section.md
nginx.section.md
opengl.section.md
shell-helpers.section.md
steam.section.md
cataclysm-dda.section.md
urxvt.section.md
weechat.section.md
xorg.section.md
```

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,159 +0,0 @@
# darwin.linux-builder {#sec-darwin-builder}
`darwin.linux-builder` provides a way to bootstrap a Linux builder on a macOS machine.
This requires macOS version 12.4 or later.
The builder runs on host port 31022 by default.
You can change it by overriding `virtualisation.darwin-builder.hostPort`.
See the [example](#sec-darwin-builder-example-flake).
You will also need to be a trusted user for your Nix installation. In other
words, your `/etc/nix/nix.conf` should have something like:
```
extra-trusted-users = <your username goes here>
```
To launch the builder, run the following flake:
```ShellSession
$ nix run nixpkgs#darwin.linux-builder
```
That will prompt you to enter your `sudo` password:
```
+ sudo --reset-timestamp /nix/store/…-install-credentials.sh ./keys
Password:
```
… so that it can install a private key used to `ssh` into the build server.
After that the script will launch the virtual machine and automatically log you
in as the `builder` user:
```
<<< Welcome to NixOS 22.11.20220901.1bd8d11 (aarch64) - ttyAMA0 >>>
Run 'nixos-help' for the NixOS manual.
nixos login: builder (automatic login)
[builder@nixos:~]$
```
> Note: When you need to stop the VM, run `shutdown now` as the `builder` user.
To delegate builds to the remote builder, add the following options to your
`nix.conf` file:
```
# - Replace ${ARCH} with either aarch64 or x86_64 to match your host machine
# - Replace ${MAX_JOBS} with the maximum number of builds (pick 4 if you're not sure)
builders = ssh-ng://builder@linux-builder ${ARCH}-linux /etc/nix/builder_ed25519 ${MAX_JOBS} - - - c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSUpCV2N4Yi9CbGFxdDFhdU90RStGOFFVV3JVb3RpQzVxQkorVXVFV2RWQ2Igcm9vdEBuaXhvcwo=
# Not strictly necessary, but this will reduce your disk utilization
builders-use-substitutes = true
```
To allow Nix to connect to a builder not running on port 22, you will also need to create a new file at `/etc/ssh/ssh_config.d/100-linux-builder.conf`:
```
Host linux-builder
Hostname localhost
HostKeyAlias linux-builder
Port 31022
```
… and then restart your Nix daemon to apply the change:
```ShellSession
$ sudo launchctl kickstart -k system/org.nixos.nix-daemon
```
## Example flake usage {#sec-darwin-builder-example-flake}
```
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
darwin.url = "github:lnl7/nix-darwin/master";
darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, darwin, nixpkgs, ... }@inputs:
let
inherit (darwin.lib) darwinSystem;
system = "aarch64-darwin";
pkgs = nixpkgs.legacyPackages."${system}";
linuxSystem = builtins.replaceStrings [ "darwin" ] [ "linux" ] system;
darwin-builder = nixpkgs.lib.nixosSystem {
system = linuxSystem;
modules = [
"${nixpkgs}/nixos/modules/profiles/macos-builder.nix"
{ virtualisation.host.pkgs = pkgs; }
];
};
in {
darwinConfigurations = {
machine1 = darwinSystem {
inherit system;
modules = [
{
nix.distributedBuilds = true;
nix.buildMachines = [{
hostName = "ssh://builder@localhost";
system = linuxSystem;
maxJobs = 4;
supportedFeatures = [ "kvm" "benchmark" "big-parallel" ];
}];
launchd.daemons.darwin-builder = {
command = "${darwin-builder.config.system.build.macos-builder-installer}/bin/create-builder";
serviceConfig = {
KeepAlive = true;
RunAtLoad = true;
StandardOutPath = "/var/log/darwin-builder.log";
StandardErrorPath = "/var/log/darwin-builder.log";
};
};
}
];
};
};
};
}
```
## Reconfiguring the builder {#sec-darwin-builder-reconfiguring}
Initially you should not change the builder configuration else you will not be
able to use the binary cache. However, after you have the builder running locally
you may use it to build a modified builder with additional storage or memory.
To do this, you just need to set the `virtualisation.darwin-builder.*` parameters as
in the example below and rebuild.
```
darwin-builder = nixpkgs.lib.nixosSystem {
system = linuxSystem;
modules = [
"${nixpkgs}/nixos/modules/profiles/macos-builder.nix"
{
virtualisation.host.pkgs = pkgs;
virtualisation.darwin-builder.diskSize = 5120;
virtualisation.darwin-builder.memorySize = 1024;
virtualisation.darwin-builder.hostPort = 33022;
virtualisation.darwin-builder.workingDirectory = "/var/lib/darwin-builder";
}
];
```
You may make any other changes to your VM in this attribute set. For example,
you could enable Docker or X11 forwarding to your Darwin host.

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,245 +0,0 @@
# Testers {#chap-testers}
This chapter describes several testing builders which are available in the `testers` namespace.
## `hasPkgConfigModules` {#tester-hasPkgConfigModules}
<!-- Old anchor name so links still work -->
[]{#tester-hasPkgConfigModule}
Checks whether a package exposes a given list of `pkg-config` modules.
If the `moduleNames` argument is omitted, `hasPkgConfigModules` will
use `meta.pkgConfigModules`.
Example:
```nix
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [ "libfoo" ];
};
```
If the package in question has `meta.pkgConfigModules` set, it is even simpler:
```nix
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
meta.pkgConfigModules = [ "libfoo" ];
```
## `testVersion` {#tester-testVersion}
Checks the command output contains the specified version
Although simplistic, this test assures that the main program
can run. While there's no substitute for a real test case,
it does catch dynamic linking errors and such. It also provides
some protection against accidentally building the wrong version,
for example when using an 'old' hash in a fixed-output derivation.
Examples:
```nix
passthru.tests.version = testers.testVersion { package = hello; };
passthru.tests.version = testers.testVersion {
package = seaweedfs;
command = "weed version";
};
passthru.tests.version = testers.testVersion {
package = key;
command = "KeY --help";
# Wrong '2.5' version in the code. Drop on next version.
version = "2.5";
};
passthru.tests.version = testers.testVersion {
package = ghr;
# The output needs to contain the 'version' string without any prefix or suffix.
version = "v${version}";
};
```
## `testBuildFailure` {#tester-testBuildFailure}
Make sure that a build does not succeed. This is useful for testing testers.
This returns a derivation with an override on the builder, with the following effects:
- Fail the build when the original builder succeeds
- Move `$out` to `$out/result`, if it exists (assuming `out` is the default output)
- Save the build log to `$out/testBuildFailure.log` (same)
Example:
```nix
runCommand "example" {
failed = testers.testBuildFailure (runCommand "fail" {} ''
echo ok-ish >$out
echo failing though
exit 3
'');
} ''
grep -F 'ok-ish' $failed/result
grep -F 'failing though' $failed/testBuildFailure.log
[[ 3 = $(cat $failed/testBuildFailure.exit) ]]
touch $out
'';
```
While `testBuildFailure` is designed to keep changes to the original builder's
environment to a minimum, some small changes are inevitable.
- The file `$TMPDIR/testBuildFailure.log` is present. It should not be deleted.
- `stdout` and `stderr` are a pipe instead of a tty. This could be improved.
- One or two extra processes are present in the sandbox during the original
builder's execution.
- The derivation and output hashes are different, but not unusual.
- The derivation includes a dependency on `buildPackages.bash` and
`expect-failure.sh`, which is built to include a transitive dependency on
`buildPackages.coreutils` and possibly more. These are not added to `PATH`
or any other environment variable, so they should be hard to observe.
## `testEqualContents` {#tester-equalContents}
Check that two paths have the same contents.
Example:
```nix
testers.testEqualContents {
assertion = "sed -e performs replacement";
expected = writeText "expected" ''
foo baz baz
'';
actual = runCommand "actual" {
# not really necessary for a package that's in stdenv
nativeBuildInputs = [ gnused ];
base = writeText "base" ''
foo bar baz
'';
} ''
sed -e 's/bar/baz/g' $base >$out
'';
}
```
## `testEqualDerivation` {#tester-testEqualDerivation}
Checks that two packages produce the exact same build instructions.
This can be used to make sure that a certain difference of configuration,
such as the presence of an overlay does not cause a cache miss.
When the derivations are equal, the return value is an empty file.
Otherwise, the build log explains the difference via `nix-diff`.
Example:
```nix
testers.testEqualDerivation
"The hello package must stay the same when enabling checks."
hello
(hello.overrideAttrs(o: { doCheck = true; }))
```
## `invalidateFetcherByDrvHash` {#tester-invalidateFetcherByDrvHash}
Use the derivation hash to invalidate the output via name, for testing.
Type: `(a@{ name, ... } -> Derivation) -> a -> Derivation`
Normally, fixed output derivations can and should be cached by their output
hash only, but for testing we want to re-fetch everytime the fetcher changes.
Changes to the fetcher become apparent in the drvPath, which is a hash of
how to fetch, rather than a fixed store path.
By inserting this hash into the name, we can make sure to re-run the fetcher
every time the fetcher changes.
This relies on the assumption that Nix isn't clever enough to reuse its
database of local store contents to optimize fetching.
You might notice that the "salted" name derives from the normal invocation,
not the final derivation. `invalidateFetcherByDrvHash` has to invoke the fetcher
function twice: once to get a derivation hash, and again to produce the final
fixed output derivation.
Example:
```nix
tests.fetchgit = testers.invalidateFetcherByDrvHash fetchgit {
name = "nix-source";
url = "https://github.com/NixOS/nix";
rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
hash = "sha256-7DszvbCNTjpzGRmpIVAWXk20P0/XTrWZ79KSOGLrUWY=";
};
```
## `runNixOSTest` {#tester-runNixOSTest}
A helper function that behaves exactly like the NixOS `runTest`, except it also assigns this Nixpkgs package set as the `pkgs` of the test and makes the `nixpkgs.*` options read-only.
If your test is part of the Nixpkgs repository, or if you need a more general entrypoint, see ["Calling a test" in the NixOS manual](https://nixos.org/manual/nixos/stable/index.html#sec-calling-nixos-tests).
Example:
```nix
pkgs.testers.runNixOSTest ({ lib, ... }: {
name = "hello";
nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.hello ];
};
testScript = ''
machine.succeed("hello")
'';
})
```
## `nixosTest` {#tester-nixosTest}
Run a NixOS VM network test using this evaluation of Nixpkgs.
NOTE: This function is primarily for external use. NixOS itself uses `make-test-python.nix` directly. Packages defined in Nixpkgs [reuse NixOS tests via `nixosTests`, plural](#ssec-nixos-tests-linking).
It is mostly equivalent to the function `import ./make-test-python.nix` from the
[NixOS manual](https://nixos.org/nixos/manual/index.html#sec-nixos-tests),
except that the current application of Nixpkgs (`pkgs`) will be used, instead of
letting NixOS invoke Nixpkgs anew.
If a test machine needs to set NixOS options under `nixpkgs`, it must set only the
`nixpkgs.pkgs` option.
### Parameter {#tester-nixosTest-parameter}
A [NixOS VM test network](https://nixos.org/nixos/manual/index.html#sec-nixos-tests), or path to it. Example:
```nix
{
name = "my-test";
nodes = {
machine1 = { lib, pkgs, nodes, ... }: {
environment.systemPackages = [ pkgs.hello ];
services.foo.enable = true;
};
# machine2 = ...;
};
testScript = ''
start_all()
machine1.wait_for_unit("foo.service")
machine1.succeed("hello | foo-send")
'';
}
```
### Result {#tester-nixosTest-result}
A derivation that runs the VM test.
Notable attributes:
* `nodes`: the evaluated NixOS configurations. Useful for debugging and exploring the configuration.
* `driverInteractive`: a script that launches an interactive Python session in the context of the `testScript`.

View File

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

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

@@ -0,0 +1,680 @@
<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.1rc2"</literal>.</para></listitem>
<listitem><para>If a package is not a release but a commit from a repository, then
the version part of the name <emphasis>must</emphasis> be the date of that
(fetched) commit. The date must be in <literal>"YYYY-MM-DD"</literal> format.
Also append <literal>"unstable"</literal> to the name - e.g.,
<literal>"pkgname-unstable-2014-09-23"</literal>.</para></listitem>
<listitem><para>Dashes in the package name should be preserved
in new variable names, rather than converted to underscores
(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>Bad: Uses <literal>git://</literal> which won't be proxied.
<programlisting>
src = fetchgit {
url = "git://github.com/NixOS/nix.git";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
}
</programlisting>
</para>
</listitem>
<listitem>
<para>Better: This is ok, but an archive fetch will still be faster.
<programlisting>
src = fetchgit {
url = "https://github.com/NixOS/nix.git";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kg";
}
</programlisting>
</para>
</listitem>
<listitem>
<para>Best: Fetches a snapshot archive and you get the rev you want.
<programlisting>
src = fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = "1f795f9f44607cc5bec70d1300150bfefcef2aae";
sha256 = "04yri911rj9j19qqqn6m82266fl05pz98inasni0vxr1cf1gdgv9";
}
</programlisting>
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section xml:id="sec-patches"><title>Patches</title>
<para>Only patches that are unique to <literal>nixpkgs</literal> should be
included in <literal>nixpkgs</literal> source.</para>
<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>
</section>
</chapter>

View File

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

247
doc/configuration.xml Normal file
View File

@@ -0,0 +1,247 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-packageconfig">
<title>Global configuration</title>
<para>Nix comes with certain defaults about what packages can and
cannot be installed, based on a package's metadata. By default, Nix
will prevent installation if any of the following criteria are
true:</para>
<itemizedlist>
<listitem><para>The package is thought to be broken, and has had
its <literal>meta.broken</literal> set to
<literal>true</literal>.</para></listitem>
<listitem><para>The package's <literal>meta.license</literal> is set
to a license which is considered to be unfree.</para></listitem>
<listitem><para>The package has known security vulnerabilities but
has not or can not be updated for some reason, and a list of issues
has been entered in to the package's
<literal>meta.knownVulnerabilities</literal>.</para></listitem>
</itemizedlist>
<para>Note that all this is checked during evaluation already,
and the check includes any package that is evaluated.
In particular, all build-time dependencies are checked.
<literal>nix-env -qa</literal> will (attempt to) hide any packages
that would be refused.
</para>
<para>Each of these criteria can be altered in the nixpkgs
configuration.</para>
<para>The nixpkgs configuration for a NixOS system is set in the
<literal>configuration.nix</literal>, as in the following example:
<programlisting>
{
nixpkgs.config = {
allowUnfree = true;
};
}
</programlisting>
However, this does not allow unfree software for individual users.
Their configurations are managed separately.</para>
<para>A user's of nixpkgs configuration is stored in a user-specific
configuration file located at
<filename>~/.config/nixpkgs/config.nix</filename>. For example:
<programlisting>
{
allowUnfree = true;
}
</programlisting>
</para>
<section xml:id="sec-allow-broken">
<title>Installing broken packages</title>
<para>There are two ways to try compiling a package which has been
marked as broken.</para>
<itemizedlist>
<listitem><para>
For allowing the build of a broken package once, you can use an
environment variable for a single invocation of the nix tools:
<programlisting>$ export NIXPKGS_ALLOW_BROKEN=1</programlisting>
</para></listitem>
<listitem><para>
For permanently allowing broken packages to be built, you may
add <literal>allowBroken = true;</literal> to your user's
configuration file, like this:
<programlisting>
{
allowBroken = true;
}
</programlisting>
</para></listitem>
</itemizedlist>
</section>
<section xml:id="sec-allow-unfree">
<title>Installing unfree packages</title>
<para>There are several ways to tweak how Nix handles a package
which has been marked as unfree.</para>
<itemizedlist>
<listitem><para>
To temporarily allow all unfree packages, you can use an
environment variable for a single invocation of the nix tools:
<programlisting>$ export NIXPKGS_ALLOW_UNFREE=1</programlisting>
</para></listitem>
<listitem><para>
It is possible to permanently allow individual unfree packages,
while still blocking unfree packages by default using the
<literal>allowUnfreePredicate</literal> configuration
option in the user configuration file.</para>
<para>This option is a function which accepts a package as a
parameter, and returns a boolean. The following example
configuration accepts a package and always returns false:
<programlisting>
{
allowUnfreePredicate = (pkg: false);
}
</programlisting>
</para>
<para>A more useful example, the following configuration allows
only allows flash player and visual studio code:
<programlisting>
{
allowUnfreePredicate = (pkg: elem (builtins.parseDrvName pkg.name).name [ "flashplayer" "vscode" ]);
}
</programlisting>
</para></listitem>
<listitem>
<para>It is also possible to whitelist and blacklist licenses
that are specifically acceptable or not acceptable, using
<literal>whitelistedLicenses</literal> and
<literal>blacklistedLicenses</literal>, respectively.
</para>
<para>The following example configuration whitelists the
licenses <literal>amd</literal> and <literal>wtfpl</literal>:
<programlisting>
{
whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ];
}
</programlisting>
</para>
<para>The following example configuration blacklists the
<literal>gpl3</literal> and <literal>agpl3</literal> licenses:
<programlisting>
{
blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ];
}
</programlisting>
</para>
</listitem>
</itemizedlist>
<para>A complete list of licenses can be found in the file
<filename>lib/licenses.nix</filename> of the nixpkgs tree.</para>
</section>
<section xml:id="sec-allow-insecure">
<title>
Installing insecure packages
</title>
<para>There are several ways to tweak how Nix handles a package
which has been marked as insecure.</para>
<itemizedlist>
<listitem><para>
To temporarily allow all insecure packages, you can use an
environment variable for a single invocation of the nix tools:
<programlisting>$ export NIXPKGS_ALLOW_INSECURE=1</programlisting>
</para></listitem>
<listitem><para>
It is possible to permanently allow individual insecure
packages, while still blocking other insecure packages by
default using the <literal>permittedInsecurePackages</literal>
configuration option in the user configuration file.</para>
<para>The following example configuration permits the
installation of the hypothetically insecure package
<literal>hello</literal>, version <literal>1.2.3</literal>:
<programlisting>
{
permittedInsecurePackages = [
"hello-1.2.3"
];
}
</programlisting>
</para>
</listitem>
<listitem><para>
It is also possible to create a custom policy around which
insecure packages to allow and deny, by overriding the
<literal>allowInsecurePredicate</literal> configuration
option.</para>
<para>The <literal>allowInsecurePredicate</literal> option is a
function which accepts a package and returns a boolean, much
like <literal>allowUnfreePredicate</literal>.</para>
<para>The following configuration example only allows insecure
packages with very short names:
<programlisting>
{
allowInsecurePredicate = (pkg: (builtins.stringLength (builtins.parseDrvName pkg.name).name) &lt;= 5);
}
</programlisting>
</para>
<para>Note that <literal>permittedInsecurePackages</literal> is
only checked if <literal>allowInsecurePredicate</literal> is not
specified.
</para></listitem>
</itemizedlist>
</section>
<!--============================================================-->
<section xml:id="sec-modify-via-packageOverrides"><title>Modify
packages via <literal>packageOverrides</literal></title>
<para>You can define a function called
<varname>packageOverrides</varname> in your local
<filename>~/.config/nixpkgs/config.nix</filename> to 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>

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

@@ -0,0 +1,168 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-cross">
<title>Cross-compilation</title>
<section xml:id="sec-cross-intro">
<title>Introduction</title>
<para>
"Cross-compilation" means compiling a program on one machine for another type of machine.
For example, a typical use of cross compilation is to compile programs for embedded devices.
These devices often don't have the computing power and memory to compile their own programs.
One might think that cross-compilation is a fairly niche concern, but there are advantages to being rigorous about distinguishing build-time vs run-time environments even when one is developing and deploying on the same machine.
Nixpkgs is increasingly adopting this opinion in that packages should be written with cross-compilation in mind, and nixpkgs should evaluate in a similar way (by minimizing cross-compilation-specific special cases) whether or not one is cross-compiling.
</para>
<para>
This chapter will be organized in three parts.
First, it will describe the basics of how to package software in a way that supports cross-compilation.
Second, it will describe how to use Nixpkgs when cross-compiling.
Third, it will describe the internal infrastructure supporting cross-compilation.
</para>
</section>
<!--============================================================-->
<section xml:id="sec-cross-packaging">
<title>Packaging in a cross-friendly manner</title>
<section>
<title>Platform parameters</title>
<para>
The three GNU Autoconf platforms, <wordasword>build</wordasword>, <wordasword>host</wordasword>, and <wordasword>cross</wordasword>, are historically the result of much confusion.
<link xlink:href="https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html" /> clears this up somewhat but there is more to be said.
An important advice to get out the way is, unless you are packaging a compiler or other build tool, just worry about the build and host platforms.
Dealing with just two platforms usually better matches people's preconceptions, and in this case is completely correct.
</para>
<para>
In Nixpkgs, these three platforms are defined as attribute sets under the names <literal>buildPlatform</literal>, <literal>hostPlatform</literal>, and <literal>targetPlatform</literal>.
All are guaranteed to contain at least a <varname>platform</varname> field, which contains detailed information on the platform.
All three are always defined at the top level, so one can get at them just like a dependency in a function that is imported with <literal>callPackage</literal>:
<programlisting>{ stdenv, buildPlatform, hostPlatform, fooDep, barDep, .. }: ...</programlisting>
</para>
<warning><para>
These platforms should all have the same structure in all scenarios, but that is currently not the case.
When not cross-compiling, they will each contain a <literal>system</literal> field with a short 2-part, hyphen-separated summering string name for the platform.
But, when when cross compiling, <literal>hostPlatform</literal> and <literal>targetPlatform</literal> may instead contain <literal>config</literal> with a fuller 3- or 4-part string in the manner of LLVM.
We should have all 3 platforms always contain both, and maybe give <literal>config</literal> a better name while we are at it.
</para></warning>
<variablelist>
<varlistentry>
<term><varname>buildPlatform</varname></term>
<listitem><para>
The "build platform" is the platform on which a package is built.
Once someone has a built package, or pre-built binary package, the build platform should not matter and be safe to ignore.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>hostPlatform</varname></term>
<listitem><para>
The "host platform" is the platform on which a package is run.
This is the simplest platform to understand, but also the one with the worst name.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>targetPlatform</varname></term>
<listitem>
<para>
The "target platform" is black sheep.
The other two intrinsically apply to all compiled software—or any build process with a notion of "build-time" followed by "run-time".
The target platform only applies to programming tools, and even then only is a good for for some of them.
Briefly, GCC, Binutils, GHC, and certain other tools are written in such a way such that a single build can only compiler code for a single platform.
Thus, when building them, one must think ahead about what platforms they wish to use the tool to produce machine code for, and build binaries for each.
</para>
<para>
There is no fundamental need to think about the target ahead of time like this.
LLVM, for example, was designed from the beginning with cross-compilation in mind, and so a normal LLVM binary will support every architecture that LLVM supports.
If the tool supports modular or pluggable backends, one might imagine specifying a <emphasis>set</emphasis> of target platforms / backends one wishes to support, rather than a single one.
</para>
<para>
The biggest reason for mess, if there is one, is that many compilers have the bad habit a build process that builds the compiler and standard library/runtime together.
Then the specifying target platform is essential, because it determines the host platform of the standard library/runtime.
Nixpkgs tries to avoid this where possible too, but still, because the concept of a target platform is so ingrained now in Autoconf and other tools, it is best to support it as is.
Tools like LLVM that don't need up-front target platforms can safely ignore it like normal packages, and it will do no harm.
</para>
</listitem>
</varlistentry>
</variablelist>
<note><para>
If you dig around nixpkgs, you may notice there is also <varname>stdenv.cross</varname>.
This field defined as <varname>hostPlatform</varname> when the host and build platforms differ, but otherwise not defined at all.
This field is obsolete and will soon disappear—please do not use it.
</para></note>
</section>
<section>
<title>Specifying Dependencies</title>
<para>
As mentioned in the introduction to this chapter, one can think about a build time vs run time distinction whether cross-compiling or not.
In the case of cross-compilation, this corresponds with whether a derivation running on the native or foreign platform is produced.
An interesting thing to think about is how this corresponds with the three Autoconf platforms.
In the run-time case, the depending and depended-on package simply have matching build, host, and target platforms.
But in the build-time case, one can imagine "sliding" the platforms one over.
The depended-on package's host and target platforms (respectively) become the depending package's build and host platforms.
This is the most important guiding principle behind cross-compilation with Nixpkgs, and will be called the <wordasword>sliding window principle</wordasword>.
In this manner, given the 3 platforms for one package, we can determine the three platforms for all its transitive dependencies.
</para>
<para>
Some examples will probably make this clearer.
If a package is being built with a <literal>(build, host, target)</literal> platform triple of <literal>(foo, bar, bar)</literal>, then its build-time dependencies would have a triple of <literal>(foo, foo, bar)</literal>, and <emphasis>those packages'</emphasis> build-time dependencies would have triple of <literal>(foo, foo, foo)</literal>.
In other words, it should take two "rounds" of following build-time dependency edges before one reaches a fixed point where, by the sliding window principle, the platform triple no longer changes.
Indeed, this happens with cross compilation, where only rounds of native dependencies starting with the second necessarily coincide with native packages.
</para>
<note><para>
The depending package's target platform is unconstrained by the sliding window principle, which makes sense in that one can in principle build cross compilers targeting arbitrary platforms.
</para></note>
<para>
How does this work in practice? Nixpkgs is now structured so that build-time dependencies are taken from from <varname>buildPackages</varname>, whereas run-time dependencies are taken from the top level attribute set.
For example, <varname>buildPackages.gcc</varname> should be used at build time, while <varname>gcc</varname> should be used at run time.
Now, for most of Nixpkgs's history, there was no <varname>buildPackages</varname>, and most packages have not been refactored to use it explicitly.
Instead, one can use the four attributes used for specifying dependencies as documented in <link linkend="ssec-stdenv-attributes" />.
We "splice" together the run-time and build-time package sets with <varname>callPackage</varname>, and then <varname>mkDerivation</varname> for each of four attributes pulls the right derivation out.
This splicing can be skipped when not cross compiling as the package sets are the same, but is a bit slow for cross compiling.
Because of this, a best-of-both-worlds solution is in the works with no splicing or explicit access of <varname>buildPackages</varname> needed.
For now, feel free to use either method.
</para>
</section>
</section>
<!--============================================================-->
<section xml:id="sec-cross-usage">
<title>Cross-building packages</title>
<note><para>
More information needs to moved from the old wiki, especially <link xlink:href="https://nixos.org/wiki/CrossCompiling" />, for this section.
</para></note>
<para>
Many sources (manual, wiki, etc) probably mention passing <varname>system</varname>, <varname>platform</varname>, and, optionally, <varname>crossSystem</varname> to nixpkgs:
<literal>import &lt;nixpkgs&gt; { system = ..; platform = ..; crossSystem = ..; }</literal>.
<varname>system</varname> and <varname>platform</varname> together determine the system on which packages are built, and <varname>crossSystem</varname> specifies the platform on which packages are ultimately intended to run, if it is different.
This still works, but with more recent changes, one can alternatively pass <varname>localSystem</varname>, containing <varname>system</varname> and <varname>platform</varname>, for symmetry.
</para>
<para>
One would think that <varname>localSystem</varname> and <varname>crossSystem</varname> overlap horribly with the three <varname>*Platforms</varname> (<varname>buildPlatform</varname>, <varname>hostPlatform,</varname> and <varname>targetPlatform</varname>; see <varname>stage.nix</varname> or the manual).
Actually, those identifiers are purposefully not used here to draw a subtle but important distinction:
While the granularity of having 3 platforms is necessary to properly *build* packages, it is overkill for specifying the user's *intent* when making a build plan or package set.
A simple "build vs deploy" dichotomy is adequate: the sliding window principle described in the previous section shows how to interpolate between the these two "end points" to get the 3 platform triple for each bootstrapping stage.
That means for any package a given package set, even those not bound on the top level but only reachable via dependencies or <varname>buildPackages</varname>, the three platforms will be defined as one of <varname>localSystem</varname> or <varname>crossSystem</varname>, with the former replacing the latter as one traverses build-time dependencies.
A last simple difference then is <varname>crossSystem</varname> should be null when one doesn't want to cross-compile, while the <varname>*Platform</varname>s are always non-null.
<varname>localSystem</varname> is always non-null.
</para>
</section>
<!--============================================================-->
<section xml:id="sec-cross-infra">
<title>Cross-compilation infrastructure</title>
<para>To be written.</para>
<note><para>
If one explores nixpkgs, they will see derivations with names like <literal>gccCross</literal>.
Such <literal>*Cross</literal> derivations is a holdover from before we properly distinguished between the host and target platforms
—the derivation with "Cross" in the name covered the <literal>build = host != target</literal> case, while the other covered the <literal>host = target</literal>, with build platform the same or not based on whether one was using its <literal>.nativeDrv</literal> or <literal>.crossDrv</literal>.
This ugliness will disappear soon.
</para></note>
</section>
</chapter>

View File

@@ -1,150 +1,113 @@
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
let
inherit (pkgs) lib;
inherit (lib) hasPrefix removePrefix;
common = import ./common.nix;
lib-docs = import ./doc-support/lib-function-docs.nix {
inherit pkgs nixpkgs;
libsets = [
{ name = "asserts"; description = "assertion functions"; }
{ name = "attrsets"; description = "attribute set functions"; }
{ name = "strings"; description = "string manipulation functions"; }
{ name = "versions"; description = "version string functions"; }
{ name = "trivial"; description = "miscellaneous functions"; }
{ name = "fixedPoints"; baseName = "fixed-points"; description = "explicit recursion functions"; }
{ name = "lists"; description = "list manipulation functions"; }
{ name = "debug"; description = "debugging functions"; }
{ name = "options"; description = "NixOS / nixpkgs option handling"; }
{ name = "path"; description = "path functions"; }
{ name = "filesystem"; description = "filesystem functions"; }
{ name = "fileset"; description = "file set functions"; }
{ name = "sources"; description = "source filtering functions"; }
{ name = "cli"; description = "command-line serialization functions"; }
{ name = "gvariant"; description = "GVariant formatted string serialization functions"; }
];
};
epub = pkgs.runCommand "manual.epub" {
nativeBuildInputs = with pkgs; [ libxslt zip ];
epub = ''
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="nixpkgs-manual">
<info>
<title>Nixpkgs Manual</title>
<subtitle>Version ${pkgs.lib.version}</subtitle>
</info>
<chapter>
<title>Temporarily unavailable</title>
<para>
The Nixpkgs manual is currently not available in EPUB format,
please use the <link xlink:href="https://nixos.org/nixpkgs/manual">HTML manual</link>
instead.
</para>
<para>
If you've used the EPUB manual in the past and it has been useful to you, please
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>.
</para>
</chapter>
</book>
'';
passAsFile = [ "epub" ];
} ''
mkdir scratch
xsltproc \
--param chapter.autolabel 0 \
--nonet \
--output scratch/ \
${pkgs.docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \
$epubPath
echo "application/epub+zip" > mimetype
zip -0Xq "$out" mimetype
cd scratch && zip -Xr9D "$out" *
'';
# NB: This file describes the Nixpkgs manual, which happens to use module
# docs infra originally developed for NixOS.
optionsDoc = pkgs.nixosOptionsDoc {
inherit (pkgs.lib.evalModules {
modules = [ ../pkgs/top-level/config.nix ];
class = "nixpkgsConfig";
}) options;
documentType = "none";
transformOptions = opt:
opt // {
declarations =
map
(decl:
if hasPrefix (toString ../..) (toString decl)
then
let subpath = removePrefix "/" (removePrefix (toString ../.) (toString decl));
in { url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}"; name = subpath; }
else decl)
opt.declarations;
};
};
in pkgs.stdenv.mkDerivation {
pkgs = import ./.. { };
lib = pkgs.lib;
sources = lib.sourceFilesBySuffices ./. [".xml"];
sources-langs = ./languages-frameworks;
in
pkgs.stdenv.mkDerivation {
name = "nixpkgs-manual";
nativeBuildInputs = with pkgs; [
nixos-render-docs
];
src = ./.;
buildInputs = with pkgs; [ pandoc libxml2 libxslt zip ];
postPatch = ''
ln -s ${optionsDoc.optionsJSON}/share/doc/nixos/options.json ./config-options.json
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'
'';
buildPhase = ''
cat \
./functions/library.md.in \
${lib-docs}/index.md \
> ./functions/library.md
substitute ./manual.md.in ./manual.md \
--replace '@MANUAL_VERSION@' '${pkgs.lib.version}'
mkdir -p out/media
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 ${lib.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/highlightjs
cp -t out/highlightjs \
${pkgs.documentation-highlighter}/highlight.pack.js \
${pkgs.documentation-highlighter}/LICENSE \
${pkgs.documentation-highlighter}/mono-blue.css \
${pkgs.documentation-highlighter}/loader.js
''
ln -s '${sources}/'*.xml .
mkdir ./languages-frameworks
cp -s '${sources-langs}'/* ./languages-frameworks
''
+ toDocbook {
inputFile = ./introduction.md;
outputFile = "introduction.xml";
useChapters = true;
}
+ toDocbook {
inputFile = ./languages-frameworks/python.md;
outputFile = "./languages-frameworks/python.xml";
}
+ toDocbook {
inputFile = ./languages-frameworks/haskell.md;
outputFile = "./languages-frameworks/haskell.xml";
}
+ toDocbook {
inputFile = ../pkgs/development/idris-modules/README.md;
outputFile = "languages-frameworks/idris.xml";
}
+ toDocbook {
inputFile = ../pkgs/development/node-packages/README.md;
outputFile = "languages-frameworks/node.xml";
}
+ toDocbook {
inputFile = ../pkgs/development/r-modules/README.md;
outputFile = "languages-frameworks/r.xml";
}
+ toDocbook {
inputFile = ./languages-frameworks/rust.md;
outputFile = "./languages-frameworks/rust.xml";
}
+ toDocbook {
inputFile = ./languages-frameworks/vim.md;
outputFile = "./languages-frameworks/vim.xml";
}
+ ''
echo ${lib.nixpkgsVersion} > .version
cp -t out ./overrides.css ./style.css
# validate against relaxng schema
xmllint --nonet --xinclude --noxincludenode manual.xml --output manual-full.xml
${pkgs.jing}/bin/jing ${pkgs.docbook5}/xml/rng/docbook/docbook.rng manual-full.xml
nixos-render-docs manual html \
--manpage-urls ./manpage-urls.json \
--revision ${pkgs.lib.trivial.revisionWithDefault (pkgs.rev or "master")} \
--stylesheet style.css \
--stylesheet overrides.css \
--stylesheet highlightjs/mono-blue.css \
--script ./highlightjs/highlight.pack.js \
--script ./highlightjs/loader.js \
--toc-depth 1 \
--section-toc-depth 1 \
manual.md \
out/index.html
'';
dst=$out/share/doc/nixpkgs
mkdir -p $dst
xsltproc $xsltFlags --nonet --xinclude \
--output $dst/manual.html \
${pkgs.docbook5_xsl}/xml/xsl/docbook/xhtml/docbook.xsl \
./manual.xml
installPhase = ''
dest="$out/${common.outputPath}"
mkdir -p "$(dirname "$dest")"
mv out "$dest"
mv "$dest/index.html" "$dest/${common.indexPath}"
cp ${./style.css} $dst/style.css
cp ${epub} "$dest/nixpkgs-manual.epub"
mkdir -p $dst/images/callouts
cp "${pkgs.docbook5_xsl}/xml/xsl/docbook/images/callouts/"*.gif $dst/images/callouts/
mkdir -p $out/nix-support/
echo "doc manual $dest ${common.indexPath}" >> $out/nix-support/hydra-build-products
echo "doc manual $dest nixpkgs-manual.epub" >> $out/nix-support/hydra-build-products
mkdir -p $out/nix-support
echo "doc manual $dst manual.html" >> $out/nix-support/hydra-build-products
xsltproc $xsltFlags --nonet --xinclude \
--output $dst/epub/ \
${pkgs.docbook5_xsl}/xml/xsl/docbook/epub/docbook.xsl \
./manual.xml
cp -r $dst/images $dst/epub/OEBPS
echo "application/epub+zip" > mimetype
manual="$dst/nixpkgs-manual.epub"
zip -0Xq "$manual" mimetype
cd $dst/epub && zip -Xr9D "$manual" *
rm -rf $dst/epub
'';
}

View File

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

View File

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

View File

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

View File

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

View File

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

706
doc/functions.xml Normal file
View File

@@ -0,0 +1,706 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="chap-functions">
<title>Functions reference</title>
<para>
The nixpkgs repository has several utility functions to manipulate Nix expressions.
</para>
<section xml:id="sec-overrides">
<title>Overriding</title>
<para>
Sometimes one wants to override parts of
<literal>nixpkgs</literal>, e.g. derivation attributes, the results of
derivations or even the whole package set.
</para>
<section xml:id="sec-pkg-override">
<title>&lt;pkg&gt;.override</title>
<para>
The function <varname>override</varname> is usually available for all the
derivations in the nixpkgs expression (<varname>pkgs</varname>).
</para>
<para>
It is used to override the arguments passed to a function.
</para>
<para>
Example usages:
<programlisting>pkgs.foo.override { arg1 = val1; arg2 = val2; ... }</programlisting>
<programlisting>import pkgs.path { overlays = [ (self: super: {
foo = super.foo.override { barSupport = true ; };
})]};</programlisting>
<programlisting>mypkg = pkgs.callPackage ./mypkg.nix {
mydep = pkgs.mydep.override { ... };
}</programlisting>
</para>
<para>
In the first example, <varname>pkgs.foo</varname> is the result of a function call
with some default arguments, usually a derivation.
Using <varname>pkgs.foo.override</varname> will call the same function with
the given new arguments.
</para>
</section>
<section xml:id="sec-pkg-overrideAttrs">
<title>&lt;pkg&gt;.overrideAttrs</title>
<para>
The function <varname>overrideAttrs</varname> allows overriding the
attribute set passed to a <varname>stdenv.mkDerivation</varname> call,
producing a new derivation based on the original one.
This function is available on all derivations produced by the
<varname>stdenv.mkDerivation</varname> function, which is most packages
in the nixpkgs expression <varname>pkgs</varname>.
</para>
<para>
Example usage:
<programlisting>helloWithDebug = pkgs.hello.overrideAttrs (oldAttrs: rec {
separateDebugInfo = true;
});</programlisting>
</para>
<para>
In the above example, the <varname>separateDebugInfo</varname> attribute is
overriden to be true, thus building debug info for
<varname>helloWithDebug</varname>, while all other attributes will be
retained from the original <varname>hello</varname> package.
</para>
<para>
The argument <varname>oldAttrs</varname> is conventionally used to refer to
the attr set originally passed to <varname>stdenv.mkDerivation</varname>.
</para>
<note>
<para>
Note that <varname>separateDebugInfo</varname> is processed only by the
<varname>stdenv.mkDerivation</varname> function, not the generated, raw
Nix derivation. Thus, using <varname>overrideDerivation</varname> will
not work in this case, as it overrides only the attributes of the final
derivation. It is for this reason that <varname>overrideAttrs</varname>
should be preferred in (almost) all cases to
<varname>overrideDerivation</varname>, i.e. to allow using
<varname>sdenv.mkDerivation</varname> to process input arguments, as well
as the fact that it is easier to use (you can use the same attribute
names you see in your Nix code, instead of the ones generated (e.g.
<varname>buildInputs</varname> vs <varname>nativeBuildInputs</varname>,
and involves less typing.
</para>
</note>
</section>
<section xml:id="sec-pkg-overrideDerivation">
<title>&lt;pkg&gt;.overrideDerivation</title>
<warning>
<para>You should prefer <varname>overrideAttrs</varname> in almost all
cases, see its documentation for the reasons why.
<varname>overrideDerivation</varname> is not deprecated and will continue
to work, but is less nice to use and does not have as many abilities as
<varname>overrideAttrs</varname>.
</para>
</warning>
<warning>
<para>Do not use this function in Nixpkgs as it evaluates a Derivation
before modifying it, which breaks package abstraction and removes
error-checking of function arguments. In addition, this
evaluation-per-function application incurs a performance penalty,
which can become a problem if many overrides are used.
It is only intended for ad-hoc customisation, such as in
<filename>~/.config/nixpkgs/config.nix</filename>.
</para>
</warning>
<para>
The function <varname>overrideDerivation</varname> creates a new derivation
based on an existing one by overriding the original's attributes with
the attribute set produced by the specified function.
This function is available on all
derivations defined using the <varname>makeOverridable</varname> function.
Most standard derivation-producing functions, such as
<varname>stdenv.mkDerivation</varname>, are defined using this
function, which means most packages in the nixpkgs expression,
<varname>pkgs</varname>, have this function.
</para>
<para>
Example usage:
<programlisting>mySed = pkgs.gnused.overrideDerivation (oldAttrs: {
name = "sed-4.2.2-pre";
src = fetchurl {
url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;
sha256 = "11nq06d131y4wmf3drm0yk502d2xc6n5qy82cg88rb9nqd2lj41k";
};
patches = [];
});</programlisting>
</para>
<para>
In the above example, the <varname>name</varname>, <varname>src</varname>,
and <varname>patches</varname> of the derivation will be overridden, while
all other attributes will be retained from the original derivation.
</para>
<para>
The argument <varname>oldAttrs</varname> is used to refer to the attribute set of
the original derivation.
</para>
<note>
<para>
A package's attributes are evaluated *before* being modified by
the <varname>overrideDerivation</varname> function.
For example, the <varname>name</varname> attribute reference
in <varname>url = "mirror://gnu/hello/${name}.tar.gz";</varname>
is filled-in *before* the <varname>overrideDerivation</varname> function
modifies the attribute set. This means that overriding the
<varname>name</varname> attribute, in this example, *will not* change the
value of the <varname>url</varname> attribute. Instead, we need to override
both the <varname>name</varname> *and* <varname>url</varname> attributes.
</para>
</note>
</section>
<section xml:id="sec-lib-makeOverridable">
<title>lib.makeOverridable</title>
<para>
The function <varname>lib.makeOverridable</varname> is used to make the result
of a function easily customizable. This utility only makes sense for functions
that accept an argument set and return an attribute set.
</para>
<para>
Example usage:
<programlisting>f = { a, b }: { result = a+b; }
c = lib.makeOverridable f { a = 1; b = 2; }</programlisting>
</para>
<para>
The variable <varname>c</varname> is the value of the <varname>f</varname> function
applied with some default arguments. Hence the value of <varname>c.result</varname>
is <literal>3</literal>, in this example.
</para>
<para>
The variable <varname>c</varname> however also has some additional functions, like
<link linkend="sec-pkg-override">c.override</link> which can be used to
override the default arguments. In this example the value of
<varname>(c.override { a = 4; }).result</varname> is 6.
</para>
</section>
</section>
<section xml:id="sec-generators">
<title>Generators</title>
<para>
Generators are functions that create file formats from nix
data structures, e.g. for configuration files.
There are generators available for: <literal>INI</literal>,
<literal>JSON</literal> and <literal>YAML</literal>
</para>
<para>
All generators follow a similar call interface: <code>generatorName
configFunctions data</code>, where <literal>configFunctions</literal> is a
set of user-defined functions that format variable parts of the content.
They each have common defaults, so often they do not need to be set
manually. An example is <code>mkSectionName ? (name: libStr.escape [ "[" "]"
] name)</code> from the <literal>INI</literal> generator. It gets the name
of a section and returns a sanitized name. The default
<literal>mkSectionName</literal> escapes <literal>[</literal> and
<literal>]</literal> with a backslash.
</para>
<note><para>Nix store paths can be converted to strings by enclosing a
derivation attribute like so: <code>"${drv}"</code>.</para></note>
<para>
Detailed documentation for each generator can be found in
<literal>lib/generators.nix</literal>.
</para>
</section>
<section xml:id="sec-fhs-environments">
<title>buildFHSUserEnv</title>
<para>
<function>buildFHSUserEnv</function> provides a way to build and run
FHS-compatible lightweight sandboxes. It creates an isolated root with
bound <filename>/nix/store</filename>, so its footprint in terms of disk
space needed is quite small. This allows one to run software which is hard or
unfeasible to patch for NixOS -- 3rd-party source trees with FHS assumptions,
games distributed as tarballs, software with integrity checking and/or external
self-updated binaries. It uses Linux namespaces feature to create
temporary lightweight environments which are destroyed after all child
processes exit, without root user rights requirement. Accepted arguments are:
</para>
<variablelist>
<varlistentry>
<term><literal>name</literal></term>
<listitem><para>Environment name.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>targetPkgs</literal></term>
<listitem><para>Packages to be installed for the main host's architecture
(i.e. x86_64 on x86_64 installations). Along with libraries binaries are also
installed.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>multiPkgs</literal></term>
<listitem><para>Packages to be installed for all architectures supported by
a host (i.e. i686 and x86_64 on x86_64 installations). Only libraries are
installed by default.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>extraBuildCommands</literal></term>
<listitem><para>Additional commands to be executed for finalizing the
directory structure.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>extraBuildCommandsMulti</literal></term>
<listitem><para>Like <literal>extraBuildCommands</literal>, but
executed only on multilib architectures.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>extraOutputsToInstall</literal></term>
<listitem><para>Additional derivation outputs to be linked for both
target and multi-architecture packages.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>extraInstallCommands</literal></term>
<listitem><para>Additional commands to be executed for finalizing the
derivation with runner script.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>runScript</literal></term>
<listitem><para>A command that would be executed inside the sandbox and
passed all the command line arguments. It defaults to
<literal>bash</literal>.</para></listitem>
</varlistentry>
</variablelist>
<para>
One can create a simple environment using a <literal>shell.nix</literal>
like that:
</para>
<programlisting><![CDATA[
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "simple-x11-env";
targetPkgs = pkgs: (with pkgs;
[ udev
alsaLib
]) ++ (with pkgs.xorg;
[ libX11
libXcursor
libXrandr
]);
multiPkgs = pkgs: (with pkgs;
[ udev
alsaLib
]);
runScript = "bash";
}).env
]]></programlisting>
<para>
Running <literal>nix-shell</literal> would then drop you into a shell with
these libraries and binaries available. You can use this to run
closed-source applications which expect FHS structure without hassles:
simply change <literal>runScript</literal> to the application path,
e.g. <filename>./bin/start.sh</filename> -- relative paths are supported.
</para>
</section>
<section xml:id="sec-pkgs-dockerTools">
<title>pkgs.dockerTools</title>
<para>
<varname>pkgs.dockerTools</varname> is a set of functions for creating and
manipulating Docker images according to the
<link xlink:href="https://github.com/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>
<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>
<note>
<para>
If you see errors similar to <literal>getProtocolByName: does not exist (no such protocol name: tcp)</literal>
you may need to add <literal>pkgs.iana_etc</literal> to <varname>contents</varname>.
</para>
</note>
<note>
<para>
If you see errors similar to <literal>Error_Protocol ("certificate has unknown CA",True,UnknownCa)</literal>
you may need to add <literal>pkgs.cacert</literal> to <varname>contents</varname>.
</para>
</note>
</section>
<section xml:id="ssec-pkgs-dockerTools-fetchFromRegistry">
<title>pullImage</title>
<para>
This function is analogous to the <command>docker pull</command> command,
in that can be used to fetch a Docker image from a Docker registry.
Currently only registry <literal>v1</literal> is supported.
By default <link xlink:href="https://hub.docker.com/">Docker Hub</link>
is used to pull images.
</para>
<para>
Its parameters are described in the example below:
</para>
<example xml:id='ex-dockerTools-pullImage'><title>Docker pull</title>
<programlisting>
pullImage {
imageName = "debian"; <co xml:id='ex-dockerTools-pullImage-1' />
imageTag = "jessie"; <co xml:id='ex-dockerTools-pullImage-2' />
imageId = null; <co xml:id='ex-dockerTools-pullImage-3' />
sha256 = "1bhw5hkz6chrnrih0ymjbmn69hyfriza2lr550xyvpdrnbzr4gk2"; <co xml:id='ex-dockerTools-pullImage-4' />
indexUrl = "https://index.docker.io"; <co xml:id='ex-dockerTools-pullImage-5' />
registryVersion = "v1";
}
</programlisting>
</example>
<calloutlist>
<callout arearefs='ex-dockerTools-pullImage-1'>
<para>
<varname>imageName</varname> specifies the name of the image to be downloaded,
which can also include the registry namespace (e.g. <literal>library/debian</literal>).
This argument is required.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-2'>
<para>
<varname>imageTag</varname> specifies the tag of the image to be downloaded.
By default it's <literal>latest</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-3'>
<para>
<varname>imageId</varname>, if specified this exact image will be fetched, instead
of <varname>imageName/imageTag</varname>. However, the resulting repository
will still be named <varname>imageName/imageTag</varname>.
By default it's <literal>null</literal>.
</para>
</callout>
<callout arearefs='ex-dockerTools-pullImage-4'>
<para>
<varname>sha256</varname> is the checksum of the whole fetched image.
This argument is required.
</para>
<note>
<para>The checksum is computed on the unpacked directory, not on the final tarball.</para>
</note>
</callout>
<callout arearefs='ex-dockerTools-pullImage-5'>
<para>
In the above example the default values are shown for the variables
<varname>indexUrl</varname> and <varname>registryVersion</varname>.
Hence by default the Docker.io registry is used to pull the images.
</para>
</callout>
</calloutlist>
</section>
<section xml:id="ssec-pkgs-dockerTools-exportImage">
<title>exportImage</title>
<para>
This function is analogous to the <command>docker export</command> command,
in that can used to flatten a Docker image that contains multiple layers.
It is in fact the result of the merge of all the layers of the image.
As such, the result is suitable for being imported in Docker
with <command>docker import</command>.
</para>
<note>
<para>
Using this function requires the <literal>kvm</literal>
device to be available.
</para>
</note>
<para>
The parameters of <varname>exportImage</varname> are the following:
</para>
<example xml:id='ex-dockerTools-exportImage'><title>Docker export</title>
<programlisting>
exportImage {
fromImage = someLayeredImage;
fromImageName = null;
fromImageTag = null;
name = someLayeredImage.name;
}
</programlisting>
</example>
<para>
The parameters relative to the base image have the same synopsis as
described in <xref linkend='ssec-pkgs-dockerTools-buildImage'/>, except that
<varname>fromImage</varname> is the only required argument in this case.
</para>
<para>
The <varname>name</varname> argument is the name of the derivation output,
which defaults to <varname>fromImage.name</varname>.
</para>
</section>
<section xml:id="ssec-pkgs-dockerTools-shadowSetup">
<title>shadowSetup</title>
<para>
This constant string is a helper for setting up the base files for managing
users and groups, only if such files don't exist already.
It is suitable for being used in a
<varname>runAsRoot</varname> <xref linkend='ex-dockerTools-buildImage-runAsRoot'/> script for cases like
in the example below:
</para>
<example xml:id='ex-dockerTools-shadowSetup'><title>Shadow base files</title>
<programlisting>
buildImage {
name = "shadow-basic";
runAsRoot = ''
#!${stdenv.shell}
${shadowSetup}
groupadd -r redis
useradd -r -g redis redis
mkdir /data
chown redis:redis /data
'';
}
</programlisting>
</example>
<para>
Creating base files like <literal>/etc/passwd</literal> or
<literal>/etc/login.defs</literal> are necessary for shadow-utils to
manipulate users and groups.
</para>
</section>
</section>
</chapter>

View File

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

View File

@@ -1,51 +0,0 @@
<!-- TODO: Render this document in front of function documentation in case https://github.com/nix-community/nixdoc/issues/19 is ever supported -->
# File sets {#sec-fileset}
The [`lib.fileset`](#sec-functions-library-fileset) library allows you to work with _file sets_.
A file set is a mathematical set of local files that can be added to the Nix store for use in Nix derivations.
File sets are easy and safe to use, providing obvious and composable semantics with good error messages to prevent mistakes.
These sections apply to the entire library.
See the [function reference](#sec-functions-library-fileset) for function-specific documentation.
The file set library is currently very limited but is being expanded to include more functions over time.
## Implicit coercion from paths to file sets {#sec-fileset-path-coercion}
All functions accepting file sets as arguments can also accept [paths](https://nixos.org/manual/nix/stable/language/values.html#type-path) as arguments.
Such path arguments are implicitly coerced to file sets containing all files under that path:
- A path to a file turns into a file set containing that single file.
- A path to a directory turns into a file set containing all files _recursively_ in that directory.
If the path points to a non-existent location, an error is thrown.
::: {.note}
Just like in Git, file sets cannot represent empty directories.
Because of this, a path to a directory that contains no files (recursively) will turn into a file set containing no files.
:::
:::{.note}
File set coercion does _not_ add any of the files under the coerced paths to the store.
Only the [`toSource`](#function-library-lib.fileset.toSource) function adds files to the Nix store, and only those files contained in the `fileset` argument.
This is in contrast to using [paths in string interpolation](https://nixos.org/manual/nix/stable/language/values.html#type-path), which does add the entire referenced path to the store.
:::
### Example {#sec-fileset-path-coercion-example}
Assume we are in a local directory with a file hierarchy like this:
```
├─ a/
│ ├─ x (file)
│ └─ b/
  └─ y (file)
└─ c/
  └─ d/
```
Here's a listing of which files get included when different path expressions get coerced to file sets:
- `./.` as a file set contains both `a/x` and `a/b/y` (`c/` does not contain any files and is therefore omitted).
- `./a` as a file set contains both `a/x` and `a/b/y`.
- `./a/x` as a file set contains only `a/x`.
- `./a/b` as a file set contains only `a/b/y`.
- `./c` as a file set is empty, since neither `c` nor `c/d` contain any files.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,24 +0,0 @@
# mpiCheckPhaseHook {#setup-hook-mpi-check}
This hook can be used to setup a check phase that
requires running a MPI application. It detects the
used present MPI implementaion type and exports
the neceesary environment variables to use
`mpirun` and `mpiexec` in a Nix sandbox.
Example:
```nix
{ mpiCheckPhaseHook, mpi, ... }:
...
nativeCheckInputs = [
openssh
mpiCheckPhaseHook
];
```

View File

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

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