From c9d8ae084d9340f9f7dddd3267e1f7ad72f70502 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 12 Mar 2017 07:29:54 +0000 Subject: [PATCH] ocamlPackages.ocaml-migrate-parsetree: init at 0.5 This library converts parsetrees, outcometree and ast mappers between different OCaml versions. High-level functions help making PPX rewriters independent of a compiler version. Homepage: https://github.com/let-def/ocaml-migrate-parsetree --- .../ocaml-migrate-parsetree/default.nix | 31 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix diff --git a/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix b/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix new file mode 100644 index 000000000000..3694dd2d6abc --- /dev/null +++ b/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, jbuilder, result }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ocaml-migrate-parsetree-${version}"; + version = "0.5"; + + src = fetchFromGitHub { + owner = "let-def"; + repo = "ocaml-migrate-parsetree"; + rev = "v${version}"; + sha256 = "023lnd3kxa3d4zgsvv0z2lyzhg05zcgagy18vaalimbza57wq83h"; + }; + + buildInputs = [ ocaml findlib ocamlbuild jbuilder ]; + propagatedBuildInputs = [ result ]; + + installPhase = '' + for p in *.install + do + ${jbuilder.installPhase} $p + done + ''; + + meta = { + description = "Convert OCaml parsetrees between different major versions"; + license = stdenv.lib.licenses.lgpl21; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 1cc5de01e101..f3f535bb0857 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -336,6 +336,8 @@ let ocaml_lwt = callPackage ../development/ocaml-modules/lwt { }; + ocaml-migrate-parsetree = callPackage ../development/ocaml-modules/ocaml-migrate-parsetree { }; + ocamlmod = callPackage ../development/tools/ocaml/ocamlmod { }; ocaml_mysql = callPackage ../development/ocaml-modules/mysql { };