diff mbox series

[bug#45133] Add ocaml reactiveData

Message ID c4b9aeae0ab049516dbd6d56b0b8f566de141d49.camel@divoplade.fr
State Accepted
Headers show
Series [bug#45133] Add ocaml reactiveData | expand

Checks

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

Commit Message

divoplade Dec. 10, 2020, 2:57 p.m. UTC
Le jeudi 10 décembre 2020 à 15:43 +0100, zimoun a écrit :
> > I've tried to reproduce the changes of simon but I'm not sure I
> > reproduced the indentation correctly (it's different from what
> > etc/indent.el does, but a lot of ocaml packages are not indented
> > according to that script).
> 
> Ahah!  Let use the one of etc/indent.el for the ocaml-reactivedata
> and
> see the other ones later.

Weird, this indentation is still correct. Maybe etc/indent.el fails to
convert tabs? Anyway.

> It is a matter of taste.  You can read the thread starting here:
> 
> <
> https://yhetil.org/guix-devel/CAJ3okZ0v3VvmT=eWAVeAQoFqZh4L3H4tUkEJn1-5EXcJgRB_tQ@mail.gmail.com
> >
> 
> The main advantages of git-fetch over url-fetch are, IMHO:
> 
>  - lint saves to SWH; no SWH fallback with url-fetch
>  - easy to try any other commit (--with-commit)
>  - with specified commit–as it is here– avoid the in-place upstream
> replacement annoyance

I'm convinced, although we should keep in mind that future commits use
dune as a build system, so we wont be able to explore the future that
easily.

Comments

Julien Lepiller Dec. 15, 2020, 2:49 p.m. UTC | #1
Pushed as 190187326ad7516dd6728eed7bb6ef2d4f92897a.

I made a small number of changes to your patch:

In the commit message, added capitalization (add -> Add) and full
stops, removed spaces at the beginning of the `*` line.

In the patch, added a copyright line for you, added a comment to the
phase where we delete the Makefile, fixed the description (guix lint
should have told you so), and added an upstream-name property so guix
refresh knows where to look for newer versions. In general, it's not
needed because guix-name->opam-name works well, but here we lost
capitalization, so we need to explicitely tell it which name it is.

Thank you!
diff mbox series

Patch

From 581f992d1e3172f39088913270b0f4ce314dbfad Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Thu, 10 Dec 2020 15:06:50 +0100
Subject: [PATCH] gnu: add ocaml-reactivedata

	* ocaml.scm (ocaml-reactivedata): add ocaml-reactivedata
---
 gnu/packages/ocaml.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2bfda7307e..fac4e31ce5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5859,3 +5859,46 @@  LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
 generate OCaml code from .glade files), libpanel, librsvg and quartz.")
     ;; Version 2 only, with linking exception.
     (license license:lgpl2.0)))
+
+(define-public ocaml-reactivedata
+  ;; Future releases will use dune.
+  (package
+    (name "ocaml-reactivedata")
+    (version "0.2.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ocsigen/reactiveData")
+                    (commit version)))
+              (sha256
+               (base32
+                "0l5z0fsckqkywjbn2nwy3s55h85yx8scc4hq9qzr9ig3hrq1mfb0"))))
+    (arguments
+     `(#:phases
+       (modify-phases
+           %standard-phases
+         (delete 'configure)
+         (add-before 'build 'fix-deprecated
+           (lambda _
+             (substitute*
+                 "src/reactiveData.ml"
+               (("Pervasives.compare") "compare"))
+             #t))
+         (add-before 'install 'forget-makefile
+           (lambda _
+             (delete-file "Makefile")
+             #t)))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("ocamlbuild" ,ocamlbuild)
+       ("opam" ,opam)))
+    (propagated-inputs
+     `(("ocaml-react" ,ocaml-react)))
+    (home-page "https://github.com/ocsigen/reactiveData")
+    (synopsis "Declarative events and signals for OCaml")
+    (description
+     "React is an OCaml module for functional reactive programming (FRP). It
+provides support to program with time varying values : declarative events and
+ signals. React doesn't define any primitive event or signal, it lets the
+client chooses the concrete timeline.")
+    (license license:lgpl2.1+)))
-- 
2.29.2