From: "Stefan Stefanović" <stefanx2ovic@gmail.com>
To: 35345@debbugs.gnu.org
Subject: [bug#35345] [PATCH 2/2] gnu: tlp: Add required x86-energy-perf-policy input dependency.
Date: Sat, 20 Apr 2019 16:48:19 +0000 [thread overview]
Message-ID: <CAFBTj=gX01d7iKBRWhu3tw+Mao=WeoS6Sq5cDCuXX0dbragGRQ@mail.gmail.com> (raw)
In-Reply-To: <CAFBTj=gVDM1vgTye404pgLzP_rtMRd+=ebJuA1pQGwprsQ47kQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0002-gnu-tlp-Add-required-x86-energy-perf-policy-input-de.patch --]
[-- Type: text/x-patch, Size: 5041 bytes --]
From a7264289ba328478a1dab1978fe080a5b4f392c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Stefanovi=C4=87?= <stefanx2ovic@gmail.com>
Date: Sat, 20 Apr 2019 16:13:37 +0200
Subject: [PATCH 2/2] gnu: tlp: Add required x86-energy-perf-policy input
dependency.
* gnu/packages/linux.scm (tlp)
[inputs]: Add system specific x86-energy-perf-policy dependency.
[arguments]<#:phases>['wrap]:
Adjust bin-directory procedure to return #f on missing input,
a guard against system specific input dependencies.
Filter only strings in the path list. Reformat for-each block.
Add x86-energy-perf-policy in bin-directory input-name list.
---
gnu/packages/linux.scm | 56 ++++++++++++++++++++++++------------------
1 file changed, 32 insertions(+), 24 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 88905b6b74..aa0eeef1b0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4451,7 +4451,11 @@ interface in sysfs, which can be accomplished with the included udev rules.")
("sed" ,sed)
("usbutils" ,usbutils)
("util-linux" ,util-linux)
- ("wireless-tools" ,wireless-tools)))
+ ("wireless-tools" ,wireless-tools)
+ ,@(if (member (or (%current-target-system) (%current-system))
+ (package-supported-systems x86-energy-perf-policy))
+ `(("x86-energy-perf-policy" ,x86-energy-perf-policy))
+ '())))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -4488,31 +4492,35 @@ interface in sysfs, which can be accomplished with the included udev rules.")
(let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
(bin-files (find-files bin ".*")))
(define (bin-directory input-name)
- (string-append (assoc-ref inputs input-name) "/bin"))
+ (let ((p (assoc-ref inputs input-name)))
+ (and p (string-append p "/bin"))))
(define (sbin-directory input-name)
(string-append (assoc-ref inputs input-name) "/sbin"))
- (for-each (lambda (program)
- (wrap-program program
- `("PATH" ":" prefix
- ,(append
- (map bin-directory '("bash"
- "coreutils"
- "dbus"
- "eudev"
- "grep"
- "inetutils"
- "kmod"
- "perl"
- "sed"
- "usbutils"
- "util-linux"))
- (map sbin-directory '("ethtool"
- "hdparm"
- "iw"
- "pciutils"
- "rfkill"
- "wireless-tools"))))))
- bin-files)
+ (for-each
+ (lambda (program)
+ (wrap-program program
+ `("PATH" ":" prefix
+ ,(filter string?
+ (append
+ (map bin-directory '("bash"
+ "coreutils"
+ "dbus"
+ "eudev"
+ "grep"
+ "inetutils"
+ "kmod"
+ "perl"
+ "sed"
+ "usbutils"
+ "util-linux"
+ "x86-energy-perf-policy"))
+ (map sbin-directory '("ethtool"
+ "hdparm"
+ "iw"
+ "pciutils"
+ "rfkill"
+ "wireless-tools")))))))
+ bin-files)
#t))))))
(home-page "http://linrunner.de/en/tlp/tlp.html")
(synopsis "Power management tool for Linux")
--
2.21.0
next prev parent reply other threads:[~2019-04-20 17:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-20 16:26 [bug#35345] [PATCH 0/2] Add missing run-time dependency for TLP (Power management tool for Linux) Stefan Stefanović
2019-04-20 16:45 ` [bug#35345] [PATCH 1/2] gnu: Add x86-energy-perf-policy Stefan Stefanović
2019-05-27 14:35 ` Ludovic Courtès
2019-04-20 16:48 ` Stefan Stefanović [this message]
2019-05-27 14:43 ` bug#35345: [PATCH 2/2] gnu: tlp: Add required x86-energy-perf-policy input dependency Ludovic Courtès
2019-05-28 18:21 ` [bug#35345] " Stefan Stefanović
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFBTj=gX01d7iKBRWhu3tw+Mao=WeoS6Sq5cDCuXX0dbragGRQ@mail.gmail.com' \
--to=stefanx2ovic@gmail.com \
--cc=35345@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).