unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49445] [PATCH] gnu: add ocaml-bibtex2html
@ 2021-07-06 17:57 Ivan Gankevich
  2021-07-06 18:49 ` Julien Lepiller
  2021-07-07  7:13 ` Ivan Gankevich
  0 siblings, 2 replies; 5+ messages in thread
From: Ivan Gankevich @ 2021-07-06 17:57 UTC (permalink / raw)
  To: 49445; +Cc: Ivan Gankevich

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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#49445] [PATCH] gnu: add ocaml-bibtex2html
  2021-07-06 17:57 [bug#49445] [PATCH] gnu: add ocaml-bibtex2html Ivan Gankevich
@ 2021-07-06 18:49 ` Julien Lepiller
  2021-07-07  7:12   ` Ivan Gankevich
  2021-07-07  7:13 ` Ivan Gankevich
  1 sibling, 1 reply; 5+ messages in thread
From: Julien Lepiller @ 2021-07-06 18:49 UTC (permalink / raw)
  To: 49445, i.gankevich

Thanks for the patch!

Le 6 juillet 2021 13:57:49 GMT-04:00, Ivan Gankevich <i.gankevich@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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#49445] [PATCH] gnu: add ocaml-bibtex2html
  2021-07-06 18:49 ` Julien Lepiller
@ 2021-07-07  7:12   ` Ivan Gankevich
  0 siblings, 0 replies; 5+ messages in thread
From: Ivan Gankevich @ 2021-07-07  7:12 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 49445

>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!




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#49445] [PATCH] gnu: add ocaml-bibtex2html
  2021-07-06 17:57 [bug#49445] [PATCH] gnu: add ocaml-bibtex2html Ivan Gankevich
  2021-07-06 18:49 ` Julien Lepiller
@ 2021-07-07  7:13 ` Ivan Gankevich
  2021-07-10 13:08   ` bug#49445: " Julien Lepiller
  1 sibling, 1 reply; 5+ messages in thread
From: Ivan Gankevich @ 2021-07-07  7:13 UTC (permalink / raw)
  To: 49445; +Cc: Ivan Gankevich

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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#49445: [PATCH] gnu: add ocaml-bibtex2html
  2021-07-07  7:13 ` Ivan Gankevich
@ 2021-07-10 13:08   ` Julien Lepiller
  0 siblings, 0 replies; 5+ messages in thread
From: Julien Lepiller @ 2021-07-10 13:08 UTC (permalink / raw)
  To: Ivan Gankevich; +Cc: 49445-done

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!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-10 13:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 17:57 [bug#49445] [PATCH] gnu: add ocaml-bibtex2html Ivan Gankevich
2021-07-06 18:49 ` Julien Lepiller
2021-07-07  7:12   ` Ivan Gankevich
2021-07-07  7:13 ` Ivan Gankevich
2021-07-10 13:08   ` bug#49445: " Julien Lepiller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).