summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-06-06 19:27:16 +0200
committerMarius Bakke <marius@gnu.org>2021-06-06 19:49:57 +0200
commite7f0835b07d868fd447aa64c873174fa385e1699 (patch)
tree3efa83a3582108d3cca61a8e0a4cdbcd5605c46b /gnu
parent79878c64b4bda523f50974c3f61b796309b1b8d9 (diff)
downloadguix-e7f0835b07d868fd447aa64c873174fa385e1699.tar.gz
gnu: nss: Use (guix utils).
* gnu/packages/nss.scm (nss)[arguments]: Utilize CC-FOR-TARGET and
TARGET-64bit?.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/nss.scm14
1 files changed, 6 insertions, 8 deletions
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index c874ce105c..73006fe3c2 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -24,6 +24,7 @@
 
 (define-module (gnu packages nss)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module ((guix licenses) #:prefix license:)
@@ -31,8 +32,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages perl)
-  #:use-module (gnu packages sqlite)
-  #:use-module (ice-9 match))
+  #:use-module (gnu packages sqlite))
 
 (define-public nspr
   (package
@@ -121,13 +121,11 @@ in the Mozilla clients.")
        (modify-phases %standard-phases
          (replace 'configure
            (lambda _
-             (setenv "CC" "gcc")
+             (setenv "CC" ,(cc-for-target))
              ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
-             ,@(match (%current-system)
-                 ((or "x86_64-linux" "aarch64-linux")
-                  `((setenv "USE_64" "1")))
-                 (_
-                  '()))))
+             ,@(if (target-64bit?)
+                   `((setenv "USE_64" "1"))
+                   '())))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (if tests?