diff mbox series

[bug#45133] Add ocaml reactiveData

Message ID ba12877b53f01573109079592ed837d54254f11c.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. 9, 2020, 5:03 p.m. UTC
Hello,

Le mercredi 09 décembre 2020 à 10:40 -0500, Julien Lepiller a écrit :
> There's no reason not to use the latest release. Could you scnd an
> updated patch for the latest release, with a comment saying future
> versions will use dune?
> 
> There seem to be some whitespace issues with your patch. Tabs?

You should be more pleased by this version. There are a lot of build
files, and no install command. So, I provided mine, which seems to
work, but I don't know what files should be installed. I bet on:

- .a, for the native code;
- .cma, for the ocaml bytecode;
- .cmi, for the interface;
- .cmxa for the ocaml native code;
- .cmxs for the plugins;
- .cmx if the compiler wants to inline code.

What do you think?
diff mbox series

Patch

From f0c1d3e95bb4d348fe863dfd1286e65dce7eb3a2 Mon Sep 17 00:00:00 2001
From: divoplade <d@divoplade.fr>
Date: Wed, 9 Dec 2020 15:45:04 +0100
Subject: [PATCH] gnu: add ocaml-reactiveData

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

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2bfda7307e..e3fcbe236f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5859,3 +5859,48 @@  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 ocaml-reactiveData
+  ;; Future releases will use dune.
+  (package
+    (name "ocaml-reactiveData")
+    (version "0.2.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri "https://github.com/ocsigen/reactiveData/archive/0.2.2.tar.gz")
+       (sha256
+        (base32
+         "0jzagyp4zla28wykvcgqwd8df71ir0vb4s8akp02cfacd5v86sng"))
+       (snippet
+        `(begin
+	   (let ((makefile (open-file "Makefile" "a")))
+	     (display "
+install:
+\tocamlfind install reactiveData pkg/META _build/src/reactiveData.{a,cma,cmi,cmx,cmxa,cmxs}
+" makefile)
+	     (close-port makefile))
+	   #t))))
+    (arguments
+     `(#:phases
+       (modify-phases
+           %standard-phases
+         (delete 'configure)
+         (add-before 'build 'fix-deprecated
+	   (lambda _
+	     (substitute*
+		 "src/reactiveData.ml"
+	       (("Pervasives.compare") "compare"))
+	     #t)))))
+    (build-system ocaml-build-system)
+    (native-inputs
+     `(("ocamlbuild" ,ocamlbuild)))
+    (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