diff options
author | Robert Helgesson <robert@rycee.net> | 2015-01-01 16:47:24 +0100 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2015-01-03 21:18:54 +0100 |
commit | f9afb8e6cbf8deb9e6b46352d42ea3509a02074b (patch) | |
tree | ee2c490a8c5783371c14e1d5e61b345ed01f7139 /pkgs/os-specific/linux/radeontop/default.nix | |
parent | 597373bbd5ca3237f3b198c150cf7dbb63183fb1 (diff) | |
download | nixpkgs-f9afb8e6cbf8deb9e6b46352d42ea3509a02074b.tar nixpkgs-f9afb8e6cbf8deb9e6b46352d42ea3509a02074b.tar.gz nixpkgs-f9afb8e6cbf8deb9e6b46352d42ea3509a02074b.tar.bz2 nixpkgs-f9afb8e6cbf8deb9e6b46352d42ea3509a02074b.tar.lz nixpkgs-f9afb8e6cbf8deb9e6b46352d42ea3509a02074b.tar.xz nixpkgs-f9afb8e6cbf8deb9e6b46352d42ea3509a02074b.tar.zst nixpkgs-f9afb8e6cbf8deb9e6b46352d42ea3509a02074b.zip |
Add package 'radeontop'.
Diffstat (limited to 'pkgs/os-specific/linux/radeontop/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/radeontop/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/radeontop/default.nix b/pkgs/os-specific/linux/radeontop/default.nix new file mode 100644 index 00000000000..ed159bbf37f --- /dev/null +++ b/pkgs/os-specific/linux/radeontop/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, substituteAll, pkgconfig +, gettext, ncurses, libdrm, libpciaccess }: + +stdenv.mkDerivation rec { + name = "radeontop-${version}"; + version = "0.8"; + + src = fetchurl { + url = "https://github.com/clbr/radeontop/archive/v${version}.tar.gz"; + sha256 = "12c4kpr9zy2a21k8mck9cbfwm54x1l0i96va97m70pc9ramf2c24"; + }; + + buildInputs = [ pkgconfig gettext ncurses libdrm libpciaccess ]; + + patches = [ + ./install-paths.patch + + # 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 + ''; + + makeFlags = "DESTDIR=$(out)"; + + meta = with stdenv.lib; { + description = "Top-like tool for viewing AMD Radeon GPU utilization"; + homepage = https://github.com/clbr/radeontop; + platforms = platforms.linux; + license = licenses.gpl3; + maintainers = [ maintainers.rycee ]; + }; +} |