at 23.11-beta 33 lines 890 B view raw
1{ fetchurl, lib, stdenv, ncurses }: 2 3stdenv.mkDerivation rec { 4 pname = "nmon"; 5 version = "16p"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/nmon/lmon${version}.c"; 9 sha256 = "sha256-XcYEX2cl4ySalpkY+uaWY6HWaRYgh3ILq825D86eayo="; 10 }; 11 12 buildInputs = [ ncurses ]; 13 dontUnpack = true; 14 buildPhase = "${stdenv.cc.targetPrefix}cc -o nmon ${src} -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -lm -g -D ${ 15 with stdenv.hostPlatform; 16 if isx86 then "X86" 17 else if isAarch then "ARM" 18 else if isPower then "POWER" 19 else "UNKNOWN" 20 }"; 21 installPhase = '' 22 mkdir -p $out/bin 23 cp nmon $out/bin 24 ''; 25 26 meta = with lib; { 27 description = "AIX & Linux Performance Monitoring tool"; 28 homepage = "https://nmon.sourceforge.net"; 29 license = licenses.gpl3Plus; 30 platforms = platforms.linux; 31 maintainers = with maintainers; [ sveitser ]; 32 }; 33}