From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: Re: 07/42: gnu: guix: Cross-build fix: override compressors. Date: Sun, 26 Apr 2020 21:10:11 +0200 Message-ID: <87a72ym5bg.fsf@gnu.org> References: <20200425174447.10575.48360@vcs0.savannah.gnu.org> <20200425174501.8CF2620A5E@vcs0.savannah.gnu.org> <87368q2pgi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45494) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSmfl-0002zn-Fn for guix-devel@gnu.org; Sun, 26 Apr 2020 15:10:39 -0400 In-Reply-To: <87368q2pgi.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sun, 26 Apr 2020 18:15:25 +0200") 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-mx.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > guix-commits@gnu.org skribis: > >> commit eeb87326d891e0f88f5eebf767d97b45c3e6bbbb >> Author: Jan (janneke) Nieuwenhuizen >> AuthorDate: Fri Apr 10 21:24:19 2020 +0200 >> >> gnu: guix: Cross-build fix: override compressors. >>=20=20=20=20=20 >> * gnu/packages/package-management.scm (guix)[arguments]: When cross-= compiling, >> add `fixup-compressors' stage. >> [inputs]: When cross-compiling, add `xz'. > > Nice! > >> + (lambda* (#:key inputs #:allow-other-keys) >> + ;; Use host compressors. >> + (let ((bzip2 (assoc-ref inputs "bzip2")) >> + (gzip (assoc-ref inputs "gzip")) >> + (xz (assoc-ref inputs "xz"))) >> + (substitute* "guix/config.scm" >> + (("/gnu/store/.*/bzip2") >> + (string-append bzip2 "/bin/bzip2")) >> + (("/gnu/store/.*/gzip") gzip >> + (string-append gzip "/bin/gzip")) >> + (("/gnu/store/.*/xz") >> + (string-append xz "/bin/xz"))) > > Here=E2=80=99s a way to avoid hard-coding the store name: > > (substitute* "guix/config.scm" > (("\".*/bin/gzip\"") > (string-append "\"" gzip "/bin/gzip\"")) > =E2=80=A6) Ah, nice. Change them to (("\"[^\"]*/bin/bzip2") (string-append "\"" bzip2 "/bin/bzip2")) > Otherwise LGTM! Thanks! > Perhaps eventually we should add =E2=80=98--with-host-gzip=E2=80=99 and s= imilar > configure options. Okay, I'll give that a go later. janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com