diff options
Diffstat (limited to 'pkgs/tools/nix/nix-output-monitor/default.nix')
-rw-r--r-- | pkgs/tools/nix/nix-output-monitor/default.nix | 179 |
1 files changed, 19 insertions, 160 deletions
diff --git a/pkgs/tools/nix/nix-output-monitor/default.nix b/pkgs/tools/nix/nix-output-monitor/default.nix index 0f78600a050..a79b41a4a5d 100644 --- a/pkgs/tools/nix/nix-output-monitor/default.nix +++ b/pkgs/tools/nix/nix-output-monitor/default.nix @@ -1,164 +1,23 @@ -# This file has been autogenerate with cabal2nix. -# Update via ./update.sh" { - mkDerivation, - ansi-terminal, - async, - attoparsec, - base, - bytestring, - cassava, - containers, - data-default, - directory, + haskell, expect, - extra, - fetchzip, - filepath, - generic-optics, - HUnit, + haskellPackages, installShellFiles, - lib, - lock-file, - MemoTrie, - mtl, - nix-derivation, - optics, - process, - random, - relude, - runtimeShell, - safe, - stm, - streamly, - terminal-size, - text, - time, - unix, - vector, - wcwidth, - word8, -}: -mkDerivation { - pname = "nix-output-monitor"; - version = "1.1.2.0"; - src = fetchzip { - url = "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/v1.1.2.0.tar.gz"; - sha256 = "03qhy4xzika41pxlmvpz3psgy54va72ipn9v1lv33l6369ikrhl1"; +}: let + inherit (haskell.lib.compose) justStaticExecutables overrideCabal; + overrides = { + passthru.updateScript = ./update.sh; + testTarget = "unit-tests"; + buildTools = [installShellFiles]; + postInstall = '' + substitute "exe-sh/nom-build" "$out/bin/nom-build" \ + --replace 'unbuffer' '${expect}/bin/unbuffer' \ + --replace 'nom' "$out/bin/nom" + chmod a+x $out/bin/nom-build + installShellCompletion --zsh --name _nom-build completions/completion.zsh + ''; }; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - ansi-terminal - async - attoparsec - base - bytestring - cassava - containers - data-default - directory - extra - filepath - generic-optics - lock-file - MemoTrie - mtl - nix-derivation - optics - random - relude - safe - stm - streamly - terminal-size - text - time - unix - vector - wcwidth - word8 - ]; - executableHaskellDepends = [ - ansi-terminal - async - attoparsec - base - bytestring - cassava - containers - data-default - directory - extra - filepath - generic-optics - lock-file - MemoTrie - mtl - nix-derivation - optics - random - relude - safe - stm - streamly - terminal-size - text - time - unix - vector - wcwidth - word8 - ]; - testHaskellDepends = [ - ansi-terminal - async - attoparsec - base - bytestring - cassava - containers - data-default - directory - extra - filepath - generic-optics - HUnit - lock-file - MemoTrie - mtl - nix-derivation - optics - process - random - relude - safe - stm - streamly - terminal-size - text - time - unix - vector - wcwidth - word8 - ]; - homepage = "https://github.com/maralorn/nix-output-monitor"; - description = "Parses output of nix-build to show additional information"; - license = lib.licenses.agpl3Plus; - maintainers = with lib.maintainers; [maralorn]; - passthru.updateScript = ./update.sh; - testTarget = "unit-tests"; - buildTools = [installShellFiles]; - 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 - installShellCompletion --zsh --name _nom-build ${builtins.toFile "completion.zsh" '' - #compdef nom-build - compdef nom-build=nix-build - ''} - ''; -} +in + justStaticExecutables + (overrideCabal overrides + (haskellPackages.callPackage ./generated-package.nix {})) |