Commit Graph

2466 Commits

Author SHA1 Message Date
Silvan Mosberger
8908766165
lib/tests: Update for error message changes 2020-09-21 18:24:55 +02:00
Silvan Mosberger
4f0982b223
lib/tests: Allow grepping for newlines in error messages 2020-09-21 18:24:54 +02:00
Silvan Mosberger
910dfdc41e
lib/modules: Evaluate single defs for readOnly error
If multiple definitions are passed, this evaluates them all as if they
were the only one, for a better error message. In particular this won't
show module-internal properties like `_type = "override"` and co.
2020-09-21 18:24:52 +02:00
Silvan Mosberger
bdfcee2590
lib/modules: Improve error messages using showDefs 2020-09-21 18:24:52 +02:00
Silvan Mosberger
7c20e68f6b
lib/options: Introduce showDefs
For pretty-printing definitions, including file and values
2020-09-21 18:24:50 +02:00
Silvan Mosberger
2ff7c3e2e1
lib/types: Remove unreachable if branch
The type's check function already ensured that it can't be passed
non-lists
2020-09-21 17:13:06 +02:00
Silvan Mosberger
366a677dbb
Merge pull request #97133 from Infinisil/improved-toPretty
Improve `generators.toPretty`
2020-09-21 17:11:49 +02:00
Robert Hensing
f3893d8b53
Merge pull request #97119 from Infinisil/types.anything
Introduce `types.anything`
2020-09-21 08:49:24 +02:00
Gabriel Ebner
de3cc475e0
Merge pull request #81014 from fgaz/platforms/endianness
platforms: add bigEndian and littleEndian
2020-09-20 17:03:55 +02:00
Francesco Gazzetta
4fc8c5098d platforms: add bigEndian and littleEndian 2020-09-20 16:12:58 +02:00
Silvan Mosberger
15c5ba9d28
lib/generators.toPretty: functors should print as functions
Not attribute sets. So move the function case forward
2020-09-17 18:20:43 +02:00
Silvan Mosberger
05e4d371ef
lib/generators.toPretty: Print [] and {} compactly 2020-09-17 18:20:39 +02:00
Silvan Mosberger
d0be9e9810
lib/generators.toPretty: Switch away from δ and λ
- These symbols can be confusing for those not familiar with them
- There's no harm in making these more obvious
- Terminals may not print them correctly either

Also changes the function argument printing slightly to be more obvious
2020-09-17 18:20:35 +02:00
Silvan Mosberger
073e9b2aed
lib/generators.toPretty: Improved string printing, handling newlines 2020-09-17 18:20:31 +02:00
Silvan Mosberger
47f2eb89c1
lib/generators.toPretty: Implement multiline printing 2020-09-17 18:20:25 +02:00
Silvan Mosberger
4811f54e94
lib/generators.toPretty: Wrap in a go function
As a preparation to the following commit
2020-09-17 18:20:18 +02:00
Silvan Mosberger
0f6231702f
lib/generators.toPretty: Only quote attribute names if necessary 2020-09-17 18:20:08 +02:00
Silvan Mosberger
6a7d250007
lib/tests: Add tests for types.anything 2020-09-15 21:06:05 +02:00
Silvan Mosberger
67551f46fb
lib/types: Introduce types.anything
This new type has unsurprising merge behavior: Only attribute sets are
merged together (recursively), and only if they don't conflict.

This is in contrast to the existing types:
- types.attrs is problematic because later definitions completely
  override attributes of earlier definitions, and it doesn't support
  mkIf and co.
- types.unspecified is very similar to types.attrs, but it has smart
  merging behavior that often doesn't make sense, and it doesn't support
  all types
2020-09-15 21:01:07 +02:00
Silvan Mosberger
6e7bc2c6c9
lib/options: Fix mergeEqualOption for singular functions
Previously it would error out for a single function definition
2020-09-15 21:01:07 +02:00
Geoffrey Huntley
bc62fff2cf
lib.licenses: add Prosperity-3.0.0 license (#97832) 2020-09-12 22:13:27 +02:00
Matthew Bauer
8483d29d60
Merge pull request #97587 from arcnmx/arch-fix
Fix arch eval error
2020-09-10 14:48:25 -05:00
arcnmx
8f3efbde4e Fix arch eval error introduced in #61019
This occurs when using a `platform.gcc.arch` that isn't one of the
pre-existing hard-coded options.
2020-09-09 12:17:00 -07:00
David Anderson
3a38cef8f9 jasper: remove, abandoned upstream.
Jasper has been marked insecure for a while, and upstream has not
been responsive to CVEs for over a year.

Fixes #55388.

Signed-off-by: David Anderson <dave@natulte.net>
2020-09-09 18:29:42 +00:00
John Ericson
5fd27509cf
Merge pull request #97387 from Ericson2314/fix-android-prebuilt
cc-wrapper: Fix for prebuilt android
2020-09-08 20:24:50 -04:00
John Ericson
e2bef8fbdc lib.systems.examples: Bump android SDK to 21
074bc78cc8 evidently meant to do this, but
forgot.
2020-09-08 09:33:09 -04:00
Jonathan Ringer
1f3587cdd5 21.03 is Okapi
* Okapi is an artiodactyl mammal native to Central Africa
* https://en.wikipedia.org/wiki/Okapi
2020-09-07 14:20:35 -07:00
Silvan Mosberger
ed5a07c0ef
Merge pull request #97114 from Infinisil/type-deprecation
Better type deprecation messages
2020-09-07 19:33:19 +02:00
Silvan Mosberger
f73b762aac
Merge pull request #97042 from Infinisil/freeform-option-docs
Show sub options of freeform types
2020-09-07 19:31:01 +02:00
Silvan Mosberger
a582f6adde
lib/types: Set deprecationMessage for types.optionSet 2020-09-07 13:17:19 +02:00
Silvan Mosberger
3b7aca47e0
lib/types: Set deprecationMessage for types.loaOf 2020-09-07 13:17:19 +02:00
Silvan Mosberger
2bed3b2ad7
lib/types: Set deprecationMessage for types.string 2020-09-07 13:17:19 +02:00
Silvan Mosberger
14095f8f48
lib/types: Remove types.list, it's been deprecated long enough
Has been deprecated since fd803fce60
(2013-08-22)
2020-09-07 13:17:18 +02:00
Silvan Mosberger
1d4656225d
lib/types: Allow types to emit a deprecation warning
Previously the only way to deprecate a type was using

  theType = lib.warn "deprecated" (mkOptionType ...)

This caused the warning to be emitted when the type was evaluated, but
the error didn't include which option actually used that type.

With this commit, types can specify a deprecationMessage, which when
non-null, is printed along with the option that uses the type
2020-09-07 13:17:14 +02:00
Silvan Mosberger
f320dbae41
lib/tests: Add test for freeform option docs 2020-09-04 15:50:13 +02:00
Silvan Mosberger
ea5ba6e13d
lib/types: Show sub options of freeform types
Previously if you set the freeform type to e.g. attrsOf (submodule ..),
those submodule options wouldn't be shown in the manual.
2020-09-03 21:16:29 +02:00
V
423fc3f232 lib/strings: deprecate readPathsFromFile
> NOTE: This function is not performant and should be avoided.

It's not used at all in-tree now, so we can remove it completely after
any remaining users are given notice.
2020-09-03 19:15:10 +02:00
WORLDofPEACE
18348c7829
Merge pull request #96042 from rnhmjoj/loaOf
treewide: completely remove types.loaOf
2020-09-02 08:45:37 -04:00
John Ericson
1965a241fc
Merge pull request #61019 from volth/gcc.arch-amd
platform.gcc.arch: support for AMD CPUs
2020-09-01 22:31:16 -04:00
rnhmjoj
20d491a317
treewide: completely remove types.loaOf 2020-09-02 00:42:50 +02:00
volth
c5fe132b3c
Update architectures.nix 2020-09-01 11:28:34 +00:00
John Ericson
5a05601013
Merge pull request #96223 from KAction/static
Make pkgsStatic set "static" argument to true
2020-08-31 20:00:15 -04:00
kfollesdal
bf74036952 pythonPackages.databricks-connect: init at 7.1.0 2020-08-31 13:05:09 -07:00
kfollesdal
a9337c0873 licenses: add databricks 2020-08-31 13:05:09 -07:00
Matthew Bauer
d0e52b6b32
Merge pull request #95309 from obsidiansystems/mobile-fixes
Support Android 29 in cross-compilation
2020-08-28 14:59:37 -05:00
Dmitry Bogatov
55195119d5 Distinguish pkgsStatic from pkgsMusl via stdenv.targetPlatform
This change allows derivations to distinguish dynamic musl build and
static musl build in cases where upstream build system can't detect it
by itself.
2020-08-27 18:36:34 -04:00
Eelco Dolstra
2d50c7c08e
Don't set $NIX_DB_DIR
This variable was removed in 2016.
2020-08-24 18:50:20 +02:00
volth
60ce27db2b
Update architectures.nix 2020-08-22 23:04:08 +00:00
volth
8ad48c921e
Update architectures.nix 2020-08-22 23:01:38 +00:00
volth
55bc2b54a4
Update architectures.nix 2020-08-22 22:55:13 +00:00