summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2017-01-24 21:38:19 +0000
committerGitHub <noreply@github.com>2017-01-24 21:38:19 +0000
commit54e97b8ec6348e5d3f11014aa1902d85a26db51f (patch)
treeca942a9cc5f28d945541ee5654ba441bfbcd2ab0 /pkgs
parentba603d03f403d03124b5230e06ace7bca3c4b68a (diff)
parent5bcf3c5e25aeb6b2d0d587ec6d5f3cb6ca5170c9 (diff)
downloadnixlib-54e97b8ec6348e5d3f11014aa1902d85a26db51f.tar
nixlib-54e97b8ec6348e5d3f11014aa1902d85a26db51f.tar.gz
nixlib-54e97b8ec6348e5d3f11014aa1902d85a26db51f.tar.bz2
nixlib-54e97b8ec6348e5d3f11014aa1902d85a26db51f.tar.lz
nixlib-54e97b8ec6348e5d3f11014aa1902d85a26db51f.tar.xz
nixlib-54e97b8ec6348e5d3f11014aa1902d85a26db51f.tar.zst
nixlib-54e97b8ec6348e5d3f11014aa1902d85a26db51f.zip
Merge pull request #22114 from vbgl/ocaml-4.04
OCaml 4.04
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/ocaml/4.04.nix6
-rw-r--r--pkgs/development/compilers/ocaml/generic.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocsigen-deriving/default.nix8
-rw-r--r--pkgs/development/ocaml-modules/ppx_tools/default.nix20
-rw-r--r--pkgs/development/ocaml-modules/spacetime_lib/default.nix27
-rw-r--r--pkgs/development/tools/ocaml/camlp4/default.nix3
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/default.nix4
-rw-r--r--pkgs/top-level/ocaml-packages.nix6
8 files changed, 60 insertions, 18 deletions
diff --git a/pkgs/development/compilers/ocaml/4.04.nix b/pkgs/development/compilers/ocaml/4.04.nix
new file mode 100644
index 000000000000..7e35c9e1aa80
--- /dev/null
+++ b/pkgs/development/compilers/ocaml/4.04.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "04";
+  patch_version = "0";
+  sha256 = "1d2nk3kq4dyzz8dls45r13jprq5by3q8kshc8kvxzm8n4fnnvvb4";
+}
diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix
index abded4b66900..17b3033c31df 100644
--- a/pkgs/development/compilers/ocaml/generic.nix
+++ b/pkgs/development/compilers/ocaml/generic.nix
@@ -41,7 +41,7 @@ stdenv.mkDerivation (args // rec {
   buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";
   buildInputs = [ncurses] ++ optionals useX11 [ libX11 xproto ];
   installTargets = "install" + optionalString useNativeCompilers " installopt";
-  preConfigure = ''
+  preConfigure = optionalString (!stdenv.lib.versionAtLeast version "4.04") ''
     CAT=$(type -tp cat)
     sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
   '';
@@ -56,7 +56,7 @@ stdenv.mkDerivation (args // rec {
 
   meta = with stdenv.lib; {
     homepage = http://caml.inria.fr/ocaml;
-    branch = "4.03";
+    branch = versionNoPatch;
     license = with licenses; [
       qpl /* compiler */
       lgpl2 /* library */
diff --git a/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix b/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
index d2d66994604b..653445617958 100644
--- a/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
+++ b/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
@@ -1,15 +1,15 @@
-{ stdenv, fetchzip, ocaml, findlib, oasis, ocaml_optcomp, camlp4 }:
+{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, oasis, ocaml_optcomp, camlp4 }:
 
-let version = "0.7"; in
+let version = "0.7.1"; in
 
 stdenv.mkDerivation {
   name = "ocsigen-deriving-${version}";
   src = fetchzip {
     url = "https://github.com/ocsigen/deriving/archive/${version}.tar.gz";
-    sha256 = "05z606gly1iyan292x3mflg3zasgg68n8i2mivz0zbshx2hz2jbw";
+    sha256 = "0gg3nr3iic4rwqrcc0qvfm9x0x57zclvdsnpy0z8rv2fl5isbzms";
     };
 
-  buildInputs = [ ocaml findlib oasis ocaml_optcomp camlp4 ];
+  buildInputs = [ ocaml findlib ocamlbuild oasis ocaml_optcomp camlp4 ];
 
   createFindlibDestdir = true;
 
diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix
index 33bf180cd7f3..b6a6039a4faa 100644
--- a/pkgs/development/ocaml-modules/ppx_tools/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix
@@ -1,19 +1,21 @@
 { stdenv, fetchFromGitHub, ocaml, findlib }:
 
-let
-  version =
-  if stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.03" then "5.0+4.03.0" else "5.0+4.02.0";
+let param = {
+  "4.02.3" = {
+    version = "5.0+4.02.0";
+    sha256 = "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8"; };
+  "4.03.0" = {
+    version = "5.0+4.03.0";
+    sha256 = "061v1fl5z7z3ywi4ppryrlcywnvnqbsw83ppq72qmkc7ma4603jg"; };
+}."${ocaml.version}";
 in
   stdenv.mkDerivation {
-    name = "ocaml-ppx_tools-${version}";
+    name = "ocaml${ocaml.version}-ppx_tools-${param.version}";
     src = fetchFromGitHub {
       owner = "alainfrisch";
       repo = "ppx_tools";
-      rev = version;
-      sha256 = if version == "5.0+4.03.0"
-      then "061v1fl5z7z3ywi4ppryrlcywnvnqbsw83ppq72qmkc7ma4603jg"
-      else "16drjk0qafjls8blng69qiv35a84wlafpk16grrg2i3x19p8dlj8"
-      ;
+      rev = param.version;
+      inherit (param) sha256;
     };
 
     buildInputs = [ ocaml findlib ];
diff --git a/pkgs/development/ocaml-modules/spacetime_lib/default.nix b/pkgs/development/ocaml-modules/spacetime_lib/default.nix
new file mode 100644
index 000000000000..c12e47968ef0
--- /dev/null
+++ b/pkgs/development/ocaml-modules/spacetime_lib/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, owee }:
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-spacetime_lib-${version}";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "lpw25";
+    repo = "spacetime_lib";
+    rev = version;
+    sha256 = "1g91y6wl3z18jhaz2q03wn54zj6xk1qcjidr1nc6nq9a8906lcq5";
+  };
+
+  buildInputs = [ ocaml findlib ];
+
+  propagatedBuildInputs = [ owee ];
+
+  createFindlibDestdir = true;
+
+  meta = {
+    description = "An OCaml library providing some simple operations for handling OCaml “spacetime” profiles";
+    inherit (src.meta) homepage;
+    inherit (ocaml.meta) platforms;
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+  };
+}
diff --git a/pkgs/development/tools/ocaml/camlp4/default.nix b/pkgs/development/tools/ocaml/camlp4/default.nix
index 1e1d2eb68eab..a257a88287cd 100644
--- a/pkgs/development/tools/ocaml/camlp4/default.nix
+++ b/pkgs/development/tools/ocaml/camlp4/default.nix
@@ -7,6 +7,9 @@ let param = {
   "4.03.0" = {
      version = "4.03+1";
      sha256 = "1f2ndch6f1m4fgnxsjb94qbpwjnjgdlya6pard44y6n0dqxi1wsq"; };
+  "4.04.0" = {
+     version = "4.04+1";
+     sha256 = "1ad7rygqjxrc1im95gw9lp8q83nhdaf383f2808f1p63yl42xm7k"; };
   }."${ocaml.version}";
 in
 
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
index d88dd9eb8964..81cd2caf7ee0 100644
--- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4
+{ stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4, ocamlbuild
 , cmdliner, tyxml, reactivedata, cppo, which, base64, uchar
 }:
 
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
     }."${version}";
   };
 
-  buildInputs = [ ocaml findlib menhir ocsigen_deriving
+  buildInputs = [ ocaml findlib menhir ocsigen_deriving ocamlbuild
                  cmdliner reactivedata cppo which base64 ]
   ++ stdenv.lib.optional (stdenv.lib.versionAtLeast ocaml.version "4.02") tyxml;
   propagatedBuildInputs = [ ocaml_lwt camlp4 ppx_deriving ]
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index eb3553f55612..52c74b37b6e8 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -374,6 +374,8 @@ let
 
     sequence = callPackage ../development/ocaml-modules/sequence { };
 
+    spacetime_lib = callPackage ../development/ocaml-modules/spacetime_lib { };
+
     sqlexpr = callPackage ../development/ocaml-modules/sqlexpr { };
 
     tuntap = callPackage ../development/ocaml-modules/tuntap { };
@@ -727,7 +729,9 @@ in rec
 
   ocamlPackages_4_03 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.03.nix { }) (self: super: { });
 
-  ocamlPackages_latest = ocamlPackages_4_03;
+  ocamlPackages_4_04 = mkOcamlPackages (callPackage ../development/compilers/ocaml/4.04.nix { }) (self: super: { });
+
+  ocamlPackages_latest = ocamlPackages_4_04;
 
   ocamlPackages = ocamlPackages_4_01_0;
 }