Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 34 lines 916 B view raw
1{ fetchurl, lib, stdenv, ncurses }: 2 3stdenv.mkDerivation rec { 4 pname = "nmon"; 5 version = "16q"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/nmon/lmon${version}.c"; 9 sha256 = "sha256-G3ioFnLBkpGz0RpuMZ3ZsjoCKiYtuh786gCNbfUaylE="; 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 mainProgram = "nmon"; 29 homepage = "https://nmon.sourceforge.net"; 30 license = licenses.gpl3Plus; 31 platforms = platforms.linux; 32 maintainers = with maintainers; [ sveitser ]; 33 }; 34}