about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-10-19 21:09:20 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-10-20 07:19:13 +0000
commit68ed8f685b35b80c7caf1c5296526beb1e977552 (patch)
tree70cc369fdd94ba0636fbd88abb4ee008f97d8c80 /pkgs
parent5da5af56e11ea26841d0c3226dc27c0dc720b3c9 (diff)
downloadnixlib-68ed8f685b35b80c7caf1c5296526beb1e977552.tar
nixlib-68ed8f685b35b80c7caf1c5296526beb1e977552.tar.gz
nixlib-68ed8f685b35b80c7caf1c5296526beb1e977552.tar.bz2
nixlib-68ed8f685b35b80c7caf1c5296526beb1e977552.tar.lz
nixlib-68ed8f685b35b80c7caf1c5296526beb1e977552.tar.xz
nixlib-68ed8f685b35b80c7caf1c5296526beb1e977552.tar.zst
nixlib-68ed8f685b35b80c7caf1c5296526beb1e977552.zip
ocamlPackages.camomile: 0.8.5 -> 0.8.6
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/ocaml-modules/camomile/0.8.5.nix30
-rw-r--r--pkgs/development/ocaml-modules/camomile/default.nix41
-rw-r--r--pkgs/top-level/ocaml-packages.nix5
3 files changed, 53 insertions, 23 deletions
diff --git a/pkgs/development/ocaml-modules/camomile/0.8.5.nix b/pkgs/development/ocaml-modules/camomile/0.8.5.nix
new file mode 100644
index 000000000000..48517036dc6d
--- /dev/null
+++ b/pkgs/development/ocaml-modules/camomile/0.8.5.nix
@@ -0,0 +1,30 @@
+{stdenv, fetchurl, fetchpatch, ocaml, findlib, camlp4}:
+
+stdenv.mkDerivation rec {
+  name = "camomile-${version}";
+  version = "0.8.5";
+
+  src = fetchurl {
+    url = https://github.com/yoriyuki/Camomile/releases/download/rel-0.8.5/camomile-0.8.5.tar.bz2;
+    sha256 = "003ikpvpaliy5hblhckfmln34zqz0mk3y2m1fqvbjngh3h2np045";
+  };
+
+  patches = [ (fetchpatch {
+    url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/camomile/camomile.0.8.5/files/4.05-typing-fix.patch;
+    sha256 = "167279lia6qx62mdcyc5rjsi4gf4yi52wn9mhgd9y1v3754z7fwb";
+  })];
+
+  buildInputs = [ocaml findlib camlp4];
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = https://github.com/yoriyuki/Camomile/tree/master/Camomile;
+    description = "A comprehensive Unicode library for OCaml";
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = ocaml.meta.platforms or [];
+    maintainers = [
+      stdenv.lib.maintainers.z77z
+    ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/camomile/default.nix b/pkgs/development/ocaml-modules/camomile/default.nix
index 48517036dc6d..897a3ff6036d 100644
--- a/pkgs/development/ocaml-modules/camomile/default.nix
+++ b/pkgs/development/ocaml-modules/camomile/default.nix
@@ -1,30 +1,27 @@
-{stdenv, fetchurl, fetchpatch, ocaml, findlib, camlp4}:
+{ stdenv, fetchFromGitHub, ocaml, findlib, jbuilder, cppo }:
 
 stdenv.mkDerivation rec {
-  name = "camomile-${version}";
-  version = "0.8.5";
+	version = "0.8.6";
+	name = "ocaml${ocaml.version}-camomile-${version}";
 
-  src = fetchurl {
-    url = https://github.com/yoriyuki/Camomile/releases/download/rel-0.8.5/camomile-0.8.5.tar.bz2;
-    sha256 = "003ikpvpaliy5hblhckfmln34zqz0mk3y2m1fqvbjngh3h2np045";
-  };
+	src = fetchFromGitHub {
+		owner = "yoriyuki";
+		repo = "camomile";
+		rev = "rel-${version}";
+		sha256 = "1jq1xhaikczk6lbvas7c35aa04q0kjaqd8m54c4jivpj80yvg4x9";
+	};
 
-  patches = [ (fetchpatch {
-    url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/camomile/camomile.0.8.5/files/4.05-typing-fix.patch;
-    sha256 = "167279lia6qx62mdcyc5rjsi4gf4yi52wn9mhgd9y1v3754z7fwb";
-  })];
+	buildInputs = [ ocaml findlib jbuilder cppo ];
 
-  buildInputs = [ocaml findlib camlp4];
+	configurePhase = "ocaml configure.ml --share $out/share/camomile";
 
-  createFindlibDestdir = true;
+	inherit (jbuilder) installPhase;
 
-  meta = {
-    homepage = https://github.com/yoriyuki/Camomile/tree/master/Camomile;
-    description = "A comprehensive Unicode library for OCaml";
-    license = stdenv.lib.licenses.lgpl21;
-    platforms = ocaml.meta.platforms or [];
-    maintainers = [
-      stdenv.lib.maintainers.z77z
-    ];
-  };
+	meta = {
+		inherit (ocaml.meta) platforms;
+		inherit (src.meta) homepage;
+		maintainers = [ stdenv.lib.maintainers.vbgl ];
+		license = stdenv.lib.licenses.lgpl21;
+		description = "A Unicode library for OCaml";
+	};
 }
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index c27cb1bcdfdd..43c249e7b1d9 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -98,7 +98,10 @@ let
     camlzip = callPackage ../development/ocaml-modules/camlzip { };
 
     camomile_0_8_2 = callPackage ../development/ocaml-modules/camomile/0.8.2.nix { };
-    camomile = callPackage ../development/ocaml-modules/camomile { };
+    camomile =
+      if lib.versionOlder "4.03" ocaml.version
+      then callPackage ../development/ocaml-modules/camomile { }
+      else callPackage ../development/ocaml-modules/camomile/0.8.5.nix { };
 
     camlimages_4_0 =
       if lib.versionOlder "4.02" ocaml.version