Skip to content

Commit

Permalink
fix: enable experimental features
Browse files Browse the repository at this point in the history
  • Loading branch information
Erin van der Veen committed Apr 10, 2024
1 parent f01871e commit c201fc7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
in
{
defaultPackage = naersk-lib.buildPackage {
pname = "genealogos";
pname = "nixtract";
src = ./.;

# nixtract uses the reqwest crate to query for narinfo on the substituters.
Expand Down
1 change: 1 addition & 0 deletions src/nix/describe_derivation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
.envs(env_vars);

// Add --offline if offline is set
Expand Down
1 change: 1 addition & 0 deletions src/nix/find_attribute_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub fn find_attribute_paths(
.arg(format!("lib={}", lib.path().to_string_lossy()))
.args(["--json", "--expr", expr])
.arg("--impure")
.args(["--extra-experimental-features", "flakes nix-command"])
.envs(env_vars);

if *offline {
Expand Down
2 changes: 2 additions & 0 deletions src/nix/substituters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fn from_flake_ref(flake_ref: &str) -> Result<Substituters> {
let output = std::process::Command::new("nix")
.args(["eval", "--json", "--impure"])
.args(["--expr", &expr])
.args(["--extra-experimental-features", "flakes nix-command"])
.output()?;

let stdout = String::from_utf8_lossy(&output.stdout);
Expand All @@ -35,6 +36,7 @@ fn from_flake_ref(flake_ref: &str) -> Result<Substituters> {
fn from_nix_conf() -> Result<Substituters> {
let output = std::process::Command::new("nix")
.args(["show-config", "--json"])
.args(["--extra-experimental-features", "flakes nix-command"])
.output()?;

let stdout = String::from_utf8_lossy(&output.stdout);
Expand Down

0 comments on commit c201fc7

Please sign in to comment.