unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add radeontop.
@ 2016-10-27 23:07 Tobias Geerinckx-Rice
  2016-10-28 13:49 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Geerinckx-Rice @ 2016-10-27 23:07 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/linux.scm (radeontop): New variable.
---

Ahoy Guix,

Like top, but for mediocre GPUs.

I'm too ignorant of anything beyond x86 to know if supported-systems is
needed or even makes sense here.

Kind regards,

T G-R

 gnu/packages/linux.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c959f62..f6cde13 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -70,6 +70,8 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
@@ -3044,3 +3046,45 @@ interface that should be familiar to, and easily adopted by, application
 developers.")
     (home-page "https://github.com/seccomp/libseccomp")
     (license license:lgpl2.1)))
+
+(define-public radeontop
+  (package
+    (name "radeontop")
+    (version "0.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/clbr/radeontop/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "07fnimn6wwablmdjw0av11hk9a6xilbryh09izq4b2ic4b8md2p7"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  ;; getver.sh uses ‘git --describe’, isn't worth an extra git
+                  ;; dependency, and doesn't even work on release(!) tarballs.
+                  (add-after 'unpack 'report-correct-version
+                    (lambda _ (substitute* "getver.sh"
+                                (("ver=unknown")
+                                 (string-append "ver=" ,version)))))
+                  (delete 'configure))  ; no configure script
+       #:make-flags (list "CC=gcc"
+                          (string-append "PREFIX=" %output))
+       #:tests? #f))                    ; no tests
+    (native-inputs
+     `(("gnu-gettext" ,gnu-gettext)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libdrm" ,libdrm)
+       ("libpciaccess" ,libpciaccess)
+       ("ncurses" ,ncurses)))
+    (home-page "https://github.com/clbr/radeontop/")
+    (synopsis "Usage monitor for AMD Radeon graphics")
+    (description "RadeonTop monitors resource consumption on supported AMD
+Radeon Graphics Processing Units (GPUs), either in real time as bar graphs on
+a terminal or saved to a file for further processing.  It measures both the
+activity of the GPU as a whole, which is also accurate during OpenCL
+computations, as well as separate component statistics that are only meaningful
+under OpenGL graphics workloads.")
+    (license license:gpl3)))
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add radeontop.
  2016-10-27 23:07 [PATCH] gnu: Add radeontop Tobias Geerinckx-Rice
@ 2016-10-28 13:49 ` Ludovic Courtès
  2016-10-28 15:55   ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2016-10-28 13:49 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: guix-devel

Hi!

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> * gnu/packages/linux.scm (radeontop): New variable.

[...]

> I'm too ignorant of anything beyond x86 to know if supported-systems is
> needed or even makes sense here.

I’m guessing the program is not very useful on non-x86 machines… but it
may build fine anyway.

We can add ‘supported-systems’ later if/when we have evidence that it
doesn’t build on other arches.

> +(define-public radeontop
> +  (package
> +    (name "radeontop")
> +    (version "0.9")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/clbr/radeontop/archive/v"

You could move ‘home-page’ above ‘source’ and reference it here.

Otherwise LGTM, thanks!

> +    (license license:gpl3)))

It’s indeed v3-only, bah.

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add radeontop.
  2016-10-28 13:49 ` Ludovic Courtès
@ 2016-10-28 15:55   ` Tobias Geerinckx-Rice
  0 siblings, 0 replies; 3+ messages in thread
From: Tobias Geerinckx-Rice @ 2016-10-28 15:55 UTC (permalink / raw)
  To: ludo; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 536 bytes --]

Ludo',

On 28/10/16 15:49, Ludovic Courtès wrote:
> We can add ‘supported-systems’ later if/when we have evidence that it
> doesn’t build on other arches.

OK!

> You could move ‘home-page’ above ‘source’ and reference it here.

Done. Nice to know that's not considered over-factorisation; I quite
like it.

>> +    (license license:gpl3)))
> It’s indeed v3-only, bah.

Yup :-/

Because you never know what those freedom-smoking hippies at the FSF
will come up with in future.

Thanks!

T G-R


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 476 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-28 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 23:07 [PATCH] gnu: Add radeontop Tobias Geerinckx-Rice
2016-10-28 13:49 ` Ludovic Courtès
2016-10-28 15:55   ` Tobias Geerinckx-Rice

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).