| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`builtins.currentSystem` is not available in pure eval. For this
particular test, we don't really care since it's all about generating
.drv files.
Fixes the following error:
$ nix flake check
warning: unknown flake output 'lib'
error: attribute 'currentSystem' missing
at /nix/store/8wvnlbjxlr90kq2qa6d9zjpj8rqkilr5-source/lib/tests/misc.nix:499:73:
498| let
499| deriv = derivation { name = "test"; builder = "/bin/sh"; system = builtins.currentSystem; };
| ^
500| in {
(use '--show-trace' to show detailed location informat
|
|\
| |
| | |
pkgsCross.aarch64be-embedded: fix eval
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
lib/modules: Short-circuit unmatchedDefns when configs is empty
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
recursiveUpdate does not produce an attrset until it has evaluated
both its arguments to weak head normal form.
nix-repl> lib.recursiveUpdate (throw "a") (throw "b")
error: b
nix-repl> lib.recursiveUpdate (throw "a") {}
error: a
|
| |
| |
| |
| | |
Very confusing otherwise.
|
| |
| |
| |
| | |
In hot code, the overhead (envs, applies) can matter.
|
| |
| |
| |
| |
| | |
Doesn't seem to have been a problem actually, but now it won't
regress.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
lib/meta: add getLicenseFromSpdxId function (resumed)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move function spdxLicense, internally used in yarn2nix
to lib/meta.nix, and
rename to getLicenseFromSpdxId
A similar function is implemented in poetry2nix,
but the one originally in yarn2nix seems beter.
since it falls back to an license-like attrset
for mismatched case
instead of a plain string
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
For consistency.
|
| | |
| | |
| | |
| | | |
Strengthens the tests by making sure the whole line is matched.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Makes any programming errors more likely to show up early.
Non-obvious changes because of this:
- Ignore the `evalConfig` result in `reportFailure`; we're not checking
it at that point.
- Pre-increment `$fail` and `$pass` to make sure the arithmetic doesn't
result in a zero, which would result in a non-zero exit code for the
expression.
|
| | |
| | |
| | |
| | | |
The exit codes aren't used for anything.
|
| | |
| | |
| | |
| | | |
As per <https://github.com/koalaman/shellcheck/wiki/SC2124>.
|
| | | |
|
| | |
| | |
| | |
| | | |
The extra equal sign was confusing, and doesn't seem to be relevant.
|
| | |
| | |
| | |
| | |
| | | |
The script uses plenty of non-POSIX features, such as referencing
`$BASH_SOURCE`.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Avoids hiding the exit code from the assignment. See
<https://github.com/koalaman/shellcheck/wiki/SC2155>.
|
| | | |
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b
Create config definitions with the same priority as the definition of another option.
This should be used for option definitions where one option sets the value of another as a convenience.
For instance a config file could be set with a `text` or `source` option, where text translates to a `source`
value using `mkDerivedConfig options.text (pkgs.writeText "filename.conf")`.
It takes care of setting the right priority using `mkOverride`.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
The previous example output was forgotten copy-paste from some other
function.
|
|\ \
| | |
| | |
| | | |
polykernel/lib-lists-mutuallyexclusive-optimization
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current implementation of `mutuallyExclusive` builds a new list with
length subtracted by one on every recursive call which is expensive. When
b is empty, the function still traverses a in its entirety before returning
a result.
The new implementation uses `any` to check if each element of list b is in
list a using `elem`. This maintains short circuiting when list a or b is empty
and has a worst case time complexity of O(nm).
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
Allows the simultaneous construction of top-level invocations and
submodule types.
This helps structure configuration systems integration code.
|
|\
| |
| | |
lib/systems: update powernv kernel config
|
| |
| |
| |
| |
| |
| |
| |
| | |
PowerNV was looking for a nonexisting zImage file.
Remove unnecessary .file / .installTarget.
Also add config options needed for default minimal
NixOS config and QEMU VirtIO/VirtFS devices.
|
|\ \
| | |
| | | |
lib: make extendDerivation lighter on eval
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
the fix to extendDerivation in #140051 unwittingly worsened eval performance by
quite a bit. set elements alone needed over 1GB extra after the change, which
seems disproportionate to how small it was. if we flip the logic used to
determine which outputs to install around and keep a "this one exactly" flag in
the specific outputs instead of a "all of them" in the root we can avoid most
of that cost.
|
|/ / |
|
|\ \
| | |
| | | |
lib.warn: Add NIX_ABORT_ON_WARN for call traces
|
| | | |
|
|/ /
| |
| |
| | |
aarch64-darwin is getting built by hydra
|
|\ \
| | |
| | | |
lib/types: Make types.anything merge functions
|
| |/
| |
| |
| |
| | |
Previously it would give an error if there were multiple function
definitions.
|