summary refs log tree commit diff
path: root/lib/path/default.nix
AgeCommit message (Collapse)AuthorFilesLines
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 Hensing1-0/+31
`lib.path.subpath.components`: init
2023-07-26lib.path.subpath.components: initSilvan Mosberger1-0/+31
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 Mosberger1-0/+46
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-10lib.path.removePrefix: initSilvan Mosberger1-0/+53
2023-06-15lib.path.hasPrefix: initSilvan Mosberger1-0/+63
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 Mosberger1-0/+77
This function can be used to safely join subpaths together
2023-01-18lib.path.append: initSilvan Mosberger1-0/+47
This function can be used to append strings to Nix path values in a safe way.
2023-01-18lib.path: Minor improvementsSilvan Mosberger1-7/+16
- 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-03lib.path.subpath.normalise: initSilvan Mosberger1-0/+143
2023-01-03lib.path.subpath.isValid: initSilvan Mosberger1-0/+75
The first path library function