From cdf3dc27935e65196a0e17a7b3aaae6e443eaa09 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 10 Oct 2014 23:33:22 +0100 Subject: [PATCH 1/3] ocaml-reactivedata: new package reactiveData is an OCaml module for functional reactive programming (FRP) based on React. Homepage: https://github.com/hhugo/reactiveData --- .../ocaml-modules/reactivedata/default.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/ocaml-modules/reactivedata/default.nix diff --git a/pkgs/development/ocaml-modules/reactivedata/default.nix b/pkgs/development/ocaml-modules/reactivedata/default.nix new file mode 100644 index 000000000000..eecae885302f --- /dev/null +++ b/pkgs/development/ocaml-modules/reactivedata/default.nix @@ -0,0 +1,34 @@ +{stdenv, fetchurl, ocaml, findlib, ocaml_react, opam}: + +let + ocamlVersion = stdenv.lib.getVersion ocaml; +in + +assert stdenv.lib.versionAtLeast ocamlVersion "3.11"; + +stdenv.mkDerivation { + name = "ocaml-reactiveData-0.1"; + src = fetchurl { + url = https://github.com/hhugo/reactiveData/archive/0.1.tar.gz; + sha256 = "056y9in6j6rpggdf8apailvs1m30wxizpyyrj08xyfxgv91mhxgw"; + }; + + buildInputs = [ocaml findlib opam]; + propagatedBuildInputs = [ocaml_react]; + + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; + + installPhase = '' + opam-installer --script --prefix=$out reactiveData.install > install.sh + sed -i s!lib/reactiveData!lib/ocaml/${ocamlVersion}/site-lib/reactiveData! install.sh + sh install.sh + ''; + + meta = with stdenv.lib; { + description = "An OCaml module for functional reactive programming (FRP) based on React"; + homepage = https://github.com/hhugo/reactiveData; + license = licenses.lgpl21; + platforms = ocaml.meta.platforms; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 21381e7ac953..cfb82f45591b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3536,6 +3536,7 @@ let }; ocaml_react = callPackage ../development/ocaml-modules/react { }; + reactivedata = callPackage ../development/ocaml-modules/reactivedata {}; ocamlsdl= callPackage ../development/ocaml-modules/ocamlsdl { }; From 33bba5f0b3905164e76c07a34e7428085cbace34 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 10 Oct 2014 23:51:29 +0100 Subject: [PATCH 2/3] ocaml-pgocaml: new package PG'OCaml provides an interface to PostgreSQL databases for OCaml applications. Homepage: http://pgocaml.forge.ocamlcore.org/ --- .../ocaml-modules/pgocaml/default.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/ocaml-modules/pgocaml/default.nix diff --git a/pkgs/development/ocaml-modules/pgocaml/default.nix b/pkgs/development/ocaml-modules/pgocaml/default.nix new file mode 100644 index 000000000000..f1166d1c3249 --- /dev/null +++ b/pkgs/development/ocaml-modules/pgocaml/default.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl, ocaml, findlib, camlp4, calendar, csv, ocaml_pcre}: + +stdenv.mkDerivation { + name = "ocaml-pgocaml-2.1"; + src = fetchurl { + url = http://forge.ocamlcore.org/frs/download.php/1413/pgocaml-2.1.tgz; + sha256 = "0m7whlmhm7z58pfaarvkyiwaylmrz05aj6fr773zd9xlv07ljiym"; + }; + + buildInputs = [ocaml findlib camlp4]; + propagatedBuildInputs = [calendar csv ocaml_pcre]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + description = "An interface to PostgreSQL databases for OCaml applications"; + homepage = http://pgocaml.forge.ocamlcore.org/; + license = licenses.lgpl2; + platforms = ocaml.meta.platforms; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cfb82f45591b..9c0325d2c2f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3535,6 +3535,8 @@ let inherit pcre; }; + pgocaml = callPackage ../development/ocaml-modules/pgocaml {}; + ocaml_react = callPackage ../development/ocaml-modules/react { }; reactivedata = callPackage ../development/ocaml-modules/reactivedata {}; From 8320bbaaa31f43fda9173dede63ef04ec603997f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 10 Oct 2014 23:58:08 +0100 Subject: [PATCH 3/3] ocaml-macaque: new package MaCaQue (or macaque) is a DSL for SQL Queries in Caml. Homepage: https://github.com/ocsigen/macaque --- .../ocaml-modules/macaque/default.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/ocaml-modules/macaque/default.nix diff --git a/pkgs/development/ocaml-modules/macaque/default.nix b/pkgs/development/ocaml-modules/macaque/default.nix new file mode 100644 index 000000000000..f2d13ad1f137 --- /dev/null +++ b/pkgs/development/ocaml-modules/macaque/default.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl, ocaml, findlib, pgocaml, camlp4}: + +stdenv.mkDerivation { + name = "ocaml-macaque-0.7.1"; + src = fetchurl { + url = https://github.com/ocsigen/macaque/archive/0.7.1.tar.gz; + sha256 = "0wnq3pgpcrfpivr8j7p827rhag6hdx0yr0bdvma0hw1g30vwf9qa"; + }; + + buildInputs = [ ocaml findlib camlp4 ]; + propagatedBuildInputs = [ pgocaml ]; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + description = "Macros for Caml Queries"; + homepage = https://github.com/ocsigen/macaque; + license = licenses.lgpl2; + platforms = ocaml.meta.platforms; + maintainers = with maintainers; [ vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9c0325d2c2f5..c4ac7da27455 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3493,6 +3493,8 @@ let lambdaTerm = callPackage ../development/ocaml-modules/lambda-term { }; + macaque = callPackage ../development/ocaml-modules/macaque { }; + menhir = callPackage ../development/ocaml-modules/menhir { }; merlin = callPackage ../development/tools/ocaml/merlin { };