diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm index da6dead3c2..eb20fdd549 100644 --- a/gnu/packages/acl.scm +++ b/gnu/packages/acl.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2019 Marius Bakke -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2021 Lars-Dominik Braun ;;; ;;; This file is part of GNU Guix. @@ -28,14 +28,14 @@ (define-module (gnu packages acl) #:use-module (gnu packages attr) #:use-module (gnu packages base) #:use-module (gnu packages check) - #:use-module (gnu packages hurd) #:use-module (gnu packages gettext) #:use-module (gnu packages perl) #:use-module (guix packages) #:use-module (guix download) #:use-module (gnu packages) #:use-module (guix build-system gnu) - #:use-module (guix build-system python)) + #:use-module (guix build-system python) + #:use-module (guix utils)) (define-public acl (package @@ -55,7 +55,7 @@ (define-public acl ,@%gnu-build-system-modules) #:configure-flags '("--disable-static") #:tests? ,(not (or (%current-target-system) - (hurd-target?))) + (target-hurd?))) #:phases (modify-phases %standard-phases ;; XXX After repacking the sources the timestamps are reset to the diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 5bae16157e..529a477ed0 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -31,7 +31,7 @@ ;;; Copyright © 2019, 2021, 2022 Guillaume Le Vaillant ;;; Copyright © 2019, 2020, 2021 Mathieu Othacehe ;;; Copyright © 2020 Oleg Pykhalov -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020, 2021, 2022 Michael Rohleder ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Morgan Smith @@ -130,7 +130,6 @@ (define-module (gnu packages admin) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) - #:use-module (gnu packages hurd) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages inkscape) @@ -913,7 +912,7 @@ (define-public inetutils ,@(if (%current-target-system) '("--with-path-procnet-dev=/proc/net/dev") '()) - ,@(if (hurd-target?) + ,@(if (target-hurd?) '("--disable-rcp" "--disable-rexec" "--disable-rexecd" @@ -967,7 +966,7 @@ (define-public shadow `(;; Assume System V `setpgrp (void)', which is the default on GNU ;; variants (`AC_FUNC_SETPGRP' is not cross-compilation capable.) #:configure-flags - '(,@(if (hurd-target?) + '(,@(if (target-hurd?) '() '("--with-libpam")) "shadow_cv_logdir=/var/log" @@ -1018,7 +1017,7 @@ (define-public shadow (delete-file (string-append bin "/groups")) (for-each delete-file (find-files man "^groups\\.")))))))) (inputs - `(,@(if (hurd-target?) + `(,@(if (target-hurd?) '() `(("linux-pam" ,linux-pam))) ,@(if (%current-target-system) @@ -1527,7 +1526,7 @@ (define-public isc-dhcp (inputs `(("inetutils" ,inetutils) ("bash" ,bash-minimal) - ,@(if (hurd-target?) '() + ,@(if (target-hurd?) '() `(("net-tools" ,net-tools) ("iproute" ,iproute))) @@ -2037,7 +2036,7 @@ (define-public sudo (list groff)) (inputs `(("coreutils" ,coreutils) - ,@(if (hurd-target?) + ,@(if (target-hurd?) '() `(("linux-pam" ,linux-pam))) ("zlib" ,zlib))) diff --git a/gnu/packages/attr.scm b/gnu/packages/attr.scm index 8c1a4aca7c..cd0a997474 100644 --- a/gnu/packages/attr.scm +++ b/gnu/packages/attr.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2012, 2013, 2016, 2021 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2023 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,10 +24,10 @@ (define-module (gnu packages attr) #:use-module (guix licenses) #:use-module (gnu packages perl) #:use-module (gnu packages gettext) - #:use-module (gnu packages hurd) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix utils)) (define-public attr (package @@ -43,7 +44,7 @@ (define-public attr (arguments `(#:phases (modify-phases %standard-phases - ,@(if (hurd-target?) + ,@(if (target-hurd?) `((add-before 'configure 'skip-linux-syscalls (lambda _ ;; Starting from 2.5.1, libattr includes Linux-specific diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 39c7e5ef5f..ada9edf0e6 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2014 Alex Kost ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis ;;; Copyright © 2016, 2017, 2019-2023 Efraim Flashner -;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2016, 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2016, 2018 Alex Vong ;;; Copyright © 2017 Rene Saavedra ;;; Copyright © 2017, 2020 Mathieu Othacehe @@ -132,7 +132,7 @@ (define-public grep (string-append bin "/fgrep")) (("^exec grep") (string-append "exec " bin "/grep")))))) - ,@(if (hurd-target?) + ,@(if (target-hurd?) '((add-before 'check 'skip-triple-backref-test (lambda _ ;; This test is marked as malfunctioning on glibc systems @@ -144,7 +144,7 @@ (define-public grep (("^warn_" all) (string-append "exit 77\n" all)))))) '())) - #:make-flags ,(if (hurd-target?) + #:make-flags ,(if (target-hurd?) ''("XFAIL_TESTS=test-perror2 equiv-classes") ;XXX ''()))) (synopsis "Print lines matching a pattern") @@ -186,7 +186,7 @@ (define-public sed (modules '((guix build utils))))) (build-system gnu-build-system) (arguments - `(#:make-flags ,(if (hurd-target?) + `(#:make-flags ,(if (target-hurd?) ''("XFAIL_TESTS=test-perror2") ''()))) (synopsis "Stream editor") @@ -217,7 +217,7 @@ (define-public tar ;; Note: test suite requires ~1GiB of disk space. (arguments `(,@(cond - ((hurd-target?) + ((target-hurd?) '(#:make-flags (list (string-append "TESTSUITEFLAGS= -k '" @@ -309,7 +309,7 @@ (define-public diffutils (patches (search-patches "diffutils-fix-signal-processing.patch")))) (build-system gnu-build-system) (arguments - `(#:make-flags ,(if (hurd-target?) + `(#:make-flags ,(if (target-hurd?) ''("XFAIL_TESTS=test-perror2 large-subopt") ''()))) (native-inputs (list perl)) @@ -347,7 +347,7 @@ (define-public findutils "tests/find/exec-plus-last-file.sh") (("#!/bin/sh") (string-append "#!" (which "sh"))))))) - #:make-flags ,(if (hurd-target?) + #:make-flags ,(if (target-hurd?) ''("XFAIL_TESTS=test-strerror_r") ''()))) (synopsis "Operating on files matching given criteria") @@ -395,7 +395,7 @@ (define-public coreutils (outputs '("out" "debug")) (arguments `(#:parallel-build? #f ; help2man may be called too early - ,@(if (hurd-target?) + ,@(if (target-hurd?) '(#:make-flags ; these tests fail deterministically (list (string-append "XFAIL_TESTS=tests/misc/env-S.pl" " tests/misc/kill.sh" @@ -433,7 +433,7 @@ (define-public coreutils (("#!/bin/sh") (string-append "#!" (which "sh")))))) (add-after 'unpack 'remove-tests (lambda _ - ,@(if (hurd-target?) + ,@(if (target-hurd?) '((substitute* "Makefile.in" ;; this test hangs (("^ *tests/misc/timeout-group.sh.*") "")) @@ -511,7 +511,7 @@ (define-public gnu-make (inputs (list guile-3.0)) (outputs '("out" "debug")) (arguments - `(,@(if (hurd-target?) + `(,@(if (target-hurd?) '(#:configure-flags '("CFLAGS=-D__alloca=alloca" "ac_cv_func_posix_spawn=no")) '()) @@ -798,7 +798,7 @@ (define-public glibc ;; libc provides , which includes a bunch of Hurd and Mach headers, ;; so both should be propagated. (propagated-inputs - (if (hurd-target?) + (if (target-hurd?) `(("hurd-core-headers" ,hurd-core-headers)) `(("kernel-headers" ,linux-libre-headers)))) @@ -864,7 +864,7 @@ (define-public glibc ;; On GNU/Hurd we get discarded-qualifiers warnings for ;; 'device_write_inband' among other things. Ignore them. - ,@(if (hurd-target?) + ,@(if (target-hurd?) `("--disable-werror" ,@%glibc/hurd-configure-flags) '())) @@ -992,7 +992,7 @@ (define (linker-script? file) (map (cut string-append slib "/" <>) files)))))) - ,@(if (hurd-target?) + ,@(if (target-hurd?) '((add-after 'install 'augment-libc.so (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) @@ -1012,7 +1012,7 @@ (define (linker-script? file) ("gettext" ,gettext-minimal) ("python" ,python-minimal) - ,@(if (hurd-target?) + ,@(if (target-hurd?) `(("mig" ,mig) ("perl" ,perl)) '()))) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index bccb035854..821b8808f7 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -46,7 +46,6 @@ (define-module (gnu packages cmake) #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages file) - #:use-module (gnu packages hurd) #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages libevent) #:use-module (gnu packages ncurses) @@ -214,7 +213,7 @@ (define-public cmake-bootstrap (apply invoke "./configure" configure-flags)))))) (inputs (append - (if (hurd-target?) + (if (target-hurd?) '() (list libuv)) ;not supported on the Hurd (list bzip2 diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 7c7c11c174..669d54099d 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2014, 2015, 2017 Mark H Weaver ;;; Copyright © 2017, 2018, 2019, 2021, 2022 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; Copyright © 2018, 2019, 2020, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2018, 2019, 2020, 2021, 2022, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2019-2022 Marius Bakke ;;; Copyright © 2020, 2022 Timothy Sample ;;; Copyright © 2020 Guy Fleury Iteriteka @@ -2786,7 +2786,7 @@ (define python-boot0 "/lib/python" ,(version-major+minor version) "/test")))) - ,@(if (hurd-system?) + ,@(if (system-hurd?) `((add-before 'build 'fix-regen (lambda* (#:key inputs #:allow-other-keys) (let ((libc (assoc-ref inputs "libc"))) @@ -2841,7 +2841,7 @@ (define glibc-final-with-bootstrap-bash `(append (list ,(string-append "--host=" (boot-triplet)) ,(string-append "--build=" (nix-system->gnu-triplet)) - ,(if (hurd-system?) "--disable-werror" + ,(if (system-hurd?) "--disable-werror" "")) ,flags)) ((#:phases phases) @@ -2853,7 +2853,7 @@ (define glibc-final-with-bootstrap-bash (unsetenv "CPLUS_INCLUDE_PATH") ;; Tell 'libpthread' where to find 'libihash' on Hurd systems. - ,@(if (hurd-system?) + ,@(if (system-hurd?) '((substitute* '("sysdeps/mach/Makefile" "sysdeps/mach/hurd/Makefile") (("LDLIBS-pthread.so =.*") @@ -2873,7 +2873,7 @@ (define glibc-final-with-bootstrap-bash ,@(%boot1-inputs) ;; A native MiG is needed to build Glibc on Hurd. - ,@(if (hurd-system?) + ,@(if (system-hurd?) `(("mig" ,mig-boot0)) '()) @@ -3024,7 +3024,7 @@ (define glibc-final (,(gexp-input gcc-boot0 "lib") ,(kernel-headers-boot0) ,static-bash-for-glibc - ,@(if (hurd-system?) + ,@(if (system-hurd?) `(,gnumach-headers-boot0 ,hurd-headers-boot0) '()) diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index a8d8a86ea8..34d081dc9e 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -114,14 +114,14 @@ (define-public gdb/pinned ("libxml2" ,libxml2) ;; The Hurd needs -lshouldbeinlibc. - ,@(if (hurd-target?) + ,@(if (target-hurd?) `(("hurd" ,hurd)) '()))) (native-inputs `(("texinfo" ,texinfo) ("dejagnu" ,dejagnu) ("pkg-config" ,pkg-config) - ,@(if (hurd-target?) + ,@(if (target-hurd?) ;; When cross-compiling from x86_64-linux, make sure to use a ;; 32-bit MiG because we assume target i586-pc-gnu. `(("mig" ,(if (%current-target-system) diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm index 9387f4fb8a..114d8cf7af 100644 --- a/gnu/packages/gettext.scm +++ b/gnu/packages/gettext.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2017 Eric Bavier ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2019 Miguel -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020 EuAndreh ;;; Copyright © 2022 gemmaro ;;; Copyright © 2023 Maxim Cournoyer maxim.cournoyer@gmail.com> @@ -42,7 +42,6 @@ (define-module (gnu packages gettext) #:use-module (gnu packages check) #:use-module (gnu packages docbook) #:use-module (gnu packages emacs) - #:use-module (gnu packages hurd) #:use-module (gnu packages libunistring) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) @@ -124,7 +123,7 @@ (define-public gettext-minimal "coreutils-gnulib-tests.patch"))))) '()) - #$@(if (hurd-target?) + #$@(if (target-hurd?) #~((substitute* "gettext-tools/gnulib-tests/Makefile.in" ;; See 'coreutils' for the rationale. @@ -135,7 +134,7 @@ (define-public gettext-minimal ;; When tests fail, we want to know the details. #:make-flags #~'("VERBOSE=yes" - #$@(if (hurd-target?) + #$@(if (target-hurd?) '("XFAIL_TESTS=test-perror2") '())))) (home-page "https://www.gnu.org/software/gettext/") diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 4fea60ff11..db7be432cc 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2016, 2017, 2021 Alex Kost ;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira ;;; Copyright © 2016, 2021 Amirouche -;;; Copyright © 2016, 2019, 2021 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2016, 2019, 2021, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2017 Andy Wingo ;;; Copyright © 2017 David Thompson ;;; Copyright © 2017, 2018, 2019, 2020 Mathieu Othacehe @@ -89,7 +89,6 @@ (define-module (gnu packages guile-xyz) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages haskell-xyz) ;pandoc - #:use-module (gnu packages hurd) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages libevent) @@ -822,7 +821,7 @@ (define-public guile-fibers-1.3 gettext-minimal)) (inputs (append (list guile-3.0) ;for libguile-3.0.so - (if (hurd-target?) + (if (target-hurd?) (list libevent) '()))) (synopsis "Lightweight concurrency facility for Guile") diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 322eda1fc8..292ee10bcb 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2014, 2016, 2018 David Thompson ;;; Copyright © 2014, 2017, 2018 Mark H Weaver ;;; Copyright © 2015, 2017 Christine Lemmer-Webber -;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2016, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2016, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2017 Andy Wingo @@ -47,7 +47,6 @@ (define-module (gnu packages guile) #:use-module (gnu packages gawk) #:use-module (gnu packages gettext) #:use-module (gnu packages gperf) - #:use-module (gnu packages hurd) #:use-module (gnu packages libffi) #:use-module (gnu packages libunistring) #:use-module (gnu packages linux) @@ -202,7 +201,7 @@ (define-public guile-2.0 #:phases (modify-phases %standard-phases - ,@(if (hurd-system?) + ,@(if (system-hurd?) '((add-after 'unpack 'disable-tests (lambda _ ;; Hangs at: "Running 00-repl-server.test" @@ -345,7 +344,7 @@ (define-public guile-3.0 (not (%current-target-system))) ((#:configure-flags flags #~'()) ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd. - #~(cons* #$@(if (hurd-target?) + #~(cons* #$@(if (target-hurd?) #~("--disable-jit") #~()) ;; -fexcess-precision=standard is required when compiling for diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 34c7c00f2d..c9f77d799a 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -46,20 +46,7 @@ (define-module (gnu packages hurd) #:use-module (gnu packages texinfo) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages xorg) ; libpciaccess - #:use-module (guix git-download) - #:export (hurd-system? - hurd-target?)) - -(define (hurd-target?) - "Return true if the cross-compilation target or the current system is -GNU/Hurd." - (or (and=> (%current-target-system) target-hurd?) - (and (not (%current-target-system)) - (and=> (%current-system) target-hurd?)))) - -(define (hurd-system?) - "Return true if the current system is the Hurd." - (and=> (%current-system) target-hurd?)) + #:use-module (guix git-download)) (define (hurd-source-url version) (string-append "mirror://gnu/hurd/hurd-" diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 6bafc5697c..7b40f395f3 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2017, 2021 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019 Mark H Weaver -;;; Copyright © 2018, 2019, 2021, 2022 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2018, 2019, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2019, 2020, 2022 Marius Bakke ;;; Copyright © 2020 Mathieu Othacehe ;;; Copyright © 2021 Pierre Langlois @@ -626,7 +626,7 @@ (define* (make-guile-static guile patches) #~("AR=gcc-ar" "RANLIB=gcc-ranlib") #~()) - #$@(if (hurd-target?) + #$@(if (target-hurd?) #~("--disable-jit") #~()))) ((#:phases phases '%standard-phases) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 3a5ba3420c..e3dba508f0 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2019-2023 Efraim Flashner ;;; Copyright © 2019 Jonathan Brielmaier ;;; Copyright © 2020 Mathieu Othacehe -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020 Giacomo Leidi ;;; Copyright © 2020 Jesse Gibbons ;;; Copyright © 2020 Martin Becze @@ -216,7 +216,7 @@ (define-public guix ;; choose a fixed-width and short directory name ;; for tests. "ac_cv_guix_test_root=/tmp/guix-tests" - ,@(if (hurd-target?) '("--with-courage") '())) + ,@(if (target-hurd?) '("--with-courage") '())) #:parallel-tests? #f ;work around #:modules ((guix build gnu-build-system) @@ -416,7 +416,7 @@ (define code ;; cross-compilation. ("guile" ,guile-3.0-latest) ;for faster builds ("guile-gnutls" ,guile-gnutls) - ,@(if (hurd-target?) + ,@(if (target-hurd?) '() `(("guile-avahi" ,guile-avahi))) ("guile-gcrypt" ,guile-gcrypt) @@ -476,7 +476,7 @@ (define code (propagated-inputs `(("guile-gnutls" ,guile-gnutls) ;; Avahi requires "glib" which doesn't cross-compile yet. - ,@(if (hurd-target?) + ,@(if (target-hurd?) '() `(("guile-avahi" ,guile-avahi))) ("guile-gcrypt" ,guile-gcrypt) @@ -1442,7 +1442,7 @@ (define-public guix-build-coordinator "guile-zlib" "guile-sqlite3" "guile-gnutls" - ,@(if (hurd-target?) + ,@(if (target-hurd?) '() '("guile-fibers"))))) (wrap-program file diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index 741dcdf787..140bbd0e90 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Mathieu Othacehe -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2022 Brendan Tildesley ;;; Copyright © 2022 Marius Bakke ;;; @@ -33,7 +33,6 @@ (define-module (gnu packages pciutils) #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages hurd) #:use-module (gnu packages linux) #:use-module (gnu packages base)) @@ -162,7 +161,7 @@ (define-public pciutils (native-inputs (list `(,hwdata "pci") pkg-config which)) (inputs - `(,@(if (not (hurd-target?)) + `(,@(if (not (target-hurd?)) `(("kmod" ,kmod)) '()) ("zlib" ,zlib))) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index bfe8a68352..302f995b0f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -56,7 +56,7 @@ ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian ;;; Copyright © 2019 Tanguy Le Carrour -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020, 2021 Greg Hogan ;;; Copyright © 2022 Philip McGrath ;;; Copyright © 2022 jgart @@ -85,7 +85,6 @@ (define-module (gnu packages python) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages dbm) - #:use-module (gnu packages hurd) #:use-module (gnu packages libffi) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python-build) @@ -245,7 +244,7 @@ (define-public python-2.7 "Lib/test/support/__init__.py" "Lib/test/test_subprocess.py")) (("/bin/sh") (which "sh"))))) - ,@(if (hurd-system?) + ,@(if (system-hurd?) `((add-before 'build 'patch-regen-for-hurd (lambda* (#:key inputs #:allow-other-keys) (let ((libc (assoc-ref inputs "libc"))) @@ -458,7 +457,7 @@ (define-public python-3.10 (format #f "TESTOPTS=-j~d" (parallel-job-count)) ;; test_mmap fails on low-memory systems " --exclude test_mmap test_socket" - ,@(if (hurd-target?) + ,@(if (target-hurd?) '(" test_posix" ;multiple errors " test_time" " test_pty" @@ -492,7 +491,7 @@ (define-public python-3.10 '())))) ((#:phases phases) `(modify-phases ,phases - ,@(if (hurd-system?) + ,@(if (system-hurd?) `((delete 'patch-regen-for-hurd)) ;regen was removed after 3.5.9 '()) (add-after 'unpack 'remove-windows-binaries diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index 71926c6795..b973efc291 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2018 Manuel Graf ;;; Copyright © 2019 Gábor Boskovits ;;; Copyright © 2019, 2020 Mathieu Othacehe -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020 Oleg Pykhalov ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2021 Brice Waegeneire @@ -49,7 +49,6 @@ (define-module (gnu packages ssh) #:use-module (gnu packages gperf) #:use-module (gnu packages groff) #:use-module (gnu packages guile) - #:use-module (gnu packages hurd) #:use-module (gnu packages libedit) #:use-module (gnu packages linux) #:use-module (gnu packages logging) @@ -213,7 +212,7 @@ (define-public openssh (native-inputs (list groff pkg-config)) (inputs `(("libedit" ,libedit) ("openssl" ,openssl) - ,@(if (hurd-target?) + ,@(if (target-hurd?) '() `(("pam" ,linux-pam) ("libfido2" ,libfido2))) ;fails to build on GNU/Hurd @@ -239,7 +238,7 @@ (define-public openssh "--with-libedit" ;; Enable PAM support in sshd. - ,,@(if (hurd-target?) + ,,@(if (target-hurd?) '() '("--with-pam" diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 3296c468c1..f45ae06810 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2019 Pierre-Moana Levesque ;;; Copyright © 2019, 2020 Mathieu Othacehe ;;; Copyright © 2020 Nicolas Goaziou -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2022 ( ;;; @@ -40,7 +40,6 @@ (define-module (gnu packages texinfo) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages gettext) - #:use-module ((gnu packages hurd) #:select (hurd-target?)) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages perl-compression) @@ -77,7 +76,7 @@ (define-public texinfo %standard-phases) ;; XXX: Work around . - #:tests? ,(and (not (hurd-target?)) + #:tests? ,(and (not (target-hurd?)) (not (%current-target-system))))) (inputs (list ncurses perl)) ;; When cross-compiling, texinfo will build some of its own binaries with diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index d162094ed4..140932a809 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -14,7 +14,7 @@ ;;; Copyright © 2017 Rutger Helling ;;; Copyright © 2018 Clément Lassieur ;;; Copyright © 2019 Mathieu Othacehe -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020, 2021, 2023 Maxim Cournoyer ;;; Copyright © 2021 Solene Rapenne ;;; Copyright © 2021 Brice Waegeneire @@ -65,7 +65,6 @@ (define-module (gnu packages tls) #:use-module (gnu packages gawk) #:use-module (gnu packages gettext) #:use-module (gnu packages guile) - #:use-module (gnu packages hurd) #:use-module (gnu packages libbsd) #:use-module (gnu packages libffi) #:use-module (gnu packages libidn) @@ -153,12 +152,12 @@ (define-public p11-kit (build-system gnu-build-system) (native-inputs (append (list pkg-config) - (if (hurd-target?) + (if (target-hurd?) (list autoconf automake gettext-minimal libtool) '()))) (inputs (append (list libffi libtasn1) - (if (hurd-target?) + (if (target-hurd?) (list libbsd) '()))) (arguments @@ -167,7 +166,7 @@ (define-public p11-kit ;; find them. See . #~'("--with-trust-paths=/etc/ssl/certs/ca-certificates.crt") #:phases #~(modify-phases %standard-phases - #$@(if (hurd-target?) + #$@(if (target-hurd?) #~((add-after 'unpack 'apply-hurd-patch (lambda* (#:key inputs #:allow-other-keys) (define patch @@ -216,9 +215,9 @@ (define-public gnutls (build-system gnu-build-system) (arguments (list #:tests? (not (or (%current-target-system) - (hurd-target?))) + (target-hurd?))) ;; Ensure we don't keep a reference to the tools used for testing. - #:disallowed-references (if (hurd-target?) + #:disallowed-references (if (target-hurd?) '() (list net-tools iproute socat)) #:configure-flags @@ -276,7 +275,7 @@ (define-public gnutls (native-inputs (append (list pkg-config texinfo which util-linux) ;one test needs 'setsid' - (if (hurd-target?) + (if (target-hurd?) '() (list net-tools iproute ;for 'ss' diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index daa569263b..f5b6c8cd2f 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -40,7 +40,7 @@ ;;; Copyright © 2019, 2020 Florian Pelz ;;; Copyright © 2020 Timotej Lazar ;;; Copyright © 2020 Pierre Neidhardt -;;; Copyright © 2020, 2021 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2021, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2018, 2019, 2020 Björn Höfling ;;; Copyright © 2020, 2021 Paul Garlick ;;; Copyright © 2020, 2022 Michael Rohleder @@ -142,7 +142,6 @@ (define-module (gnu packages web) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) - #:use-module (gnu packages hurd) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages java) @@ -7785,7 +7784,7 @@ (define-public nghttp2 (inputs ;; Required to build the tools (i.e. without ‘--enable-lib-only’). (append - (if (hurd-target?) + (if (target-hurd?) `((,openssl "static")) (list jemalloc)) ; fight nghttpd{,x} heap fragmentation (list c-ares diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 558d1ee9e3..387605ec4f 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -57,7 +57,7 @@ (define-module (gnu system hurd) ;;; Code: (define %hurd-default-operating-system-kernel - (if (hurd-system?) + (if (system-hurd?) gnumach ;; A cross-built GNUmach does not work (with-parameters ((%current-system "i686-linux") diff --git a/guix/utils.scm b/guix/utils.scm index b9657df292..e9af33bdeb 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2022 Denis 'GNUtoo' Carikli ;;; Copyright © 2022 Antero Mejr ;;; Copyright © 2023 Philip McGrath +;;; Copyright © 2023 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -89,6 +90,7 @@ (define-module (guix utils) package-name->name+version target-linux? target-hurd? + system-hurd? target-mingw? target-x86-32? target-x86-64? @@ -674,6 +676,10 @@ (define* (target-hurd? #:optional (target (or (%current-target-system) (and (string-suffix? "-gnu" target) (not (string-contains target "linux")))) +(define* (system-hurd?) + "Is the current system the GNU(/Hurd) system?" + (and=> (%current-system) target-hurd?)) + (define* (target-mingw? #:optional (target (%current-target-system))) "Is the operating system of TARGET Windows?" (and target