diff mbox series

[bug#49584] gnu: Add powercap.

Message ID BYAPR05MB4023AAEDE6FBAE1A05A47711C5129@BYAPR05MB4023.namprd05.prod.outlook.com
State Accepted
Headers show
Series [bug#49584] gnu: Add powercap. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Morgan Smith July 15, 2021, 9:27 p.m. UTC
From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/linux.scm (powercap): New variable.
---
 gnu/packages/linux.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Efraim Flashner July 19, 2021, 1:29 p.m. UTC | #1
After reading the synopsis and description and then seeing it again on
their repo's README I went and borrowed the ones from Debian, which I
found clearer.

Patch pushed!
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 41902e7785..295e456488 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1651,6 +1651,34 @@  at login.  Local and dynamic reconfiguration are its key features.")
 ;;; Miscellaneous.
 ;;;
 
+(define-public powercap
+  (package
+    (name "powercap")
+    (version "0.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/powercap/powercap")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1hp2i1d195v0n4jgvgaymkxlpgyhn07ic273gkda95lz65cdfcgm"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:configure-flags
+       '("-DBUILD_SHARED_LIBS=On" "-DCMAKE_BUILD_TYPE=Release")))
+    (home-page "https://github.com/powercap/powercap")
+    (synopsis "C interface to the Linux power capping framework
+(sysfs interface)")
+    (description "C interface to the Linux power capping framework (sysfs
+interface).  It includes an implementation for working with Intel Running
+Average Power Limit (RAPL).
+
+It provides the commands powercap-info and powercap-set.")
+    (license license:bsd-3)))
+
 (define-public powerstat
   (package
     (name "powerstat")