summary refs log tree commit diff
path: root/pkgs/os-specific/linux/smem/default.nix
blob: b2636382aec64d25d4d923d51f52d015c3e35c6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, stdenv, fetchurl, python2 }:

stdenv.mkDerivation rec {
  pname = "smem";
  version = "1.5";

  src = fetchurl {
    url = "https://selenic.com/repo/smem/archive/${version}.tar.bz2";
    sha256 = "19ibv1byxf2b68186ysrgrhy5shkc5mc69abark1h18yigp3j34m";
  };

  buildInputs = [ python2 ];

  makeFlags = [ "smemcap" ];

  installPhase =
    ''
      install -Dm555 -t $out/bin/ smem smemcap
      install -Dm444 -t $out/share/man/man8/ smem.8
    '';

  meta = {
    homepage = "https://www.selenic.com/smem/";
    description = "A memory usage reporting tool that takes shared memory into account";
    platforms = lib.platforms.linux;
    maintainers = [ lib.maintainers.eelco ];
    license = lib.licenses.gpl2Plus;
  };
}