Skip to content

Comments

lib.path.splitStorePath: init#273884

Closed
infinisil wants to merge 1 commit intoNixOS:masterfrom
tweag:path.splitStorePath
Closed

lib.path.splitStorePath: init#273884
infinisil wants to merge 1 commit intoNixOS:masterfrom
tweag:path.splitStorePath

Conversation

@infinisil
Copy link
Member

@infinisil infinisil commented Dec 13, 2023

Note

This was dependent on #273883

Description of changes

In order to implement #269283 I need a function to split a path within a store path into its store path and the subpath. So this PR adds a function to do that:

splitStorePath /nix/store/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo/bar/baz
-> {
  storePath = /nix/store/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo;
  subpath = "./bar/baz";
}

This work is sponsored by Antithesis

Things done

  • Documentation
  • Tidy code
  • Tests

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: lib The Nixpkgs function library label Dec 13, 2023
@infinisil infinisil force-pushed the path.splitStorePath branch 2 times, most recently from 15b9cf4 to 7580ae9 Compare December 13, 2023 04:15
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 13, 2023
@infinisil infinisil marked this pull request as ready for review December 13, 2023 20:09
@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 16, 2023
@infinisil infinisil marked this pull request as draft December 19, 2023 00:39
@infinisil
Copy link
Member Author

I originally thought this function was necessary for #269283, but turns out it's not. While this would be ready, we shouldn't merge this if there's no use case for it. So I'll just close for now until perhaps another use case comes up.

@infinisil infinisil closed this Dec 19, 2023
@infinisil infinisil deleted the path.splitStorePath branch December 19, 2023 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: lib The Nixpkgs function library 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants