From e5c13343a691361934b68ed4019bc42787b62606 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 7 Sep 2022 11:55:35 +0200 Subject: withNixOutputMonitor: run shell with know Nix path --- pkgs/krops/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index b94c89b..a0244c3 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -9,7 +9,7 @@ in }: args: target: runShell target {} - (withNixOutputMonitor useNixOutputMonitor /* sh */ '' + (withNixOutputMonitor target useNixOutputMonitor /* sh */ '' nixos-rebuild -I ${ lib.concatMapStringsSep " " lib.escapeShellArg ([target.path] ++ args) } @@ -37,7 +37,7 @@ in ])} ''; - withNixOutputMonitor = mode_: command: let + withNixOutputMonitor = target: mode_: command: let mode = lib.getAttr (lib.typeOf mode_) { bool = lib.toJSON mode_; @@ -57,6 +57,7 @@ in (${command}) 2>&1 | nom ''; pessimistic = /* sh */ '' + NIX_PATH=${lib.escapeShellArg target.path} \ nix-shell -p nix-output-monitor --run ${lib.escapeShellArg optimistic} ''; true = /* sh */ '' -- cgit v1.2.3