Skip to content
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

fix: enable experimental features #43

Merged
merged 2 commits into from
Apr 11, 2024
Merged

Conversation

ErinvanderVeen
Copy link
Member

@ErinvanderVeen ErinvanderVeen commented Apr 10, 2024

Description

This PR adds the --extra-experimental-features "flakes nix-command" to the nix invocations.

Motivation

The Genealogos README does mention that flakes and nix-command must be enabled for it to function, and we could have gone with a similar approach for nixtract. But, since this flag is a no-op on systems where flakes and nix-command are already enabled anyway, we can set it here and avoid users having to set it manually.

Either way, we are limited to a version of nix that supports these features.

Checklist

Checklist before merging:

  • CHANGELOG.md updated
  • [ ] README.md up-to-date

@ErinvanderVeen ErinvanderVeen marked this pull request as ready for review April 10, 2024 10:58
Copy link
Member

@yannham yannham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling them by default sounds sensible to me 👍

@@ -126,6 +126,7 @@ pub fn describe_derivation(args: &DescribeDerivationArgs) -> Result<DerivationDe
.arg(format!("lib={}", args.lib.path().to_string_lossy()))
.args(["--json", "--expr", expr])
.arg("--impure")
.args(["--extra-experimental-features", "flakes nix-command"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, I haven't looked at it, this Rust API for the Nix CLI was presented at NixCon two years ago I believe by Flox. Don't know if it's really helpful here, but I'm mentioning it just in case.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't unfortunately! When I started this project, I investigated it, and there was actually a prototype that used it. But I found it not powerful enough to do what we needed to do with it unfortunately.

@ErinvanderVeen ErinvanderVeen merged commit 6a5637b into main Apr 11, 2024
7 checks passed
@ErinvanderVeen ErinvanderVeen deleted the experimental-features branch April 11, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants