summaryrefslogtreecommitdiff
path: root/lib/default.nix (follow)
Commit message (Expand)AuthorAgeFilesLines
...
| * lib.lists: add `replicate`•••`replicate` returns n copies of an element as a list. Co-Authored-By: Silvan Mosberger <contact@infinisil.com> h7x42023-02-061-1/+1
* | Merge pull request #205557 from ncfavier/concatLines•••lib/strings: add `concatLines`Silvan Mosberger2023-01-311-1/+1
|\ \
| * | 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 Favier2022-12-101-1/+1
| |/
* | Merge pull request #208674 from YoshiRulz/yoshi-lib-docs•••lib: Fix mismatched quotes in `lib.*` doc commentsSilvan Mosberger2023-01-051-1/+1
|\ \
| * | lib: Fix mismatched quotes in `lib.*` doc comments•••caused problems for automated rich text generation such as https://teu5us.github.io/nix-lib.html#customisation-functions YoshiRulz2023-01-021-1/+1
* | | modules: add mkPackageOptionMD•••another transitional option factory, like mkAliasOptionModuleMD. pennae2023-01-051-1/+1
* | | modules: add mkAliasOptionModuleMD•••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. pennae2023-01-051-1/+2
* | | Merge pull request #205190 from NixOS/lib.path.relativeNormalise•••lib.path.subpath.{isValid,normalise}: initRobert Hensing2023-01-031-1/+2
|\ \ \ | |/ / |/| |
| * | lib.path.subpath.isValid: init•••The first path library function Silvan Mosberger2023-01-031-1/+2
| |/
* | lib: Add isStringLikeRobert Hensing2022-12-311-2/+4
* | lib: Add isPath•••Available since Nix 2.3, which is the Nixpkgs minimum version. Thanks zimbatm! Robert Hensing2022-12-311-1/+1
|/
* lib/default.nix: include mesonOption-related functions•••To bring them to the scope when calling `lib`. AndersonTorres2022-12-061-0/+1
* lib/attrsets: add concatMapAttrsfigsoda2022-11-171-1/+1
* lib/strings: Refactor toInt into toInt and toIntBase10Jacob Abel2022-10-231-1/+1
* lib: Add lazyDerivationRobert Hensing2022-09-211-0/+2
* lib/options: Add showOptionWithDefLocsRobert Hensing2022-06-211-1/+2
* treewide: attempt at markdown option docspennae2022-06-121-1/+2
* Merge pull request #157480 from MatthewCroughan/in-pure-eval-mode•••lib: add inPureEvalModeRobert Hensing2022-06-101-1/+1
|\
| * lib: add inPureEvalMode•••This makes a value that is true if builtins does not contain the currentSystem function, but false if it does. matthewcroughan2022-05-061-1/+1
* | add mechanism for handling meta.sourceProvenance attributes•••heavily based on patterns used by licenses infrastructure, so may appear overengineered for its initial level of use Robert Scott2022-05-301-0/+1
* | Revert "lib: init flakes.nix"•••This reverts commit PR #167947. Flakes aren't standardised and the `lib` namespace shouldn't be polluted with utilities that serve only experimental uses. adisbladis2022-05-151-4/+0
|/
* Merge pull request #167947 from MatthewCroughan/mc/callLocklessFlake•••lib: add callLocklessFlakeArtturi2022-05-011-0/+4
|\
| * lib: init flakes.nix•••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. matthewcroughan2022-04-121-1/+5
| * lib: add callLocklessFlake•••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> matthewcroughan2022-04-121-1/+1
* | Merge pull request #170583 from ncfavier/mkShellVars•••lib/strings: add toShellVarsRobert Hensing2022-04-271-1/+2
|\ \
| * | lib/strings: add toShellVars•••A straightforward piece of plumbing to safely inject Nix variables into shell scripts: '' ${lib.toShellVars { inherit foo bar; }} cmd "$foo" --bar "$bar" '' Naïm Favier2022-04-271-1/+2
| |/
* / lib/meta: add getExe to get the main program of a drvArtturin2022-04-241-1/+1
|/
* lib/trivial: actually expose warnIfNot and throwIfNaïm Favier2022-03-271-1/+1
* Merge remote-tracking branch 'upstream/master' into tests-restrict-argumentsRobert Hensing2022-03-211-4/+6
|\
| * Merge pull request #163451 from hercules-ci/stop-premature-warnings•••Stop premature warnings, including `nix.settings` migrationKevin Cox2022-03-211-2/+3
| |\
| | * lib: Add mkRenamedOptionModuleWith•••Adds support for sinceRelease Robert Hensing2022-03-091-2/+3
| * | lib.attrsets: Introduce updateManyAttrsByPathSilvan Mosberger2022-03-181-1/+2
| * | lib.attrsets: Introduce showAttrPathSilvan Mosberger2022-03-181-1/+1
| |/
* | lib: Add toFunctionRobert Hensing2022-03-211-1/+2
* | lib: applyIfFunction -> applyModuleArgsIfFunctionRobert Hensing2022-03-211-1/+1
|/
* Merge pull request #157301 from pennae/lib-add-mkPackageOption•••lib: add mkPackageOption to default.nix0x4A6F2022-02-281-1/+1
|\
| * lib: add mkPackageOption to default.nix•••this was forgotten in #155669 pennae2022-01-291-1/+1
* | lib/modules: introduce setDefaultModuleLocation•••Wraps a module with a default location for reporting errors. Naïm Favier2022-01-271-2/+2
|/
* lib.types: Add unique like uniq, but custom errors•••Couldn't extend types.uniq and it had a silly name anyway. Now we can have better error messages. Robert Hensing2022-01-241-2/+3
* lib.checkListOfEnum: initJosé Romildo2022-01-091-1/+1
* lib.throwIfNot: initRobert Hensing2021-12-221-1/+2
* lib/meta: add getLicenseFromSpdxId function•••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 Shamrock Lee2021-12-021-1/+1
* lib.modules: add mkDerivedConfig•••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`. Taeer Bar-Yam2021-11-151-1/+1
* Merge pull request #136909 from ncfavier/cleanup-defaults-examples•••nixos/doc: clean up defaults and examplesRobert Hensing2021-10-041-2/+2
|\
| * lib/options: add literalExpression and literalDocBook, deprecate literalExampleNaïm Favier2021-10-031-2/+2
* | lib: add function escapeXML•••Given a string, this function returns a string that can be inserted verbatim in an XML document. Robert Helgesson2021-10-031-1/+1
|/
* lib: export strings/escapeRegex•••I see no reason why I should be disallowed from using it. Harrison Houghton2021-08-221-1/+1
* lib: inherit mkImageMediaOverridelassulus2021-08-181-1/+1
* lib.mkFixStrictness: DeprecateRobert Hensing2021-07-121-1/+1
* Partially revert "lib/modules: Drop mkStrict and mkFixStrictness"•••mkFixStrictness was never properly deprecated and should only be removed after warning for some time. This partially reverts commit 8fb9984690c878fcd768e967190957441de05d11. Robert Hensing2021-07-121-2/+2