diff options
author | stuebinm | 2023-10-01 21:19:33 +0200 |
---|---|---|
committer | stuebinm | 2024-03-10 21:48:23 +0100 |
commit | 9001480e03ab8c957716e2bf164bbde605472399 (patch) | |
tree | b5eda915dd4d7226b711c139b425ba3acac7bcf0 /src/push.rs | |
parent | 0a0187794ac7f7a1e62cda3dabf8dc041f868790 (diff) |
Add a flag for building with nix-output-monitornom-flag
all this does is to replace the build invocations of nix/nix-build
with nom/nom-build (of https://github.com/maralorn/nix-output-monitor)
which gives more structured output of the running build.
Diffstat (limited to 'src/push.rs')
-rw-r--r-- | src/push.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/push.rs b/src/push.rs index c800a98..2d34436 100644 --- a/src/push.rs +++ b/src/push.rs @@ -57,6 +57,7 @@ pub struct PushProfileData<'a> { pub keep_result: bool, pub result_path: Option<&'a str>, pub extra_build_args: &'a [String], + pub use_nom: bool, } pub async fn build_profile_locally(data: &PushProfileData<'_>, derivation_name: &str) -> Result<(), PushProfileError> { @@ -66,9 +67,9 @@ pub async fn build_profile_locally(data: &PushProfileData<'_>, derivation_name: ); let mut build_command = if data.supports_flakes { - Command::new("nix") + Command::new(if data.use_nom {"nom"} else {"nix"}) } else { - Command::new("nix-build") + Command::new(if data.use_nom {"nom-build"} else {"nix-build"}) }; if data.supports_flakes { @@ -184,7 +185,7 @@ pub async fn build_profile_remotely(data: &PushProfileData<'_>, derivation_name: a => return Err(PushProfileError::CopyExit(a)), }; - let mut build_command = Command::new("nix"); + let mut build_command = Command::new(if data.use_nom {"nom"} else {"nix"}); build_command .arg("build").arg(derivation_name) .arg("--eval-store").arg("auto") |