gnu: nss: Use 'modify-phases' syntax.
* gnu/packages/gnuzilla.scm (nss)[arguments]: Use 'modify-phases'.
This commit is contained in:
parent
4b7e5c1131
commit
db3c06d511
|
@ -221,55 +221,52 @@ in the Mozilla clients.")
|
||||||
(ice-9 match)
|
(ice-9 match)
|
||||||
(srfi srfi-26))
|
(srfi srfi-26))
|
||||||
#:phases
|
#:phases
|
||||||
(alist-replace
|
(modify-phases %standard-phases
|
||||||
'configure
|
(replace 'configure
|
||||||
(lambda* (#:key system inputs #:allow-other-keys)
|
(lambda* (#:key system inputs #:allow-other-keys)
|
||||||
(setenv "CC" "gcc")
|
(setenv "CC" "gcc")
|
||||||
;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
|
;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
|
||||||
(when (string-prefix? "x86_64" system)
|
(when (string-prefix? "x86_64" system)
|
||||||
(setenv "USE_64" "1"))
|
(setenv "USE_64" "1"))
|
||||||
#t)
|
#t))
|
||||||
(alist-replace
|
(replace 'check
|
||||||
'check
|
(lambda _
|
||||||
(lambda _
|
;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
|
||||||
;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
|
;; The later requires a working DNS or /etc/hosts.
|
||||||
;; The later requires a working DNS or /etc/hosts.
|
(setenv "DOMSUF" "(none)")
|
||||||
(setenv "DOMSUF" "(none)")
|
(setenv "USE_IP" "TRUE")
|
||||||
(setenv "USE_IP" "TRUE")
|
(setenv "IP_ADDRESS" "127.0.0.1")
|
||||||
(setenv "IP_ADDRESS" "127.0.0.1")
|
(zero? (system* "./nss/tests/all.sh"))))
|
||||||
(zero? (system* "./nss/tests/all.sh")))
|
(replace 'install
|
||||||
(alist-replace
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
'install
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(bin (string-append (assoc-ref outputs "bin") "/bin"))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(inc (string-append out "/include/nss"))
|
||||||
(bin (string-append (assoc-ref outputs "bin") "/bin"))
|
(lib (string-append out "/lib/nss"))
|
||||||
(inc (string-append out "/include/nss"))
|
(obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
|
||||||
(lib (string-append out "/lib/nss"))
|
((obj) (string-append "dist/" obj)))))
|
||||||
(obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
|
;; Install nss-config to $out/bin.
|
||||||
((obj) (string-append "dist/" obj)))))
|
(install-file (string-append obj "/bin/nss-config")
|
||||||
;; Install nss-config to $out/bin.
|
(string-append out "/bin"))
|
||||||
(install-file (string-append obj "/bin/nss-config")
|
(delete-file (string-append obj "/bin/nss-config"))
|
||||||
(string-append out "/bin"))
|
;; Install nss.pc to $out/lib/pkgconfig.
|
||||||
(delete-file (string-append obj "/bin/nss-config"))
|
(install-file (string-append obj "/lib/pkgconfig/nss.pc")
|
||||||
;; Install nss.pc to $out/lib/pkgconfig.
|
(string-append out "/lib/pkgconfig"))
|
||||||
(install-file (string-append obj "/lib/pkgconfig/nss.pc")
|
(delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
|
||||||
(string-append out "/lib/pkgconfig"))
|
(rmdir (string-append obj "/lib/pkgconfig"))
|
||||||
(delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
|
;; Install other files.
|
||||||
(rmdir (string-append obj "/lib/pkgconfig"))
|
(copy-recursively "dist/public/nss" inc)
|
||||||
;; Install other files.
|
(copy-recursively (string-append obj "/bin") bin)
|
||||||
(copy-recursively "dist/public/nss" inc)
|
(copy-recursively (string-append obj "/lib") lib)
|
||||||
(copy-recursively (string-append obj "/bin") bin)
|
|
||||||
(copy-recursively (string-append obj "/lib") lib)
|
|
||||||
|
|
||||||
;; FIXME: libgtest1.so is installed in the above step, and it's
|
;; FIXME: libgtest1.so is installed in the above step, and it's
|
||||||
;; (unnecessarily) linked with several NSS libraries, but
|
;; (unnecessarily) linked with several NSS libraries, but
|
||||||
;; without the needed rpaths, causing the 'validate-runpath'
|
;; without the needed rpaths, causing the 'validate-runpath'
|
||||||
;; phase to fail. Here we simply delete libgtest1.so, since it
|
;; phase to fail. Here we simply delete libgtest1.so, since it
|
||||||
;; seems to be used only during the tests.
|
;; seems to be used only during the tests.
|
||||||
(delete-file (string-append lib "/libgtest1.so"))
|
(delete-file (string-append lib "/libgtest1.so"))
|
||||||
|
|
||||||
#t))
|
#t))))))
|
||||||
%standard-phases)))))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("sqlite" ,sqlite)
|
`(("sqlite" ,sqlite)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
|
|
Loading…
Reference in New Issue