From 841a02cabb06c1869ac772b2a2629574466d3cbe Mon Sep 17 00:00:00 2001 From: Marco Maggesi Date: Wed, 29 Jan 2014 22:09:29 +0100 Subject: [PATCH 1/4] Update OCaml Type_conv to version 109.60.01. Also keep the old version 3.0.5 around for compatibility with OCaml 3.12.1. --- .../ocaml-modules/typeconv/3.0.5.nix | 23 +++++++++++++++++++ .../ocaml-modules/typeconv/default.nix | 11 ++++----- pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/ocaml-modules/typeconv/3.0.5.nix diff --git a/pkgs/development/ocaml-modules/typeconv/3.0.5.nix b/pkgs/development/ocaml-modules/typeconv/3.0.5.nix new file mode 100644 index 000000000000..299e7729b91e --- /dev/null +++ b/pkgs/development/ocaml-modules/typeconv/3.0.5.nix @@ -0,0 +1,23 @@ +{stdenv, fetchurl, ocaml, findlib}: + +# note: works only with ocaml >3.12 + +stdenv.mkDerivation { + name = "ocaml-typeconv-3.0.5"; + + src = fetchurl { + url = "http://forge.ocamlcore.org/frs/download.php/821/type_conv-3.0.5.tar.gz"; + sha256 = "90ac6c401a600a23012a3f513def6f67d4979b11bd551f4d0af78f0f0b479198"; + }; + + buildInputs = [ocaml findlib ]; + + createFindlibDestdir = true; + + meta = { + homepage = "http://forge.ocamlcore.org/projects/type-conv/"; + description = "Support library for OCaml preprocessor type conversions"; + license = "LGPL"; + platforms = ocaml.meta.platforms; + }; +} diff --git a/pkgs/development/ocaml-modules/typeconv/default.nix b/pkgs/development/ocaml-modules/typeconv/default.nix index 299e7729b91e..33e30f5d5c8e 100644 --- a/pkgs/development/ocaml-modules/typeconv/default.nix +++ b/pkgs/development/ocaml-modules/typeconv/default.nix @@ -1,13 +1,11 @@ {stdenv, fetchurl, ocaml, findlib}: -# note: works only with ocaml >3.12 - stdenv.mkDerivation { - name = "ocaml-typeconv-3.0.5"; + name = "ocaml-typeconv-109.60.01"; src = fetchurl { - url = "http://forge.ocamlcore.org/frs/download.php/821/type_conv-3.0.5.tar.gz"; - sha256 = "90ac6c401a600a23012a3f513def6f67d4979b11bd551f4d0af78f0f0b479198"; + url = https://github.com/janestreet/type_conv/archive/109.60.01.tar.gz; + sha256 = "0lpxri68glgq1z2pp02rp45cb909xywbff8d4idljrf6fzzil2zx"; }; buildInputs = [ocaml findlib ]; @@ -17,7 +15,8 @@ stdenv.mkDerivation { meta = { homepage = "http://forge.ocamlcore.org/projects/type-conv/"; description = "Support library for OCaml preprocessor type conversions"; - license = "LGPL"; + license = stdenv.lib.licenses.lgpl21; platforms = ocaml.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ z77z ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b1fb47c9be75..e4bc8845c072 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2939,6 +2939,8 @@ let ocaml_typeconv = callPackage ../development/ocaml-modules/typeconv { }; + ocaml_typeconv_3_0_5 = callPackage ../development/ocaml-modules/typeconv/3.0.5.nix { }; + ocaml_sexplib = callPackage ../development/ocaml-modules/sexplib { }; ocaml_extlib = callPackage ../development/ocaml-modules/extlib { }; From ec1b40be872c4a7ea06cfb354b6462bf75d72c96 Mon Sep 17 00:00:00 2001 From: Marco Maggesi Date: Wed, 29 Jan 2014 17:52:53 +0100 Subject: [PATCH 2/4] Update OCaml Batteries to version 2.2.0 --- .../ocaml-modules/batteries/default.nix | 24 ++++--------------- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix index 3ecf2ae46994..ac7b8adfd8ca 100644 --- a/pkgs/development/ocaml-modules/batteries/default.nix +++ b/pkgs/development/ocaml-modules/batteries/default.nix @@ -1,32 +1,18 @@ {stdenv, fetchurl, ocaml, findlib, camomile, ounit}: -let - ocaml_version = (builtins.parseDrvName ocaml.name).version; -in - stdenv.mkDerivation { - name = "ocaml-batteries-1.4.1"; + name = "ocaml-batteries-2.2.0"; src = fetchurl { - url = http://forge.ocamlcore.org/frs/download.php/684/batteries-1.4.1.tar.gz; - sha256 = "bdca7deba290d83c66c0a5001da52b2d7f2af58b7b7e7d9303d4363aaafe9c30"; + url = http://forge.ocamlcore.org/frs/download.php/1363/batteries-2.2.tar.gz; + sha256 = "0z4wg357fzz7cnarjsrrdnpmxw8mxcj10fp67dm3bnn0l3zkjwbs"; }; buildInputs = [ocaml findlib camomile ounit]; - patchPhase = '' - substituteInPlace Makefile --replace '/bin/echo -n' echo - ''; - configurePhase = "true"; # Skip configure - preInstall = '' - mkdir -p "$out/lib/ocaml/${ocaml_version}/site-lib" - ''; - - doCheck = true; - - checkTarget = "test"; + createFindlibDestdir = true; meta = { homepage = http://batteries.forge.ocamlcore.org/; @@ -36,7 +22,7 @@ stdenv.mkDerivation { and comprehensive development platform for the OCaml programming language. ''; - license = "LGPL"; + license = stdenv.lib.licenses.lgpl21; platforms = ocaml.meta.platforms; maintainers = [ stdenv.lib.maintainers.z77z diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e4bc8845c072..4a41cebc7d5f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2899,9 +2899,7 @@ let mlgmp = callPackage ../development/ocaml-modules/mlgmp { }; - ocaml_batteries = callPackage ../development/ocaml-modules/batteries { - camomile = camomile_0_8_2; - }; + ocaml_batteries = callPackage ../development/ocaml-modules/batteries { }; ocaml_cryptgps = callPackage ../development/ocaml-modules/cryptgps { }; From f3a49abf089de509bbfc5f535d01d0053bc54046 Mon Sep 17 00:00:00 2001 From: Marco Maggesi Date: Fri, 31 Jan 2014 06:44:42 +0100 Subject: [PATCH 3/4] Add OCaml Oasis OCaml Oasis is a configure/build/install system for OCaml proget (like Cabal for Haskell). This commit also add a few small dependencies that where missing - OCaml Data Notation (odn) - ocamlify - ocamlmod --- .../development/ocaml-modules/odn/default.nix | 28 ++++++++++++++++ .../development/tools/ocaml/oasis/default.nix | 32 +++++++++++++++++++ .../tools/ocaml/ocamlify/default.nix | 26 +++++++++++++++ .../tools/ocaml/ocamlmod/default.nix | 25 +++++++++++++++ pkgs/top-level/all-packages.nix | 8 +++++ 5 files changed, 119 insertions(+) create mode 100644 pkgs/development/ocaml-modules/odn/default.nix create mode 100644 pkgs/development/tools/ocaml/oasis/default.nix create mode 100644 pkgs/development/tools/ocaml/ocamlify/default.nix create mode 100644 pkgs/development/tools/ocaml/ocamlmod/default.nix diff --git a/pkgs/development/ocaml-modules/odn/default.nix b/pkgs/development/ocaml-modules/odn/default.nix new file mode 100644 index 000000000000..5f72afcf7666 --- /dev/null +++ b/pkgs/development/ocaml-modules/odn/default.nix @@ -0,0 +1,28 @@ +{stdenv, fetchurl, ocaml, findlib, ocaml_typeconv, ounit}: + +stdenv.mkDerivation { + name = "ocaml-data-notation-0.0.11"; + + src = fetchurl { + url = https://forge.ocamlcore.org/frs/download.php/1310/ocaml-data-notation-0.0.11.tar.gz; + sha256 = "09a8zdyifpc2nl4hdvg9206142y31cq95ajgij011s1qcg3z93lj"; + }; + + buildInputs = [ocaml findlib ocaml_typeconv ounit]; + + createFindlibDestdir = true; + + configurePhase = "ocaml setup.ml -configure"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; + + meta = { + description = "Store data using OCaml notation"; + homepage = https://forge.ocamlcore.org/projects/odn/; + license = stdenv.lib.licenses.lgpl21; + platforms = ocaml.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ + z77z + ]; + }; +} diff --git a/pkgs/development/tools/ocaml/oasis/default.nix b/pkgs/development/tools/ocaml/oasis/default.nix new file mode 100644 index 000000000000..3ab935705a2d --- /dev/null +++ b/pkgs/development/tools/ocaml/oasis/default.nix @@ -0,0 +1,32 @@ +{stdenv, fetchurl, ocaml, findlib, ocaml_data_notation, ocaml_typeconv, + ocamlmod, ocamlify, ounit, expect}: + +stdenv.mkDerivation { + name = "ocaml-oasis-0.4.1"; + + src = fetchurl { + url = http://forge.ocamlcore.org/frs/download.php/1355/oasis-0.4.1.tar.gz; + sha256 = "1lsnw9f1jh6106kphxg40qp0sia6cbkbb9ahs5y6ifnfkmllkjhj"; + }; + + createFindlibDestdir = true; + + buildInputs = + [ + ocaml findlib ocaml_data_notation ocaml_typeconv ocamlmod ocamlify ounit + ]; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; + + meta = { + homepage = http://oasis.forge.ocamlcore.org/; + description = "Configure, build and install system for OCaml projects"; + license = stdenv.lib.licenses.lgpl21; + platforms = ocaml.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ + z77z + ]; + }; +} diff --git a/pkgs/development/tools/ocaml/ocamlify/default.nix b/pkgs/development/tools/ocaml/ocamlify/default.nix new file mode 100644 index 000000000000..88b7451e0f00 --- /dev/null +++ b/pkgs/development/tools/ocaml/ocamlify/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl, ocaml, findlib, ounit}: + +stdenv.mkDerivation { + name = "ocamlify-0.0.2"; + + src = fetchurl { + url = http://forge.ocamlcore.org/frs/download.php/1209/ocamlify-0.0.2.tar.gz; + sha256 = "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"; + }; + + buildInputs = [ocaml findlib ounit]; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; + + meta = { + homepage = http://forge.ocamlcore.org/projects/ocamlmod/ocamlmod; + description = "Generate OCaml modules from source files"; + platforms = ocaml.meta.platforms; + license = stdenv.lib.licenses.lgpl21; + maintainers = with stdenv.lib.maintainers; [ + z77z + ]; + }; +} diff --git a/pkgs/development/tools/ocaml/ocamlmod/default.nix b/pkgs/development/tools/ocaml/ocamlmod/default.nix new file mode 100644 index 000000000000..d72df18f8992 --- /dev/null +++ b/pkgs/development/tools/ocaml/ocamlmod/default.nix @@ -0,0 +1,25 @@ +{stdenv, fetchurl, ocaml, findlib, ounit}: + +stdenv.mkDerivation { + name = "ocamlmod-0.0.7"; + + src = fetchurl { + url = http://forge.ocamlcore.org/frs/download.php/1350/ocamlmod-0.0.7.tar.gz; + sha256 = "11kg7wh0gy492ma5c6bcjh6frv1a9lh9f26hiys2i0d1ky8s0ad3"; + }; + + buildInputs = [ocaml findlib ounit]; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; + + meta = { + homepage = http://forge.ocamlcore.org/projects/ocamlmod/ocamlmod; + description = "Generate OCaml modules from source files"; + platforms = ocaml.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ + z77z + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4a41cebc7d5f..08b4f1efb10a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2903,18 +2903,26 @@ let ocaml_cryptgps = callPackage ../development/ocaml-modules/cryptgps { }; + ocaml_data_notation = callPackage ../development/ocaml-modules/odn { }; + ocaml_expat = callPackage ../development/ocaml-modules/expat { }; ocamlgraph = callPackage ../development/ocaml-modules/ocamlgraph { }; ocaml_http = callPackage ../development/ocaml-modules/http { }; + ocamlify = callPackage ../development/tools/ocaml/ocamlify { }; + ocaml_lwt = callPackage ../development/ocaml-modules/lwt { }; + ocamlmod = callPackage ../development/tools/ocaml/ocamlmod { }; + ocaml_mysql = callPackage ../development/ocaml-modules/mysql { }; ocamlnet = callPackage ../development/ocaml-modules/ocamlnet { }; + ocaml_oasis = callPackage ../development/tools/ocaml/oasis { }; + ocaml_pcre = callPackage ../development/ocaml-modules/pcre { inherit pcre; }; From e1df6c21620a78107ecbab33fb53eba921189d45 Mon Sep 17 00:00:00 2001 From: Marco Maggesi Date: Fri, 31 Jan 2014 00:10:20 +0100 Subject: [PATCH 4/4] Update OCaml react to version 2.4.3 --- .../ocaml-modules/react/default.nix | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/pkgs/development/ocaml-modules/react/default.nix b/pkgs/development/ocaml-modules/react/default.nix index 02420204dbfa..a69ef9d446c2 100644 --- a/pkgs/development/ocaml-modules/react/default.nix +++ b/pkgs/development/ocaml-modules/react/default.nix @@ -1,34 +1,25 @@ -{stdenv, fetchurl, ocaml}: - -let - ocaml_version = (builtins.parseDrvName ocaml.name).version; - version = "0.9.2"; -in +{stdenv, fetchurl, ocaml, findlib, ocaml_oasis}: stdenv.mkDerivation { - name = "ocaml-react-${version}"; + name = "ocaml-react-0.9.4"; src = fetchurl { - url = "http://erratique.ch/software/react/releases/react-${version}.tbz"; - sha256 = "0fiaxzfxv8pc82d31jz85zryz06k84is0l3sn5g0di5mpc5falxr"; + url = http://github.com/dbuenzli/react/archive/v0.9.4.tar.gz; + sha256 = "16k0kx93kd45s7pigkzvirfsbr22xhby0y88y86p473qxzc6ngrm"; }; - buildInputs = [ocaml]; + buildInputs = [ocaml findlib ocaml_oasis]; - buildCommand = '' - export INSTALLDIR=$out/lib/ocaml/${ocaml_version}/site-lib/react - tar xjf $src - cd react-* - substituteInPlace src/META --replace '+react' $INSTALLDIR - chmod +x build - ./build - ./build install - ''; + createFindlibDestdir = true; + + configurePhase = "oasis setup && ocaml setup.ml -configure --prefix $out"; + buildPhase = "ocaml setup.ml -build"; + installPhase = "ocaml setup.ml -install"; meta = { homepage = http://erratique.ch/software/react; description = "Applicative events and signals for OCaml"; - license = "BSD"; + license = stdenv.lib.licenses.bsd3; platforms = ocaml.meta.platforms; maintainers = [ stdenv.lib.maintainers.z77z