[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
34/104: utils: 'target-arm32?' & co. take an optional parameter.
From: |
guix-commits |
Subject: |
34/104: utils: 'target-arm32?' & co. take an optional parameter. |
Date: |
Sun, 17 May 2020 11:36:33 -0400 (EDT) |
nckx pushed a commit to branch core-updates
in repository guix.
commit 3d028f03c8cc258fa74b87f15a80b7b2b7da28ec
Author: Ludovic Courtès <address@hidden>
AuthorDate: Fri May 15 22:22:03 2020 +0200
utils: 'target-arm32?' & co. take an optional parameter.
* guix/utils.scm (target-arm32?, target-aarch64?)
(target-arm?, target-64bit?): Make 'target' an optional parameter.
---
guix/utils.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/guix/utils.scm b/guix/utils.scm
index 3e8e59b..d7b197f 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -490,18 +490,21 @@ a character other than '@'."
(and target
(string-suffix? "-mingw32" target)))
-(define (target-arm32?)
- (string-prefix? "arm" (or (%current-target-system) (%current-system))))
+(define* (target-arm32? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "arm" target))
-(define (target-aarch64?)
- (string-prefix? "aarch64" (or (%current-target-system) (%current-system))))
+(define* (target-aarch64? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "aarch64" target))
-(define (target-arm?)
- (or (target-arm32?) (target-aarch64?)))
+(define* (target-arm? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (or (target-arm32? target) (target-aarch64? target)))
-(define (target-64bit?)
- (let ((system (or (%current-target-system) (%current-system))))
- (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64"
"ppc64"))))
+(define* (target-64bit? #:optional (system (or (%current-target-system)
+ (%current-system))))
+ (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
(define version-compare
(let ((strverscmp
- 16/104: gnu: emacs-flycheck-grammalecte: Update to 1.2., (continued)
- 16/104: gnu: emacs-flycheck-grammalecte: Update to 1.2., guix-commits, 2020/05/17
- 18/104: gnu: ethtool: Update to 5.6., guix-commits, 2020/05/17
- 21/104: gnu: oil-shell: Rename to "oil"., guix-commits, 2020/05/17
- 26/104: gnu: kicad-footprints: Update to 5.1.6., guix-commits, 2020/05/17
- 27/104: gnu: kicad-packages3d: Update to 5.1.6., guix-commits, 2020/05/17
- 04/104: gnu: openjdk11: Simplify snippet., guix-commits, 2020/05/17
- 22/104: gnu: kicad-i18l: Fix typo in… name., guix-commits, 2020/05/17
- 23/104: gnu: kicad: Update to 5.1.6., guix-commits, 2020/05/17
- 24/104: gnu: kicad-i18n: Update to 5.1.6., guix-commits, 2020/05/17
- 28/104: gnu: kicad-templates: Update to 5.1.6., guix-commits, 2020/05/17
- 34/104: utils: 'target-arm32?' & co. take an optional parameter.,
guix-commits <=
- 30/104: gnu: python-libmpsse: Update to 1.4.1., guix-commits, 2020/05/17
- 31/104: bootloader: grub: Refer to the native 'grub-mklayout' and font file., guix-commits, 2020/05/17
- 20/104: gnu: clamav: End snippet in truth., guix-commits, 2020/05/17
- 25/104: gnu: kicad-symbols: Update to 5.1.6., guix-commits, 2020/05/17
- 32/104: gexp: Compilers can now return lowerable objects., guix-commits, 2020/05/17
- 33/104: gexp: Add 'let-system'., guix-commits, 2020/05/17
- 35/104: vm: Use 'let-system'., guix-commits, 2020/05/17
- 36/104: linux-initrd: Silence Guile warnings., guix-commits, 2020/05/17
- 37/104: services: shepherd: Silence Guile warnings., guix-commits, 2020/05/17
- 38/104: gnu: matcha-theme: Update to 2020-05-09., guix-commits, 2020/05/17