summaryrefslogtreecommitdiff
path: root/lib/default.nix (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* lib.substring: inherit from lib.stringsSilvan Mosberger2024-06-201-2/+2
|
* lib.head: inherit from lib.listsSilvan Mosberger2024-06-201-2/+2
|
* lib.tail: inherit from lib.listsSilvan Mosberger2024-06-201-2/+2
|
* lib.stringLength: inherit from lib.stringsSilvan Mosberger2024-06-201-1/+2
|
* lib.length: inherit from lib.listsSilvan Mosberger2024-06-201-2/+3
|
* lib.genList: inherit from lib.listsSilvan Mosberger2024-06-201-2/+2
|
* lib.filter: inherit from lib.listsSilvan Mosberger2024-06-201-2/+2
|
* lib.attrNames: inherit from lib.attrsetsSilvan Mosberger2024-06-201-2/+2
|
* lib: inherit concatLists via lib.listsSilvan Mosberger2024-06-201-2/+2
|
* lib.split: Export from lib.strings.splitSilvan Mosberger2024-06-201-1/+1
|
* lib.match: Export from lib.strings.matchSilvan Mosberger2024-06-201-1/+1
|
* lib.removeAttrs: Export from lib.attrsets.removeAttrsSilvan Mosberger2024-06-201-1/+1
|
* lib.intersectAttrs: Export from builtinsSilvan Mosberger2024-06-201-1/+1
|
* lib.map: Export from lib.lists.mapSilvan Mosberger2024-06-201-1/+1
|
* Merge pull request #214021 from tweag/ifilter0Silvan Mosberger2024-04-221-1/+1
|\ | | | | lib.lists.ifilter0: init
| * lib.lists.ifilter0: initSilvan Mosberger2024-04-221-1/+1
| |
* | lib: Document status of deprecated.nix and move itRobert Hensing2024-04-211-1/+1
|/ | | | | | | | | | | This is all I could find after co-maintaining lib for a long time. I've had the fortune of basically not really noticing this file, because it has had very few interactions until the confusion in https://github.com/NixOS/nixpkgs/pull/304277 It seems to be a state of limbo, which would be nice to resolve (with great care), but this is not urgent, and first we should document its status.
* Merge pull request #298680 from gvolpe/lib/transposeMapRick van Schijndel2024-04-191-2/+2
|\ | | | | lib/attrsets: add mapCartesianProduct function
| * lib/attrsets: introduce mapCartesianProductGabriel Volpe2024-04-151-1/+1
| |
| * lib/attrsets: rename cartesianProductOfSets to cartesianProductGabriel Volpe2024-04-151-1/+1
| |
* | lib: add mdDoc back in to provide proper warningéclairevoyant2024-04-151-1/+1
|/
* lib: remove all uses of lib.mdDocstuebinm2024-04-131-1/+1
| | | | | this change is otherwise a no-op, as lib.mdDoc is already defined to be the identity function.
* Merge pull request #284551 from hercules-ci/types-attrTagSilvan Mosberger2024-04-091-1/+2
|\ | | | | Add `types.attrTag`
| * lib.modules.evalOptionValue: Undeprecate for lib.typesRobert Hensing2024-04-041-1/+2
| | | | | | | | lib.types.attrTag needs it.
* | lib: add xoredef2024-04-041-1/+1
| | | | | | | | This gets clumsily reimplemented in various places, to no useful end.
* | lib/strings: Add makeIncludePath (#296237)Florian Richer2024-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update strings.nix * Fix typo in docs * Update lib/strings.nix Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com> * Update lib/strings.nix Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com> * Add unit test with strings * Move test to strings * Add unit test with package structure * testMakeIncludePathWithPkgs: use real pkgs * Revert "testMakeIncludePathWithPkgs: use real pkgs" This reverts commit fb1850c069cfb324f3a43323da740a27a11793f3. * Update lib/tests/misc.nix Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com> * Update lib/tests/misc.nix Co-authored-by: Silvan Mosberger <github@infinisil.com> --------- Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com> Co-authored-by: Silvan Mosberger <github@infinisil.com>
* | lib: export attrsets.mergeAttrsListSandro2024-02-261-2/+2
|/
* lib: Add optionalDrvAttr to conditionally set drv attributes.Shea Levy2024-02-021-1/+1
| | | | | | This allows for adding new, conditionally set, derivation attributes to an existing derivation without changing any output paths in the case where the condition is not met.
* Merge pull request #270537 from 9999years/packagesFromDirectorySilvan Mosberger2023-12-191-1/+2
|\ | | | | lib.packagesFromDirectoryRecursive: init
| * lib.packagesFromDirectoryRecursive: initRebecca Turner2023-12-191-1/+2
| | | | | | | | Co-authored-by: Gabriella Gonzalez <GenuineGabriella@gmail.com>
* | lib.sortOn: initRobert Hensing2023-12-081-1/+1
|/ | | | | | | | | | | A more efficient sort in some cases, and often convenient. This exposes `lib.lists.sortOn` immediately on `lib`, because it is a sibling of `sort`, which is already present there. Omitting it would lead to more confusion, and worse outcomes. There's no confusion about the types `sort` or `sortOn` operate on. Haskell agrees about the type for `sortOn`, and it is in its `base`.
* Merge pull request #239722 from Stunkymonkey/lib-allUniqueSilvan Mosberger2023-11-151-1/+1
|\ | | | | lib.lists.allUnique: init
| * lib.lists.allUnique: initFelix Buehler2023-11-141-1/+1
| |
* | lib.mirrorFunctionArgs: initYueh-Shun Li2023-11-071-1/+1
|/ | | | Co-authored-by: Silvan Mosberger <github@infinisil.com>
* Merge pull request #254452 from flyingcircusio/lib-attrsToListSilvan Mosberger2023-10-101-2/+2
|\ | | | | lib.attrsets.attrsToList: add function
| * lib.attrsets.attrsToList: add functionOliver Schmidt2023-10-101-2/+2
| | | | | | | | | | | | | | | | | | 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>
* | lib: add cmakeOptionType, cmakeBool and cmakeFeatureAnderson Torres2023-09-271-0/+1
|/
* Merge pull request #245623 from tweag/fileset.toSourceSilvan Mosberger2023-09-021-0/+1
|\ | | | | File set combinators base: `lib.fileset.toSource`
| * lib.fileset.toSource: initSilvan Mosberger2023-09-011-0/+1
| |
* | Merge pull request #234615 from linsui/dconfJan Tojnar2023-08-281-0/+1
|\ \ | | | | | | nixos/dconf: support generating from attrs
| * | lib/gvariant: initlinsui2023-08-151-0/+1
| |/
* | Merge pull request #245957 from ↵Artturi2023-08-201-1/+1
|\ \ | | | | | | | | | amjoseph-nixpkgs/pr/lib/customization/makeScopeWithSplicing2
| * | lib.customisation: add uncurried form of makeScopeWithSplicingAdam Joseph2023-08-141-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Deeply-curried functions are pretty error-prone in untyped languages like Nix. This is a particularly bad case because `top-level/splice.nix` *also* declares a makeScopeWithSplicing, but it takes *two fewer arguments*. Let's add a version that uses attrset-passing form, to provide some minimal level of sanity-checking. This also provides defaults for keep and extra (these are often unneeded by the user).
* / lib/meta.nix: introduce getExe'Sefa Eyeoglu2023-08-131-1/+1
|/ | | | | | | getExe' can be used to get a binary other than the mainProgram from a derivation. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
* lib/options: remove literalDocBookpennae2023-06-131-1/+1
| | | | | | no longer supported. warning when used would not be appropriate, and docbook has been on the way out for long enough that throwing an error should not be necessary either.
* lib.sources.pathType and co.: Move to lib.filesystemSilvan Mosberger2023-04-051-2/+3
| | | | | These functions only work with the filesystem, they don't import anything as sources
* init: lib.foldlAttrshsjobeki2023-03-111-1/+1
| | | | | - provide comprehensive example - add unit test
* lib: remove deprecated functionspennae2023-03-081-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".
* strings: add escapeQuery for url encodingPatrick Widmer2023-03-031-1/+1
|
* Merge pull request #206611 from h7x4/lib-lists-add-repeatSilvan Mosberger2023-02-071-1/+1
|\ | | | | lib.lists: add `replicate`