Ludovic Courtès writes: > guix-comm...@gnu.org skribis: > >> commit eeb87326d891e0f88f5eebf767d97b45c3e6bbbb >> Author: Jan (janneke) Nieuwenhuizen <jann...@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 <jann...@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com