gnu: nspr: Use G-expressions.

* gnu/packages/nss.scm (nspr)[arguments]: Convert to gexp.
This commit is contained in:
Marius Bakke 2022-06-29 21:13:12 +02:00
parent fd004ddafa
commit b316d8b751
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -42,50 +42,50 @@
(name "nspr") (name "nspr")
(version "4.34") (version "4.34")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v" "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v"
version "/src/nspr-" version ".tar.gz")) version "/src/nspr-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"177rxcf3lglabs7sgwcvf72ww4v56qa71lc495wl13sxs4f03vxy")))) "177rxcf3lglabs7sgwcvf72ww4v56qa71lc495wl13sxs4f03vxy"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
;; For 'compile-et.pl' and 'nspr-config'. (list perl ;for 'compile-et.pl'
(list perl ;for 'compile-et.pl' bash-minimal)) ;for 'nspr-config'
bash-minimal)) ;for 'nspr-config'
(native-inputs (native-inputs
(list perl)) (list perl))
(arguments (arguments
`(;; Prevent the 'native' perl from sneaking into the closure. (list
;; XXX it would be nice to do the same for 'bash-minimal', ;; Prevent the 'native' perl from sneaking into the closure.
;; but using 'canonical-package' causes loops. ;; XXX it would be nice to do the same for 'bash-minimal',
,@(if (%current-target-system) ;; but using 'canonical-package' causes loops.
`(#:disallowed-references #:disallowed-references
(,(gexp-input (this-package-native-input "perl") #:native? #t))) (if (%current-target-system)
'()) (list (gexp-input (this-package-native-input "perl") #:native? #t))
#:tests? #f ; no check target #f)
#:configure-flags #:tests? #f ;no check target
(list "--disable-static" #:configure-flags
"--enable-64bit" #~(list "--disable-static"
(string-append "LDFLAGS=-Wl,-rpath=" "--enable-64bit"
(assoc-ref %outputs "out") "/lib") (string-append "LDFLAGS=-Wl,-rpath="
;; Mozilla deviates from Autotools conventions (assoc-ref %outputs "out") "/lib")
;; due to historical reasons. Adjust to Mozilla conventions, ;; Mozilla deviates from Autotools conventions
;; otherwise the Makefile will try to use TARGET-gcc ;; due to historical reasons. Adjust to Mozilla conventions,
;; as a native compiler. ;; otherwise the Makefile will try to use TARGET-gcc
,@(if (%current-target-system) ;; as a native compiler.
`(,(string-append "--host=" #$@(if (%current-target-system)
(nix-system->gnu-triplet (%current-system))) #~((string-append "--host="
,(string-append "--target=" (%current-target-system))) #$(nix-system->gnu-triplet (%current-system)))
'())) (string-append "--target=" #$(%current-target-system)))
;; Use fixed timestamps for reproducibility. #~()))
#:make-flags '("SH_DATE='1970-01-01 00:00:01'" ;; Use fixed timestamps for reproducibility.
;; This is epoch 1 in microseconds. #:make-flags #~'("SH_DATE='1970-01-01 00:00:01'"
"SH_NOW=100000") ;; This is epoch 1 in microseconds.
#:phases (modify-phases %standard-phases "SH_NOW=100000")
(add-before 'configure 'chdir #:phases #~(modify-phases %standard-phases
(lambda _ (chdir "nspr") #t))))) (add-before 'configure 'chdir
(lambda _ (chdir "nspr") #t)))))
(home-page (home-page
"https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR") "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR")
(synopsis "Netscape API for system level and libc-like functions") (synopsis "Netscape API for system level and libc-like functions")