Age | Commit message (Collapse) | Author | Files | Lines |
|
24.11 rename codeName to Vicuna
|
|
Add parity with importTOML.
|
|
Friend came to me with misunderstanding of how this function works.
After discussion we came to the conclusion having an example would have
prevented this.
|
|
|
|
|
|
This gets clumsily reimplemented in various places, to no useful end.
|
|
* doc: migrate lib.trivial to use doc-comments
* Apply suggestions from code review
---------
Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com>
|
|
`lib/` flake: fix `lib.version`
|
|
Manually tested with
nix-repl> :lf path:lib
nix-repl> lib.version
|
|
Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around.
|
|
The deprecation warnings in lib were wildly inconsistent. Different
formulations were used in different places for the same meaning. Some warnings
used builtins.trace instead of lib.warn, which prevents silencing; one even
only had a comment instead. Make everything more uniform.
|
|
|
|
lib.toHexString: Statically compute hexDigits attrset
|
|
lib.pipe: Avoid creating a scope
|
|
|
|
|
|
That way each expression uses the final version of other lib.trivial
declarations.
For instance, when replacing `versionSuffix` with the string `"fnord"`
in a lib overlay, `trivial.version` uses `"fnord"` as suffix now rather
than `pre-git`.
|
|
|
|
Co-authored-by: Silvan Mosberger <github@infinisil.com>
|
|
|
|
|
|
Fix documentation of lib.trivial.importJSON and lib.trivial.importTOML
|
|
|
|
|
|
Revert "lib/trivial: fix 'error: cannot decode virtual path '/nix/sto…
|
|
'/nix/store/virtual0000000000000000000000005-source''"
This reverts commit b67ee6e861903abb04e9024d605dfc7b00922633.
https://github.com/NixOS/nixpkgs/issues/202244
error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30
appears to happen when there's a nixpkgs git submodule
> So one of the things that is different for a git submodule is that the .git folder isn't a folder, it's a textfile that contains (in my case) this:
> $ cat nix/nixos-unstable/.git
> gitdir: ../../.git/modules/nixpkgs
|
|
|
|
lib/sources: remove 2 usages of toString on a path which will be read using fileContents
|
|
|
|
'/nix/store/virtual0000000000000000000000005-source''
happens on lazy-trees branch of Nix (NixOS/nix#6530)
|
|
|
|
It gives a warning on the lazy-trees branch of Nix
(NixOS/nix#6530)
one of these was also giving me an error (the one in lib/trivial probably)
```
$ nix build
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd
-image-aarch64.nix' and then accessing it is deprecated, at /home/artturin/nixgits/my-nixpkgs/lib/modules.
nix:349:99
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/.git' and then accessing it is dep
recated, at /home/artturin/nixgits/my-nixpkgs/lib/sources.nix:35:32
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc.nix'
and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/system/etc/etc-activ
ation.nix' and then accessing it is deprecated, at «stdin»:0
warning: applying 'toString' to path '/home/artturin/nixgits/my-nixpkgs/nixos/modules/installer/sd-card/sd
-image-aarch64.nix' and then accessing it is deprecated, at «stdin»:0
error: cannot decode virtual path '/nix/store/virtual0000000000000000000000005-source'
(use '--show-trace' to show detailed location information)
```
|
|
|
|
lib: add inPureEvalMode
|
|
|
|
This makes a value that is true if builtins does not contain the
currentSystem function, but false if it does.
|
|
nixos/testing: restrict arguments to makeTest
|
|
lib/trivial: add warnIfNot and throwIf
|
|
|
|
|
|
Negated versions of warnIf and throwIfNot.
|
|
Adds support for sinceRelease
|
|
C-style comment was being picked up by nixdoc as a documentation comment for the function.
|
|
|
|
|
|
|
|
|
|
`functionArgs` should give valid results on
functions that have been identified with `lib.isFunction`
instead of erroring out.
|
|
|
|
|