[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49672] [PATCH 6/9] gnu: Fix GNU/Linux system detection
From: |
Thiago Jung Bauermann |
Subject: |
[bug#49672] [PATCH 6/9] gnu: Fix GNU/Linux system detection |
Date: |
Tue, 20 Jul 2021 22:00:40 -0300 |
The current code isn’t strictly correct because the GNU triplet in
‘%current-target-system’ could end in “linux-gnu”. Instead, check whether
either of the system identifiers contain the string “-linux”.
* gnu/packages/messaging.scm (ngircd)[inputs]: Use ‘string-contains’.
[arguments]<#:configure-flags>: Likewise.
* gnu/packages/ntp.scm (ntp)[inputs]: Likewise
---
gnu/packages/messaging.scm | 12 ++++++------
gnu/packages/ntp.scm | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index e5ecdb889441..f18de2a1295d 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -781,17 +781,17 @@ dictionaries. HexChat can be extended with multiple
addons.")
(inputs `(("zlib" ,zlib)
("libwrap" ,tcp-wrappers)
("gnutls" ,gnutls)
- ,@(if (string-suffix? "-linux"
- (or (%current-target-system)
- (%current-system)))
+ ,@(if (string-contains (or (%current-target-system)
+ (%current-system))
+ "-linux")
`(("linux-pam" ,linux-pam))
'())))
(arguments
`(#:configure-flags
'("--with-gnutls" "--with-iconv" "--enable-ipv6" "--with-tcp-wrappers"
- ,@(if (string-suffix? "-linux"
- (or (%current-target-system)
- (%current-system)))
+ ,@(if (string-contains (or (%current-target-system)
+ (%current-system))
+ "-linux")
'("--with-pam")
'()))
#:phases
diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 191eedd15875..de501199596c 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -154,8 +154,8 @@ time-stamping or reference clock, sub-microsecond accuracy
is possible.")
("libevent" ,libevent)
;; Build with POSIX capabilities support on GNU/Linux. This allows
'ntpd'
;; to run as non-root (when invoked with '-u'.)
- ,@(if (string-suffix? "-linux"
- (or (%current-target-system) (%current-system)))
+ ,@(if (string-contains (or (%current-target-system) (%current-system))
+ "-linux")
`(("libcap" ,libcap))
'())))
(arguments
- [bug#49672] [PATCH 0/9] Target check fixes and cleanups, Thiago Jung Bauermann, 2021/07/20
- [bug#49672] [PATCH 1/9] gnu: Fix check of ‘%current-system’ and ‘%current-target-system’, Thiago Jung Bauermann, 2021/07/20
- [bug#49672] [PATCH 2/9] utils: Add ‘current-target-nix-system’ helper, Thiago Jung Bauermann, 2021/07/20
- [bug#49672] [PATCH 3/9] gnu: Query membership in ‘supported-systems’ list with Nix identifier, Thiago Jung Bauermann, 2021/07/20
- [bug#49672] [PATCH 7/9] bootloader: grub: Fix mix of GNU triplet and Nix system identifier, Thiago Jung Bauermann, 2021/07/20
- [bug#49672] [PATCH 4/9] gnu: Use ‘current-target-nix-system’ in pattern matches, Thiago Jung Bauermann, 2021/07/20
- [bug#49672] [PATCH 5/9] gnu: Use ‘current-target-nix-system’ in prefix checks, Thiago Jung Bauermann, 2021/07/20
- [bug#49672] [PATCH 6/9] gnu: Fix GNU/Linux system detection,
Thiago Jung Bauermann <=
- [bug#49672] [PATCH 8/9] gnu: ustr: Don’t pass default argument, Thiago Jung Bauermann, 2021/07/20
- [bug#49672] [PATCH 9/9] gnu: Use existing target helpers from ‘(guix utils)’, Thiago Jung Bauermann, 2021/07/20