From 695ec0c36f2b43fffe10a72619ecd2de0dab6f59 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sun, 18 Sep 2022 17:27:46 -0600 Subject: [PATCH] Use --extra-experimental-features as opposed to --experimental-features --- integration-tests/flakes/default.nix | 2 +- src/nix/evaluator/nix_eval_jobs.rs | 2 +- src/nix/flake.rs | 4 ++-- src/nix/hive/mod.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration-tests/flakes/default.nix b/integration-tests/flakes/default.nix index 1cb3191..3c4385d 100644 --- a/integration-tests/flakes/default.nix +++ b/integration-tests/flakes/default.nix @@ -17,7 +17,7 @@ in tools.makeTest { deployer.succeed("sed -i 's @nixpkgs@ path:${pkgs._inputs.nixpkgs.outPath}?narHash=${pkgs._inputs.nixpkgs.narHash} g' /tmp/bundle/flake.nix") with subtest("Lock flake dependencies"): - deployer.succeed("cd /tmp/bundle && nix --experimental-features \"nix-command flakes\" flake lock") + deployer.succeed("cd /tmp/bundle && nix --extra-experimental-features \"nix-command flakes\" flake lock") with subtest("Deploy with a plain flake without git"): deployer.succeed("cd /tmp/bundle && ${tools.colmenaExec} apply --on @target --evaluator ${evaluator}") diff --git a/src/nix/evaluator/nix_eval_jobs.rs b/src/nix/evaluator/nix_eval_jobs.rs index 7ae7762..87e520b 100644 --- a/src/nix/evaluator/nix_eval_jobs.rs +++ b/src/nix/evaluator/nix_eval_jobs.rs @@ -85,7 +85,7 @@ impl DrvSetEvaluator for NixEvalJobs { command.args(options.to_args()); if expression.requires_flakes() { - command.args(&["--experimental-features", "flakes"]); + command.args(&["--extra-experimental-features", "flakes"]); } let mut child = command diff --git a/src/nix/flake.rs b/src/nix/flake.rs index adcf23a..10c5fff 100644 --- a/src/nix/flake.rs +++ b/src/nix/flake.rs @@ -88,7 +88,7 @@ impl FlakeMetadata { async fn resolve(flake: &str) -> ColmenaResult { let child = Command::new("nix") .args(&["flake", "metadata", "--json"]) - .args(&["--experimental-features", "nix-command flakes"]) + .args(&["--extra-experimental-features", "nix-command flakes"]) .arg(flake) .stdout(Stdio::piped()) .spawn()?; @@ -110,7 +110,7 @@ impl FlakeMetadata { pub async fn lock_flake_quiet(uri: &str) -> ColmenaResult<()> { let status = Command::new("nix") .args(&["flake", "lock"]) - .args(&["--experimental-features", "nix-command flakes"]) + .args(&["--extra-experimental-features", "nix-command flakes"]) .arg(uri) .stderr(Stdio::null()) .status() diff --git a/src/nix/hive/mod.rs b/src/nix/hive/mod.rs index 9cbccb8..e5b9b43 100644 --- a/src/nix/hive/mod.rs +++ b/src/nix/hive/mod.rs @@ -402,7 +402,7 @@ impl<'hive> NixInstantiate<'hive> { let mut command = Command::new("nix-instantiate"); if self.hive.is_flake() { - command.args(&["--experimental-features", "flakes"]); + command.args(&["--extra-experimental-features", "flakes"]); } let mut full_expression = self.hive.get_base_expression();