diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 78cfa4acd0..17745705f7 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1997,24 +1997,41 @@ (define coreutils-boot0 `(("make" ,gnu-make-boot0) ,@(%bootstrap-inputs+toolchain))) (arguments - `(#:tests? #f - #:implicit-inputs? #f - #:guile ,%bootstrap-guile - ,@(package-arguments coreutils) - ;; The %bootstrap-glibc for aarch64 and armhf doesn't have - ;; $output/include/linux/prctl.h which causes some binaries - ;; to fail to build with coreutils-9.0+. - ,@(if (target-arm?) - `(#:configure-flags '(,(string-append - "--enable-no-install-program=" - ;; the defaults to not install. - "arch,coreutils,hostname" - ;; fails due to missing headers. - ",timeout,sort") - ,@(if (target-arm32?) - `("--disable-year2038") - `()))) - '()))))) + (substitute-keyword-arguments (package-arguments coreutils) + ((#:tests? _ #t) + #f) + ((#:implicit-inputs? _ #t) + #f) + ((#:guile _ #f) + %bootstrap-guile) + ((#:configure-flags flags ''()) + ;; The %bootstrap-glibc for aarch64 and armhf doesn't have + ;; $output/include/linux/prctl.h which causes some binaries + ;; to fail to build with coreutils-9.0+. + (if (target-arm?) + `'(,(string-append "--enable-no-install-program=" + ;; the defaults to not install. + "arch,coreutils,hostname" + ;; fails due to missing headers. + ",timeout,sort") + ,@(if (target-arm32?) + `("--disable-year2038") + `())) + ''())) + ((#:phases phases '%standard-phases) + (if (target-hurd?) + `(modify-phases ,phases + (add-after 'unpack 'build-nothing-but-rm + ;; XXX: Normally we wouldn't depend on coreutils-boot0 for + ;; GNU/Hurd; unfortunately, it is used for the gcc-boot0 + ;; snippet below. Since the snippet needs nothing but 'rm', + ;; build just that (thus avoiding build errors in other + ;; programs). + (lambda _ + (substitute* "Makefile.in" + (("^bin_PROGRAMS = .*") + "bin_PROGRAMS = src/rm\n"))))) + phases)))))) (define diffutils-boot0 (package diff --git a/guix/packages.scm b/guix/packages.scm index e26602d589..0802d863b1 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -944,6 +944,13 @@ (define* (patch-and-repack source patches (locales (lookup-input "locales")) (comp (and=> (compressor source-file-name) lookup-input)) (patches (map instantiate-patch patches))) + (define fail-on-error? + #t + #;(let-system (system target) + (pk 'fail? system (->bool (or locales + target + (not (string-prefix? "-gnu" system))))))) + (define build (with-imported-modules '((guix build utils)) #~(begin @@ -986,7 +993,7 @@ (define* (patch-and-repack source patches (format port "~a~%" name)) (find-files directory #:directories? #t - #:fail-on-error? #t))))) + #:fail-on-error? #$fail-on-error?))))) (apply invoke #+(file-append tar "/bin/tar") "cvfa" output