From patchwork Sat Apr 20 16:48:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Stefanovi=C4=87?= X-Patchwork-Id: 11840 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5EC8716ED2; Sat, 20 Apr 2019 18:34:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id D9CDB16E94 for ; Sat, 20 Apr 2019 18:34:48 +0100 (BST) Received: from localhost ([127.0.0.1]:43736 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHtt2-0004Es-GE for patchwork@mira.cbaines.net; Sat, 20 Apr 2019 13:34:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHtPn-0005Q6-Vo for guix-patches@gnu.org; Sat, 20 Apr 2019 13:04:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHtAk-0007BP-Lu for guix-patches@gnu.org; Sat, 20 Apr 2019 12:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHtAk-0007Az-HU for guix-patches@gnu.org; Sat, 20 Apr 2019 12:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hHtAk-0000az-FC for guix-patches@gnu.org; Sat, 20 Apr 2019 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35345] [PATCH 2/2] gnu: tlp: Add required x86-energy-perf-policy input dependency. References: In-Reply-To: Resent-From: Stefan =?utf-8?q?Stefanovi=C4=87?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Apr 2019 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35345 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35345@debbugs.gnu.org Received: via spool by 35345-submit@debbugs.gnu.org id=B35345.15557789082249 (code B ref 35345); Sat, 20 Apr 2019 16:49:02 +0000 Received: (at 35345) by debbugs.gnu.org; 20 Apr 2019 16:48:28 +0000 Received: from localhost ([127.0.0.1]:46686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHtAC-0000aB-IP for submit@debbugs.gnu.org; Sat, 20 Apr 2019 12:48:28 -0400 Received: from mail-ot1-f51.google.com ([209.85.210.51]:33998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHtAA-0000Zy-7m for 35345@debbugs.gnu.org; Sat, 20 Apr 2019 12:48:27 -0400 Received: by mail-ot1-f51.google.com with SMTP id k21so6549497otf.1 for <35345@debbugs.gnu.org>; Sat, 20 Apr 2019 09:48:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=vUnKI6GRr+n49Yu2cF2sj0X2NdrYcd2r2uqByE7NUrQ=; b=OXvTJUJlP6OqU2xoSA87hkl+z6BA7+IJ62eqHjxu0OFHge7Vz7GKtRpciY+5DsORmv HSPxxVck4kb4pgwjZCUISC/f6+k6nCvENwBebpkNvec1CX1CrCHTqWo0fwuGin0zN+0Z XTw2Sa/hVDeRx9aqCdyO0mZnAYTQ+Uwp/uKDUcNAOZJC/Wbfnl1vYc3AsK34ym6u3uif pTvH8HoZUsJ2vi4+2u7dLcmLmBco5j7tkxQTJAwUP30IsYTv5nliaBjwEz4Rr1E9P6YK ts7TUjUy9vnxmvKSG4db2MHScELrjPGCRig9BtZ/WAvSNU8nm0cQiJriB2xqzCDbwobP Dv5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vUnKI6GRr+n49Yu2cF2sj0X2NdrYcd2r2uqByE7NUrQ=; b=NtMtbfZkMtcyeaEnK5yerIuXcGojGorxpcPUk3ffeoRfQwo7lihXZhcQWIZNO7qFke Q7ak7lmlO6NxFgngzYXi7okPH63VmXoxEp2TK0Lwj/jQeigA5d6xRc40TJKygtADJdVh /nSRJUTpmwkFYLcIchKNSZLtqG+lFD73bWLXSJgpyff8p4ikSjCgIyBlh8zex7kOedem yfhjO6StGZAwh8Ieoz9x01MXeImK2Q1wOIF/FSUw27pR7vcTwNqE86BnrAwcMQfC4AJT E+fPIbvJQGv+SGGNhnNid8yUkjf+/3+R8BW1eWVXujg1wklXe4JmjmQScU7otmk15Lqi JU5Q== X-Gm-Message-State: APjAAAX2iJEHCfbrFzn/liHsSuuI1SkeACBmiiWXiHCgPoT5VYZJwzbZ 4h9pORhBEUfSbnFzlessi4CM819WsjFXAu1U6wuVag== X-Google-Smtp-Source: APXvYqw24Wrjib0ARgvArfruUwwReHrVehYYLJgQh4KPqxSzPL8vrtEGUvfIWbBD8/mHPEm3qogNWLyHua4ZjzDZFxk= X-Received: by 2002:a9d:4909:: with SMTP id e9mr6117342otf.160.1555778900510; Sat, 20 Apr 2019 09:48:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:a849:0:0:0:0:0 with HTTP; Sat, 20 Apr 2019 09:48:19 -0700 (PDT) From: Stefan =?utf-8?q?Stefanovi=C4=87?= Date: Sat, 20 Apr 2019 16:48:19 +0000 Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-Mailman-Approved-At: Sat, 20 Apr 2019 13:34:20 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From a7264289ba328478a1dab1978fe080a5b4f392c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Stefanovi=C4=87?= 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