guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 07/42: gnu: guix: Cross-build fix: override compressors.


From: Jan Nieuwenhuizen
Subject: Re: 07/42: gnu: guix: Cross-build fix: override compressors.
Date: Sun, 26 Apr 2020 21:10:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Ludovic Courtès writes:

> address@hidden skribis:
>
>> commit eeb87326d891e0f88f5eebf767d97b45c3e6bbbb
>> Author: Jan (janneke) Nieuwenhuizen <address@hidden>
>> 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 <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]