diff --git a/gnu/packages/magic-wormhole.scm b/gnu/packages/magic-wormhole.scm index 4f8fabd1c5..80e707a3e2 100644 --- a/gnu/packages/magic-wormhole.scm +++ b/gnu/packages/magic-wormhole.scm @@ -117,17 +117,20 @@ together, allowing them to pretend they have a direct connection.") "01fr4bi6kc6fz9n3c4qq892inrc3nf6p2djy65yvm7xkvdxncydf")))) (build-system python-build-system) (arguments - '(#:phases + '(#:tests? #f ; to speed up debugging the documentation build failure + #:phases (modify-phases %standard-phases ;; XXX I can't figure out how to build the docs properly. (add-after 'install 'install-docs (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (man (string-append out "/share/man/man1"))) - (install-file "docs/wormhole.1" man)) - #t))))) + (invoke "make" "-C" "docs" "man") + #t)))))) (native-inputs `(("python-mock" ,python-mock) + ("python-sphinx" ,python-sphinx) + ("python-recommonmark" ,python-recommonmark) ;; XXX These are required for the test suite but end up being referenced ;; by the built package. ("magic-wormhole-mailbox-server" ,magic-wormhole-mailbox-server) @@ -156,3 +159,68 @@ wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.") (license expat))) + +(define-public python-commonmark + (package + (name "python-commonmark") + (version "0.8.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "commonmark" version)) + (sha256 + (base32 + "1130029ykz4jny5sr65zb03lm2xp062k4pmfaapxxrgaw1acijxb")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; have to delete and recreate check? + (delete 'check) + (add-after 'install 'check + ;; inputs and outputs? + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "python" "setup.py" "test")))) + ) + ) + (propagated-inputs + `( + ("python-flake8" ,python-flake8) + ("python-future" ,python-future) + ("python-hypothesis" ,python-hypothesis) + )) + (home-page + "https://github.com/rtfd/CommonMark-py") + (synopsis + "Python parser for the CommonMark Markdown spec") + (description + "Python parser for the CommonMark Markdown spec") + (license bsd-3))) + +(define-public python-recommonmark + (package + (name "python-recommonmark") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "recommonmark" version)) + (sha256 + (base32 + "0j5vylbhdddjhc6kj4y9pm8pyf7yy9965kr77bi1m9bia39bh855")))) + (build-system python-build-system) + (arguments + '(#:tests? #f)) ; fail mysteriously... + (propagated-inputs + `(("python-commonmark" ,python-commonmark) + ("python-docutils" ,python-docutils) + ("python-sphinx" ,python-sphinx))) + (home-page + "https://github.com/rtfd/recommonmark") + (synopsis + "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects.") + (description + "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects.") + (license expat))) +