about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ppx_import
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2018-09-10 05:45:15 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2018-09-18 05:00:51 +0000
commit66842c9a720184f67d51a45c6acb47234a888788 (patch)
tree27e8d35190f7d8386314623eb6c2b64d6c7ffdd1 /pkgs/development/ocaml-modules/ppx_import
parent134a83ac70053d2e6084deea5e04f60658d5b203 (diff)
downloadnixlib-66842c9a720184f67d51a45c6acb47234a888788.tar
nixlib-66842c9a720184f67d51a45c6acb47234a888788.tar.gz
nixlib-66842c9a720184f67d51a45c6acb47234a888788.tar.bz2
nixlib-66842c9a720184f67d51a45c6acb47234a888788.tar.lz
nixlib-66842c9a720184f67d51a45c6acb47234a888788.tar.xz
nixlib-66842c9a720184f67d51a45c6acb47234a888788.tar.zst
nixlib-66842c9a720184f67d51a45c6acb47234a888788.zip
ocamlPackages.ppx_import: 1.4 -> 1.5
Diffstat (limited to 'pkgs/development/ocaml-modules/ppx_import')
-rw-r--r--pkgs/development/ocaml-modules/ppx_import/default.nix21
1 files changed, 13 insertions, 8 deletions
diff --git a/pkgs/development/ocaml-modules/ppx_import/default.nix b/pkgs/development/ocaml-modules/ppx_import/default.nix
index 1f53b8712828..ffac74de4edf 100644
--- a/pkgs/development/ocaml-modules/ppx_import/default.nix
+++ b/pkgs/development/ocaml-modules/ppx_import/default.nix
@@ -1,21 +1,24 @@
-{stdenv, fetchFromGitHub, buildOcaml, opaline,
- cppo, ounit, ppx_deriving}:
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opaline
+, cppo, ounit, ppx_deriving
+}:
 
-buildOcaml rec {
-  name = "ppx_import";
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "ppx_import is not available for OCaml ${ocaml.version}"
+else
 
-  version = "1.4";
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-ppx_import-${version}";
 
-  minimumSupportedOcamlVersion = "4.02";
+  version = "1.5";
 
   src = fetchFromGitHub {
     owner = "ocaml-ppx";
     repo = "ppx_import";
     rev = "v${version}";
-    sha256 = "14c2lp7r9080c4hsb1y1drbxxx3v44b7ib5wfh3kkh3f1jfsjwbk";
+    sha256 = "1lf5lfp6bl5g4gdszaa6k6pkyh3qyhbarg5m1j0ai3i8zh5qg09d";
   };
 
-  buildInputs = [ cppo ounit ppx_deriving opaline ];
+  buildInputs = [ ocaml findlib ocamlbuild cppo ounit ppx_deriving opaline ];
 
   doCheck = true;
   checkTarget = "test";
@@ -25,5 +28,7 @@ buildOcaml rec {
   meta = with stdenv.lib; {
     description = "A syntax extension that allows to pull in types or signatures from other compiled interface files";
     license = licenses.mit;
+    inherit (ocaml.meta) platforms;
+    inherit (src.meta) homepage;
   };
 }