Merge pull request #114903 from maralorn/nom-build

nix-output-monitor: Add nom-build script
This commit is contained in:
Sandro 2021-03-03 15:24:14 +01:00 committed by GitHub
commit c872f28f61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;