gnu: certbot: Share python-acme's arguments.

* gnu/packages/tls.scm (certbot)[arguments]: Use substitute-keyword-arguments to
inherit from python-acme.
This commit is contained in:
Leo Famulari 2017-04-08 12:45:16 -04:00
parent f0e9fda6be
commit f26d6e4e9c
No known key found for this signature in database
GPG Key ID: 2646FA30BACA7F08
1 changed files with 15 additions and 24 deletions

View File

@ -478,8 +478,6 @@ security, and applying best practice development processes.")
"05cqadwzgfcianw3v0qxwja65dxnzw429f7dk8w0mnh21pib72bl")))) "05cqadwzgfcianw3v0qxwja65dxnzw429f7dk8w0mnh21pib72bl"))))
(build-system python-build-system) (build-system python-build-system)
;; TODO factorize the 'docs' phase and share arguments between python-acme
;; and certbot.
(arguments (arguments
`(#:phases `(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
@ -541,28 +539,21 @@ security, and applying best practice development processes.")
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:python ,python-2 `(#:python ,python-2
#:phases ,@(substitute-keyword-arguments (package-arguments python-acme)
(modify-phases %standard-phases ((#:phases phases)
(add-after 'unpack 'patch-dependency `(modify-phases ,phases
;; This module is part of the Python standard library, so we don't (replace 'docs
;; need to use an external package. (lambda* (#:key outputs #:allow-other-keys)
;; https://github.com/certbot/certbot/pull/2249 (let* ((out (assoc-ref outputs "out"))
(lambda _ (man1 (string-append out "/share/man/man1"))
(substitute* "setup.py" (man7 (string-append out "/share/man/man7"))
(("'argparse',") "")) (info (string-append out "/info")))
#t)) (and
(add-after 'build 'docs (zero? (system* "make" "-C" "docs" "man" "info"))
(lambda* (#:key outputs #:allow-other-keys) (install-file "docs/_build/texinfo/Certbot.info" info)
(let* ((out (assoc-ref outputs "out")) (install-file "docs/_build/man/certbot.1" man1)
(man1 (string-append out "/share/man/man1")) (install-file "docs/_build/man/certbot.7" man7)
(man7 (string-append out "/share/man/man7")) #t)))))))))
(info (string-append out "/info")))
(and
(zero? (system* "make" "-C" "docs" "man" "info"))
(install-file "docs/_build/texinfo/Certbot.info" info)
(install-file "docs/_build/man/certbot.1" man1)
(install-file "docs/_build/man/certbot.7" man7)
#t)))))))
;; TODO: Add optional inputs for testing. ;; TODO: Add optional inputs for testing.
(native-inputs (native-inputs
`(("python2-nose" ,python2-nose) `(("python2-nose" ,python2-nose)