From ee843ee86e1f2bd3c48c81692076325cc8a37432 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 5 Dec 2018 09:31:47 +0000 Subject: [PATCH] ocamlPackages.ppx_import: 1.5 -> 1.5-3 --- .../ocaml-modules/ppx_import/default.nix | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/pkgs/development/ocaml-modules/ppx_import/default.nix b/pkgs/development/ocaml-modules/ppx_import/default.nix index ffac74de4edf..bdcc6568ffe7 100644 --- a/pkgs/development/ocaml-modules/ppx_import/default.nix +++ b/pkgs/development/ocaml-modules/ppx_import/default.nix @@ -1,34 +1,31 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opaline -, cppo, ounit, ppx_deriving +{ lib, fetchFromGitHub, buildDunePackage, ocaml +, ounit, ppx_deriving, ppx_tools_versioned }: -if !stdenv.lib.versionAtLeast ocaml.version "4.02" +if !lib.versionAtLeast ocaml.version "4.04" then throw "ppx_import is not available for OCaml ${ocaml.version}" else -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-ppx_import-${version}"; - - version = "1.5"; +buildDunePackage rec { + pname = "ppx_import"; + version = "1.5-3"; src = fetchFromGitHub { owner = "ocaml-ppx"; repo = "ppx_import"; - rev = "v${version}"; - sha256 = "1lf5lfp6bl5g4gdszaa6k6pkyh3qyhbarg5m1j0ai3i8zh5qg09d"; + rev = "bd627d5afee597589761d6fee30359300b5e1d80"; + sha256 = "1f9bphif1izhyx72hvwpkd9kxi9lfvygaicy6nbxyp6qgc87z4nm"; }; - buildInputs = [ ocaml findlib ocamlbuild cppo ounit ppx_deriving opaline ]; + buildInputs = [ ounit ppx_deriving ]; + propagatedBuildInputs = [ ppx_tools_versioned ]; doCheck = true; checkTarget = "test"; - installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR"; - - meta = with stdenv.lib; { + meta = { description = "A syntax extension that allows to pull in types or signatures from other compiled interface files"; - license = licenses.mit; - inherit (ocaml.meta) platforms; + license = lib.licenses.mit; inherit (src.meta) homepage; }; }