Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2023-10-11 | lib.makeOverridable: fix functionArgs on returned function | Robert Hensing | 1 | -0/+12 | |
2023-10-10 | Merge pull request #254452 from flyingcircusio/lib-attrsToList | Silvan Mosberger | 1 | -0/+24 | |
lib.attrsets.attrsToList: add function | |||||
2023-10-10 | lib.attrsets.attrsToList: add function | Oliver Schmidt | 1 | -0/+24 | |
For transforming back between lists and attrsets, it makes sense to have a quasi-inverse of `builtins.listToAttrs` available as a library function. Co-authored-by: Silvan Mosberger <github@infinisil.com> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> | |||||
2023-09-27 | lib.attrsets.foldlAttrs: Make stricter | Silvan Mosberger | 1 | -2/+2 | |
See the parent commit for the same change to lib.lists.foldl' | |||||
2023-09-27 | lib.lists.foldl': Make strict in the initial accumulator | Silvan Mosberger | 1 | -2/+2 | |
To maintain backwards compatibility, this can't be changed in the Nix language. We can however ensure that the version Nixpkgs has the more intuitive behavior. | |||||
2023-09-26 | lib.lists.foldl': Add tests | Silvan Mosberger | 1 | -0/+32 | |
2023-08-21 | lib.generators.toGitINI: added test | VwCSXg | 1 | -0/+45 | |
Added basic generators.toGitINI test. Mostly taken from https://github.com/nix-community/home-manager/blob/958c06303f43cf0625694326b7f7e5475b1a2d5c/tests/modules/programs/git/git.nix. The ${"\t} escape is used so that the lines aren't recognized as "Wrong indent style". | |||||
2023-08-14 | lib.removePrefix: Add tests | Silvan Mosberger | 1 | -0/+21 | |
2023-08-14 | Merge pull request #243511 from tweag/lib.lists.hasPrefix | Silvan Mosberger | 1 | -0/+38 | |
`lib.lists.{hasPrefix,removePrefix}`: init | |||||
2023-07-26 | Merge pull request #243520 from tweag/lib.lists.commonPrefix | Silvan Mosberger | 1 | -20/+63 | |
`lib.lists.{findFirstIndex,commonPrefix}`: init | |||||
2023-07-20 | lib.lists.commonPrefix: init | Silvan Mosberger | 1 | -0/+33 | |
2023-07-19 | lib.lists.findFirstIndex: init | Silvan Mosberger | 1 | -20/+30 | |
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> | |||||
2023-07-19 | Merge pull request #244044 from tweag/lib-readme | Robert Hensing | 1 | -3/+15 | |
Create a Readme in `lib` | |||||
2023-07-18 | lib.attrsets.mergeAttrsList: init | Silvan Mosberger | 1 | -0/+25 | |
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> | |||||
2023-07-18 | lib/tests: Unify documentation of individual testable files | Silvan Mosberger | 1 | -3/+15 | |
2023-07-14 | lib.lists.removePrefix: init | Silvan Mosberger | 1 | -0/+17 | |
2023-07-14 | lib.lists.hasPrefix: init | Silvan Mosberger | 1 | -0/+21 | |
2023-06-06 | lib.list.findFirst: Make lazier | Silvan Mosberger | 1 | -0/+5 | |
There's no need to evaluate list elements after a matching element | |||||
2023-06-06 | lib/tests: Add findFirst tests | Silvan Mosberger | 1 | -0/+35 | |
2023-05-05 | Merge pull request #223407 from AngryAnt/toplist-path | toonn | 1 | -0/+24 | |
lib.toPlist: Add support for path values | |||||
2023-04-29 | lib.generators.toLua: asBindings option | Mykola Orliuk | 1 | -0/+40 | |
Allows to generate code block for setting of global variables | |||||
2023-04-23 | lib.generators.toLua: allow disabling multiline | Mykola Orliuk | 1 | -2/+7 | |
2023-04-23 | lib/generators: add toLua/mkLuaInline | Mykola Orliuk | 1 | -0/+61 | |
Suitable to simplify Lua-based configurations like neovim-lspconfig that might need to interpolate Nix package paths. | |||||
2023-03-27 | lib.toPlist: keep test output in external files for their tab indents | Emil "AngryAnt" Johansen | 1 | -46/+1 | |
2023-03-27 | lib.toPlist: basic test coverage | Emil "AngryAnt" Johansen | 1 | -0/+69 | |
2023-03-11 | init: lib.foldlAttrs | hsjobeki | 1 | -0/+31 | |
- provide comprehensive example - add unit test | |||||
2023-03-03 | strings: add escapeQuery for url encoding | Patrick Widmer | 1 | -0/+9 | |
2023-02-07 | Merge pull request #206611 from h7x4/lib-lists-add-repeat | Silvan Mosberger | 1 | -0/+5 | |
lib.lists: add `replicate` | |||||
2023-02-06 | lib.lists: add `replicate` | h7x4 | 1 | -0/+5 | |
`replicate` returns n copies of an element as a list. Co-Authored-By: Silvan Mosberger <contact@infinisil.com> | |||||
2023-01-31 | Merge pull request #205557 from ncfavier/concatLines | Silvan Mosberger | 1 | -0/+5 | |
lib/strings: add `concatLines` | |||||
2022-12-21 | lib/versions: add `pad` | Naïm Favier | 1 | -0/+15 | |
Pad a version string with zeros to match a given number of components. | |||||
2022-12-11 | Merge pull request #205457 from ↵ | Robert Hensing | 1 | -0/+4 | |
h7x4/lib-strings-toInt-broken-for-negative-numbers lib.strings: fix negative number handling for `toInt` and `toIntBase10` | |||||
2022-12-10 | lib/strings: add `concatLines` | Naïm Favier | 1 | -0/+5 | |
Like `unlines` from Haskell. The aim is to replace the `concatStringsSep "\n"` pattern for generated files, which doesn't add a final newline. | |||||
2022-12-10 | lib.strings: fix negative number handling for `toInt` and `toIntBase10` | h7x4 | 1 | -0/+4 | |
The previous version would be unstable due to an input validation regex not expecting a '-' in front of the number. | |||||
2022-12-08 | nixos/doc: render option values using `lib.generators.toPretty` | Naïm Favier | 1 | -1/+1 | |
Render un`_type`d defaults and examples as `literalExpression`s using `lib.generators.toPretty` so that consumers don't have to reinvent Nix pretty-printing. `renderOptionValue` is kept internal for now intentionally. Make `toPretty` print floats as valid Nix values (without a tilde). Get rid of the now-obsolete `substSpecial` function. Move towards disallowing evaluation of packages in the manual by raising a warning on `pkgs.foo.{outPath,drvPath}`; later, this should throw an error. Instead, module authors should use `literalExpression` and `mkPackageOption`. | |||||
2022-12-08 | lib/generators.toPretty: escape strings properly | Naïm Favier | 1 | -8/+8 | |
2022-12-08 | lib/generators.toPretty: don't evaluate derivations | Naïm Favier | 1 | -1/+1 | |
With the goal of making `toPretty` suitable for rendering option values, render derivations as `<derivation foo-1.0>` instead of `<derivation /nix/store/…-foo-1.0.drv>`. This is to avoid causing sudden evaluation errors for out-of-tree projects that have options with `default = pkgs.someUnfreePackage;` and no `defaultText`. | |||||
2022-11-17 | lib/attrsets: add concatMapAttrs | figsoda | 1 | -0/+17 | |
2022-10-23 | lib/strings: Update docs and restructured code to improve readability of ↵ | Jacob Abel | 1 | -0/+4 | |
toInt and toIntBase10. | |||||
2022-10-23 | lib/strings: Refactor toInt into toInt and toIntBase10 | Jacob Abel | 1 | -16/+44 | |
2022-10-23 | lib/strings: Update toInt to handle intermixed ws and zeros. Added tests | Jacob Abel | 1 | -0/+11 | |
2022-10-23 | lib/strings: allow toInt to parse zero-padded strings | Jacob Abel | 1 | -0/+28 | |
2022-10-20 | lib/tests/misc: Add tests for charToInt, escapeC, and normalizePath | Daniel Olsen | 1 | -0/+15 | |
2022-09-21 | lib: Add lazyDerivation | Robert Hensing | 1 | -0/+53 | |
2022-09-17 | lib.types: Add parentheses where description is ambiguous | Robert Hensing | 1 | -0/+53 | |
2022-05-23 | Merge pull request #168374 from Ma27/special-attrs-in-with-recursion | Silvan Mosberger | 1 | -0/+15 | |
lib/generators: withRecursion: don't break attr-sets with special attrs | |||||
2022-05-15 | Revert "lib: init flakes.nix" | adisbladis | 1 | -10/+0 | |
This reverts commit PR #167947. Flakes aren't standardised and the `lib` namespace shouldn't be polluted with utilities that serve only experimental uses. | |||||
2022-05-07 | lib/strings/toShellVars: handle derivations as strings | Naïm Favier | 1 | -0/+12 | |
2022-05-02 | Merge pull request #170090 from danth/has-infix-toString | Robert Hensing | 1 | -0/+30 | |
lib/strings: call toString within hasInfix | |||||
2022-05-02 | lib/tests: add tests for hasInfix | Daniel Thwaites | 1 | -0/+30 | |
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> |