Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add the
gcDeleteSpecific
action of theCollectGarbage
operation.ignoreLiveness
is not exposed since nix-daemon always errors out if it's set. (https://github.com/NixOS/nix/blob/a8fea5a54/src/libstore/daemon.cc#L728)maxFreedBytes
is not exposed since it just doesn't seem very useful.nix-store --delete
does not expose it either.The
CollectGarbage
operation has three other actions that could potentially be exposed. They seem different enough that I think you'd want different functions for dealing with them. (Ref: https://github.com/NixOS/nix/blob/a8fea5a54/src/libstore/gc-store.hh#L15)The test is a little strange. It needs to delete the tempRoot of the newly added path. It can do this by restarting the nix-daemon or by manually deleting it from the filesystem. So the test manually deletes it, using a path it builds from the
storeDir
.