From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: [PATCH] gnu: powertop: Patch absolute file names. Date: Thu, 21 Apr 2016 12:14:52 +0200 Message-ID: <87lh47z2sj.fsf@gnu.org> References: <1461013301-13196-1-git-send-email-mthl@gnu.org> <20160421003400.GA18423@debian-netbook> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atBdV-0003dF-3e for guix-devel@gnu.org; Thu, 21 Apr 2016 06:15:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atBdR-0006Ri-0m for guix-devel@gnu.org; Thu, 21 Apr 2016 06:15:01 -0400 In-Reply-To: <20160421003400.GA18423@debian-netbook> (Efraim Flashner's message of "Thu, 21 Apr 2016 03:34:00 +0300") 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: Efraim Flashner Cc: guix-devel@gnu.org Efraim Flashner writes: > On Mon, Apr 18, 2016 at 11:01:41PM +0200, Mathieu Lirzin wrote: > >> + (arguments >> + '(#:phases >> + (modify-phases %standard-phases >> + ;; TODO: Patch some hardcoded "wlan0" in calibrate/calibrate.c= pp to >> + ;; allow calibrating the network interface in GuixSD. >> + (add-after 'unpack 'patch-absolute-file-names >> + (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 usi= ng >> + ;; relative file names avoids adding extra inputs. Wh= en they >> + ;; are missing powertop gracefully handle it. >> + (("/usr/bin/xset") "xset") >> + (("/usr/sbin/hciconfig") "hciconfig") ;XXX:not package= d yet >> + (("/usr/bin/hcitool") "hcitool")) ;XXX:not package= d yet > > hci* programs are part of the bluez package. According to apt-file, > debian has xset as part of x11-xserver-utils. Thank you for taking to search this. :) I don't intend to package "bluez" since I have no use of Bluetooth, and xset is already packaged in Guix. Those programs are called when doing =E2=80=98powertop --calibrat= e=E2=80=99 like this: if(!system("DISPLAY=3D:0 /usr/bin/xset dpms force off")) printf("System is not available\n"); =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 So IMO adding them as explicit inputs will not make sense since those =E2=80=98system=E2=80=99 calls are meant as feature tests. WDYT? --=20 Mathieu Lirzin