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

@ -51,22 +51,22 @@
"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
;; Prevent the 'native' perl from sneaking into the closure.
;; XXX it would be nice to do the same for 'bash-minimal', ;; XXX it would be nice to do the same for 'bash-minimal',
;; but using 'canonical-package' causes loops. ;; but using 'canonical-package' causes loops.
,@(if (%current-target-system) #:disallowed-references
`(#:disallowed-references (if (%current-target-system)
(,(gexp-input (this-package-native-input "perl") #:native? #t))) (list (gexp-input (this-package-native-input "perl") #:native? #t))
'()) #f)
#:tests? #f ;no check target #:tests? #f ;no check target
#:configure-flags #:configure-flags
(list "--disable-static" #~(list "--disable-static"
"--enable-64bit" "--enable-64bit"
(string-append "LDFLAGS=-Wl,-rpath=" (string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %outputs "out") "/lib") (assoc-ref %outputs "out") "/lib")
@ -74,16 +74,16 @@
;; due to historical reasons. Adjust to Mozilla conventions, ;; due to historical reasons. Adjust to Mozilla conventions,
;; otherwise the Makefile will try to use TARGET-gcc ;; otherwise the Makefile will try to use TARGET-gcc
;; as a native compiler. ;; as a native compiler.
,@(if (%current-target-system) #$@(if (%current-target-system)
`(,(string-append "--host=" #~((string-append "--host="
(nix-system->gnu-triplet (%current-system))) #$(nix-system->gnu-triplet (%current-system)))
,(string-append "--target=" (%current-target-system))) (string-append "--target=" #$(%current-target-system)))
'())) #~()))
;; Use fixed timestamps for reproducibility. ;; Use fixed timestamps for reproducibility.
#:make-flags '("SH_DATE='1970-01-01 00:00:01'" #:make-flags #~'("SH_DATE='1970-01-01 00:00:01'"
;; This is epoch 1 in microseconds. ;; This is epoch 1 in microseconds.
"SH_NOW=100000") "SH_NOW=100000")
#:phases (modify-phases %standard-phases #:phases #~(modify-phases %standard-phases
(add-before 'configure 'chdir (add-before 'configure 'chdir
(lambda _ (chdir "nspr") #t))))) (lambda _ (chdir "nspr") #t)))))
(home-page (home-page