Merge pull request #50206 from c0bw3b/pkg/smem

smem: 1.4 -> 1.5
This commit is contained in:
Jörg Thalheim 2018-11-10 21:40:03 +00:00 committed by GitHub
commit e63da358ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,31 +1,26 @@
{ lib, stdenv, fetchurl, python }: { lib, stdenv, fetchurl, python }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "smem-1.4"; name = "smem-${version}";
version = "1.5";
src = fetchurl { src = fetchurl {
url = "https://www.selenic.com/smem/download/${name}.tar.gz"; url = "https://selenic.com/repo/smem/archive/${version}.tar.bz2";
sha256 = "1v31vy23s7szl6vdrllq9zbg58bp36jf5xy3fikjfg6gyiwgia9f"; sha256 = "19ibv1byxf2b68186ysrgrhy5shkc5mc69abark1h18yigp3j34m";
}; };
buildInputs = [ python ]; buildInputs = [ python ];
buildPhase = makeFlags = [ "smemcap" ];
''
gcc -O2 smemcap.c -o smemcap
'';
installPhase = installPhase =
'' ''
mkdir -p $out/bin install -Dm555 -t $out/bin/ smem smemcap
cp smem smemcap $out/bin/ install -Dm444 -t $out/share/man/man8/ smem.8
mkdir -p $out/share/man/man8
cp smem.8 $out/share/man/man8/
''; '';
meta = { meta = {
homepage = http://www.selenic.com/smem/; homepage = https://www.selenic.com/smem/;
description = "A memory usage reporting tool that takes shared memory into account"; description = "A memory usage reporting tool that takes shared memory into account";
platforms = lib.platforms.linux; platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.eelco ]; maintainers = [ lib.maintainers.eelco ];