diff mbox series

[bug#43809,v2] gnu: emacs-tuareg: Update to 2.2.0-0.ccde45b.

Message ID 20201008222532.19034-1-zimon.toutoune@gmail.com
State Accepted
Headers show
Series [bug#43809,v2] gnu: emacs-tuareg: Update to 2.2.0-0.ccde45b. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

zimoun Oct. 8, 2020, 10:25 p.m. UTC
* gnu/packages/ocaml.scm (emacs-tuareg): Update to 2.2.0-0.ccde45b.
---
 gnu/packages/ocaml.scm | 87 ++++++++++++++++++++++--------------------
 1 file changed, 46 insertions(+), 41 deletions(-)


base-commit: 7e917283d71fee1a29363e113f29c8c21f7c4739

Comments

Nicolas Goaziou Oct. 13, 2020, 7:30 a.m. UTC | #1
Hello,

zimoun <zimon.toutoune@gmail.com> writes:

> * gnu/packages/ocaml.scm (emacs-tuareg): Update to 2.2.0-0.ccde45b.

Thank you.

> +  ;; Last upstream release on Sept., 14th, 2018, since then "Package cl
> +  ;; deprecated" or 'lexical-binding' and others had been fixed.
> +  (let ((commit "ccde45bbc292123ec20617f1af7f7e19f7481545"))
> +    (package
> +      (name "emacs-tuareg")
> +      (version (git-version "2.2.0" "0" commit))

I suggest to bind "0" to `revision' instead of hard-coding it here.
Otherwise, LGTM.

> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/ocaml/tuareg")
> +               (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
> +      (build-system gnu-build-system)

I assume emacs-build-system is not an option, right?

Regards,
zimoun Oct. 13, 2020, 8:34 a.m. UTC | #2
Hi,

On Tue, 13 Oct 2020 at 09:30, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> > +      (source
> > +       (origin
> > +         (method git-fetch)
> > +         (uri (git-reference
> > +               (url "https://github.com/ocaml/tuareg")
> > +               (commit commit)))
> > +         (file-name (git-file-name name version))
> > +         (sha256
> > +          (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
> > +      (build-system gnu-build-system)
>
> I assume emacs-build-system is not an option, right?

I do not know.  I have just tried to fix an annoying message with my
Emacs config, not really tried to check the Tuareg package itsefl. :-)
What do you mean?  Use the OCaml build system instead?

Thanks for the review.

All the best,
simon
Nicolas Goaziou Oct. 13, 2020, 9:36 a.m. UTC | #3
zimoun <zimon.toutoune@gmail.com> writes:

> Hi,
>
> On Tue, 13 Oct 2020 at 09:30, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
>> > +      (source
>> > +       (origin
>> > +         (method git-fetch)
>> > +         (uri (git-reference
>> > +               (url "https://github.com/ocaml/tuareg")
>> > +               (commit commit)))
>> > +         (file-name (git-file-name name version))
>> > +         (sha256
>> > +          (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
>> > +      (build-system gnu-build-system)
>>
>> I assume emacs-build-system is not an option, right?
>
> I do not know.  I have just tried to fix an annoying message with my
> Emacs config, not really tried to check the Tuareg package itsefl. :-)
> What do you mean?  Use the OCaml build system instead?

AFAICT, I see mostly elisp files in the repository, and all the
additional phases in the package are already handled by Emacs build
system. So, I thought using emacs-build-system would be enough. I didn't
try it, tho.

But this is indeed orthogonal to your patch, so I think you can push it
as-is.

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d61948afc3..9ad17ec49c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -15,6 +15,7 @@ 
 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -672,49 +673,53 @@  the OCaml core distribution.")
     (license license:lgpl2.1+))); with linking exception
 
 (define-public emacs-tuareg
-  (package
-    (name "emacs-tuareg")
-    (version "2.2.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/ocaml/tuareg")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "06zxnn85fk5087iq0zxc5l5n9fz8r0367wylmynbfhc9711vccy6"))))
-    (build-system gnu-build-system)
-    (native-inputs `(("emacs" ,emacs-minimal)
-                     ("opam" ,opam)))
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'make-git-checkout-writable
-           (lambda _
-             (for-each make-file-writable (find-files "."))
-             #t))
-         (delete 'configure)
-         (add-before 'install 'fix-install-path
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "Makefile"
-               (("/emacs/site-lisp")
-                (string-append (assoc-ref %outputs "out")
-                               "/share/emacs/site-lisp/")))
-             #t))
-         (add-after 'install 'post-install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (symlink "tuareg.el"
-                      (string-append (assoc-ref outputs "out")
-                                     "/share/emacs/site-lisp/"
-                                     "tuareg-autoloads.el"))
-             #t)))))
-    (home-page "https://github.com/ocaml/tuareg")
-    (synopsis "OCaml programming mode, REPL, debugger for Emacs")
-    (description "Tuareg helps editing OCaml code, to highlight important
+  ;; Last upstream release on Sept., 14th, 2018, since then "Package cl
+  ;; deprecated" or 'lexical-binding' and others had been fixed.
+  (let ((commit "ccde45bbc292123ec20617f1af7f7e19f7481545"))
+    (package
+      (name "emacs-tuareg")
+      (version (git-version "2.2.0" "0" commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/ocaml/tuareg")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("emacs" ,emacs-minimal)
+         ("opam" ,opam)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'make-git-checkout-writable
+             (lambda _
+               (for-each make-file-writable (find-files "."))
+               #t))
+           (delete 'configure)
+           (add-before 'install 'fix-install-path
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "Makefile"
+                 (("/emacs/site-lisp")
+                  (string-append (assoc-ref %outputs "out")
+                                 "/share/emacs/site-lisp/")))
+               #t))
+           (add-after 'install 'post-install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (symlink "tuareg.el"
+                        (string-append (assoc-ref outputs "out")
+                                       "/share/emacs/site-lisp/"
+                                       "tuareg-autoloads.el"))
+               #t)))))
+      (home-page "https://github.com/ocaml/tuareg")
+      (synopsis "OCaml programming mode, REPL, debugger for Emacs")
+      (description "Tuareg helps editing OCaml code, to highlight important
 parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
 Emacs.")
-    (license license:gpl2+)))
+      (license license:gpl2+))))
 
 (define-public ocaml-menhir
   (package