about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2020-11-19lib: Create `makeScopeWithSplicing`John Ericson2-1/+28
It's ugly as hell, but I suppose it is needed to codify how to make spliced package sets.
2020-11-16Merge master into staging-nextFrederik Rietdijk8-19/+64
2020-11-14Merge pull request #102766 from siraben/mmixJohn Ericson5-16/+32
Initial implementation of cross-compilation to Knuth's MMIX
2020-11-13lib: Add composeManyExtensionsJoe Hermaszewski3-3/+32
2020-11-11Merge staging-next into stagingFrederik Rietdijk1-2/+6
2020-11-11Merge pull request #44928 from vcunat/p/configure-assertEelco Dolstra1-2/+6
lib/strings: guard against an easy mistake
2020-11-09Initial support for OpenRISC 1000 (or1k)Samuel Dionne-Riel4-0/+11
2020-11-09Initial implementation of mmix cross-compileBen Siraphob5-16/+32
2020-10-30lib/sources.nix: fix incorrect inheritV1-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-26lib/types.nix: fix missing inheritKeshav Kini1-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-26Merge pull request #101139 from roberth/lib-use-static-scope-checkingRobert Hensing9-86/+265
lib: Use Nix's static scope checking, fix error message, optimize
2020-10-25Merge pull request #101409 from rycee/dbus-warningGabriel Ebner1-1/+1
2020-10-25Merge pull request #100456 from maralorn/boolToStringAndreas Rammhold1-1/+1
treewide: De-inline uses of lib.boolToString
2020-10-24docs: update documentation of `mkRemovedOptionModule`Robert Helgesson1-1/+1
Since b08b0bcbbec77046e5a7082177cedc12fbf1dc6c, the function actually causes an assertion error, not a warning.
2020-10-22lib/sources.nix: Prefer lib for readFile inheritRobert Hensing1-1/+1
2020-10-22lib: Add lib.trace for consistencyRobert Hensing1-1/+1
This puts it among the trace* family of functions derived from it.
2020-10-22lib/modules: Simplify inheritsRobert Hensing1-34/+32
2020-10-22lib: Add lib.isFloat for consistencyRobert Hensing1-1/+1
Unlike the other three is* functions in lib.trivial, it was only available as lib.trivial.isFloat
2020-10-22lib/options.nix: Use merge-friendly inherit syntaxRobert Hensing1-5/+30
2020-10-22lib: Use Nix's static scope checking, fix error message, optimizeRobert Hensing9-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-22lib/types.nix: Use // instead of mergeAttrsRobert Hensing1-1/+1
2020-10-22lib/options.nix: Use head instead of elemAt _ 0Robert Hensing1-1/+1
2020-10-20Merge pull request #100953 from AtnNn/splitStringsSilvan Mosberger2-21/+28
Implement splitString using builtins.split
2020-10-19lib: Add readTree function to filesystemFarid Zakaria1-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-18lib.splitString: use builtin.splitEtienne Laurin2-21/+28
2020-10-14treewide: De-inline uses of lib.boolToStringMalte Brandy1-1/+1
This commit should not change eval results
2020-10-10Merge branch 'master' into staging-nextVladimír Čunát3-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-09Merge pull request #96641 from zimbatm/data-module-importszimbatm3-1/+24
nixos: Data module imports
2020-10-06Merge staging-next into stagingFrederik Rietdijk1-0/+1
2020-09-24Merge branch 'staging-next' into stagingJan Tojnar4-33/+55
2020-09-22Merge staging-next into stagingFrederik Rietdijk11-27/+310
2020-09-21lib/tests: Update for error message changesSilvan Mosberger1-12/+12
2020-09-21lib/tests: Allow grepping for newlines in error messagesSilvan Mosberger1-1/+1
2020-09-21lib/modules: Evaluate single defs for readOnly errorSilvan Mosberger1-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-21lib/modules: Improve error messages using showDefsSilvan Mosberger2-10/+10
2020-09-21lib/options: Introduce showDefsSilvan Mosberger1-0/+18
For pretty-printing definitions, including file and values
2020-09-21lib/types: Remove unreachable if branchSilvan Mosberger1-10/+8
The type's check function already ensured that it can't be passed non-lists
2020-09-21Merge pull request #97133 from Infinisil/improved-toPrettySilvan Mosberger2-27/+104
Improve `generators.toPretty`
2020-09-21Merge pull request #97119 from Infinisil/types.anythingRobert Hensing9-0/+206
Introduce `types.anything`
2020-09-20Merge branch 'staging-next' into stagingWORLDofPEACE1-25/+28
2020-09-20Merge pull request #81014 from fgaz/platforms/endiannessGabriel Ebner1-25/+28
platforms: add bigEndian and littleEndian
2020-09-20platforms: add bigEndian and littleEndianFrancesco Gazzetta1-25/+28
2020-09-17lib/generators.toPretty: functors should print as functionsSilvan Mosberger1-7/+7
Not attribute sets. So move the function case forward
2020-09-17lib/generators.toPretty: Print [] and {} compactlySilvan Mosberger2-2/+9
2020-09-17lib/generators.toPretty: Switch away from δ and λSilvan Mosberger2-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-17lib/generators.toPretty: Improved string printing, handling newlinesSilvan Mosberger2-1/+40
2020-09-17lib/generators.toPretty: Implement multiline printingSilvan Mosberger2-11/+40
2020-09-17lib/generators.toPretty: Wrap in a go functionSilvan Mosberger1-3/+4
As a preparation to the following commit
2020-09-17lib/generators.toPretty: Only quote attribute names if necessarySilvan Mosberger2-2/+2
2020-09-15lib/tests: Add tests for types.anythingSilvan Mosberger7-0/+166