unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: 07/42: gnu: guix: Cross-build fix: override compressors.
Date: Sun, 26 Apr 2020 21:10:11 +0200	[thread overview]
Message-ID: <87a72ym5bg.fsf@gnu.org> (raw)
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")

Ludovic Courtès writes:

> guix-commits@gnu.org skribis:
>
>> commit eeb87326d891e0f88f5eebf767d97b45c3e6bbbb
>> Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
>> AuthorDate: Fri Apr 10 21:24:19 2020 +0200
>>
>>     gnu: guix: Cross-build fix: override compressors.
>>     
>>     * 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’s a way to avoid hard-coding the store name:
>
>   (substitute* "guix/config.scm"
>     (("\".*/bin/gzip\"")
>      (string-append "\"" gzip "/bin/gzip\""))
>     …)

Ah, nice.  Change them to

   (("\"[^\"]*/bin/bzip2")
     (string-append "\"" bzip2 "/bin/bzip2"))

> Otherwise LGTM!

Thanks!

> Perhaps eventually we should add ‘--with-host-gzip’ and similar
> configure options.

Okay, I'll give that a go later.
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

  reply	other threads:[~2020-04-26 19:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200425174447.10575.48360@vcs0.savannah.gnu.org>
     [not found] ` <20200425174501.C9B1A20A5E@vcs0.savannah.gnu.org>
2020-04-26 16:11   ` 08/42: gnu: guix: Update to eeb87326d8 Ludovic Courtès
2020-04-26 19:12     ` Jan Nieuwenhuizen
     [not found] ` <20200425174500.B268120A5E@vcs0.savannah.gnu.org>
2020-04-26 16:12   ` 04/42: gnu: guix: Cross-build workaround: Run native guile for version Ludovic Courtès
2020-04-26 19:09     ` Jan Nieuwenhuizen
     [not found] ` <20200425174501.8CF2620A5E@vcs0.savannah.gnu.org>
2020-04-26 16:15   ` 07/42: gnu: guix: Cross-build fix: override compressors Ludovic Courtès
2020-04-26 19:10     ` Jan Nieuwenhuizen [this message]
2020-04-26 19:10     ` Jan Nieuwenhuizen
     [not found] ` <20200425174503.85FCE20A5E@vcs0.savannah.gnu.org>
2020-04-26 16:16   ` 14/42: gnu: Add netdde Ludovic Courtès
2020-04-26 19:12     ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a72ym5bg.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).