2014-09-11 21:20:02 +01:00
|
|
|
{ lib, stdenv, fetchurl, python }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "smem-1.4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://www.selenic.com/smem/download/${name}.tar.gz";
|
2014-09-11 21:20:02 +01:00
|
|
|
sha256 = "1v31vy23s7szl6vdrllq9zbg58bp36jf5xy3fikjfg6gyiwgia9f";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ python ];
|
|
|
|
|
|
|
|
buildPhase =
|
|
|
|
''
|
|
|
|
gcc -O2 smemcap.c -o smemcap
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp smem smemcap $out/bin/
|
|
|
|
|
|
|
|
mkdir -p $out/share/man/man8
|
|
|
|
cp smem.8 $out/share/man/man8/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.selenic.com/smem/;
|
|
|
|
description = "A memory usage reporting tool that takes shared memory into account";
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = [ lib.maintainers.eelco ];
|
|
|
|
};
|
|
|
|
}
|