summary refs log tree commit diff
path: root/lib/path
Commit message (Collapse)AuthorAge
* lib.tests: build nix without flaky aws-sdk-cppAdam Joseph2023-11-18
| | | | | | | | | | 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.
* Merge pull request #247825 from tweag/lib.path-mdSilvan Mosberger2023-08-12
|\ | | | | Minor `lib.path` documentation consistency improvements
| * lib.path: Add argument docs when missingSilvan Mosberger2023-08-08
| |
| * lib.path: Indent comments the sameSilvan Mosberger2023-08-08
| |
| * lib.path: Make documentation more uniformSilvan Mosberger2023-08-08
| | | | | | | | | | | | | | - Always have a trailing dot after sentences - Link more things - Fix some formatting - Use `append` instead of `+ ("/"`
* | lib/path/tests: Fix test setup on darwinRobert Hensing2023-08-11
|/ | | | | | | 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
* Merge pull request #242695 from tweag/lib.path.subpath.componentsRobert Hensing2023-08-04
|\ | | | | `lib.path.subpath.components`: init
| * lib/path/README.md: Justify returning subpathsSilvan Mosberger2023-07-26
| | | | | | | | Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
| * lib.path.subpath.components: initSilvan Mosberger2023-07-26
| | | | | | | | Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
* | lib.path.subpath.isValid: Add definition of a subpathSilvan Mosberger2023-07-26
| | | | | | | | Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
* | lib.path.splitRoot: initSilvan Mosberger2023-07-26
| | | | | | | | Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
* | Merge pull request #238013 from tweag/lib.path.removePrefixRobert Hensing2023-07-19
|\ \ | | | | | | `lib.path.removePrefix`: init
| * | lib.path.removePrefix: initSilvan Mosberger2023-07-10
| | |
* | | Merge pull request #244044 from tweag/lib-readmeRobert Hensing2023-07-19
|\ \ \ | |_|/ |/| | Create a Readme in `lib`
| * | lib/tests: Unify documentation of individual testable filesSilvan Mosberger2023-07-18
| | |
* | | lib/path/tests/prop.sh: Add --show-traceRobert Hensing2023-06-26
| | |
* | | lib/path/tests: Add --show-traceRobert Hensing2023-06-26
| |/ |/| | | | | | | This should help troubleshoot errors. Fyi --eval is just a flag, not an option with a value.
* | lib.path.hasPrefix: initSilvan Mosberger2023-06-15
| |
* | lib.path.append: Add a lawSilvan Mosberger2023-04-05
|/ | | | | | | | | | | | | | | | | 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)
* lib.path.subpath.join: initSilvan Mosberger2023-02-13
| | | | This function can be used to safely join subpaths together
* Merge pull request #208887 from tweag/lib.path.appendSilvan Mosberger2023-02-07
|\ | | | | lib.path.append: init
| * lib.path.append: initSilvan Mosberger2023-01-18
| | | | | | | | | | This function can be used to append strings to Nix path values in a safe way.
| * lib.path: Minor improvementsSilvan Mosberger2023-01-18
| | | | | | | | | | | | | | | | - 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
* | lib/path/tests: Fix property tests when "-n" is generatedSilvan Mosberger2023-01-10
|/ | | | | | | | | 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
* lib.path.subpath.normalise: add property testsSilvan Mosberger2023-01-03
|
* lib.path.subpath.normalise: initSilvan Mosberger2023-01-03
|
* lib.path.subpath.isValid: initSilvan Mosberger2023-01-03
| | | | The first path library function
* lib.path: init README.md documentSilvan Mosberger2023-01-03
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>