summaryrefslogtreecommitdiff
path: root/lib/path (follow)
Commit message (Expand)AuthorAgeFilesLines
* lib.path.hasStorePathPrefix: init•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Silvan Mosberger2023-12-132-1/+110
* lib: Take advantage of section descriptions•••See https://github.com/nix-community/nixdoc/releases/tag/v2.6.0 Silvan Mosberger2023-11-201-1/+2
* lib.tests: build nix without flaky aws-sdk-cpp•••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. Adam Joseph2023-11-181-3/+6
* Merge pull request #247825 from tweag/lib.path-md•••Minor `lib.path` documentation consistency improvementsSilvan Mosberger2023-08-121-157/+163
|\
| * lib.path: Add argument docs when missingSilvan Mosberger2023-08-081-1/+4
| * lib.path: Indent comments the sameSilvan Mosberger2023-08-081-146/+150
| * lib.path: Make documentation more uniform•••- Always have a trailing dot after sentences - Link more things - Fix some formatting - Use `append` instead of `+ ("/"` Silvan Mosberger2023-08-081-27/+26
* | lib/path/tests: Fix test setup on darwin•••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 Robert Hensing2023-08-111-1/+8
|/
* Merge pull request #242695 from tweag/lib.path.subpath.components•••`lib.path.subpath.components`: initRobert Hensing2023-08-043-0/+65
|\
| * lib/path/README.md: Justify returning subpaths•••Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Silvan Mosberger2023-07-261-0/+21
| * lib.path.subpath.components: init•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Silvan Mosberger2023-07-262-0/+44
* | lib.path.subpath.isValid: Add definition of a subpath•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Silvan Mosberger2023-07-261-0/+3
* | lib.path.splitRoot: init•••Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Silvan Mosberger2023-07-262-1/+64
* | Merge pull request #238013 from tweag/lib.path.removePrefix•••`lib.path.removePrefix`: initRobert Hensing2023-07-192-1/+71
|\ \
| * | lib.path.removePrefix: initSilvan Mosberger2023-07-102-1/+71
* | | Merge pull request #244044 from tweag/lib-readme•••Create a Readme in `lib`Robert Hensing2023-07-191-2/+5
|\ \ \ | |_|/ |/| |
| * | lib/tests: Unify documentation of individual testable filesSilvan Mosberger2023-07-181-2/+5
* | | lib/path/tests/prop.sh: Add --show-traceRobert Hensing2023-06-261-1/+1
* | | lib/path/tests: Add --show-trace•••This should help troubleshoot errors. Fyi --eval is just a flag, not an option with a value. Robert Hensing2023-06-261-2/+3
| |/ |/|
* | lib.path.hasPrefix: initSilvan Mosberger2023-06-152-1/+81
* | lib.path.append: Add a law•••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) Silvan Mosberger2023-04-051-0/+6
|/
* lib.path.subpath.join: init•••This function can be used to safely join subpaths together Silvan Mosberger2023-02-132-0/+107
* Merge pull request #208887 from tweag/lib.path.append•••lib.path.append: initSilvan Mosberger2023-02-072-8/+102
|\
| * lib.path.append: init•••This function can be used to append strings to Nix path values in a safe way. Silvan Mosberger2023-01-182-1/+82
| * lib.path: Minor improvements•••- 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 Silvan Mosberger2023-01-182-7/+20
* | lib/path/tests: Fix property tests when "-n" is generated•••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 Silvan Mosberger2023-01-101-1/+1
|/
* lib.path.subpath.normalise: add property testsSilvan Mosberger2023-01-034-0/+310
* lib.path.subpath.normalise: initSilvan Mosberger2023-01-032-0/+192
* lib.path.subpath.isValid: init•••The first path library function Silvan Mosberger2023-01-033-0/+178
* lib.path: init README.md document•••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> Silvan Mosberger2023-01-031-0/+196