diff mbox series

[bug#49445] gnu: add ocaml-bibtex2html

Message ID 20210707071339.23265-1-i.gankevich@spbu.ru
State Accepted
Headers show
Series [bug#49445] gnu: add ocaml-bibtex2html | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Ivan Gankevich July 7, 2021, 7:13 a.m. UTC
---
 gnu/packages/ocaml.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

Julien Lepiller July 10, 2021, 1:08 p.m. UTC | #1
Pushed as c21ccbf14e211bf3417c04f5add733a1e49b44fa, thank you!

I fixed the commit message:

gnu: Add ocaml-bibtex2html.

* gnu/packages/ocaml.scm (ocaml-bibtex2html): New variable.

I also managed to find a more minimal set of packages required to run
the tests. Instead of the monolithic texlive, we usually use
texlive-bin or texlive-tiny, but it was still missing some modules.
I had to add texlive-preprint to Guix first, and used a texlive-union,
which creates a texlive package that adds some packages on top of
texlive-tiny.

Thanks again for the patch!
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 652ad3c5f4..2e48d16b4b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7175,3 +7175,33 @@  libraries.")
 It makes it possible to run pure OCaml programs in JavaScript environment like
 browsers and Node.js.")
     (license license:lgpl2.1+)))
+
+(define-public ocaml-bibtex2html
+  (package
+    (name "ocaml-bibtex2html")
+    (version "1.99")
+    (source
+      (origin
+        (method url-fetch)
+        (uri "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")
+        (sha256 (base32 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
+    (build-system ocaml-build-system)
+    (arguments
+      `(#:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'patch-/bin/sh
+            (lambda _
+              (substitute* "configure" (("/bin/sh") (which "bash")))
+              (setenv "HOME" (getcwd)) ;; mktexfmt needs writable home directory
+              #t)))))
+    (native-inputs
+      `(("which" ,which)
+        ("texlive" ,texlive) ;; bibtex and pdflatex executables are needed for tests
+        ))
+    (propagated-inputs
+      `(("hevea" ,hevea)))
+    (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
+    (synopsis "BibTeX to HTML translator")
+    (description "Allows to produce, from a set of bibliography files
+in BibTeX format, a bibliography in HTML format.")
+    (license license:gpl2)))