diff options
author | Maxime Devos <maximedevos@telenet.be> | 2021-07-14 13:12:47 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-07-14 15:38:03 +0200 |
commit | 637a1e7dcce4d1a2c4f2f9c478df4a640ae1f230 (patch) | |
tree | 9448c036d0a0021b134f4e60210d0900b70c524f /guix/utils.scm | |
parent | ef71965c162ff19c7b4b85889b0330d7c428dda5 (diff) | |
download | guix-patches-637a1e7dcce4d1a2c4f2f9c478df4a640ae1f230.tar guix-patches-637a1e7dcce4d1a2c4f2f9c478df4a640ae1f230.tar.gz |
utils: Define 'target-hurd?' predicate.
It behaves similarily to the other target-...? procedures.
The usage of hurd-triplet? / target-hurd? in libgc appears
incorrect to me, as (%current-system) is normally never false.
* gnu/packages/hurd.scm (hurd-triplet?): Move to ...
* guix/util.scm (target-hurd?): ... here, let its argument
default to (%current-target-system) or (%current-system),
and write a docstring.
* gnu/packages/hurd.scm
(hurd-target?, hurd-system?): Use target-hurd? instead of
hurd-triplet?.
* gnu/packages/bdw-gc.scm (libgc): Likewise.
* gnu/packages/cross-base.scm
(cross-libc)[arguments]<#:configure-flags>: Likewise.
(cross-libc)[arguments]<#:phases>: Likewise.
(cross-libc)[arguments]<#:native-inputs>: Likewise.
* gnu/packages/make-boostrap.scm
(%glibc-stripped)[inputs]: Likewise.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'guix/utils.scm')
-rw-r--r-- | guix/utils.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 1ac17b3657..8ae912c48b 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -85,6 +85,7 @@ %current-target-system package-name->name+version target-linux? + target-hurd? target-mingw? target-arm32? target-aarch64? @@ -639,6 +640,12 @@ a character other than '@'." "Does the operating system of TARGET use the Linux kernel?" (->bool (string-contains target "linux"))) +(define* (target-hurd? #:optional (target (or (%current-target-system) + (%current-system)))) + "Does TARGET represent the GNU(/Hurd) system?" + (and (string-suffix? "-gnu" target) + (not (string-contains target "linux")))) + (define* (target-mingw? #:optional (target (%current-target-system))) (and target (string-suffix? "-mingw32" target))) |