Commit graph

200422 commits

Author SHA1 Message Date
Chuck
5646240870 Only print example when there is one 2019-11-04 15:11:45 +01:00
Chuck
4d17d5b31f snake_case -> camelCase 2019-11-04 15:11:45 +01:00
Chuck
84d55716a9 Don't print header on stderr
Automated consumers can use 'sed 1d' or similar to remove this header.

This probably makes this output *easier* to consume correctly.  Having
this header show up in consumers' terminal or log output is probably not
useful, but hiding it without hiding all error messages would have been
more troublesome that just stripping it from stdout.

I.e., previously, unsophisticated use would show undesired output:
  $ some-other-tool
  This attribute set contains:
  This attribute set contains:
  This attribute set contains:
  This attribute set contains:
  <Actual some-other-tool output>

The simplest way to hide this undesired output would have been
nixos-option ... 2>/dev/null, which would hide all error messages.
We do not wish to encourage that.

Correct use would have been something like:
  nixos-option ... 2> >( grep --line-buffered -v 'This attribute set contains:')

After this change, correct use is simpler:
  nixos-option ... | sed 1d
or
  nixos-option ... | sed '1/This attribute set contains:/d'
if the caller don't know if this invocation of nixos-option will yield
an attribute listing or an option description.
2019-11-04 15:11:45 +01:00
Chuck
2ddd2d0760 Explain why header goes on stderr 2019-11-04 15:11:45 +01:00
Chuck
94a068fe36 Pass values by reference
Switch from convention "appease clang-tidy --checks='*'" to
"References are like non-nullptr pointers".  The clang-tidy check
"google-runtime-references" complains about non-const reference
arguments, but this is not a convention used in Nix.
2019-11-04 15:11:45 +01:00
Chuck
3d3ce8df7f Pass Context by reference
Switch from convention "appease clang-tidy --checks='*'" to
"References are like non-nullptr pointers".  The clang-tidy check
"google-runtime-references" complains about non-const reference
arguments, but this is not a convention used in Nix.
2019-11-04 15:11:45 +01:00
Chuck
c967e3fd3e Hold state and autoArgs by reference
Switch from convention "appease clang-tidy --checks='*'" to
"References are like non-nullptr pointers".  The clang-tidy check
"google-runtime-references" complains about non-const reference
arguments, but this is not a convention used in Nix.
2019-11-04 15:11:45 +01:00
Chuck
c457766a1f Use std::get_if 2019-11-04 15:11:45 +01:00
Chuck
88183eb484 Per reviewer request, cast the other side.
I don't think this matters.  As long as one or the other of these is
a std::string, I get an operator== that looks at content rather than
pointer equality.  I picked casting the constant over casting the dynamic
thing in hopes that the compiler would have a better chance at optimizing
away any runtime cost.

Deferring to reviewer.
2019-11-04 15:11:45 +01:00
Chuck
aa8e1d5f1e Always say which path component had trouble 2019-11-04 15:11:45 +01:00
Chuck
4ded9beea2 Add note: Keep error message in sync with nixos-option 2019-11-04 15:11:45 +01:00
Chuck
c352bfeaf0 Switch from east const to west const
For consistency with the Nix C++ convention.

:~(
2019-11-04 15:11:45 +01:00
Chuck
b8db81573a Support submodules (Fixes #13121) 2019-11-04 15:11:45 +01:00
Chuck
88349921a4 clang-format 2019-11-04 15:11:45 +01:00
Chuck
6b405f9789 Fix missing "using ThrownError" 2019-11-04 15:11:45 +01:00
Chuck
0adf77e2ee Narrow the «not defined» check to just ThrownError 2019-11-04 15:11:45 +01:00
Chuck
c7c684aaa3 Preserve type of rethrown exceptions 2019-11-04 15:11:45 +01:00
Chuck
d89ccc1554 Correct syntax for license specification 2019-11-04 15:11:45 +01:00
Chuck
2336982957 Add license
This is important because this contains some code copied from nix (as an
interim expediency until that functionality can be exported via nix's
API).  The license specified here must be compatible with this borrowing.
Select the same license that nix is released under: lgpl2Plus.
2019-11-04 15:11:45 +01:00
Chuck
f3eedb6020 Parallel build is the default, so no need to specify 2019-11-04 15:11:45 +01:00
Chuck
e1ecc2b6c1 Remove list sorting 2019-11-04 15:11:45 +01:00
Chuck
36c00c1080 Use format strings, not concatenation, in error messages 2019-11-04 15:11:44 +01:00
Chuck
4af8dbf896 Reformat for 4-space indentation
Specifically, with
  clang-format --style='{ IndentWidth: 4, BreakBeforeBraces: Mozilla, ColumnLimit: 120, PointerAlignment: Middle }'
which was the clang-format invocation that produced the fewest diffs on
the nix source out of ~20 that I tried.
2019-11-04 15:11:44 +01:00
Chuck
74f05df671 nixos/nixos-option: Fix references to old name 2019-11-04 15:11:44 +01:00
Chuck
26c45dfec2 nixos/nixos-option: Show options' types #27920 2019-11-04 15:11:44 +01:00
Chuck
59c5bfc86b nixos/nixos-option: Rewrite in a more suitable language
Also add --all, which shows the value of all options.  Diffing the --all
output on either side of contemplated changes is a lovely way to better
understand what's going on inside nixos.
2019-11-04 15:11:44 +01:00
Michael Raskin
d690c20efd
Merge pull request #71814 from puckipedia/frozen-bubble
frozen-bubble: init at 2.212
2019-11-04 06:00:43 +00:00
Mario Rodas
22378e6996
Merge pull request #70846 from athas/ispc-macos
ispc: add x86_64-darwin to platforms.

Closes https://github.com/NixOS/nixpkgs/pull/71134
2019-11-03 21:03:41 -05:00
Dmitry Kalinkin
cf8a2d0225
Revert "stdenv/check-meta: getEnv if the attribute is unset (#72376)" (#72752)
This reverts commit 71184f8e15.
2019-11-03 20:38:35 -05:00
Mario Rodas
f397750416
Merge pull request #72440 from marsam/update-timescaledb
postgresqlPackages.timescaledb: 1.4.2 -> 1.5.0
2019-11-03 20:00:04 -05:00
Léo Gaspard
3376fd9f43
Merge pull request #72202 from risicle/ris-koji-1.14.3
pythonPackages.koji: 1.13.0 -> 1.14.3, addressing CVE-2019-17109
2019-11-04 01:39:18 +01:00
Alyssa Ross
547b5b7a73 ruby.withPackages: preserve setup hooks (#72743)
This fixes

    nix-shell -p 'ruby.withPackages (const [])' ruby.devdoc

which otherwise wouldn't find documentation, unlike

    nix-shell -p ruby ruby.devdoc

which would, because ruby has setup hooks to accomodate for this, that
were being masked by the withPackages wrapper.
2019-11-03 22:09:44 +00:00
Mario Rodas
b60853cdca
ispc: only check on Linux
The test suite tries to execute `transcendentals` tests, which is not
expected to work anywhere except Linux.
2019-11-03 16:20:00 -05:00
Jan Tojnar
3df93dbe0e
Merge pull request #72386 from jtojnar/gimp-2.10.14
gimp: 2.10.12 → 2.10.14
2019-11-03 21:48:13 +01:00
Marek Mahut
794c919765
Merge pull request #68327 from mmilata/moin
nixos/moinmoin: init module
2019-11-03 21:36:12 +01:00
John Ericson
d8cf78466e
Merge pull request #72694 from kirelagin/gnu-efi-cross
gnu-efi: Use their crosscompilation support correctly
2019-11-03 15:14:29 -05:00
Jonathan Ringer
deb201b311 update-python-libraries: update usage comments 2019-11-03 12:03:27 -08:00
worldofpeace
7c4f09f695
Merge pull request #72319 from gnidorah/mame
mame: init at 0.215
2019-11-03 19:18:53 +00:00
R. RyanTM
049c47c6f6 wpgtk: 6.0.9 -> 6.0.11 2019-11-03 19:59:50 +01:00
R. RyanTM
6ca77c43ae yq: 2.7.2 -> 2.8.1 2019-11-03 19:59:25 +01:00
worldofpeace
dcd89d2c80 lollypop: 1.2.2 -> 1.2.5 2019-11-03 13:25:33 -05:00
worldofpeace
fbbb67b858 quilter: 2.0.2 - 2.0.3 2019-11-03 13:25:33 -05:00
worldofpeace
e43ab14fc9
Merge pull request #71287 from judaew/dep/keybase
keybase, keybase-gui, kbfs: 4.6.0 -> 4.7.2, added dependencies
2019-11-03 18:15:05 +00:00
Vadim-Valdis Yudaev
3894ec0a50 keybase, keybase-gui, kbfs: 4.6.0 -> 4.7.2, added dependencies
all: update from 4.6.0 to 4.7.2

keybase:
- added gnupg as a dependency and patch fix-patch-keybase.patch

kbfs:
- added fuse as a dependency and patch fix-patch-kbfs.patch
2019-11-03 13:09:39 -05:00
Daiderd Jordan
80a5dd7f02
gegl: fix darwin build
../gegl/opencl/cl_gl.h:37:10: fatal error: 'OpenGL/CGLDevice.h' file not found
    #include <OpenGL/CGLDevice.h>
2019-11-03 18:59:24 +01:00
zimbatm
71184f8e15
stdenv/check-meta: getEnv if the attribute is unset (#72376)
There were two issues:

* builtins.getEnv was called deep into the nixpkgs tree making it hard
  to discover. This is solved by moving the call into
  pkgs/top-level/impure.nix
* when the config was explicitly set by the user to false, it would
  still try and load the environment variable. This meant that it was
  not possible to guarantee the same outcome on two different systems.
2019-11-03 17:40:43 +00:00
worldofpeace
59edabf8ca
Merge pull request #72375 from toonn/wire-desktop-bump
wire-desktop: linux 3.10.2904 -> 3.11.2912
2019-11-03 17:26:14 +00:00
Marek Mahut
084ae71601
Merge pull request #72725 from 1000101/dokuwiki
dokuwiki: init at 2018-04-22b
2019-11-03 18:20:48 +01:00
Matthew Bauer
a6a3958c26
Merge pull request #72070 from graham33/fix/license_list
Fix handling of lists in whitelistedLicenses and blacklistedLicenses
2019-11-03 12:08:41 -05:00
worldofpeace
c751f6000b
Merge pull request #69052 from worldofpeace/elementary-updates-maybe-5.1
Pantheon 5.1
2019-11-03 17:03:04 +00:00