summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2020-11-19lib: Create `makeScopeWithSplicing`John Ericson
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 Rietdijk
2020-11-14Merge pull request #102766 from siraben/mmixJohn Ericson
Initial implementation of cross-compilation to Knuth's MMIX
2020-11-13lib: Add composeManyExtensionsJoe Hermaszewski
2020-11-11Merge staging-next into stagingFrederik Rietdijk
2020-11-11Merge pull request #44928 from vcunat/p/configure-assertEelco Dolstra
lib/strings: guard against an easy mistake
2020-11-09Initial support for OpenRISC 1000 (or1k)Samuel Dionne-Riel
2020-11-09Initial implementation of mmix cross-compileBen Siraphob
2020-10-30lib/sources.nix: fix incorrect inheritV
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 Kini
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 Hensing
lib: Use Nix's static scope checking, fix error message, optimize
2020-10-25Merge pull request #101409 from rycee/dbus-warningGabriel Ebner
2020-10-25Merge pull request #100456 from maralorn/boolToStringAndreas Rammhold
treewide: De-inline uses of lib.boolToString
2020-10-24docs: update documentation of `mkRemovedOptionModule`Robert Helgesson
Since b08b0bcbbec77046e5a7082177cedc12fbf1dc6c, the function actually causes an assertion error, not a warning.
2020-10-22lib/sources.nix: Prefer lib for readFile inheritRobert Hensing
2020-10-22lib: Add lib.trace for consistencyRobert Hensing
This puts it among the trace* family of functions derived from it.
2020-10-22lib/modules: Simplify inheritsRobert Hensing
2020-10-22lib: Add lib.isFloat for consistencyRobert Hensing
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 Hensing
2020-10-22lib: Use Nix's static scope checking, fix error message, optimizeRobert Hensing
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 Hensing
2020-10-22lib/options.nix: Use head instead of elemAt _ 0Robert Hensing
2020-10-20Merge pull request #100953 from AtnNn/splitStringsSilvan Mosberger
Implement splitString using builtins.split
2020-10-19lib: Add readTree function to filesystemFarid Zakaria
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 Laurin
2020-10-14treewide: De-inline uses of lib.boolToStringMalte Brandy
This commit should not change eval results
2020-10-10Merge branch 'master' into staging-nextVladimír Čunát
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-importszimbatm
nixos: Data module imports
2020-10-06Merge staging-next into stagingFrederik Rietdijk
2020-09-24Merge branch 'staging-next' into stagingJan Tojnar
2020-09-22Merge staging-next into stagingFrederik Rietdijk
2020-09-21lib/tests: Update for error message changesSilvan Mosberger
2020-09-21lib/tests: Allow grepping for newlines in error messagesSilvan Mosberger
2020-09-21lib/modules: Evaluate single defs for readOnly errorSilvan Mosberger
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 Mosberger
2020-09-21lib/options: Introduce showDefsSilvan Mosberger
For pretty-printing definitions, including file and values
2020-09-21lib/types: Remove unreachable if branchSilvan Mosberger
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 Mosberger
Improve `generators.toPretty`
2020-09-21Merge pull request #97119 from Infinisil/types.anythingRobert Hensing
Introduce `types.anything`
2020-09-20Merge branch 'staging-next' into stagingWORLDofPEACE
2020-09-20Merge pull request #81014 from fgaz/platforms/endiannessGabriel Ebner
platforms: add bigEndian and littleEndian
2020-09-20platforms: add bigEndian and littleEndianFrancesco Gazzetta
2020-09-17lib/generators.toPretty: functors should print as functionsSilvan Mosberger
Not attribute sets. So move the function case forward
2020-09-17lib/generators.toPretty: Print [] and {} compactlySilvan Mosberger
2020-09-17lib/generators.toPretty: Switch away from δ and λSilvan Mosberger
- 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 Mosberger
2020-09-17lib/generators.toPretty: Implement multiline printingSilvan Mosberger
2020-09-17lib/generators.toPretty: Wrap in a go functionSilvan Mosberger
As a preparation to the following commit
2020-09-17lib/generators.toPretty: Only quote attribute names if necessarySilvan Mosberger
2020-09-15lib/tests: Add tests for types.anythingSilvan Mosberger