diff --git a/ofborg/src/nix.rs b/ofborg/src/nix.rs index 1fd0c3ce..dffe24ee 100644 --- a/ofborg/src/nix.rs +++ b/ofborg/src/nix.rs @@ -357,6 +357,7 @@ impl Nix { &format!("{}", self.build_timeout), ]); command.args(&["--argstr", "system", &self.system]); + command.args(&["--arg", "config", "{ allowUnfree = true; }"]); if self.limit_supported_systems { command.args(&[ @@ -693,7 +694,15 @@ mod tests { let ret: Result = nix.run(command, true); - assert_run(ret, Expect::Pass, vec!["./default.nix", "-A foo -A bar"]); + assert_run( + ret, + Expect::Pass, + vec![ + "./default.nix", + "-A foo -A bar", + "--arg config { allowUnfree = true; }", + ], + ); } #[test] @@ -716,6 +725,7 @@ mod tests { vec![ "./nixos/release.nix", "--arg nixpkgs { outPath=./.; revCount=999999; shortRev=\"ofborg\"; rev=\"0000000000000000000000000000000000000000\"; }", + "--arg config { allowUnfree = true; }", ], ); }