Set required experimental features internally.
This commit is contained in:
parent
1e9d3be430
commit
05e9306f21
1 changed files with 9 additions and 2 deletions
|
|
@ -138,7 +138,7 @@ fn parse_nix_build_output(output: String) -> Result<StorePath> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_nix_build(flake_uri: &str) -> Result<process::Output> {
|
fn run_nix_build(flake_uri: &str) -> Result<process::Output> {
|
||||||
let output = process::Command::new("nix")
|
let output = nix_cmd()
|
||||||
.arg("build")
|
.arg("build")
|
||||||
.arg(flake_uri)
|
.arg(flake_uri)
|
||||||
.arg("--json")
|
.arg("--json")
|
||||||
|
|
@ -151,7 +151,7 @@ fn run_nix_build(flake_uri: &str) -> Result<process::Output> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn try_nix_eval(flake_uri: &str) -> Result<bool> {
|
fn try_nix_eval(flake_uri: &str) -> Result<bool> {
|
||||||
let output = process::Command::new("nix")
|
let output = nix_cmd()
|
||||||
.arg("eval")
|
.arg("eval")
|
||||||
.arg(flake_uri)
|
.arg(flake_uri)
|
||||||
.arg("--json")
|
.arg("--json")
|
||||||
|
|
@ -167,3 +167,10 @@ fn try_nix_eval(flake_uri: &str) -> Result<bool> {
|
||||||
Ok(false)
|
Ok(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn nix_cmd() -> process::Command {
|
||||||
|
let mut cmd = process::Command::new("nix");
|
||||||
|
cmd.arg("--extra-experimental-features")
|
||||||
|
.arg("nix-command flakes");
|
||||||
|
cmd
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue