From b8826951e40626d1ad10958c1428871b97999d3e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 21 Aug 2014 15:24:43 +0200 Subject: [PATCH 1/2] Adds ocaml-sqlite3EZ and its dependency ocaml+twt ocaml+twt is an alternative syntax for OCaml that uses indentation to group multi-line expressions, like Python and Haskell. Homepage: http://people.csail.mit.edu/mikelin/ocaml+twt/ sqlite3EZ is a thin wrapper for sqlite3-ocaml with a simplified interface. Query results are processed with a functional map/fold, transactions are aborted by exceptions, resource management is handled by the garbage collector, etc. Homepage: https://github.com/mlin/ocaml-sqlite3EZ --- .../ocaml-modules/sqlite3EZ/default.nix | 23 +++++++++++++++ .../development/ocaml-modules/twt/default.nix | 29 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 3 files changed, 56 insertions(+) create mode 100644 pkgs/development/ocaml-modules/sqlite3EZ/default.nix create mode 100644 pkgs/development/ocaml-modules/twt/default.nix diff --git a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix new file mode 100644 index 000000000000..e8ec8e6f5dac --- /dev/null +++ b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, ocaml, findlib, twt, ocaml_sqlite3 }: + +stdenv.mkDerivation { + name = "ocaml-sqlite3EZ-0.1.0"; + + src = fetchurl { + url = https://github.com/mlin/ocaml-sqlite3EZ/archive/v0.1.0.tar.gz; + sha256 = "8ed2c5d5914a65cbd95589ef11bfb8b38a020eb850cdd49b8adce7ee3a563748"; + }; + + buildInputs = [ ocaml findlib twt ]; + + propagatedBuildInputs = [ ocaml_sqlite3 ]; + + createFindlibDestdir = true; + + meta = { + homepage = http://github.com/mlin/ocaml-sqlite3EZ; + description = "A thin wrapper for sqlite3-ocaml with a simplified interface"; + license = stdenv.lib.licenses.mit; + platforms = ocaml.meta.platforms; + }; +} diff --git a/pkgs/development/ocaml-modules/twt/default.nix b/pkgs/development/ocaml-modules/twt/default.nix new file mode 100644 index 000000000000..e2a627aa3609 --- /dev/null +++ b/pkgs/development/ocaml-modules/twt/default.nix @@ -0,0 +1,29 @@ +{stdenv, fetchurl, ocaml, findlib }: + +stdenv.mkDerivation { + name = "ocaml-twt-0.93.2"; + + src = fetchurl { + url = https://github.com/mlin/twt/archive/v0.93.2.tar.gz; + sha256 = "aec091fbd1e6c4d252cf9664237418b4bc8c7d6b7a17475589be78365397e768"; + }; + + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + configurePhase = '' + mkdir $out/bin + ''; + + installPhase = '' + make install PREFIX=$out + ''; + + meta = { + homepage = http://people.csail.mit.edu/mikelin/ocaml+twt/; + description = "“The Whitespace Thing” for OCaml"; + license = stdenv.lib.licenses.mit; + platforms = ocaml.meta.platforms; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 22138aa60daa..6fa8c4f91b93 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3303,6 +3303,10 @@ let opam_1_1 = callPackage ../development/tools/ocaml/opam/1.1.nix { }; opam = opam_1_1; + sqlite3EZ = callPackage ../development/ocaml-modules/sqlite3EZ { }; + + twt = callPackage ../development/ocaml-modules/twt { }; + yojson = callPackage ../development/ocaml-modules/yojson { }; zarith = callPackage ../development/ocaml-modules/zarith { }; From b33b05a8786c0acde43e0fc8d825f9e1db278862 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 3 Sep 2014 12:06:58 +0200 Subject: [PATCH 2/2] ocaml-twt: some fixes --- pkgs/development/ocaml-modules/twt/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/twt/default.nix b/pkgs/development/ocaml-modules/twt/default.nix index e2a627aa3609..c06449f68b4c 100644 --- a/pkgs/development/ocaml-modules/twt/default.nix +++ b/pkgs/development/ocaml-modules/twt/default.nix @@ -16,9 +16,9 @@ stdenv.mkDerivation { mkdir $out/bin ''; - installPhase = '' - make install PREFIX=$out - ''; + dontBuild = true; + + installFlags = "PREFIX=$(out)"; meta = { homepage = http://people.csail.mit.edu/mikelin/ocaml+twt/;