blob: 66c2533853e687d1a61aee1af0c2791f42c3365a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }:
stdenv.mkDerivation {
name = "ocaml-react-1.2.0";
src = fetchurl {
url = http://erratique.ch/software/react/releases/react-1.2.0.tbz;
sha256 = "1gymn8hy7ga0l9qymmb1jcnnkqvy7l2zr87xavzqz0dfi9ci8dm7";
};
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild opam ];
createFindlibDestdir = true;
configurePhase = "ocaml pkg/git.ml";
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
installPhase =
let ocamlVersion = (builtins.parseDrvName (ocaml.name)).version;
in
''
opam-installer --script --prefix=$out react.install > install.sh
sed -i s!lib/react!lib/ocaml/${ocamlVersion}/site-lib/react! install.sh
sh install.sh
'';
meta = with stdenv.lib; {
homepage = http://erratique.ch/software/react;
description = "Applicative events and signals for OCaml";
license = licenses.bsd3;
platforms = ocaml.meta.platforms or [];
maintainers = with maintainers; [ z77z vbmithr gal_bolle];
};
}
|