From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodoros Foradis Subject: Re: [PATCH 1/1] gnu: icestorm: Replace reference in icebox_vlog. Date: Mon, 16 Jan 2017 12:11:47 +0200 Message-ID: <87tw8zs49o.fsf@openmailbox.org> References: <20170114185652.29952-1-theodoros.for@openmailbox.org> <20170114185652.29952-2-theodoros.for@openmailbox.org> <20170114202524.0f056d54@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cT4OH-0003nx-MZ for guix-devel@gnu.org; Mon, 16 Jan 2017 05:19:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cT4OD-0001qr-5B for guix-devel@gnu.org; Mon, 16 Jan 2017 05:19:53 -0500 Received: from lb1.openmailbox.org ([5.79.108.160]:41265) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cT4OC-0001q8-Ts for guix-devel@gnu.org; Mon, 16 Jan 2017 05:19:49 -0500 In-reply-to: <20170114202524.0f056d54@scratchpost.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: Guix-devel --=-=-= Content-Type: text/plain Danny Milosavljevic writes: > Hi, > > thanks for the patch! > > On Sat, 14 Jan 2017 20:56:52 +0200 > Theodoros Foradis wrote: > >> * gnu/packages/fpga.scm (icestorm)[arguments]: Modify phases >> "fix-usr-local" to replace reference to /usr/local/share. >> --- >> gnu/packages/fpga.scm | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm >> index f65eae8..eb05a39 100644 >> --- a/gnu/packages/fpga.scm >> +++ b/gnu/packages/fpga.scm >> @@ -225,11 +225,12 @@ For synthesis, the compiler generates netlists in the desired format.") >> (string-append "PREFIX=" (assoc-ref %outputs "out"))) >> #:phases >> (modify-phases %standard-phases >> - (add-after 'unpack 'remove-usr-local >> - (lambda _ >> - (substitute* "iceprog/Makefile" >> + (add-after 'unpack 'fix-usr-local >> + (lambda* (#:key outputs #:allow-other-keys) > >> + (substitute* '("iceprog/Makefile" > > Patching this files changes nothing in the final result. > > The package is built in an isolated container anyway - it's not like it can access /usr/local while it's building. > > And if we did that everywhere we would have lots of substitution commands all over the place as noise - doing nothing useful, drowning out the important signal of actually useful substitutions. Therefore, I don't think we should do this. > > What do the others think? > >> "icebox/icebox_vlog.py") > > ... oops. This one I definitely agree with (the /usr/local/share one). I should have probably added a different phase for the "icebox/icebox_vlog.py" substitution, to make clear it's the only path which is a run-time reference. The installed icebox_vlog, can't find the chipdb.txt file, if we don't make the substitution. I attach the modified patch, adding a new phase instead. Regards, -- Theodoros Foradis --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-gnu-icestorm-Replace-reference-in-icebox_vlog.patch >From 5055cf57375103f2d01f286d9b2615defea20968 Mon Sep 17 00:00:00 2001 From: Theodoros Foradis Date: Sat, 14 Jan 2017 20:31:34 +0200 Subject: [PATCH v2 1/1] gnu: icestorm: Replace reference in icebox_vlog. * gnu/packages/fpga.scm (icestorm)[arguments]: Add phase "fix-usr-local" to replace reference to /usr/local/share. --- gnu/packages/fpga.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index f65eae8..0b98e2d 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -231,6 +231,11 @@ For synthesis, the compiler generates netlists in the desired format.") (("-I/usr/local/include") "") (("-L/usr/local/lib") "")) #t)) + (add-after 'remove-usr-local 'fix-usr-local + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "icebox/icebox_vlog.py" + (("/usr/local/share") (string-append (assoc-ref outputs "out") "/share"))) + #t)) (delete 'configure)))) (inputs `(("libftdi" ,libftdi))) -- 2.10.2 --=-=-=--