nix-output-monitor: Add nom-build script

This commit is contained in:
Malte Brandy 2021-03-02 23:39:48 +01:00
parent 25c7c6ac31
commit 65f8db5ff9
No known key found for this signature in database
GPG Key ID: 226A2D41EF5378C9

View File

@ -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;