about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2020-09-15lib/types: Introduce types.anythingSilvan Mosberger1-0/+36
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-15lib/options: Fix mergeEqualOption for singular functionsSilvan Mosberger1-0/+4
Previously it would error out for a single function definition
2020-09-13Merge branch 'staging-next' into stagingVladimír Čunát1-0/+6
2020-09-12lib.licenses: add Prosperity-3.0.0 license (#97832)Geoffrey Huntley1-0/+6
2020-09-12lib: allow to import JSON and TOML fileszimbatm1-0/+17
The vision here is that configuration tools can generate .json or .toml files, which can be plugged into an existing configuration. Eg: { lib, ... }: { imports = [ (lib.modules.importJSON ./hardware-configuration.json) ]; }
2020-09-12lib: add importTOMLzimbatm2-1/+7
Complements the `lib.importJSON`. `builtins.readTOML` has been introduced in Nix 2.1.
2020-09-12Merge staging-next into stagingFrederik Rietdijk7-26/+57
2020-09-10Merge branch 'staging' into ios-13Matthew Bauer25-185/+447
2020-09-10Merge pull request #97587 from arcnmx/arch-fixMatthew Bauer1-1/+1
Fix arch eval error
2020-09-09Fix arch eval error introduced in #61019arcnmx1-1/+1
This occurs when using a `platform.gcc.arch` that isn't one of the pre-existing hard-coded options.
2020-09-09jasper: remove, abandoned upstream.David Anderson1-5/+0
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-08Merge pull request #97387 from Ericson2314/fix-android-prebuiltJohn Ericson1-2/+2
cc-wrapper: Fix for prebuilt android
2020-09-08lib.systems.examples: Bump android SDK to 21John Ericson1-2/+2
074bc78cc8749faa31729096b65f2ef51b10abeb evidently meant to do this, but forgot.
2020-09-0721.03 is OkapiJonathan Ringer1-1/+1
* Okapi is an artiodactyl mammal native to Central Africa * https://en.wikipedia.org/wiki/Okapi
2020-09-07Merge pull request #97114 from Infinisil/type-deprecationSilvan Mosberger2-16/+21
Better type deprecation messages
2020-09-07Merge pull request #97042 from Infinisil/freeform-option-docsSilvan Mosberger2-1/+32
Show sub options of freeform types
2020-09-07lib/types: Set deprecationMessage for types.optionSetSilvan Mosberger1-1/+2
2020-09-07lib/types: Set deprecationMessage for types.loaOfSilvan Mosberger1-8/+6
2020-09-07lib/types: Set deprecationMessage for types.stringSilvan Mosberger1-2/+4
2020-09-07lib/types: Remove types.list, it's been deprecated long enoughSilvan Mosberger1-3/+0
Has been deprecated since fd803fce606a007403ba6d05f09ed2e6a3371830 (2013-08-22)
2020-09-07lib/types: Allow types to emit a deprecation warningSilvan Mosberger2-2/+9
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-04lib/tests: Add test for freeform option docsSilvan Mosberger1-0/+26
2020-09-03lib/types: Show sub options of freeform typesSilvan Mosberger1-1/+6
Previously if you set the freeform type to e.g. attrsOf (submodule ..), those submodule options wouldn't be shown in the manual.
2020-09-03lib/strings: deprecate readPathsFromFileV1-8/+9
> 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-02Merge pull request #96042 from rnhmjoj/loaOfWORLDofPEACE2-107/+11
treewide: completely remove types.loaOf
2020-09-01Merge pull request #61019 from volth/gcc.arch-amdJohn Ericson2-0/+79
platform.gcc.arch: support for AMD CPUs
2020-09-02treewide: completely remove types.loaOfrnhmjoj2-107/+11
2020-09-01Update architectures.nixvolth1-1/+2
2020-08-31Merge pull request #96223 from KAction/staticJohn Ericson1-0/+1
Make pkgsStatic set "static" argument to true
2020-08-31pythonPackages.databricks-connect: init at 7.1.0kfollesdal1-1/+1
2020-08-31licenses: add databrickskfollesdal1-0/+6
2020-08-28Merge pull request #95309 from obsidiansystems/mobile-fixesMatthew Bauer1-2/+2
Support Android 29 in cross-compilation
2020-08-27Distinguish pkgsStatic from pkgsMusl via stdenv.targetPlatformDmitry Bogatov1-0/+1
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-24Don't set $NIX_DB_DIREelco Dolstra1-1/+0
This variable was removed in 2016.
2020-08-22Update architectures.nixvolth1-12/+13
2020-08-22Update architectures.nixvolth1-7/+7
2020-08-22Update architectures.nixvolth1-6/+6
2020-08-18lib/modules: improve error-message for undeclared options if prefix contains ↵Maximilian Bosch1-2/+13
no options An easy-to-make mistake when declaring e.g. a submodule is the accidental confusion of `options` and `config`: types.submodule { config = { foo = mkOption { /* ... */ }; }; } However the error-message The option `[definition 1-entry 1].foo' defined in `<expr.nix>' does not exist. is fairly unhelpful because it seems as the options are declared at the first sight. In fact, it took a colleague and me a while to track down such a mistake a few days ago and we both agreed that this should be somehow caught to save the time we spent debugging the module in question. At first I decided to catch this error in the `submodules`-type directly by checking whether `options` is undeclared, however this becomes fairly complicated as soon as a submodule-declaration e.g. depends on existing `config`-values which would've lead to some ugly `builtins.tryExec`-heuristic. This patch now simply checks if the option's prefix has any options defined if a point in evaluation is reached where it's clear that the option in question doesn't exist. This means that this patch doesn't change the logic of the module system, it only provides a more detailed error in certain cases: The option `[definition 1-entry 1].foo' defined in `<expr.nix>' does not exist. However it seems as there are no options defined in [definition 1-entry 1]. Are you sure you've declared your options properly? This happens if you e.g. declared your options in `types.submodule' under `config' rather than `options'.
2020-08-18Merge pull request #95718 from Infinisil/fixup-nonexistant-option-errorMaximilian Bosch1-2/+2
lib/modules: Fix nonexistant option error
2020-08-17android: update sdk, ndk to 29, 21Matthew Bauer1-2/+2
2020-08-18lib/modules: Fix nonexistant option errorSilvan Mosberger1-2/+2
The refactoring in https://github.com/NixOS/nixpkgs/commit/fd75dc876586bde8cdb683a6952a41132e8db166 introduced a mistake in the error message that doesn't show the full context anymore. E.g. with this module: options.foo.bar = lib.mkOption { type = lib.types.submodule { baz = 10; }; default = {}; }; You'd get the error The option `baz' defined in `/home/infinisil/src/nixpkgs/config.nix' does not exist. instead of the previous The option `foo.bar.baz' defined in `/home/infinisil/src/nixpkgs/config.nix' does not exist. This commit undoes this regression
2020-08-17licenses: add BlueOak-1.0.0Daniël de Kok1-0/+5
2020-08-15Merge pull request #82743 from Infinisil/partially-typed-v2Robert Hensing9-43/+180
Freeform modules
2020-08-14lib/modules: Add syntactic sugar for config._module.freeformTypeSilvan Mosberger3-8/+12
This introduces `freeformType` as a top-level module attribute, allowing definitions like { freeformType = ...; options = ...; config = ...; }
2020-08-10lib/modules: Fix freeform modules when there's no definitionsSilvan Mosberger2-1/+4
2020-08-05gcc.arch: refactor, move tables under lib/volth2-0/+77
2020-08-04Merge branch 'staging-next' into stagingVladimír Čunát3-2/+25
2020-08-04Define a i686-genode system doubleEmery Hemingway2-3/+3
2020-08-03licenses: add bsdProtectionRobert Scott1-0/+5
see https://spdx.org/licenses/BSD-Protection.html
2020-08-03lib/tests: Add tests for freeform modulesSilvan Mosberger7-0/+62