Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
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-17 | lib: fix typos | figsoda | 1 | -1/+1 | |
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: 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-12-02 | lib/modules: Add context to the "option does not exist" error | Robert Hensing | 3 | -0/+9 | |
Add trace items that provide context for a failed definition that can not be caught within the Nix language. This also adds a test for the `tryEval` behavior of `showDefs`. | |||||
2022-11-17 | lib/attrsets: add concatMapAttrs | figsoda | 1 | -0/+17 | |
2022-11-04 | lib/systems: Support FreeBSD | John Ericson | 1 | -3/+3 | |
A tricky thing about FreeBSD is that there is no stable ABI across versions. That means that putting in the version as part of the config string is paramount. We have a parsed represenation that separates name versus version to accomplish this. We include FreeBSD versions 12 and 13 to demonstrate how it works. | |||||
2022-11-03 | lib/tests/modules: Test doRename | Robert Hensing | 3 | -0/+32 | |
2022-10-23 | lib/strings: Update docs and restructured code to improve readability of ↵ | Jacob Abel | 2 | -1/+5 | |
toInt and toIntBase10. | |||||
2022-10-23 | lib/strings: Refactor toInt into toInt and toIntBase10 | Jacob Abel | 2 | -17/+45 | |
2022-10-23 | lib/strings: Update toInt to handle intermixed ws and zeros. Added tests | Jacob Abel | 2 | -1/+12 | |
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-10-07 | lib/types: always use `<function body>` instead of `[function body]` to ↵ | Maximilian Bosch | 1 | -2/+2 | |
indicate a function inside an option structure The motivation is to have a single identifier for that. Useful for the next commit where I'll try to escape option-parts correctly (options can be any kind of strings, but unless these are Nix identifiers, they must be quoted). Since `<function body>` (or `<name>`/`*`) are special identifiers in error messages and the manual, we need a unique way to mark an option part as function call because these are not to be quoted. | |||||
2022-10-01 | Merge pull request #193132 from figsoda/clean-up | figsoda | 1 | -1/+0 | |
treewide: clean up | |||||
2022-09-26 | lib/tests/maintainers.nix: remove unused binding | figsoda | 1 | -1/+0 | |
2022-09-21 | lib/modules: Fix meta duplication in shorthand syntax | Robert Hensing | 2 | -0/+22 | |
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-08-31 | Merge pull request #188289 from erikarvstedt/fix-disabled-modules-abs-paths | Robert Hensing | 2 | -0/+6 | |
lib.modules: support strings with absolute paths in `disabledModules` | |||||
2022-08-31 | lib.modules: support strings with absolute paths in `disabledModules` | Erik Arvstedt | 2 | -0/+6 | |
This is particularly useful for disabling modules defined in a flake. Example: disabledModules = [ "${flake}/modules/mymodule.nix" ]; Previously, absolute string paths were internally prepended with `modulesPath`, which caused the module filtering to fail. | |||||
2022-08-25 | lib/systems: add MicroBlaze architectures | Minijackson | 1 | -1/+1 | |
2022-06-20 | teams/maintainers list: show instructions for validating the contents | Graham Christensen | 1 | -2/+2 | |
2022-06-20 | maintainer teams: check them in lib tests | Graham Christensen | 2 | -0/+54 | |
2022-06-20 | maintainer lib test: extract maintainer module | Graham Christensen | 2 | -31/+32 | |
2022-06-20 | maintainers: remove longkeyid | Graham Christensen | 1 | -1/+0 | |
see https://dkg.fifthhorseman.net/blog/openpgp-key-ids-are-not-useful.html | |||||
2022-06-14 | lib/modules: Throw earlier when module function does not return attrs | Robert Hensing | 2 | -0/+21 | |
`m` must always be an attrset at this point. It is basically always evaluated. This will make it throw when any of the attrs is accessed, rather than just `config`. We assume that this will improve the error message in more scenarios. | |||||
2022-06-14 | lib.deferredModule: Make it properly singular | Robert Hensing | 1 | -1/+1 | |
2022-06-14 | lib.types.deferredModule: Allow path-typed module references | Robert Hensing | 2 | -3/+4 | |
2022-06-14 | lib.types.deferredModule: Improve reported location | Robert Hensing | 1 | -1/+1 | |
2022-06-14 | lib/test/modules.sh: Test deferredModule error location file | Robert Hensing | 2 | -2/+11 | |
2022-06-14 | lib.types: Add deferredModule | Robert Hensing | 2 | -0/+57 | |
2022-06-14 | lib/tests: Add submodule file propagation test | Silvan Mosberger | 2 | -0/+25 | |
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-17 | Merge pull request #172813 from hercules-ci/functionTo-properly | Robert Hensing | 2 | -0/+63 | |
`lib.types.functionTo` type merging and docs | |||||
2022-05-16 | Merge pull request #170561 from klemensn/types-description | Silvan Mosberger | 1 | -1/+1 | |
lib/types: Drop misleading plural from type descriptions | |||||
2022-05-15 | Revert "lib: init flakes.nix" | adisbladis | 3 | -23/+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-13 | lib/tests/modules: Test functionTo submodule merging too | Robert Hensing | 2 | -8/+11 | |
2022-05-13 | lib.types.functionTo: Support type merging | Robert Hensing | 2 | -0/+60 | |
2022-05-07 | lib/strings/toShellVars: handle derivations as strings | Naïm Favier | 1 | -0/+12 | |
2022-05-02 | lib/tests/modules.sh: Fix for singular type descriptions | Robert Hensing | 1 | -1/+1 | |
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> | |||||
2022-05-01 | Merge pull request #167947 from MatthewCroughan/mc/callLocklessFlake | Artturi | 3 | -0/+22 | |
lib: add callLocklessFlake | |||||
2022-04-28 | lib.systems: add riscv{32,64} sets and filters | Alyssa Ross | 1 | -0/+2 | |
For other platforms like Intel and ARM, we can do e.g. lib.platforms.aarch64 to get only the 64-bit ARM platorms, but until now there were no equivalents for RISC-V. | |||||
2022-04-28 | lib/tests: add RISC-V test | Alyssa Ross | 1 | -0/+1 | |
2022-04-27 | lib/strings: add toShellVars | Naïm Favier | 1 | -0/+20 | |
A straightforward piece of plumbing to safely inject Nix variables into shell scripts: '' ${lib.toShellVars { inherit foo bar; }} cmd "$foo" --bar "$bar" '' |