all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: guix-devel@gnu.org
Subject: Re: 07/42: gnu: guix: Cross-build fix: override compressors.
Date: Sun, 26 Apr 2020 18:15:25 +0200	[thread overview]
Message-ID: <87368q2pgi.fsf@gnu.org> (raw)
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)")

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\""))
    …)

Otherwise LGTM!

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

Ludo’.

  parent reply	other threads:[~2020-04-26 16:15 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   ` Ludovic Courtès [this message]
2020-04-26 19:10     ` 07/42: gnu: guix: Cross-build fix: override compressors Jan Nieuwenhuizen
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

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

  git send-email \
    --in-reply-to=87368q2pgi.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.