| Commit message (Expand) | Author | Age | Files | Lines |
| * | init: lib.foldlAttrs•••- provide comprehensive example
- add unit test
| hsjobeki | 2023-03-11 | 1 | -0/+31 |
| * | Merge pull request #211855 from hercules-ci/lib-modules-disabledModules-modul...•••lib/modules: Allow an "anonymous" module with key in disabledModules | Robert Hensing | 2023-03-09 | 5 | -0/+145 |
| |\ |
|
| | * | lib/modules: Allow an "anonymous" module with key in disabledModules•••This makes the following work
disabledModules = [ foo.nixosModules.bar ];
even if `bar` is not a path, but rather a module such as
{ key = "/path/to/foo#nixosModules.bar"; config = ...; }
By supporting this, the user will often be able to use the same syntax
for both importing and disabling a module. This is becoming more relevant
because flakes promote the use of attributes to reference modules. Not
all of these modules in flake attributes will be identifiable, but with
the help of a framework such as flake-parts, these attributes can be
guaranteed to be identifiable (by outPath + attribute path).
| Robert Hensing | 2023-03-01 | 5 | -0/+145 |
| * | | strings: add escapeQuery for url encoding | Patrick Widmer | 2023-03-03 | 1 | -0/+9 |
| |/ |
|
| * | Merge pull request #206611 from h7x4/lib-lists-add-repeat•••lib.lists: add `replicate` | Silvan Mosberger | 2023-02-07 | 1 | -0/+5 |
| |\ |
|
| | * | lib.lists: add `replicate`•••`replicate` returns n copies of an element as a list.
Co-Authored-By: Silvan Mosberger <contact@infinisil.com>
| h7x4 | 2023-02-06 | 1 | -0/+5 |
| * | | Merge pull request #205557 from ncfavier/concatLines•••lib/strings: add `concatLines` | Silvan Mosberger | 2023-01-31 | 1 | -0/+5 |
| |\ \ |
|
| | * | | lib/strings: add `concatLines`•••Like `unlines` from Haskell.
The aim is to replace the `concatStringsSep "\n"` pattern for generated
files, which doesn't add a final newline.
| Naïm Favier | 2022-12-10 | 1 | -0/+5 |
| * | | | maintainers: clarify what fields are required | Naïm Favier | 2023-01-27 | 1 | -0/+1 |
| * | | | maintainers: disallow `noreply.github.com` emails | Naïm Favier | 2023-01-27 | 1 | -0/+2 |
| * | | | maintainers: make `email` optional•••Not giving an email address is fine as long as the maintainer is
reachable through other means, such as GitHub or Matrix.
| Naïm Favier | 2023-01-27 | 2 | -3/+6 |
| * | | | Merge pull request #211622 from alyssais/valgrind-platforms•••valgrind: make meta.platforms more accurate | John Ericson | 2023-01-19 | 1 | -0/+3 |
| |\ \ \ |
|
| | * | | | lib.platforms.s390x: init | Alyssa Ross | 2023-01-19 | 1 | -0/+1 |
| | * | | | lib.platforms.power: init | Alyssa Ross | 2023-01-19 | 1 | -0/+1 |
| | * | | | lib.platforms.armv7: init | Alyssa Ross | 2023-01-19 | 1 | -0/+1 |
| * | | | | lib/tests/release.nix: Make nix a parameter + strictDeps•••This makes bisecting nix a bit easier.
Example reproducer, invoked from nix directory:
```bash
nix-build ../nixpkgs/lib/tests/release.nix --arg nix '(builtins.getFlake "git+file://${toString ./.}").packages.x86_64-linux.default'
```
| Robert Hensing | 2023-01-18 | 1 | -3/+7 |
| |/ / / |
|
| * | | | Merge pull request #205190 from NixOS/lib.path.relativeNormalise•••lib.path.subpath.{isValid,normalise}: init | Robert Hensing | 2023-01-03 | 1 | -0/+3 |
| |\ \ \ |
|
| | * | | | lib.path.subpath.isValid: init•••The first path library function
| Silvan Mosberger | 2023-01-03 | 1 | -0/+3 |
| * | | | | lib/versions: add `pad`•••Pad a version string with zeros to match a given number of components.
| Naïm Favier | 2022-12-21 | 1 | -0/+15 |
| |/ / / |
|
| * | / | lib: fix typos | figsoda | 2022-12-17 | 1 | -1/+1 |
| | |/
|/| |
|
| * | | Merge pull request #205457 from h7x4/lib-strings-toInt-broken-for-negative-nu...•••lib.strings: fix negative number handling for `toInt` and `toIntBase10` | Robert Hensing | 2022-12-11 | 1 | -0/+4 |
| |\ \
| |/
|/| |
|
| | * | lib.strings: fix negative number handling for `toInt` and `toIntBase10`•••The previous version would be unstable due to an input validation regex
not expecting a '-' in front of the number.
| h7x4 | 2022-12-10 | 1 | -0/+4 |
| * | | nixos/doc: render option values using `lib.generators.toPretty`•••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`.
| Naïm Favier | 2022-12-08 | 1 | -1/+1 |
| * | | lib/generators.toPretty: escape strings properly | Naïm Favier | 2022-12-08 | 1 | -8/+8 |
| * | | lib/generators.toPretty: don't evaluate derivations•••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`.
| Naïm Favier | 2022-12-08 | 1 | -1/+1 |
| * | | lib/modules: Add context to the "option does not exist" error•••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`.
| Robert Hensing | 2022-12-02 | 3 | -0/+9 |
| * | | lib/attrsets: add concatMapAttrs | figsoda | 2022-11-17 | 1 | -0/+17 |
| * | | lib/systems: Support FreeBSD•••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.
| John Ericson | 2022-11-04 | 1 | -3/+3 |
| |/ |
|
| * | lib/tests/modules: Test doRenameorigin/doRename-no-warning | Robert Hensing | 2022-11-03 | 3 | -0/+32 |
| * | lib/strings: Update docs and restructured code to improve readability of toIn... | Jacob Abel | 2022-10-23 | 2 | -1/+5 |
| * | lib/strings: Refactor toInt into toInt and toIntBase10 | Jacob Abel | 2022-10-23 | 2 | -17/+45 |
| * | lib/strings: Update toInt to handle intermixed ws and zeros. Added tests | Jacob Abel | 2022-10-23 | 2 | -1/+12 |
| * | lib/strings: allow toInt to parse zero-padded strings | Jacob Abel | 2022-10-23 | 1 | -0/+28 |
| * | lib/tests/misc: Add tests for charToInt, escapeC, and normalizePath | Daniel Olsen | 2022-10-20 | 1 | -0/+15 |
| * | lib/types: always use `<function body>` instead of `[function body]` to indic...•••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.
| Maximilian Bosch | 2022-10-07 | 1 | -2/+2 |
| * | Merge pull request #193132 from figsoda/clean-up•••treewide: clean up | figsoda | 2022-10-01 | 1 | -1/+0 |
| |\ |
|
| | * | lib/tests/maintainers.nix: remove unused binding | figsoda | 2022-09-26 | 1 | -1/+0 |
| * | | lib/modules: Fix meta duplication in shorthand syntax | Robert Hensing | 2022-09-21 | 2 | -0/+22 |
| * | | lib: Add lazyDerivation | Robert Hensing | 2022-09-21 | 1 | -0/+53 |
| |/ |
|
| * | lib.types: Add parentheses where description is ambiguous | Robert Hensing | 2022-09-17 | 1 | -0/+53 |
| * | Merge pull request #188289 from erikarvstedt/fix-disabled-modules-abs-paths•••lib.modules: support strings with absolute paths in `disabledModules` | Robert Hensing | 2022-08-31 | 2 | -0/+6 |
| |\ |
|
| | * | lib.modules: support strings with absolute paths in `disabledModules`•••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.
| Erik Arvstedt | 2022-08-31 | 2 | -0/+6 |
| * | | lib/systems: add MicroBlaze architectures | Minijackson | 2022-08-25 | 1 | -1/+1 |
| |/ |
|
| * | teams/maintainers list: show instructions for validating the contents | Graham Christensen | 2022-06-20 | 1 | -2/+2 |
| * | maintainer teams: check them in lib tests | Graham Christensen | 2022-06-20 | 2 | -0/+54 |
| * | maintainer lib test: extract maintainer module | Graham Christensen | 2022-06-20 | 2 | -31/+32 |
| * | maintainers: remove longkeyid•••see https://dkg.fifthhorseman.net/blog/openpgp-key-ids-are-not-useful.html
| Graham Christensen | 2022-06-20 | 1 | -1/+0 |
| * | lib/modules: Throw earlier when module function does not return attrs•••`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.
| Robert Hensing | 2022-06-14 | 2 | -0/+21 |
| * | lib.deferredModule: Make it properly singular | Robert Hensing | 2022-06-14 | 1 | -1/+1 |
| * | lib.types.deferredModule: Allow path-typed module references | Robert Hensing | 2022-06-14 | 2 | -3/+4 |