feat: Add Nix backend support - #220
Merged
Merged
Conversation
ripytide
requested changes
Apr 5, 2026
ripytide
left a comment
Owner
There was a problem hiding this comment.
Pretty good PR, thanks for adding a changelog too.
maax3v3
force-pushed
the
feature/nix-backend
branch
from
April 6, 2026 20:56
dbfaadd to
d2c376b
Compare
Contributor
Author
|
Thanks for the feedback. I've updated the PR according to suggested changes. |
ripytide
reviewed
Apr 12, 2026
Owner
|
Here is an example of how I would rewrite your fn update_packages(packages: &BTreeSet<String>, _: bool, config: &Self::Config) -> Result<()> {
if !packages.is_empty() {
run_command(
["nix", "profile", "upgrade"]
.into_iter()
.chain(Some("--profile").filter(|_| config.profile.is_some()))
.chain(config.profile.as_deref())
.chain(Some("--impure").filter(|_| config.impure))
.chain(Some("--accept-flake-config").filter(|_| config.accept_flake_config))
.chain(packages.iter().map(String::as_str)),
Perms::Same,
)?;
}
Ok(())
} |
Contributor
Author
|
I refactored the command building parts of concerned functions. |
ripytide
approved these changes
Jun 27, 2026
Owner
|
Looks all good now, thanks for the PR and sorry for the slow review. |
Closed
Contributor
Author
|
Thanks for the feedback ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to #219
I took a first pass at Nix support in Metapac, using
nix profileas the backend.What’s in:
clean-cachefor nix runsnix store gcWhat’s not in (yet):
Why these choices:
Validation:
Happy to incorporate any feedback !