Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2020-11-11 | Merge pull request #44928 from vcunat/p/configure-assert | Eelco Dolstra | 1 | -2/+6 | |
lib/strings: guard against an easy mistake | |||||
2020-10-30 | lib/sources.nix: fix incorrect inherit | V | 1 | -1/+1 | |
split comes from builtins, not lib. error: attribute 'split' missing, at /nix/path/nixpkgs/lib/sources.nix:4:4 (use '--show-trace' to show detailed location information) | |||||
2020-10-26 | lib/types.nix: fix missing inherit | Keshav Kini | 1 | -0/+3 | |
I think there was a silent (i.e. semantic) merge conflict between PR #101139 and PR #100456. This commit should fix the error, which manifests as follows: error: undefined variable 'boolToString' at /home/kkini/src/nixpkgs/lib/types.nix:552:42 | |||||
2020-10-26 | Merge pull request #101139 from roberth/lib-use-static-scope-checking | Robert Hensing | 9 | -86/+265 | |
lib: Use Nix's static scope checking, fix error message, optimize | |||||
2020-10-25 | Merge pull request #101409 from rycee/dbus-warning | Gabriel Ebner | 1 | -1/+1 | |
2020-10-25 | Merge pull request #100456 from maralorn/boolToString | Andreas Rammhold | 1 | -1/+1 | |
treewide: De-inline uses of lib.boolToString | |||||
2020-10-24 | docs: update documentation of `mkRemovedOptionModule` | Robert Helgesson | 1 | -1/+1 | |
Since b08b0bcbbec77046e5a7082177cedc12fbf1dc6c, the function actually causes an assertion error, not a warning. | |||||
2020-10-22 | lib/sources.nix: Prefer lib for readFile inherit | Robert Hensing | 1 | -1/+1 | |
2020-10-22 | lib: Add lib.trace for consistency | Robert Hensing | 1 | -1/+1 | |
This puts it among the trace* family of functions derived from it. | |||||
2020-10-22 | lib/modules: Simplify inherits | Robert Hensing | 1 | -34/+32 | |
2020-10-22 | lib: Add lib.isFloat for consistency | Robert Hensing | 1 | -1/+1 | |
Unlike the other three is* functions in lib.trivial, it was only available as lib.trivial.isFloat | |||||
2020-10-22 | lib/options.nix: Use merge-friendly inherit syntax | Robert Hensing | 1 | -5/+30 | |
2020-10-22 | lib: Use Nix's static scope checking, fix error message, optimize | Robert Hensing | 9 | -82/+238 | |
Nix can perform static scope checking, but whenever code is inside a `with` expression, the analysis breaks down, because it can't know statically what's in the attribute set whose attributes were brought into scope. In those cases, Nix has to assume that everything works out. Except it doesnt. Removing `with` from lib/ revealed an undefined variable in an error message. If that doesn't convince you that we're better off without `with`, I can tell you that this PR results in a 3% evaluation performance improvement because Nix can look up local variables by index. This adds up with applications like the module system. Furthermore, removing `with` makes the binding site of each variable obvious, which helps with comprehension. | |||||
2020-10-22 | lib/types.nix: Use // instead of mergeAttrs | Robert Hensing | 1 | -1/+1 | |
2020-10-22 | lib/options.nix: Use head instead of elemAt _ 0 | Robert Hensing | 1 | -1/+1 | |
2020-10-20 | Merge pull request #100953 from AtnNn/splitStrings | Silvan Mosberger | 2 | -21/+28 | |
Implement splitString using builtins.split | |||||
2020-10-19 | lib: Add readTree function to filesystem | Farid Zakaria | 1 | -0/+12 | |
Add a friendly function to easily return a flattened list of files within a directory. This is useful if you want to easily iterate or concatSep the list of files all found within a directory. (i.e. when constructing Java's CLASSPATH) Style improvements Co-authored-by: Silvan Mosberger <github@infinisil.com> | |||||
2020-10-18 | lib.splitString: use builtin.split | Etienne Laurin | 2 | -21/+28 | |
2020-10-14 | treewide: De-inline uses of lib.boolToString | Malte Brandy | 1 | -1/+1 | |
This commit should not change eval results | |||||
2020-10-10 | Merge branch 'master' into staging-next | Vladimír Čunát | 3 | -1/+24 | |
Quite many rebuilds from master: > Estimating rebuild amount by counting changed Hydra jobs. > 3926 x86_64-darwin > 4645 x86_64-linux | |||||
2020-10-09 | Merge pull request #96641 from zimbatm/data-module-imports | zimbatm | 3 | -1/+24 | |
nixos: Data module imports | |||||
2020-10-06 | Merge staging-next into staging | Frederik Rietdijk | 1 | -0/+1 | |
2020-09-24 | Merge branch 'staging-next' into staging | Jan Tojnar | 4 | -33/+55 | |
2020-09-22 | Merge staging-next into staging | Frederik Rietdijk | 11 | -27/+310 | |
2020-09-21 | lib/tests: Update for error message changes | Silvan Mosberger | 1 | -12/+12 | |
2020-09-21 | lib/tests: Allow grepping for newlines in error messages | Silvan Mosberger | 1 | -1/+1 | |
2020-09-21 | lib/modules: Evaluate single defs for readOnly error | Silvan Mosberger | 1 | -1/+7 | |
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 | lib/modules: Improve error messages using showDefs | Silvan Mosberger | 2 | -10/+10 | |
2020-09-21 | lib/options: Introduce showDefs | Silvan Mosberger | 1 | -0/+18 | |
For pretty-printing definitions, including file and values | |||||
2020-09-21 | lib/types: Remove unreachable if branch | Silvan Mosberger | 1 | -10/+8 | |
The type's check function already ensured that it can't be passed non-lists | |||||
2020-09-21 | Merge pull request #97133 from Infinisil/improved-toPretty | Silvan Mosberger | 2 | -27/+104 | |
Improve `generators.toPretty` | |||||
2020-09-21 | Merge pull request #97119 from Infinisil/types.anything | Robert Hensing | 9 | -0/+206 | |
Introduce `types.anything` | |||||
2020-09-20 | Merge branch 'staging-next' into staging | WORLDofPEACE | 1 | -25/+28 | |
2020-09-20 | Merge pull request #81014 from fgaz/platforms/endianness | Gabriel Ebner | 1 | -25/+28 | |
platforms: add bigEndian and littleEndian | |||||
2020-09-20 | platforms: add bigEndian and littleEndian | Francesco Gazzetta | 1 | -25/+28 | |
2020-09-17 | lib/generators.toPretty: functors should print as functions | Silvan Mosberger | 1 | -7/+7 | |
Not attribute sets. So move the function case forward | |||||
2020-09-17 | lib/generators.toPretty: Print [] and {} compactly | Silvan Mosberger | 2 | -2/+9 | |
2020-09-17 | lib/generators.toPretty: Switch away from δ and λ | Silvan Mosberger | 2 | -12/+13 | |
- 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 | lib/generators.toPretty: Improved string printing, handling newlines | Silvan Mosberger | 2 | -1/+40 | |
2020-09-17 | lib/generators.toPretty: Implement multiline printing | Silvan Mosberger | 2 | -11/+40 | |
2020-09-17 | lib/generators.toPretty: Wrap in a go function | Silvan Mosberger | 1 | -3/+4 | |
As a preparation to the following commit | |||||
2020-09-17 | lib/generators.toPretty: Only quote attribute names if necessary | Silvan Mosberger | 2 | -2/+2 | |
2020-09-15 | lib/tests: Add tests for types.anything | Silvan Mosberger | 7 | -0/+166 | |
2020-09-15 | lib/types: Introduce types.anything | Silvan Mosberger | 1 | -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-15 | lib/options: Fix mergeEqualOption for singular functions | Silvan Mosberger | 1 | -0/+4 | |
Previously it would error out for a single function definition | |||||
2020-09-13 | Merge branch 'staging-next' into staging | Vladimír Čunát | 1 | -0/+6 | |
2020-09-12 | lib.licenses: add Prosperity-3.0.0 license (#97832) | Geoffrey Huntley | 1 | -0/+6 | |
2020-09-12 | lib: allow to import JSON and TOML files | zimbatm | 1 | -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-12 | lib: add importTOML | zimbatm | 2 | -1/+7 | |
Complements the `lib.importJSON`. `builtins.readTOML` has been introduced in Nix 2.1. | |||||
2020-09-12 | Merge staging-next into staging | Frederik Rietdijk | 7 | -26/+57 | |