From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH] gnu: powertop: Patch absolute file names. Date: Tue, 19 Apr 2016 08:19:06 +0200 Message-ID: <87d1pmyvc5.fsf@elephly.net> References: <1461013301-13196-1-git-send-email-mthl@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asP0K-0006CY-4p for guix-devel@gnu.org; Tue, 19 Apr 2016 02:19:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asP0F-0002mv-Vq for guix-devel@gnu.org; Tue, 19 Apr 2016 02:19:20 -0400 In-reply-to: <1461013301-13196-1-git-send-email-mthl@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mathieu Lirzin Cc: guix-devel@gnu.org Mathieu Lirzin writes: > * gnu/packages/linux.scm (powertop)[inputs]: Add kmod. > [arguments]: Patch absolute file names. Before that launching powertop > was failing because 'modprobe' was not found. Looks good to me, but I have one thing to nitpick below. > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((kmod (assoc-ref inputs "kmod"))) > + (substitute* (find-files "src" ".*\\.cpp" ) > + (("/sbin/modprobe") (string-append kmod "/bin/modprobe")) > + ;; These programs are only needed to calibrate, so using > + ;; relative file names avoids adding extra inputs. When they > + ;; are missing powertop gracefully handle it. Should it not be “handles”? > + (("/usr/bin/xset") "xset") > + (("/usr/sbin/hciconfig") "hciconfig") ;XXX:not packaged yet > + (("/usr/bin/hcitool") "hcitool")) ;XXX:not packaged yet > + #t)))))) ~~ Ricardo