GNU bug report logs - #49445
[PATCH] gnu: add ocaml-bibtex2html

Previous Next

Package: guix-patches;

Reported by: Ivan Gankevich <i.gankevich <at> spbu.ru>

Date: Tue, 6 Jul 2021 18:00:02 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49445 in the body.
You can then email your comments to 49445 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49445; Package guix-patches. (Tue, 06 Jul 2021 18:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Gankevich <i.gankevich <at> spbu.ru>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 06 Jul 2021 18:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Gankevich <i.gankevich <at> spbu.ru>
To: guix-patches <at> gnu.org
Cc: Ivan Gankevich <i.gankevich <at> spbu.ru>
Subject: [PATCH] gnu: add ocaml-bibtex2html
Date: Tue,  6 Jul 2021 20:57:49 +0300
---
 gnu/packages/ocaml.scm | 66 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index cec6eb4f89..b01088f46a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7175,3 +7175,69 @@ 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-hevea
+  (package
+    (name "ocaml-hevea")
+    (version "2.35")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/maranget/hevea")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256 (base32 "1ziai2pl1k2qi4v3wc4xjvh8qdk2prfsg8k64bh8vi1ichnp7mqw"))))
+    (build-system ocaml-build-system)
+    (arguments
+      `(#:tests? #f ;; no tests
+        #:make-flags
+        (list
+          "TARGET=opt"
+          (string-append "LIBDIR=" (assoc-ref %outputs "out") "/lib")
+          (string-append "BINDIR=" (assoc-ref %outputs "out") "/bin")
+          (string-append "PREFIX=" %output))
+        #:phases
+        (modify-phases %standard-phases
+          (delete 'configure)
+          (add-after 'unpack 'patch-/bin/sh
+            (lambda _
+              (substitute* "_tags"
+                (("/bin/sh") (which "bash"))))))))
+    (native-inputs
+      `(("ocamlbuild" ,ocamlbuild)
+        ("which" ,which)))
+    (home-page "http://hevea.inria.fr/")
+    (synopsis "Quite complete and fast LATEX to HTML translator")
+    (description "HEVEA is fast and efficient translator that is able to
+convert large LATEX documents into HTML.")
+    (license (list license:qpl license:gpl2))))
+
+(define-public ocaml-bibtex2html
+  (package
+    (name "ocaml-bibtex2html")
+    (version "1.99-1")
+    (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
+      `(#:tests? #f ;; tests require bibtex binary from texlive-bin package
+                    ;; that pulls a lot of dependencies
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'patch-/bin/sh
+            (lambda _
+              (substitute* "configure" (("/bin/sh") (which "bash")))
+              #t)))))
+    (native-inputs
+      `(("which" ,which)))
+    (propagated-inputs
+      `(("ocaml-hevea" ,ocaml-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)))
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#49445; Package guix-patches. (Tue, 06 Jul 2021 18:50:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: guix-patches <at> gnu.org, Ivan Gankevich <i.gankevich <at> spbu.ru>,
 49445 <at> debbugs.gnu.org
Subject: Re: [bug#49445] [PATCH] gnu: add ocaml-bibtex2html
Date: Tue, 06 Jul 2021 14:49:27 -0400
Thanks for the patch!

Le 6 juillet 2021 13:57:49 GMT-04:00, Ivan Gankevich <i.gankevich <at> spbu.ru> a écrit :
>---
> gnu/packages/ocaml.scm | 66 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 66 insertions(+)
>
>diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
>index cec6eb4f89..b01088f46a 100644
>--- a/gnu/packages/ocaml.scm
>+++ b/gnu/packages/ocaml.scm
>@@ -7175,3 +7175,69 @@ 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-hevea

Mh… we already have hevea as the "hevea" package (not "ocaml-hevea"), although at version 2.34. Would you like to send a patch that updates hevea instead?

>+  (package
>+    (name "ocaml-hevea")
>+    (version "2.35")
>+    (source
>+      (origin
>+        (method git-fetch)
>+        (uri (git-reference
>+               (url "https://github.com/maranget/hevea")
>+               (commit (string-append "v" version))))
>+        (file-name (git-file-name name version))
>+        (sha256 (base32
>"1ziai2pl1k2qi4v3wc4xjvh8qdk2prfsg8k64bh8vi1ichnp7mqw"))))
>+    (build-system ocaml-build-system)
>+    (arguments
>+      `(#:tests? #f ;; no tests
>+        #:make-flags
>+        (list
>+          "TARGET=opt"
>+          (string-append "LIBDIR=" (assoc-ref %outputs "out") "/lib")
>+          (string-append "BINDIR=" (assoc-ref %outputs "out") "/bin")
>+          (string-append "PREFIX=" %output))
>+        #:phases
>+        (modify-phases %standard-phases
>+          (delete 'configure)
>+          (add-after 'unpack 'patch-/bin/sh
>+            (lambda _
>+              (substitute* "_tags"
>+                (("/bin/sh") (which "bash"))))))))
>+    (native-inputs
>+      `(("ocamlbuild" ,ocamlbuild)
>+        ("which" ,which)))
>+    (home-page "http://hevea.inria.fr/")
>+    (synopsis "Quite complete and fast LATEX to HTML translator")
>+    (description "HEVEA is fast and efficient translator that is able
>to
>+convert large LATEX documents into HTML.")
>+    (license (list license:qpl license:gpl2))))
>+
>+(define-public ocaml-bibtex2html
>+  (package
>+    (name "ocaml-bibtex2html")
>+    (version "1.99-1")

What does -1 mean? It won't me understood well by guix, so if there's a chace a -2 might exist, maybe we should make it .1 instead? 

>+    (source
>+      (origin
>+        (method url-fetch)
>+        (uri
>"https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")

I don't see -1 in the file namc, so maybe it's useless?

>+        (sha256 (base32
>"07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
>+    (build-system ocaml-build-system)
>+    (arguments
>+      `(#:tests? #f ;; tests require bibtex binary from texlive-bin
>package
>+                    ;; that pulls a lot of dependencies

fine, but that would only be a concern at build-time, right?

>+        #:phases
>+        (modify-phases %standard-phases
>+          (add-after 'unpack 'patch-/bin/sh
>+            (lambda _
>+              (substitute* "configure" (("/bin/sh") (which "bash")))
>+              #t)))))
>+    (native-inputs
>+      `(("which" ,which)))
>+    (propagated-inputs
>+      `(("ocaml-hevea" ,ocaml-hevea)))

Make this hevea instead :)

>+    (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)))

Otherwise looks good! Can you send a v2 with a patch to update hevea and a separate patch to add bibtex2html?





Information forwarded to guix-patches <at> gnu.org:
bug#49445; Package guix-patches. (Tue, 06 Jul 2021 18:50:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#49445; Package guix-patches. (Wed, 07 Jul 2021 07:14:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Gankevich <i.gankevich <at> spbu.ru>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: 49445 <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#49445] [PATCH] gnu: add ocaml-bibtex2html
Date: Wed, 7 Jul 2021 10:12:54 +0300
>Mh… we already have hevea as the "hevea" package (not "ocaml-hevea"), although at version 2.34. Would you like to send a patch that updates hevea instead?

Oops! I thought all ocaml packages start with “ocaml-”.


>What does -1 mean? It won't me understood well by guix, so if there's a chace a -2 might exist, maybe we should make it .1 instead?

I’ve imported this package with “guix import opam”. This “-1” came from there.


>I don't see -1 in the file namc, so maybe it's useless?

You’re right. There is no such version in git repo and source tarball. Removed it.


>>+      `(#:tests? #f ;; tests require bibtex binary from texlive-bin
>>package
>>+                    ;; that pulls a lot of dependencies
>fine, but that would only be a concern at build-time, right?

Added “texlive” as native dependency. Adding “texlive-bin” is not enough, since the tests
also need “pdflatex”.


>Make this hevea instead :)

Done.


>Otherwise looks good! Can you send a v2 with a patch to update hevea and a separate patch to add bibtex2html?

I’ve sent the two separate patches for “hevea” and “bibtex2html”. Thank you for your
corrections!




Information forwarded to guix-patches <at> gnu.org:
bug#49445; Package guix-patches. (Wed, 07 Jul 2021 07:14:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#49445; Package guix-patches. (Wed, 07 Jul 2021 07:15:02 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Gankevich <i.gankevich <at> spbu.ru>
To: guix-patches <at> gnu.org
Cc: Ivan Gankevich <i.gankevich <at> spbu.ru>
Subject: [bug#49445] [PATCH] gnu: add ocaml-bibtex2html
Date: Wed,  7 Jul 2021 10:13:41 +0300
---
 gnu/packages/ocaml.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

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)))
-- 
2.32.0





Reply sent to Julien Lepiller <julien <at> lepiller.eu>:
You have taken responsibility. (Sat, 10 Jul 2021 13:09:02 GMT) Full text and rfc822 format available.

Notification sent to Ivan Gankevich <i.gankevich <at> spbu.ru>:
bug acknowledged by developer. (Sat, 10 Jul 2021 13:09:02 GMT) Full text and rfc822 format available.

Message #25 received at 49445-done <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Ivan Gankevich <i.gankevich <at> spbu.ru>
Cc: 49445-done <at> debbugs.gnu.org
Subject: Re: [bug#49445] [PATCH] gnu: add ocaml-bibtex2html
Date: Sat, 10 Jul 2021 15:08:29 +0200
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!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 08 Aug 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.