From 3f148b0c7f2d56be65dc55628f6b2e68ee10e231 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Wed, 6 Mar 2024 09:37:14 +0100 Subject: [PATCH] change --nom to --no-nom, remove env reading --- Cargo.lock | 2 +- Cargo.toml | 2 +- package.nix | 3 +-- src/home.rs | 2 +- src/interface.rs | 10 +++------- src/nixos.rs | 2 +- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 821e58e..de33cdb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -768,7 +768,7 @@ dependencies = [ [[package]] name = "nh" -version = "3.5.3" +version = "3.5.4" dependencies = [ "ambassador", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index e2cf5f4..8c61e0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nh" -version = "3.5.3" +version = "3.5.4" edition = "2021" license = "EUPL-1.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/package.nix b/package.nix index 941c423..e718983 100644 --- a/package.nix +++ b/package.nix @@ -50,8 +50,7 @@ in postFixup = '' wrapProgram $out/bin/nh \ - --prefix PATH : ${lib.makeBinPath runtimeDeps} \ - ${lib.optionalString use-nom "--set-default NH_NOM 1"} + --prefix PATH : ${lib.makeBinPath runtimeDeps} ''; cargoLock.lockFile = ./Cargo.lock; diff --git a/src/home.rs b/src/home.rs index 8c14c1c..13afe75 100644 --- a/src/home.rs +++ b/src/home.rs @@ -71,7 +71,7 @@ impl HomeRebuildArgs { .extra_args(["--out-link", out_link_str]) .extra_args(&self.extra_args) .message("Building home configuration") - .nom(self.common.nom) + .nom(!self.common.no_nom) .build()? .exec()?; diff --git a/src/interface.rs b/src/interface.rs index f45e0d8..f3d59d9 100644 --- a/src/interface.rs +++ b/src/interface.rs @@ -130,13 +130,9 @@ pub struct CommonRebuildArgs { #[arg(long, short = 'u')] pub update: bool, - /// Use nix-output-monitor for the build process - #[arg( - long, - env = "NH_NOM", - value_parser(clap::builder::FalseyValueParser::new()) - )] - pub nom: bool, + /// Don't use nix-output-monitor for the build process + #[arg(long)] + pub no_nom: bool, } #[derive(Args, Debug)] diff --git a/src/nixos.rs b/src/nixos.rs index 3121bf9..d1b0f56 100644 --- a/src/nixos.rs +++ b/src/nixos.rs @@ -60,7 +60,7 @@ impl OsRebuildArgs { .message("Building NixOS configuration") .extra_args(["--out-link", out_link_str]) .extra_args(&self.extra_args) - .nom(self.common.nom) + .nom(!self.common.no_nom) .build()? .exec()?;