about summary refs log tree commit diff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-11-05lib.systems.inspect: add patternLogicalAndAdam Joseph1-0/+26
2023-11-04Merge pull request #265045 from Artturin/addcomment1Artturi1-0/+17
2023-11-04lib.systems, test.cross.sanity: add test case for #264989Adam Joseph1-0/+1
We have several cross-compilation bugs that show up if hostPlatform!=buildPlatform yet hostPlatform.config==buildPlatform.config. These bugs have appeared and disappeared as we've fiddled with the definition of equality for platform objects. This commit adds a clear-cut case where they are *not* equal and never will be, so we can test it.
2023-11-02Merge pull request #264892 from tweag/fileset-store-path-rationaleSilvan Mosberger1-0/+3
lib.fileset: Add an additional argument in the design docs
2023-11-02lib.makeScopeWithSplicing': add commentsArtturin1-0/+17
I didn't add these arguments, so these comments are from my understading of the arguments.
2023-11-01lib.fileset: Add an additional argument in the design docsSilvan Mosberger1-0/+3
2023-11-01Merge pull request #264860 from tweag/filesystem-error-testEelco Dolstra1-2/+8
lib.filesystem: Don't test Nix-specific error messages
2023-11-01Merge pull request #259065 from tweag/fileset.differenceSilvan Mosberger3-0/+231
`lib.fileset.difference`: init
2023-11-01lib.filesystem: Don't test Nix-specific error messagesSilvan Mosberger1-2/+8
In https://github.com/NixOS/nix/pull/9269 the error messages change which would've broken this test.
2023-10-31lib/fixed-points.nix: correct typoAlexander Groleau1-1/+1
Corrects a minor typo in the description of `fix`; namely that `fix` allows factoring out syntactic recursion from another function.
2023-10-31Merge pull request #260971 from Gerg-L/getExeSilvan Mosberger2-1/+36
lib.getExe': check arguments
2023-10-30Merge pull request #263478 from tweag/fileset/unknown-type-errorRobert Hensing2-24/+43
`lib.fileset.toSource`: Improve error for unknown file types
2023-10-30lib.fileset.difference: initSilvan Mosberger3-0/+231
2023-10-30lib.fileset.toSource: Optimise unknown file type errorSilvan Mosberger1-27/+28
Compared to the parent commit, this removes any detectable performance cost :)
2023-10-30lib.fileset.toSource: Improve error for unknown file typesSilvan Mosberger2-20/+33
This does decrease performance unfortunately Benchmarking expression toSource { root = ./.; fileset = ./.; } Mean CPU time 0.103747 (σ = 0.012415) for 10 runs is 97.32181384964636% (σ = 16.34179537413021%) of the old value 0.106602 (σ = 0.0125571) Statistic .envs.elements (205920) is 105.5842% (+10891) of the old value 195029 Statistic .gc.totalBytes (20247696) is 101.7495% (+348160) of the old value 19899536 Statistic .nrThunks (134824) is 108.7878% (+10891) of the old value 123933 Statistic .symbols.number (996) is 100.1005% (+1) of the old value 995 Statistic .values.number (275238) is 104.1199% (+10891) of the old value 264347
2023-10-26lib.fileset.toSource: Test with unknown file typeSilvan Mosberger1-0/+5
Currently just throws the Nix error because unknown file types are not supported by the Nix store, but nothing catches this error earlier (yet, see next commit)
2023-10-26lib.fileset: Fix shellcheck warnings in testsSilvan Mosberger1-4/+4
2023-10-25Merge pull request #262838 from amjoseph-nixpkgs/pr/lib/systems/abi-suffixJohn Ericson1-1/+10
lib/systems/parse.nix: add removeAbiSuffix, use it
2023-10-24Merge pull request #260265 from tweag/fileset.fileFilterRobert Hensing3-0/+144
`lib.fileset.fileFilter`: init
2023-10-24lib.fileset.fileFilter: initSilvan Mosberger3-0/+144
2023-10-22lib/systems/parse.nix: add, use removeAbiSuffixAdam Joseph1-1/+10
gnu-config will ignore the portion of a triple matching the regex `e?abi.*$` when determining the validity of a triple. In other words, `i386-linuxabichickenlips` is a valid triple. This commit updates our parsing routines to match gnu-config. I was recently surprised to discover that it is in fact possible to shoehorn ABI flavors into nix doubles in a way which preserves their property of being a (non-canonical) subset of the valid gnu-config triples. This commit is required in order to exploit that discovery to add automatic detection of ILP32 platforms (64-bit void*, 32-bit int, like the Apple Watch and MIPS n32) to Nix.
2023-10-21lib.overrideDerivation: inter-link the documentationYueh-Shun Li1-2/+1
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-10-21doc: lib.customization: add Type and Example tagsYueh-Shun Li1-19/+70
Add the "Type:" blocks. Move the examples below the descriptions whenever possibles Add "Example:" tags before the examples moved below the descriptions.
2023-10-16lib/tests: add tests for getExe' and getExeGerg-L1-0/+28
2023-10-16lib.getExe': check argumentsGerg-L1-1/+8
2023-10-16Merge pull request #258866 from schuelermine/mkPackageOptionV4Silvan Mosberger3-26/+106
lib/options: mkPackageOption: document better, add pkgsText and usePname options, refactor
2023-10-16lib.fileset: Improved error for unsupported coercion valuesSilvan Mosberger2-4/+4
2023-10-13Merge pull request #260535 from ↵Robert Hensing2-3/+16
hercules-ci/fix-functionArgs-after-makeOverridable lib.makeOverridable: fix functionArgs on returned function
2023-10-12Merge pull request #242318 from hercules-ci/doc-lib-fixSilvan Mosberger1-8/+58
lib.fix: Improve doc
2023-10-12lib.fix: Improve doc moreSilvan Mosberger1-14/+24
Done together in and after the docs team meeting Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2023-10-11lib.makeOverridable: fix functionArgs on returned functionRobert Hensing2-3/+16
2023-10-11Merge pull request #257356 from tweag/fileset.intersectSilvan Mosberger4-8/+278
`lib.fileset.intersection`: init
2023-10-11lib.fileset: Minor contributor doc adjustmentsSilvan Mosberger1-2/+4
Co-authored-by: Robert Hensing <robert@roberthensing.nl>
2023-10-11lib.fileset.intersection: initSilvan Mosberger4-1/+257
2023-10-10Merge pull request #254452 from flyingcircusio/lib-attrsToListSilvan Mosberger3-2/+56
lib.attrsets.attrsToList: add function
2023-10-10lib.attrsets.attrsToList: add functionOliver Schmidt3-2/+56
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>
2023-10-10lib/options: refactor mkPackageOptionAnselm Schüler1-13/+13
2023-10-10lib/tests: add test for pkgsText parameter and package set selection of ↵Anselm Schüler2-0/+10
mkPackageOption
2023-10-09link to documentation on IFD in the Nix manualValentin Gagarin1-1/+1
2023-10-09lib: refactorAnderson Torres1-12/+15
- rename `(enable|with)Feature(As|)` inputs to more descriptive names
2023-10-06lib/options: add pkgsText parameter to mkPackageOptionAnselm Schüler1-7/+22
2023-10-06lib/tests: add more tests for mkPackageOptionAnselm Schüler2-0/+32
2023-10-06lib/options: correct and improve documentation of mkPackageOptionAnselm Schüler1-13/+36
2023-10-05licenses: add Anti-Capitalist Software License v1.4mirrorwitch1-0/+8
2023-10-04lib.fileset: Refactor for performance and future re-useSilvan Mosberger1-5/+17
2023-10-04Merge pull request #256417 from tweag/fileset.traceSilvan Mosberger4-74/+502
`lib.fileset.trace`, `lib.fileset.traceVal`: init
2023-10-04lib.fileset: Don't use ulimit for testing tracingSilvan Mosberger1-8/+13
2023-10-04lib.fileset: Refactor inotify testing to be reusableSilvan Mosberger1-51/+87
2023-10-04lib.fileset: Mention trace functions in the file set evaluation errorSilvan Mosberger3-4/+9
2023-10-04lib.fileset.traceVal: initSilvan Mosberger2-0/+68