about summary refs log tree commit diff
path: root/lib/trivial.nix
AgeCommit message (Collapse)AuthorFilesLines
2024-06-13Merge pull request #318511 from sg-qwt/masterJörg Thalheim1-1/+1
24.11 rename codeName to Vicuna
2024-06-13lib.trivial.importJSON: add exampleSamuel Shuert1-0/+31
Add parity with importTOML.
2024-06-13lib.trivial.importTOML: add exampleSamuel Shuert1-0/+29
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.
2024-06-0924.11 rename codeName to Vicuna無名氏1-1/+1
2024-05-2224.05 is Vicuña 24.11-preWeijia Wang1-1/+1
2024-04-04lib: add xoredef1-0/+18
This gets clumsily reimplemented in various places, to no useful end.
2024-03-19doc: migrate lib.trivial to use doc-comments (#297270)Johannes Kirschbauer1-214/+727
* doc: migrate lib.trivial to use doc-comments * Apply suggestions from code review --------- Co-authored-by: Daniel Sidhion <DanielSidhion@users.noreply.github.com>
2024-03-03Merge pull request #288812 from hercules-ci/lib-flake-versionRobert Hensing1-1/+1
`lib/` flake: fix `lib.version`
2024-02-26lib flake: Fix versionRobert Hensing1-1/+1
Manually tested with nix-repl> :lf path:lib nix-repl> lib.version
2024-02-09lib.trivial: Remove unneeded polyfillsSilvan Mosberger1-17/+2
Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around.
2024-02-03lib: make deprecation warnings consistentAlois Wohlschlager1-1/+1
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.
2024-01-29lib/trivial: bump oldestSupportedRelease to 23.11figsoda1-1/+1
2023-12-11Merge pull request #273470 from adisbladis/lib-tohexstring-static-valuesSilvan Mosberger1-16/+14
lib.toHexString: Statically compute hexDigits attrset
2023-12-11Merge pull request #273467 from adisbladis/lib-pipe-no-letSilvan Mosberger1-3/+1
lib.pipe: Avoid creating a scope
2023-12-11lib.toHexString: Statically compute hexDigits attrsetadisbladis1-16/+14
2023-12-11lib.pipe: Avoid creating scopesadisbladis1-3/+1
2023-12-10lib/trivial: drop `rec` in favor of `lib` fixpointMaximilian Bosch1-2/+14
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`.
2023-11-2124.05 is Uakari 24.05-prefigsoda1-1/+1
2023-11-07lib.mirrorFunctionArgs: initYueh-Shun Li1-0/+34
Co-authored-by: Silvan Mosberger <github@infinisil.com>
2023-08-10Merge pull request #235625 from ShamrockLee/lib-doc-tidySilvan Mosberger1-2/+2
2023-07-04lib/trivial: Bump oldestSupportedReleaseto to 23.05Martin Weinelt1-1/+1
2023-06-03lib: fix nix-doc variable "Type" in commentYueh-Shun Li1-2/+2
Fix documentation of lib.trivial.importJSON and lib.trivial.importTOML
2023-05-2223.11 is Tapir 23.11-preRaito Bezarius1-1/+1
2023-01-01lib/trival: Bump oldestSupportedRelease to 2211Martin Weinelt1-1/+1
2022-11-22Merge pull request #202370 from Artturin/revertpartof1Artturi1-2/+2
Revert "lib/trivial: fix 'error: cannot decode virtual path '/nix/sto…
2022-11-22Revert "lib/trivial: fix 'error: cannot decode virtual path ↵Artturin1-2/+2
'/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
2022-11-2123.05 is Stoat 23.05-preMartin Weinelt1-1/+1
2022-11-17Merge pull request #199812 from Artturin/removeusagesoftostringonpath1Artturi1-2/+2
lib/sources: remove 2 usages of toString on a path which will be read using fileContents
2022-11-11lib.trivial.toBaseDigits: type checkWeijia Wang1-0/+2
2022-11-06lib/trivial: fix 'error: cannot decode virtual path ↵Artturin1-2/+2
'/nix/store/virtual0000000000000000000000005-source'' happens on lazy-trees branch of Nix (NixOS/nix#6530)
2022-11-05Revert "lib,doc: remove obvious usages of toString on paths"Anderson Torres1-2/+2
2022-11-06lib,doc: remove obvious usages of toString on pathsArtturin1-2/+2
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) ```
2022-07-04lib/trivial: Update oldestSupportedReleaseJanne Heß1-1/+1
2022-06-10Merge pull request #157480 from MatthewCroughan/in-pure-eval-modeRobert Hensing1-0/+7
lib: add inPureEvalMode
2022-05-2322.11 is RaccoonJanne Heß1-1/+1
2022-05-06lib: add inPureEvalModematthewcroughan1-0/+7
This makes a value that is true if builtins does not contain the currentSystem function, but false if it does.
2022-03-24Merge pull request #164660 from ncfavier/tests-restrict-argumentsRobert Hensing1-0/+19
nixos/testing: restrict arguments to makeTest
2022-03-22Merge pull request #164890 from ncfavier/lib-warn-throwSilvan Mosberger1-1/+15
lib/trivial: add warnIfNot and throwIf
2022-03-21Merge remote-tracking branch 'upstream/master' into tests-restrict-argumentsRobert Hensing1-0/+24
2022-03-21lib: Add toFunctionRobert Hensing1-0/+19
2022-03-19lib/trivial: add warnIfNot and throwIfNaïm Favier1-1/+15
Negated versions of warnIf and throwIfNot.
2022-03-09lib: Add mkRenamedOptionModuleWithRobert Hensing1-0/+24
Adds support for sinceRelease
2022-01-30lib.trivial: Change comment type before concat functionJan Tojnar1-5/+5
C-style comment was being picked up by nixdoc as a documentation comment for the function.
2022-01-09lib.checkListOfEnum: initJosé Romildo1-0/+17
2021-12-22lib.throwIfNot: initRobert Hensing1-0/+22
2021-11-22add release notes for 22.05 and update codenameTimothy DeHerrera1-1/+1
2021-10-13lib.warn: Add NIX_ABORT_ON_WARN for call tracesRobert Hensing1-1/+20
2021-08-03lib: fix functionArgs for functorsDavid Arnold1-1/+4
`functionArgs` should give valid results on functions that have been identified with `lib.isFunction` instead of erroring out.
2021-07-27Merge pull request #110742 from siraben/deprecate-foldBen Siraphob1-1/+1
2021-05-2221.11 is Porcupine!Jonathan Ringer1-1/+1