diff options
author | Ian Eure <ian@retrospec.tv> | 2025-05-03 10:35:13 -0700 |
---|---|---|
committer | Maxim Cournoyer <maxim@guixotic.coop> | 2025-08-05 20:15:30 +0900 |
commit | 5641ec9eb9e51e5de8ab14dd8f082beebcc53ba2 (patch) | |
tree | b53895f24ca78eb358208d39805a869384bede54 | |
parent | 5499fb618278918597593ebe11b2c08cd74f74a5 (diff) |
gnu: nss: Clean up.nss-updates-on-master
Platform-specific build conditionals currently use ungexp to inject code into
the build phase: #$@(if ... #~(...) #~(...)). Change these to use unless/when
where appropriate, and ungexp the test value instead of the whole form.
* gnu/packages/nss.scm (nss): Clean up gexps.
* gnu/packages/nss.scm (nss): Extract URI code into `nss-uri'.
* gnu/packages/nss.scm (nss-uri): New variable.
Change-Id: I5843eb5bf80f01650e0e87a9c479d5d1ab187f9e
-rw-r--r-- | gnu/packages/nss.scm | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 13dffa4966..40adef194b 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -102,6 +102,14 @@ platform-neutral API for system level and libc-like functions. It is used in the Mozilla clients.") (license license:mpl2.0))) +(define (nss-uri version) + (let* ((components (string-split version #\.)) + (version-with-underscores (string-join components "_"))) + (string-append + "https://ftp.mozilla.org/pub/mozilla.org/security/nss/" + "releases/NSS_" version-with-underscores "_RTM/src/" + "nss-" version ".tar.gz"))) + ;; nss should track ESRs, but currently doesn't. 3.102.1 is the current ESR. (define-public nss @@ -113,12 +121,7 @@ in the Mozilla clients.") (version "3.101.4") (source (origin (method url-fetch) - (uri (let ((version-with-underscores - (string-join (string-split version #\.) "_"))) - (string-append - "https://ftp.mozilla.org/pub/mozilla.org/security/nss/" - "releases/NSS_" version-with-underscores "_RTM/src/" - "nss-" version ".tar.gz"))) + (uri (nss-uri version)) (sha256 (base32 "1sqvh49qi9vq55sbg42c5n0kz6w6ni383hgiyhaym6drsmbzb86a")) @@ -192,13 +195,12 @@ in the Mozilla clients.") (setenv "CCC" #$(cxx-for-target)) (setenv "NATIVE_CC" "gcc") ;; No VSX on powerpc-linux. - #$@(if (target-ppc32?) - #~((setenv "NSS_DISABLE_CRYPTO_VSX" "1")) - #~()) + (when #$(target-ppc32?) + (setenv "NSS_DISABLE_CRYPTO_VSX" "1")) + ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system. - #$@(if (target-64bit?) - #~((setenv "USE_64" "1")) - #~()))) + (when #$(target-64bit?) + (setenv "USE_64" "1")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (if tests? @@ -217,15 +219,13 @@ in the Mozilla clients.") (substitute* "nss/tests/dbtests/dbtests.sh" ((" -lt 5") " -lt 50")) - #$@(if (target-64bit?) - '() - ;; The script fails to determine the source - ;; directory when running under 'datefudge' (see - ;; <https://issues.guix.gnu.org/72239>). Help it. - #~((substitute* "nss/tests/gtests/gtests.sh" - (("SOURCE_DIR=.*") - (string-append "SOURCE_DIR=" (getcwd) "/nss\n"))))) - + (unless #$(target-64bit?) + ;; The script fails to determine the source + ;; directory when running under 'datefudge' (see + ;; <https://issues.guix.gnu.org/72239>). Help it. + ((substitute* "nss/tests/gtests/gtests.sh" + (("SOURCE_DIR=.*") + (string-append "SOURCE_DIR=" (getcwd) "/nss\n"))))) (let ((release-date (getenv "GUIX_NSS_RELEASE_DATE"))) (when (string=? "" release-date) |