From fac7453117bfbe56c0b3ea96a558505844caa27a Mon Sep 17 00:00:00 2001 From: Vasiliy Yorkin Date: Fri, 20 Sep 2019 08:53:30 +0300 Subject: [PATCH] ocamlPackages.ocaml-protoc: init at 1.2.0 (#68962) --- .../ocaml-modules/ocaml-protoc/default.nix | 38 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/ocaml-modules/ocaml-protoc/default.nix diff --git a/pkgs/development/ocaml-modules/ocaml-protoc/default.nix b/pkgs/development/ocaml-modules/ocaml-protoc/default.nix new file mode 100644 index 000000000000..1ef7b6c2d40b --- /dev/null +++ b/pkgs/development/ocaml-modules/ocaml-protoc/default.nix @@ -0,0 +1,38 @@ +{ stdenv, ocaml, fetchFromGitHub, ocamlbuild, findlib, ppx_deriving_protobuf }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-ocaml-protoc-${version}"; + version = "1.2.0"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "mransan"; + repo = "ocaml-protoc"; + rev = "60d2d4dd55f73830e1bed603cc44d3420430632c"; + sha256 = "1d1p8ch723z2qa9azmmnhbcpwxbpzk3imh1cgkjjq4p5jwzj8amj"; + }; + + installPhase = '' + mkdir -p tmp/bin + export PREFIX=`pwd`/tmp + make all.install.build + make check_install + make lib.install + make bin.install + ''; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ ppx_deriving_protobuf ]; + + createFindlibDestdir = true; + + doCheck = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/mransan/ocaml-protoc"; + description = "A Protobuf Compiler for OCaml"; + license = licenses.mit; + maintainers = [ maintainers.vyorkin ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 728f6f7712d0..087adee735a8 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -664,6 +664,8 @@ let then sexplib_108_08_00 else null; + ocaml-protoc = callPackage ../development/ocaml-modules/ocaml-protoc { }; + ocaml_extlib = callPackage ../development/ocaml-modules/extlib { }; ocb-stubblr = callPackage ../development/ocaml-modules/ocb-stubblr { };