From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: 07/42: gnu: guix: Cross-build fix: override compressors. Date: Sun, 26 Apr 2020 18:15:25 +0200 Message-ID: <87368q2pgi.fsf@gnu.org> References: <20200425174447.10575.48360@vcs0.savannah.gnu.org> <20200425174501.8CF2620A5E@vcs0.savannah.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]:43034) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSjwF-0007mo-Fc for guix-devel@gnu.org; Sun, 26 Apr 2020 12:15:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45597) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSjwF-0005ua-85 for guix-devel@gnu.org; Sun, 26 Apr 2020 12:15:27 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49152 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jSjwE-0001JT-N3 for guix-devel@gnu.org; Sun, 26 Apr 2020 12:15:27 -0400 In-Reply-To: <20200425174501.8CF2620A5E@vcs0.savannah.gnu.org> (guix-commits@gnu.org's message of "Sat, 25 Apr 2020 13:45:01 -0400 (EDT)") 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: guix-devel@gnu.org 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-c= ompiling, > 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) Otherwise LGTM! Perhaps eventually we should add =E2=80=98--with-host-gzip=E2=80=99 and sim= ilar configure options. Ludo=E2=80=99.