gnu: gnutls: Remove input labels.

* gnu/packages/tls.scm (gnutls)[arguments]: Use gexps.
[native-inputs, propagated-inputs]: Remove labels.
(gnutls/dane, guile2.2-gnutls): Use 'modify-inputs'.
This commit is contained in:
Ludovic Courtès 2022-06-22 22:24:24 +02:00
parent 9b4c15f27a
commit 4c4413b5c6
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -226,94 +226,88 @@ living in the same process.")
"0li7mwjnm64mbxhacz0rpf6i9qd83f53fvbrx96alpqqk9d6qvk4")))) "0li7mwjnm64mbxhacz0rpf6i9qd83f53fvbrx96alpqqk9d6qvk4"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:tests? ,(not (or (%current-target-system) (list #:tests? (not (or (%current-target-system)
(hurd-target?))) (hurd-target?)))
;; Ensure we don't keep a reference to the tools used for testing. ;; Ensure we don't keep a reference to the tools used for testing.
#:disallowed-references ,(if (hurd-target?) #:disallowed-references (if (hurd-target?)
'() '()
(list net-tools iproute socat)) (list net-tools iproute socat))
#:configure-flags #:configure-flags
(cons* #~(cons*
;; GnuTLS doesn't consult any environment variables to specify ;; GnuTLS doesn't consult any environment variables to specify
;; the location of the system-wide trust store. Instead it has a ;; the location of the system-wide trust store. Instead it has a
;; configure-time option. Unless specified, its configure script ;; configure-time option. Unless specified, its configure script
;; attempts to auto-detect the location by looking for common ;; attempts to auto-detect the location by looking for common
;; places in the file system, none of which are present in our ;; places in the file system, none of which are present in our
;; chroot build environment. If not found, then no default trust ;; chroot build environment. If not found, then no default trust
;; store is used, so each program has to provide its own ;; store is used, so each program has to provide its own
;; fallback, and users have to configure each program ;; fallback, and users have to configure each program
;; independently. This seems suboptimal. ;; independently. This seems suboptimal.
"--with-default-trust-store-dir=/etc/ssl/certs" "--with-default-trust-store-dir=/etc/ssl/certs"
;; Tell the build system that we want Guile bindings installed to ;; Tell the build system that we want Guile bindings installed to
;; the output instead of Guiles own module directory. ;; the output instead of Guiles own module directory.
(string-append "--with-guile-site-dir=" (string-append "--with-guile-site-dir="
"$(datarootdir)/guile/site/$(GUILE_EFFECTIVE_VERSION)") "$(datarootdir)/guile/site/$(GUILE_EFFECTIVE_VERSION)")
(string-append "--with-guile-site-ccache-dir=" (string-append "--with-guile-site-ccache-dir="
"$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache") "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache")
(string-append "--with-guile-extension-dir=" (string-append "--with-guile-extension-dir="
"$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/extensions") "$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/extensions")
(let ((system ,(or (%current-target-system) (let ((system #$(or (%current-target-system)
(%current-system)))) (%current-system))))
(if (string-prefix? "mips64el" system) (if (string-prefix? "mips64el" system)
(list (list
;; FIXME: Temporarily disable p11-kit support since it is ;; FIXME: Temporarily disable p11-kit support since it is
;; not working on mips64el. ;; not working on mips64el.
"--without-p11-kit") "--without-p11-kit")
'()))) '())))
#:phases (modify-phases %standard-phases #:phases
;; fastopen.sh fails to connect to the server in the builder #~(modify-phases %standard-phases
;; environment (see: ;; fastopen.sh fails to connect to the server in the builder
;; https://gitlab.com/gnutls/gnutls/-/issues/1095). ;; environment (see:
(add-after 'unpack 'disable-failing-tests ;; https://gitlab.com/gnutls/gnutls/-/issues/1095).
(lambda _ (add-after 'unpack 'disable-failing-tests
(substitute* "tests/fastopen.sh" (lambda _
(("^unset RETCODE") (substitute* "tests/fastopen.sh"
"exit 77\n")))) ;skip (("^unset RETCODE")
(add-after 'install 'move-doc "exit 77\n")))) ;skip
(lambda* (#:key outputs #:allow-other-keys) (add-after 'install 'move-doc
;; Copy the 4.1 MiB of section 3 man pages to "doc". (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) ;; Copy the 4.1 MiB of section 3 man pages to "doc".
(doc (assoc-ref outputs "doc")) (let* ((out (assoc-ref outputs "out"))
(mandir (string-append doc "/share/man/man3")) (doc (assoc-ref outputs "doc"))
(oldman (string-append out "/share/man/man3"))) (mandir (string-append doc "/share/man/man3"))
(mkdir-p mandir) (oldman (string-append out "/share/man/man3")))
(copy-recursively oldman mandir) (mkdir-p mandir)
(delete-file-recursively oldman))))))) (copy-recursively oldman mandir)
(delete-file-recursively oldman)))))))
(outputs '("out" ;4.4 MiB (outputs '("out" ;4.4 MiB
"debug" "debug"
"doc")) ;4.1 MiB of man pages "doc")) ;4.1 MiB of man pages
(native-inputs (native-inputs
`(,@(if (%current-target-system) ;for cross-build (append (list pkg-config texinfo which
`(("guile" ,guile-3.0)) ;to create .go files util-linux) ;one test needs 'setsid'
'()) (if (%current-target-system) ;for cross-build
,@(if (hurd-target?) (list guile-3.0) ;to create .go files
'() '())
`(("net-tools" ,net-tools) (if (hurd-target?)
("iproute" ,iproute) ;for 'ss' '()
("socat" ,socat))) ;several tests rely on it (list net-tools
("pkg-config" ,pkg-config) iproute ;for 'ss'
("texinfo" ,texinfo) socat ;several tests rely on it
("which" ,which) datefudge)))) ;tests rely on 'datefudge'
,@(if (hurd-target?)
'()
`(("datefudge" ,datefudge))) ;tests rely on 'datefudge'
("util-linux" ,util-linux))) ;one test needs 'setsid'
(inputs (inputs
(list guile-3.0)) (list guile-3.0))
(propagated-inputs (propagated-inputs
;; These are all in the 'Requires.private' field of gnutls.pc. ;; These are all in the 'Requires.private' field of gnutls.pc.
`(("libtasn1" ,libtasn1) (append (list libtasn1 libidn2 nettle zlib)
("libidn2" ,libidn2) (let ((system (or (%current-target-system)
("nettle" ,nettle) (%current-system))))
("zlib" ,zlib) (if (string-prefix? "mips64el" system)
,@(let ((system (or (%current-target-system) '()
(%current-system)))) (list p11-kit)))))
(if (string-prefix? "mips64el" system)
'()
`(("p11-kit" ,p11-kit))))))
(home-page "https://www.gnu.org/software/gnutls/") (home-page "https://www.gnu.org/software/gnutls/")
(synopsis "Transport layer security library") (synopsis "Transport layer security library")
(description (description
@ -332,15 +326,14 @@ required structures.")
;; to have the choice between GnuTLS with Dane and without Dane. ;; to have the choice between GnuTLS with Dane and without Dane.
(package/inherit gnutls (package/inherit gnutls
(name "gnutls-dane") (name "gnutls-dane")
(inputs `(("unbound" ,unbound) (inputs (modify-inputs (package-inputs gnutls)
,@(package-inputs gnutls))))) (prepend unbound)))))
(define-public guile2.2-gnutls (define-public guile2.2-gnutls
(package/inherit gnutls (package/inherit gnutls
(name "guile2.2-gnutls") (name "guile2.2-gnutls")
(inputs `(("guile" ,guile-2.2) (inputs (modify-inputs (package-inputs gnutls)
,@(alist-delete "guile" (replace "guile" guile-2.2)))))
(package-inputs gnutls))))))
(define (target->openssl-target target) (define (target->openssl-target target)
"Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling