diff options
Diffstat (limited to 'gnu/packages/nss.scm')
-rw-r--r-- | gnu/packages/nss.scm | 80 |
1 files changed, 42 insertions, 38 deletions
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 0444b47071..55eddc0c91 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -3,8 +3,9 @@ ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org> ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de> +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,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:) @@ -30,13 +32,12 @@ #: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 (name "nspr") - (version "4.29") + (version "4.31") (source (origin (method url-fetch) (uri (string-append @@ -44,7 +45,7 @@ version "/src/nspr-" version ".tar.gz")) (sha256 (base32 - "10i5x637x0jqmdi47grkzgn56fg6770naa3wrhr4dmsrh3dnna12")))) + "1j5b2m8cjlhnnv8sq34587avaagkqvh521w4f95miwgvsn3xlaap")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) @@ -70,10 +71,12 @@ platform-neutral API for system level and libc-like functions. It is used in the Mozilla clients.") (license license:mpl2.0))) +;;; Note: When updating, also update the nss-certs package, which cannot +;;; inherit from here. (define-public nss (package (name "nss") - (version "3.59") + (version "3.67") (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -84,22 +87,21 @@ in the Mozilla clients.") "nss-" version ".tar.gz"))) (sha256 (base32 - "096fs3z21r171q24ca3rq53p1389xmvqz1f2rpm7nlm8r9s82ag6")) + "0zyfi27lbdz1bmk9dmsivcya4phx25rzlxqcnjab69yd928rlm7n")) ;; Create nss.pc and nss-config. (patches (search-patches "nss-3.56-pkgconfig.patch" + "nss-getcwd-nonnull.patch" "nss-increase-test-timeout.patch")) (modules '((guix build utils))) (snippet '(begin ;; Delete the bundled copy of these libraries. (delete-file-recursively "nss/lib/zlib") - (delete-file-recursively "nss/lib/sqlite") - #t)))) + (delete-file-recursively "nss/lib/sqlite"))))) (build-system gnu-build-system) (outputs '("out" "bin")) (arguments - `(#:parallel-build? #f ; not supported - #:make-flags + `(#:make-flags (let* ((out (assoc-ref %outputs "out")) (nspr (string-append (assoc-ref %build-inputs "nspr"))) (rpath (string-append "-Wl,-rpath=" out "/lib/nss"))) @@ -119,27 +121,27 @@ 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"))) - (_ - '())) - #t)) + ,@(if (target-64bit?) + `((setenv "USE_64" "1")) + '()))) (replace 'check - (lambda _ - ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing. - ;; The later requires a working DNS or /etc/hosts. - (setenv "DOMSUF" "localdomain") - (setenv "USE_IP" "TRUE") - (setenv "IP_ADDRESS" "127.0.0.1") + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for + ;; testing. The latter requires a working DNS or /etc/hosts. + (setenv "DOMSUF" "localdomain") + (setenv "USE_IP" "TRUE") + (setenv "IP_ADDRESS" "127.0.0.1") - ;; The "PayPalEE.cert" certificate expires every six months, - ;; leading to test failures: - ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>. To - ;; work around that, set the time to roughly the release date. - (invoke "faketime" "2020-11-01" "./nss/tests/all.sh"))) + ;; The "PayPalEE.cert" certificate expires every six months, + ;; leading to test failures: + ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=609734>. To + ;; work around that, set the time to roughly the release date. + (invoke "faketime" "2021-06-01" "./nss/tests/all.sh")) + (format #t "test suite not run~%")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -160,21 +162,23 @@ in the Mozilla clients.") ;; Install other files. (copy-recursively "dist/public/nss" inc) (copy-recursively (string-append obj "/bin") bin) - (copy-recursively (string-append obj "/lib") lib) - #t)))))) + (copy-recursively (string-append obj "/lib") lib))))))) (inputs - `(("sqlite" ,sqlite) + `(;; XXX: Build with SQLite 3.33 to work around + ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1714874 + ("sqlite" ,sqlite-3.33) ("zlib" ,zlib))) - (propagated-inputs `(("nspr" ,nspr))) ; required by nss.pc. - (native-inputs `(("perl" ,perl) - ("libfaketime" ,libfaketime))) ;for tests + (propagated-inputs + `(("nspr" ,nspr))) ;required by nss.pc. + (native-inputs + `(("perl" ,perl) + ("libfaketime" ,libfaketime))) ;for tests ;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when ;; another build is happening concurrently on the same machine. - (properties '((timeout . 216000))) ; 60 hours + (properties '((timeout . 216000))) ;60 hours - (home-page - "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS") + (home-page "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS") (synopsis "Network Security Services") (description "Network Security Services (@dfn{NSS}) is a set of libraries designed to |