| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
lib: Use Nix's static scope checking, fix error message, optimize
|
| | |
|
| |
| |
| |
| | |
This puts it among the trace* family of functions derived from it.
|
| | |
|
| |
| |
| |
| |
| | |
Unlike the other three is* functions in lib.trivial, it was only
available as lib.trivial.isFloat
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
|\ \ |
|
| |/
| |
| |
| |
| | |
Since b08b0bcbbec77046e5a7082177cedc12fbf1dc6c, the function actually
causes an assertion error, not a warning.
|
|\ \
| |/
|/| |
treewide: De-inline uses of lib.boolToString
|
| |
| |
| |
| | |
This commit should not change eval results
|
|\ \
| | |
| | | |
Implement splitString using builtins.split
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| |
| |
| |
| | |
Quite many rebuilds from master:
> Estimating rebuild amount by counting changed Hydra jobs.
> 3926 x86_64-darwin
> 4645 x86_64-linux
|
| |\
| | |
| | | |
nixos: Data module imports
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
];
}
|
| | |
| | |
| | |
| | |
| | | |
Complements the `lib.importJSON`. `builtins.readTOML` has been
introduced in Nix 2.1.
|
|\| | |
|
| | |
| | |
| | |
| | | |
Previously bool values would show as <bool>
|
|\| | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | |
| | |
| | |
| | | |
For pretty-printing definitions, including file and values
|
| | |
| | |
| | |
| | |
| | | |
The type's check function already ensured that it can't be passed
non-lists
|
|\| | |
|
| |\ \
| | | |
| | | | |
Improve `generators.toPretty`
|
| | | |
| | | |
| | | |
| | | | |
Not attribute sets. So move the function case forward
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- 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
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
As a preparation to the following commit
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
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
|
| | |/ /
| | | |
| | | |
| | | | |
Previously it would error out for a single function definition
|
|\| | | |
|
| |\ \ \
| | | | |
| | | | | |
platforms: add bigEndian and littleEndian
|
| | | | | |
|
|\| | | | |
|
| | |_|/
| |/| | |
|
|\| | | |
|