[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 07/42: gnu: guix: Cross-build fix: override compressors.
From: |
Ludovic Courtès |
Subject: |
Re: 07/42: gnu: guix: Cross-build fix: override compressors. |
Date: |
Sun, 26 Apr 2020 18:15:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
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\""))
…)
Otherwise LGTM!
Perhaps eventually we should add ‘--with-host-gzip’ and similar
configure options.
Ludo’.
- Re: 07/42: gnu: guix: Cross-build fix: override compressors.,
Ludovic Courtès <=