@@ -1021,11 +1021,11 @@ (define-public libpasastro
`(#:tests? #f
#:make-flags
(list
- ,(match (or (%current-target-system) (%current-system))
+ ,(match (current-target-nix-system)
((or "aarch64-linux" "armhf-linux" "i686-linux" "x86_64-linux")
"OS_TARGET=linux")
(_ #f))
- ,(match (or (%current-target-system) (%current-system))
+ ,(match (current-target-nix-system)
("i686-linux" "CPU_TARGET=i386")
("x86_64-linux" "CPU_TARGET=x86_64")
((or "armhf-linux" "aarch64-linux") "CPU_TARGET=armv7l")
@@ -640,9 +640,7 @@ (define-public u-boot-tools
(invoke "test/image/test-imagetools.sh")))
;; Only run full test suite on x86_64 systems, as many tests
;; assume x86_64.
- ,@(if (string-match "^x86_64-linux"
- (or (%current-target-system)
- (%current-system)))
+ ,@(if (string-match "^x86_64-linux" (current-target-nix-system))
'((add-after 'check 'check-x86
(lambda* (#:key make-flags test-target #:allow-other-keys)
(apply invoke "make" "mrproper" make-flags)
@@ -90,8 +90,7 @@ (define-public tcc
(assoc-ref %build-inputs "libc")
"/lib")
,@(if (string-prefix? "armhf-linux"
- (or (%current-target-system)
- (%current-system)))
+ (current-target-nix-system))
`("--triplet=arm-linux-gnueabihf")
'()))
#:test-target "test"))
@@ -1449,16 +1449,14 @@ (define-public zpaq
#:make-flags
(list
(string-append "CPPFLAGS=-Dunix"
- ,(match (or (%current-target-system)
- (%current-system))
+ ,(match (current-target-nix-system)
("x86_64-linux" "")
("i686-linux" "")
(_ " -DNOJIT")))
;; These should be safe, lowest-common-denominator instruction sets,
;; allowing for some optimisation while remaining reproducible.
(string-append "CXXFLAGS=-O3 -DNDEBUG"
- ,(match (or (%current-target-system)
- (%current-system))
+ ,(match (current-target-nix-system)
("x86_64-linux" " -march=nocona -mtune=generic")
("i686-linux" " -march=i686 -mtune=generic")
("armhf-linux" " -mtune=generic-armv7-a")
@@ -228,8 +228,7 @@ (define-public c-vise
(license license:ncsa)))
(define-public american-fuzzy-lop
- (let ((machine (match (or (%current-target-system)
- (%current-system))
+ (let ((machine (match (current-target-nix-system)
("x86_64-linux" "x86_64")
("i686-linux" "i386")
("aarch64-linux" "aarch64")
@@ -304,8 +303,7 @@ (define-public american-fuzzy-lop
(define-public qemu-for-american-fuzzy-lop
;; afl only supports using a single afl-qemu-trace executable, so
;; we only build qemu for the native target.
- (let ((machine (match (or (%current-target-system)
- (%current-system))
+ (let ((machine (match (current-target-nix-system)
("x86_64-linux" "x86_64")
("i686-linux" "i386")
("aarch64-linux" "aarch64")
@@ -82,8 +82,7 @@ (define-public xxhash
(arguments
(list #:make-flags
#~(list #$(string-append "CC=" (cc-for-target))
- #$(match (or (%current-target-system)
- (%current-system))
+ #$(match (current-target-nix-system)
;; Detect vector instruction set at run time.
((or "i686-linux" "x86_64-linux") "DISPATCH=1")
(_ "DISPATCH=0"))
@@ -114,8 +114,7 @@ (define-public go-1.4
(guix build utils)
(srfi srfi-1))
#:tests? #f ; Tests are run by the all.bash script.
- ,@(if (string-prefix? "aarch64-linux" (or (%current-system)
- (%current-target-system)))
+ ,@(if (string-prefix? "aarch64-linux" (current-target-nix-system))
'(#:system "armhf-linux")
'())
#:phases
@@ -264,8 +263,7 @@ (define-public go-1.14
(arguments
(substitute-keyword-arguments (package-arguments go-1.4)
((#:system system)
- (if (string-prefix? "aarch64-linux" (or (%current-system)
- (%current-target-system)))
+ (if (string-prefix? "aarch64-linux" (current-target-nix-system))
"aarch64-linux"
system))
((#:phases phases)
@@ -3483,7 +3483,7 @@ (define-public java-swt
(file32 "x86")
(file64 "x86_64"))
(let-values (((hash file)
- (match (or (%current-target-system) (%current-system))
+ (match (current-target-nix-system)
("x86_64-linux" (values hash64 file64))
(_ (values hash32 file32)))))
(origin
@@ -12092,7 +12092,7 @@ (define-public java-jansi
(lambda _
(let ((dir (string-append "build/classes/org/fusesource/"
"jansi/internal/native/"
- ,(match (or (%current-target-system) (%current-system))
+ ,(match (current-target-nix-system)
("i686-linux" "Linux/x86")
("x86_64-linux" "Linux/x86_64")
("armhf-linux" "Linux/armv7")
@@ -452,8 +452,7 @@ (define-public julia
;; Passing the MARCH or JULIA_CPU_TARGET flag is necessary to build
;; binary substitutes for the supported architectures. See also
;; https://docs.julialang.org/en/v1/devdocs/sysimg/#Specifying-multiple-system-image-targets
- ,(match (or (%current-target-system)
- (%current-system))
+ ,(match (current-target-nix-system)
("x86_64-linux"
;; These are the flags that upstream uses for their binaries.
"JULIA_CPU_TARGET=generic;generic,-cx16,clone_all;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)")
@@ -356,8 +356,7 @@ (define-public clisp
(inputs (list libffcall ncurses readline libsigsegv))
(arguments
`(#:configure-flags '(,@(if (string-prefix? "armhf-linux"
- (or (%current-system)
- (%current-target-system)))
+ (current-target-nix-system))
'("CFLAGS=-falign-functions=4")
'())
"--with-dynamic-ffi"
@@ -897,7 +897,7 @@ (define out #$output)
%build-inputs))))
(inputs
(append (list %guile-bootstrap-tarball)
- (match (or (%current-target-system) (%current-system))
+ (match (current-target-nix-system)
((or "i686-linux" "x86_64-linux")
(list %mescc-tools-bootstrap-tarball
%mes-bootstrap-tarball
@@ -179,8 +179,7 @@ (define-public mes
(propagated-inputs (list mescc-tools nyacc-1.00.2))
(native-inputs
(append (list guile-3.0)
- (let ((target-system (or (%current-target-system)
- (%current-system))))
+ (let ((target-system (current-target-nix-system)))
(cond
((string-prefix? "x86_64-linux" target-system)
;; Use cross-compiler rather than #:system "i686-linux" to get
@@ -89,8 +89,7 @@ (define-public fpc
(list expat glibc ld-wrapper ncurses zlib))
(native-inputs
;; FPC is built with FPC, so we need bootstrap binaries.
- `(("fpc-binary" ,(match (or (%current-target-system)
- (%current-system))
+ `(("fpc-binary" ,(match (current-target-nix-system)
("i686-linux" fpc-bootstrap-i386)
;;("powerpc64le-linux" fpc-bootstrap-ppc64le)
;;("powerpc-linux" fpc-bootstrap-ppc)
@@ -103,8 +102,7 @@ (define-public fpc
#:phases
(let ((fpc-bootstrap-path
(string-append (getcwd) "/" ,name "-" ,version "/fpc-bin"))
- (arch ,(match (or (%current-target-system)
- (%current-system))
+ (arch ,(match (current-target-nix-system)
("i686-linux" "i386")
("x86_64-linux" "x86_64")
(_ "unknown"))))
@@ -2089,8 +2089,7 @@ (define-public mplayer
(string-append "--prefix=" out)
;; Enable runtime cpu detection where supported,
;; and choose a suitable target.
- ,@(match (or (%current-target-system)
- (%current-system))
+ ,@(match (current-target-nix-system)
("x86_64-linux"
'("--enable-runtime-cpudetection"
"--target=x86_64-linux"))
@@ -413,8 +413,7 @@ (define-public nginx
,(let ((system "Linux") ; uname -s
(release "3.2.0") ; uname -r
;; uname -m
- (machine (match (or (%current-target-system)
- (%current-system))
+ (machine (match (current-target-nix-system)
("x86_64-linux" "x86_64")
("i686-linux" "i686")
("mips64el-linux" "mips64")
@@ -603,8 +602,7 @@ (define-public nginx-accept-language-module
,(let ((system "Linux") ; uname -s
(release "3.2.0") ; uname -r
;; uname -m
- (machine (match (or (%current-target-system)
- (%current-system))
+ (machine (match (current-target-nix-system)
("x86_64-linux" "x86_64")
("i686-linux" "i686")
("mips64el-linux" "mips64")