From 65f8db5ff98579a529210644b33af80113521f8d Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Tue, 2 Mar 2021 23:39:48 +0100 Subject: [PATCH] nix-output-monitor: Add nom-build script --- pkgs/tools/nix/nix-output-monitor/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/nix/nix-output-monitor/default.nix b/pkgs/tools/nix/nix-output-monitor/default.nix index f3b080938eb4..2a9935793cf0 100644 --- a/pkgs/tools/nix/nix-output-monitor/default.nix +++ b/pkgs/tools/nix/nix-output-monitor/default.nix @@ -1,15 +1,16 @@ { mkDerivation, ansi-terminal, async, attoparsec, base, containers , cassava, directory, HUnit, mtl, nix-derivation, process, relude, lib , stm, terminal-size, text, time, unix, wcwidth, fetchFromGitHub +, expect, runtimeShell }: -mkDerivation { +mkDerivation rec { pname = "nix-output-monitor"; version = "1.0.1.1"; src = fetchFromGitHub { owner = "maralorn"; repo = "nix-output-monitor"; sha256 = "1wi1gsl5q1sy7k6k5wxhwpwzki7rghhbsyzm84hnw6h93w6401ax"; - rev = "v1.0.1.1"; + rev = "v${version}"; }; isLibrary = true; isExecutable = true; @@ -25,6 +26,13 @@ mkDerivation { ansi-terminal async attoparsec base containers directory HUnit mtl nix-derivation process relude stm text time unix ]; + postInstall = '' + cat > $out/bin/nom-build << EOF + #!${runtimeShell} + ${expect}/bin/unbuffer nix-build "\$@" 2>&1 | exec $out/bin/nom + EOF + chmod a+x $out/bin/nom-build + ''; homepage = "https://github.com/maralorn/nix-output-monitor"; description = "Parses output of nix-build to show additional information"; license = lib.licenses.agpl3Plus;