about summary refs log tree commit diff
path: root/lib/path
AgeCommit message (Collapse)AuthorFilesLines
2023-12-13lib.path.hasStorePathPrefix: initSilvan Mosberger2-1/+110
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-11-20lib: Take advantage of section descriptionsSilvan Mosberger1-1/+2
See https://github.com/nix-community/nixdoc/releases/tag/v2.6.0
2023-11-18lib.tests: build nix without flaky aws-sdk-cppAdam Joseph1-3/+6
The aws-sdk-cpp tests are flaky. Since pull requests to staging cause nix to be rebuilt, this means that staging PRs end up getting false CI failures due to whatever is flaky in the AWS SDK tests. Since none of our CI needs to (or should be able to) contact AWS S3, let's just omit it all. Bonus: the tests build way faster.
2023-08-12Merge pull request #247825 from tweag/lib.path-mdSilvan Mosberger1-157/+163
Minor `lib.path` documentation consistency improvements
2023-08-11lib/path/tests: Fix test setup on darwinRobert Hensing1-1/+8
These statements are taken from the `lib/test/release.nix` tests, which previously also worked on darwin. Unblocks https://github.com/NixOS/nix/pull/8569 when backported
2023-08-08lib.path: Add argument docs when missingSilvan Mosberger1-1/+4
2023-08-08lib.path: Indent comments the sameSilvan Mosberger1-146/+150
2023-08-08lib.path: Make documentation more uniformSilvan Mosberger1-27/+26
- Always have a trailing dot after sentences - Link more things - Fix some formatting - Use `append` instead of `+ ("/"`
2023-08-04Merge pull request #242695 from tweag/lib.path.subpath.componentsRobert Hensing3-0/+65
`lib.path.subpath.components`: init
2023-07-26lib/path/README.md: Justify returning subpathsSilvan Mosberger1-0/+21
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-26lib.path.subpath.components: initSilvan Mosberger2-0/+44
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-26lib.path.subpath.isValid: Add definition of a subpathSilvan Mosberger1-0/+3
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-26lib.path.splitRoot: initSilvan Mosberger2-1/+64
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-19Merge pull request #238013 from tweag/lib.path.removePrefixRobert Hensing2-1/+71
`lib.path.removePrefix`: init
2023-07-19Merge pull request #244044 from tweag/lib-readmeRobert Hensing1-2/+5
Create a Readme in `lib`
2023-07-18lib/tests: Unify documentation of individual testable filesSilvan Mosberger1-2/+5
2023-07-10lib.path.removePrefix: initSilvan Mosberger2-1/+71
2023-06-26lib/path/tests/prop.sh: Add --show-traceRobert Hensing1-1/+1
2023-06-26lib/path/tests: Add --show-traceRobert Hensing1-2/+3
This should help troubleshoot errors. Fyi --eval is just a flag, not an option with a value.
2023-06-15lib.path.hasPrefix: initSilvan Mosberger2-1/+81
2023-04-05lib.path.append: Add a lawSilvan Mosberger1-0/+6
With removePrefix introduced in a future commit this law can then be used to derive removePrefix p (append p s) == subpath.normalise s => (wrap with append) append p (removePrefix p (append p s)) == append p (subpath.normalise s) => (append is not influenced by subpath normalisation) append p (removePrefix p (append p s)) == append p s => (substitute q = append p s) append p (removePrefix p q) == q Not included in the docs because it's not that important, just shows that the first statement is more general than the second one (because this derivation doesn't work the other way)
2023-02-13lib.path.subpath.join: initSilvan Mosberger2-0/+107
This function can be used to safely join subpaths together
2023-02-07Merge pull request #208887 from tweag/lib.path.appendSilvan Mosberger2-8/+102
lib.path.append: init
2023-01-18lib.path.append: initSilvan Mosberger2-1/+82
This function can be used to append strings to Nix path values in a safe way.
2023-01-18lib.path: Minor improvementsSilvan Mosberger2-7/+20
- Use isValid when possible instead of subpathInvalidReason: https://github.com/NixOS/nixpkgs/pull/209099#discussion_r1068714681 - Add documentation to function arguments - Use newlines for error messages: https://github.com/NixOS/nixpkgs/pull/208887#discussion_r1069737602 - Add short comments for the unit test groups: https://github.com/NixOS/nixpkgs/pull/208887#discussion_r1072913051 - Slight formatting improvement for laws: https://github.com/NixOS/nixpkgs/pull/209099#discussion_r1068707955
2023-01-10lib/path/tests: Fix property tests when "-n" is generatedSilvan Mosberger1-1/+1
When "-n" is generated by the property tests, it causes `echo` to not output the string since it's interpreted as an option. Apparently there's no good way to print "-n" with `echo` [1], so switching to `printf` instead [1]: https://unix.stackexchange.com/questions/85846/how-can-i-print-n-with-echo
2023-01-03lib.path.subpath.normalise: add property testsSilvan Mosberger4-0/+310
2023-01-03lib.path.subpath.normalise: initSilvan Mosberger2-0/+192
2023-01-03lib.path.subpath.isValid: initSilvan Mosberger3-0/+178
The first path library function
2023-01-03lib.path: init README.md documentSilvan Mosberger1-0/+196
Adds initial work towards a `lib.path` library Originally proposed in https://github.com/NixOS/nixpkgs/pull/200718, but has since gone through some revisions Co-Authored-By: Valentin Gagarin <valentin.gagarin@tweag.io> Co-Authored-By: Robert Hensing <robert@roberthensing.nl>