-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path library functions #210426
Comments
This was referenced Jan 12, 2023
This was referenced Mar 14, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/tweag-nix-dev-update-47/27387/1 |
This was referenced Jun 13, 2023
This was referenced Jul 10, 2023
Closing this because it is done, see https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-path! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For something like source combinators we should have a solid foundation for functions interacting with path values. This issue tracks progress on such a path library.
Originally such a path library was proposed in #200718, but has been redesigned after feedback from @roberth, @fricklerhandwerk and taking (reasonable) lazy tree-compatibility into account.
lib.path.hasPrefix
: init #237610lib.path.removePrefix
: init #238013lib.lists.{findFirstIndex,commonPrefix}
: init #243520lib.path.splitRoot
: init #244358lib.path.subpath.components
: init #242695lib.lists.{hasPrefix,removePrefix}
: init #243511Path difference and common ancestor: lib.path.difference: init #209375Path ordering and prefix stripping: lib.path.hasPrefix, lib.path.removePrefix: init #210423Subpath-based source filtering: [WIP] lib.sources.predicateFilter: init #221361There's also more functions we could add:
dirOf
andbaseNameOf
fromlib.path
The text was updated successfully, but these errors were encountered: