diff mbox series

[bug#35345,1/2] gnu: Add x86-energy-perf-policy

Message ID CAFBTj=iu46UzSpFc-6rM4+oKp4Yn4uwuGtC-1FbOZbuT9RUnzw@mail.gmail.com
State Accepted
Headers show
Series Add missing run-time dependency for TLP (Power management tool for Linux). | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Stefan Stefanović April 20, 2019, 4:45 p.m. UTC

Comments

Ludovic Courtès May 27, 2019, 2:35 p.m. UTC | #1
Hi Stefan,

Stefan Stefanović <stefanx2ovic@gmail.com> skribis:

> From 79d021f7bd686159ad9cf4dd2f94c360b2a21ae4 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Stefan=20Stefanovi=C4=87?= <stefanx2ovic@gmail.com>
> Date: Sat, 20 Apr 2019 15:37:13 +0200
> Subject: [PATCH 1/2] gnu: Add x86-energy-perf-policy.
>
> * gnu/packages/linux.scm (cpupower): New variable.

I fixed up indentation, added a copyright line for you, and committed.

Thanks,
Ludo’.
diff mbox series

Patch

From 79d021f7bd686159ad9cf4dd2f94c360b2a21ae4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Stefanovi=C4=87?= <stefanx2ovic@gmail.com>
Date: Sat, 20 Apr 2019 15:37:13 +0200
Subject: [PATCH 1/2] gnu: Add x86-energy-perf-policy.

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

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index b562a23b2f..88905b6b74 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -3889,6 +3889,40 @@  Linux kernel to retrieve and control processor features related to power saving,
 such as frequency and voltage scaling.")
     (license license:gpl2)))
 
+(define-public x86-energy-perf-policy
+  (package
+   (name "x86-energy-perf-policy")
+   (version (package-version linux-libre))
+   (source (package-source linux-libre))
+   (build-system gnu-build-system)
+   (arguments
+    '(#:tests? #f
+      #:phases
+      (modify-phases
+       %standard-phases
+       (add-after 'unpack 'enter-subdirectory
+                  (lambda _
+                    (chdir "tools/power/x86/x86_energy_perf_policy")
+                    #t))
+       (delete 'configure)
+       (add-before 'build 'fix-makefile
+                   (lambda _
+                     (substitute* "Makefile" (("/usr") ""))
+                     #t)))
+      #:make-flags
+      (let ((out (assoc-ref %outputs "out")))
+        (list (string-append "DESTDIR=" out)
+              (string-append "LDFLAGS=-Wl,-rpath=" out "/lib")))))
+   (supported-systems '("i686-linux" "x86_64-linux"))
+   (home-page (package-home-page linux-libre))
+   (synopsis "Display and update Intel-CPU energy-performance policy")
+   (description
+    "@command{x86_energy_perf_policy} displays and updates
+energy-performance policy settings specific to Intel Architecture Processors.
+Settings are accessed via Model Specific Register (MSR) updates,
+no matter if the Linux cpufreq sub-system is enabled or not.")
+   (license license:gpl2)))
+
 (define-public haveged
   (package
     (name "haveged")
-- 
2.21.0