Skip to content

Instantly share code, notes, and snippets.

@sveitser
Created March 30, 2018 02:43
Show Gist options
  • Save sveitser/9a5f38e343025e286edbf08aec2942ba to your computer and use it in GitHub Desktop.
Save sveitser/9a5f38e343025e286edbf08aec2942ba to your computer and use it in GitHub Desktop.
# WIP nix derivation for nmon
{ lib, fetchurl, stdenv, ncurses,
IOKit }:
stdenv.mkDerivation rec {
name = "nmon";
version = "16g";
src = fetchurl {
url = "mirror://sourceforge/nmon/lmon${version}.c";
sha256 = "127n8xvmg7byp42sm924mdr7hd3bsfsxpryzahl0cfsh7dlxv0ns";
};
buildInputs =
[ ncurses ] ++
lib.optionals stdenv.isDarwin [ IOKit ];
unpackPhase = "echo nothing to unpack";
buildPhase = "cc -o nmon ${src} -g -O2 -D JFS -D GETUSER -Wall -D LARGEMEM -lncurses -lm -g -D X86";
installPhase = ''
mkdir -p $out/bin
cp nmon $out/bin
chmod +x $out/bin/nmon
'';
# builder = stdenv.builder;
meta = with stdenv.lib; {
description = "AIX & Linux Performance Monitoring tool";
homepage = "http://nmon.sourceforge.net";
license = licenses.gpl2;
platforms = with platforms; linux ++ freebsd ++ openbsd ++ darwin;
maintainers = with maintainers; [ sveitser ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment