about summary refs log tree commit diff
path: root/lib/default.nix
AgeCommit message (Collapse)AuthorFilesLines
2024-08-25lib.meta: Minor SPDX license function improvementsSilvan Mosberger1-1/+2
- Expose `lib.licensesSpdx` - Create bindings for the needed internal functions - Mention that some SPDX licenses might be missing (in the future I hope we can autogenerate the Nixpkgs license list from some SPDX endpoint
2024-07-25lib.strings: add `trim` and `trimWith`Matt Sturgeon1-1/+1
`strings.trim` returns a copy of the string with all leading and trailing whitespace removed. `strings.trimWith` does the same thing, but calling code can decide whether to trim the start and/or end of the string.
2024-07-25Merge pull request #149990 from ShamrockLee/lib-spdx-licenseSilvan Mosberger1-1/+1
2024-07-21lib: add getStaticSomeone Serge1-1/+1
2024-07-21lib: add getOutput', a nix-lang counterpart of _overrideFirstSomeone Serge1-2/+2
2024-07-11Merge pull request #318712 from woojiq/lib-network-ipv6-parserJanik1-1/+4
lib.network: add ipv6 parser
2024-07-03lib: Expose typeOf, unsafeGetAttrPosRobert Hensing1-1/+1
All builtins should be in mirrored in lib, for consistency, as well as control to let the Nixpkgs pin effect *subtle* improvements in behavior (such as the foldl' accumulator strictness).
2024-06-30lib.getLicenseFromSpdxIdOr: initYueh-Shun Li1-1/+1
Add lib.meta.getLicenseFromSpdxIdOr as a variant of lib.meta.getLicenseFromSpdxId that explicitly state the default (fallback) value if there's no license matching the given SPDX ID.
2024-06-29lib.network: ipv6 parser from stringwoojiq1-0/+3
Add a library function to parse and validate an IPv6 address from a string. It can parse the first two versions of an IPv6 address according to https://datatracker.ietf.org/doc/html/rfc4291#section-2.2. The third form "x:x:x:x:x:x.d.d.d.d" is not yet implemented. Optionally parser can accept prefix length (128 is default). Add shell script network.sh to test IPv6 parser functionality.
2024-06-28lib: add fromHexStringlucasew1-1/+1
Co-authored-by: lucasew <lucas59356@gmail.com>
2024-06-20lib: Add a TODO for builtins not available in sub-librariesSilvan Mosberger1-3/+3
2024-06-20lib.replaceStrings: inherit from lib.stringsSilvan Mosberger1-2/+1
2024-06-20lib.readFile: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.genericClosure: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.pathExists: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.getAttr: inherit from lib.attrsetsSilvan Mosberger1-2/+2
2024-06-20lib.isString: inherit from lib.stringsSilvan Mosberger1-2/+2
2024-06-20lib.isList: inherit from lib.listsSilvan Mosberger1-2/+2
2024-06-20lib.isInt: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.isBool: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.isAttrs: inherit from lib.attrsetsSilvan Mosberger1-2/+2
2024-06-20lib.hasAttr: inherit from lib.attrsetsSilvan Mosberger1-2/+2
2024-06-20lib.elemAt: inherit from lib.listsSilvan Mosberger1-2/+2
2024-06-20lib.elem: inherit from lib.listsSilvan Mosberger1-2/+2
2024-06-20lib.deepSeq: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.sub: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.add: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.lessThan: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.seq: inherit from lib.trivialSilvan Mosberger1-2/+2
2024-06-20lib.listToAttrs: inherit from lib.attrsetsSilvan Mosberger1-2/+2
2024-06-20lib.substring: inherit from lib.stringsSilvan Mosberger1-2/+2
2024-06-20lib.head: inherit from lib.listsSilvan Mosberger1-2/+2
2024-06-20lib.tail: inherit from lib.listsSilvan Mosberger1-2/+2
2024-06-20lib.stringLength: inherit from lib.stringsSilvan Mosberger1-1/+2
2024-06-20lib.length: inherit from lib.listsSilvan Mosberger1-2/+3
2024-06-20lib.genList: inherit from lib.listsSilvan Mosberger1-2/+2
2024-06-20lib.filter: inherit from lib.listsSilvan Mosberger1-2/+2
2024-06-20lib.attrNames: inherit from lib.attrsetsSilvan Mosberger1-2/+2
2024-06-20lib: inherit concatLists via lib.listsSilvan Mosberger1-2/+2
2024-06-20lib.split: Export from lib.strings.splitSilvan Mosberger1-1/+1
2024-06-20lib.match: Export from lib.strings.matchSilvan Mosberger1-1/+1
2024-06-20lib.removeAttrs: Export from lib.attrsets.removeAttrsSilvan Mosberger1-1/+1
2024-06-20lib.intersectAttrs: Export from builtinsSilvan Mosberger1-1/+1
2024-06-20lib.map: Export from lib.lists.mapSilvan Mosberger1-1/+1
2024-04-22Merge pull request #214021 from tweag/ifilter0Silvan Mosberger1-1/+1
lib.lists.ifilter0: init
2024-04-22lib.lists.ifilter0: initSilvan Mosberger1-1/+1
2024-04-21lib: Document status of deprecated.nix and move itRobert Hensing1-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.
2024-04-19Merge pull request #298680 from gvolpe/lib/transposeMapRick van Schijndel1-2/+2
lib/attrsets: add mapCartesianProduct function
2024-04-15lib: add mdDoc back in to provide proper warningéclairevoyant1-1/+1
2024-04-15lib/attrsets: introduce mapCartesianProductGabriel Volpe1-1/+1