readeontop: build without patches & include some git bugfixes

Also add my initial longDescription, and build in parallel.
This commit is contained in:
Tobias Geerinckx-Rice
2015-01-12 16:30:28 +01:00
parent 520cc3518a
commit 40ed9007f1
3 changed files with 18 additions and 77 deletions
+18 -20
View File
@@ -1,39 +1,37 @@
{ stdenv, fetchurl, substituteAll, pkgconfig
, gettext, ncurses, libdrm, libpciaccess }:
{ stdenv, fetchgit, pkgconfig, gettext, ncurses, libdrm, libpciaccess }:
stdenv.mkDerivation rec {
name = "radeontop-${version}";
version = "0.8";
version = "v0.8-8-g575a416";
src = fetchurl {
url = "https://github.com/clbr/radeontop/archive/v${version}.tar.gz";
sha256 = "12c4kpr9zy2a21k8mck9cbfwm54x1l0i96va97m70pc9ramf2c24";
src = fetchgit {
url = git://github.com/clbr/radeontop.git;
rev = "575a416596dbedb25bc6f3f0b16a0e2296fbb9bb";
sha256 = "6100a7159384cfcd71e59ef7096450e975d01786ee4e3a7cf9c0e56045c4ac91";
};
buildInputs = [ pkgconfig gettext ncurses libdrm libpciaccess ];
patches = [
./install-paths.patch
enableParallelBuilding = true;
# The default generation of version.h expects a git clone.
(substituteAll {
src = ./version-header.patch;
inherit version;
})
];
postPatch = ''
substituteInPlace radeontop.c \
--replace /usr/share/locale $out/share/locale
patchPhase = ''
substituteInPlace getver.sh --replace ver=unknown ver=${version}
'';
makeFlags = "DESTDIR=$(out)";
makeFlags = "PREFIX=$(out)";
meta = with stdenv.lib; {
description = "Top-like tool for viewing AMD Radeon GPU utilization";
longDescription = ''
View GPU utilization, both for the total activity percent and individual
blocks. Supports R600 and later cards: even Southern Islands should work.
Works with both the open drivers and AMD Catalyst. Total GPU utilization
is also valid for OpenCL loads; the other blocks are only useful for GL
loads. Requires root rights or other permissions to read /dev/mem.
'';
homepage = https://github.com/clbr/radeontop;
platforms = platforms.linux;
license = licenses.gpl3;
maintainers = [ maintainers.rycee ];
maintainers = with maintainers; [ rycee nckx ];
};
}