Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2023-04-05 | lib.sources.pathType and co.: Move to lib.filesystem | Silvan Mosberger | 1 | -2/+3 | |
These functions only work with the filesystem, they don't import anything as sources | |||||
2023-03-11 | init: lib.foldlAttrs | hsjobeki | 1 | -1/+1 | |
- provide comprehensive example - add unit test | |||||
2023-03-08 | lib: remove deprecated functions | pennae | 1 | -5/+4 | |
all of these have been deprecated and raising warnings since 18.09. it's about time we actually made good on "will be removed in the next release". | |||||
2023-03-03 | strings: add escapeQuery for url encoding | Patrick Widmer | 1 | -1/+1 | |
2023-02-07 | Merge pull request #206611 from h7x4/lib-lists-add-repeat | Silvan Mosberger | 1 | -1/+1 | |
lib.lists: add `replicate` | |||||
2023-02-06 | lib.lists: add `replicate` | h7x4 | 1 | -1/+1 | |
`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 | -1/+1 | |
lib/strings: add `concatLines` | |||||
2023-01-05 | Merge pull request #208674 from YoshiRulz/yoshi-lib-docs | Silvan Mosberger | 1 | -1/+1 | |
lib: Fix mismatched quotes in `lib.*` doc comments | |||||
2023-01-05 | modules: add mkPackageOptionMD | pennae | 1 | -1/+1 | |
another transitional option factory, like mkAliasOptionModuleMD. | |||||
2023-01-05 | modules: add mkAliasOptionModuleMD | pennae | 1 | -1/+2 | |
mkAliasOptionModule should not default to mdDoc descriptions because that can break out-of-tree users of documentation infrastructure. add an explicitly-MD variant for now, to be removed some time after the MD transition is complete. | |||||
2023-01-03 | Merge pull request #205190 from NixOS/lib.path.relativeNormalise | Robert Hensing | 1 | -1/+2 | |
lib.path.subpath.{isValid,normalise}: init | |||||
2023-01-03 | lib.path.subpath.isValid: init | Silvan Mosberger | 1 | -1/+2 | |
The first path library function | |||||
2023-01-02 | lib: Fix mismatched quotes in `lib.*` doc comments | YoshiRulz | 1 | -1/+1 | |
caused problems for automated rich text generation such as https://teu5us.github.io/nix-lib.html#customisation-functions | |||||
2022-12-31 | lib: Add isStringLike | Robert Hensing | 1 | -2/+4 | |
2022-12-31 | lib: Add isPath | Robert Hensing | 1 | -1/+1 | |
Available since Nix 2.3, which is the Nixpkgs minimum version. Thanks zimbatm! | |||||
2022-12-10 | lib/strings: add `concatLines` | Naïm Favier | 1 | -1/+1 | |
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-06 | lib/default.nix: include mesonOption-related functions | AndersonTorres | 1 | -0/+1 | |
To bring them to the scope when calling `lib`. | |||||
2022-11-17 | lib/attrsets: add concatMapAttrs | figsoda | 1 | -1/+1 | |
2022-10-23 | lib/strings: Refactor toInt into toInt and toIntBase10 | Jacob Abel | 1 | -1/+1 | |
2022-09-21 | lib: Add lazyDerivation | Robert Hensing | 1 | -0/+2 | |
2022-06-21 | lib/options: Add showOptionWithDefLocs | Robert Hensing | 1 | -1/+2 | |
2022-06-12 | treewide: attempt at markdown option docs | pennae | 1 | -1/+2 | |
2022-06-10 | Merge pull request #157480 from MatthewCroughan/in-pure-eval-mode | Robert Hensing | 1 | -1/+1 | |
lib: add inPureEvalMode | |||||
2022-05-30 | add mechanism for handling meta.sourceProvenance attributes | Robert Scott | 1 | -0/+1 | |
heavily based on patterns used by licenses infrastructure, so may appear overengineered for its initial level of use | |||||
2022-05-15 | Revert "lib: init flakes.nix" | adisbladis | 1 | -4/+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-06 | lib: add inPureEvalMode | matthewcroughan | 1 | -1/+1 | |
This makes a value that is true if builtins does not contain the currentSystem function, but false if it does. | |||||
2022-05-01 | Merge pull request #167947 from MatthewCroughan/mc/callLocklessFlake | Artturi | 1 | -0/+4 | |
lib: add callLocklessFlake | |||||
2022-04-27 | Merge pull request #170583 from ncfavier/mkShellVars | Robert Hensing | 1 | -1/+2 | |
lib/strings: add toShellVars | |||||
2022-04-27 | lib/strings: add toShellVars | Naïm Favier | 1 | -1/+2 | |
A straightforward piece of plumbing to safely inject Nix variables into shell scripts: '' ${lib.toShellVars { inherit foo bar; }} cmd "$foo" --bar "$bar" '' | |||||
2022-04-24 | lib/meta: add getExe to get the main program of a drv | Artturin | 1 | -1/+1 | |
2022-04-12 | lib: init flakes.nix | matthewcroughan | 1 | -1/+5 | |
This commit creates flakes.nix, which is a library containing functions which relate to interacting with flakes. It also moves related functions from trivial.nix into it. | |||||
2022-04-12 | lib: add callLocklessFlake | matthewcroughan | 1 | -1/+1 | |
This is essentially a copy of the function of the same name, from flake-compat. callLocklessFlake is useful when trying to utilise a flake.nix without a lock file, often for when you want to create a subflake from within a parent flake. Co-authored-by: Tom Bereknyei <tomberek@gmail.com> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> | |||||
2022-03-27 | lib/trivial: actually expose warnIfNot and throwIf | Naïm Favier | 1 | -1/+1 | |
2022-03-21 | Merge remote-tracking branch 'upstream/master' into tests-restrict-arguments | Robert Hensing | 1 | -4/+6 | |
2022-03-21 | lib: Add toFunction | Robert Hensing | 1 | -1/+2 | |
2022-03-21 | lib: applyIfFunction -> applyModuleArgsIfFunction | Robert Hensing | 1 | -1/+1 | |
2022-03-21 | Merge pull request #163451 from hercules-ci/stop-premature-warnings | Kevin Cox | 1 | -2/+3 | |
Stop premature warnings, including `nix.settings` migration | |||||
2022-03-18 | lib.attrsets: Introduce updateManyAttrsByPath | Silvan Mosberger | 1 | -1/+2 | |
2022-03-18 | lib.attrsets: Introduce showAttrPath | Silvan Mosberger | 1 | -1/+1 | |
2022-03-09 | lib: Add mkRenamedOptionModuleWith | Robert Hensing | 1 | -2/+3 | |
Adds support for sinceRelease | |||||
2022-02-28 | Merge pull request #157301 from pennae/lib-add-mkPackageOption | 0x4A6F | 1 | -1/+1 | |
lib: add mkPackageOption to default.nix | |||||
2022-01-29 | lib: add mkPackageOption to default.nix | pennae | 1 | -1/+1 | |
this was forgotten in #155669 | |||||
2022-01-27 | lib/modules: introduce setDefaultModuleLocation | Naïm Favier | 1 | -2/+2 | |
Wraps a module with a default location for reporting errors. | |||||
2022-01-24 | lib.types: Add unique like uniq, but custom errors | Robert Hensing | 1 | -2/+3 | |
Couldn't extend types.uniq and it had a silly name anyway. Now we can have better error messages. | |||||
2022-01-09 | lib.checkListOfEnum: init | José Romildo | 1 | -1/+1 | |
2021-12-22 | lib.throwIfNot: init | Robert Hensing | 1 | -1/+2 | |
2021-12-02 | lib/meta: add getLicenseFromSpdxId function | Shamrock Lee | 1 | -1/+1 | |
Move function spdxLicense, internally used in yarn2nix to lib/meta.nix, and rename to getLicenseFromSpdxId A similar function is implemented in poetry2nix, but the one originally in yarn2nix seems beter. since it falls back to an license-like attrset for mismatched case instead of a plain string | |||||
2021-11-15 | lib.modules: add mkDerivedConfig | Taeer Bar-Yam | 1 | -1/+1 | |
mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b Create config definitions with the same priority as the definition of another option. This should be used for option definitions where one option sets the value of another as a convenience. For instance a config file could be set with a `text` or `source` option, where text translates to a `source` value using `mkDerivedConfig options.text (pkgs.writeText "filename.conf")`. It takes care of setting the right priority using `mkOverride`. | |||||
2021-10-04 | Merge pull request #136909 from ncfavier/cleanup-defaults-examples | Robert Hensing | 1 | -2/+2 | |
nixos/doc: clean up defaults and examples | |||||
2021-10-03 | lib/options: add literalExpression and literalDocBook, deprecate literalExample | Naïm Favier | 1 | -2/+2 | |