2021-11-06 21:14:10 +00:00
|
|
|
{ stdenv, lib, fetchurl, fetchpatch, ncurses }:
|
2016-07-14 17:57:38 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "smemstat";
|
2021-08-28 02:41:16 +01:00
|
|
|
version = "0.02.10";
|
2016-07-14 17:57:38 +01:00
|
|
|
src = fetchurl {
|
2019-04-22 09:14:28 +01:00
|
|
|
url = "https://kernel.ubuntu.com/~cking/tarballs/smemstat/smemstat-${version}.tar.xz";
|
2021-08-28 02:41:16 +01:00
|
|
|
sha256 = "sha256-Vrs1jOg5yHdEffVo769aaxSawo4iZtGrFJ65Nu+RhcU=";
|
2016-07-14 17:57:38 +01:00
|
|
|
};
|
2021-11-06 21:14:10 +00:00
|
|
|
patches = [
|
|
|
|
# Pull patch pending upstream inclusion to support ncurses-6.3:
|
|
|
|
# https://github.com/ColinIanKing/smemstat/pull/1
|
|
|
|
(fetchpatch {
|
|
|
|
name = "ncurses-6.3.patch";
|
|
|
|
url = "https://github.com/ColinIanKing/smemstat/commit/95119558d1679295c9f9f7f618ddbe212674a4bf.patch";
|
|
|
|
sha256 = "sha256-Cl3Y0HIy1nXqBux6+AXoPuKJatSv3Z0X/4bD+MNjkAQ=";
|
|
|
|
})
|
|
|
|
];
|
2017-01-26 02:48:56 +00:00
|
|
|
buildInputs = [ ncurses ];
|
2016-07-14 17:57:38 +01:00
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/usr/* $out
|
|
|
|
rm -r $out/usr
|
|
|
|
'';
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Memory usage monitoring tool";
|
2021-11-06 21:14:10 +00:00
|
|
|
homepage = "https://github.com/ColinIanKing/smemstat";
|
2016-07-14 17:57:38 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ womfoo ];
|
|
|
|
};
|
|
|
|
}
|