From 0c085fd034e420e4633ba2ac5192de726bb48547 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 14 Jul 2018 08:26:26 +0000 Subject: ocamlPackages.astring: remove spurious dependency to camlp4 --- pkgs/development/ocaml-modules/astring/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/astring/default.nix b/pkgs/development/ocaml-modules/astring/default.nix index 97c59d8581f..827487be69b 100644 --- a/pkgs/development/ocaml-modules/astring/default.nix +++ b/pkgs/development/ocaml-modules/astring/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg }: +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: -buildOcaml rec { +stdenv.mkDerivation rec { version = "0.8.3"; - name = "astring"; + name = "ocaml${ocaml.version}-astring-${version}"; src = fetchurl { url = "http://erratique.ch/software/astring/releases/astring-${version}.tbz"; -- cgit 1.4.1 From ba612369e7f83db6b14ab93a6af9c7db3201fa1f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 14 Jul 2018 08:26:39 +0000 Subject: ocamlPackages.ipaddr: remove spurious dependency to camlp4 --- pkgs/development/ocaml-modules/ipaddr/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/ipaddr/default.nix b/pkgs/development/ocaml-modules/ipaddr/default.nix index 20d558e37c1..2f0aa342995 100644 --- a/pkgs/development/ocaml-modules/ipaddr/default.nix +++ b/pkgs/development/ocaml-modules/ipaddr/default.nix @@ -1,9 +1,9 @@ -{ stdenv, buildOcaml, fetchurl, ocamlbuild, findlib +{ stdenv, fetchurl, ocaml, ocamlbuild, findlib , jbuilder, sexplib, ppx_sexp_conv }: -buildOcaml rec { - name = "ipaddr"; +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ipaddr-${version}"; version = "2.8.0"; src = fetchurl { @@ -11,7 +11,7 @@ buildOcaml rec { sha256 = "1amb1pbm9ybpxy6190qygpj6nmbzzs2r6vx4xh5r6v89szx9rfxw"; }; - buildInputs = [ findlib ocamlbuild jbuilder ]; + buildInputs = [ ocaml findlib ocamlbuild jbuilder ]; propagatedBuildInputs = [ ppx_sexp_conv sexplib ]; inherit (jbuilder) installPhase; -- cgit 1.4.1 From 1c58618fd12182ef081f187e0b1a1136b85c4a53 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 14 Jul 2018 08:26:50 +0000 Subject: ocamlPackages.ppx_deriving: remove spurious dependency to camlp4 --- .../ocaml-modules/ppx_deriving/default.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/ppx_deriving/default.nix b/pkgs/development/ocaml-modules/ppx_deriving/default.nix index 3afe4149fa3..24cfbcf5b7a 100644 --- a/pkgs/development/ocaml-modules/ppx_deriving/default.nix +++ b/pkgs/development/ocaml-modules/ppx_deriving/default.nix @@ -1,7 +1,11 @@ -{ stdenv, buildOcaml, ocaml, fetchzip +{ stdenv, ocaml, findlib, ocamlbuild, fetchzip , cppo, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree }: +if !stdenv.lib.versionAtLeast ocaml.version "4.02" +then throw "ppx_deriving is not available for OCaml ${ocaml.version}" +else + let param = if ocaml.version == "4.03.0" then { @@ -14,23 +18,21 @@ let param = extraPropagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ]; }; in -buildOcaml rec { - name = "ppx_deriving"; +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ppx_deriving-${version}"; inherit (param) version; - minimumSupportedOcamlVersion = "4.02"; - src = fetchzip { - url = "https://github.com/whitequark/${name}/archive/v${version}.tar.gz"; + url = "https://github.com/ocaml-ppx/ppx_deriving/archive/v${version}.tar.gz"; inherit (param) sha256; }; - hasSharedObjects = true; - - buildInputs = [ cppo ounit ]; + buildInputs = [ ocaml findlib ocamlbuild cppo ounit ]; propagatedBuildInputs = param.extraPropagatedBuildInputs ++ [ ppx_tools result ]; + createFindlibDestdir = true; + installPhase = "OCAMLPATH=$OCAMLPATH:`ocamlfind printconf destdir` make install"; meta = with stdenv.lib; { -- cgit 1.4.1 From d534882ca27789c000fd0b17088ae39d1b566cd4 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 14 Jul 2018 08:27:00 +0000 Subject: ocamlPackages.ppx_tools: enable for OCaml 4.07 --- pkgs/development/ocaml-modules/ppx_tools/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/ppx_tools/default.nix b/pkgs/development/ocaml-modules/ppx_tools/default.nix index 53d7847acee..2aa74d751db 100644 --- a/pkgs/development/ocaml-modules/ppx_tools/default.nix +++ b/pkgs/development/ocaml-modules/ppx_tools/default.nix @@ -17,6 +17,9 @@ let param = { "4.06" = { version = "5.1+4.06.0"; sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; }; + "4.07" = { + version = "5.1+4.06.0"; + sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; }; }."${ocaml.meta.branch}"; in stdenv.mkDerivation { -- cgit 1.4.1 From fdf291f92270a378f04cda6da330970c1c88e021 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 14 Jul 2018 08:27:11 +0000 Subject: ocamlPackages.tyxml: make dependency to camlp4 optional --- pkgs/development/ocaml-modules/tyxml/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/tyxml/default.nix b/pkgs/development/ocaml-modules/tyxml/default.nix index a965d6ed116..b34c9279c30 100644 --- a/pkgs/development/ocaml-modules/tyxml/default.nix +++ b/pkgs/development/ocaml-modules/tyxml/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, camlp4, uutf, markup, ppx_tools_versioned, re +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, uutf, markup, ppx_tools_versioned, re +, withP4 ? !stdenv.lib.versionAtLeast ocaml.version "4.07" +, camlp4 ? null }: assert stdenv.lib.versionAtLeast ocaml.version "4.02"; @@ -13,13 +15,14 @@ stdenv.mkDerivation rec { sha256 = "1zrkrmxyj5a2cdh4b9zr9anwfk320wv3x0ynxnyxl5za2ix8sld8"; }; - buildInputs = [ ocaml findlib ocamlbuild camlp4 ppx_tools_versioned markup ]; + buildInputs = [ ocaml findlib ocamlbuild ppx_tools_versioned markup ] + ++ stdenv.lib.optional withP4 camlp4; propagatedBuildInputs = [ uutf re ]; createFindlibDestdir = true; - configureFlags = "--enable-syntax"; + configureFlags = stdenv.lib.optional withP4 "--enable-syntax"; meta = with stdenv.lib; { homepage = http://ocsigen.org/tyxml/; -- cgit 1.4.1