nixpkgs-suyu/pkgs/development/ocaml-modules/elpi/default.nix

41 lines
1,008 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, ocaml, findlib, camlp5
2018-09-20 07:45:31 +02:00
, ppx_tools_versioned, ppx_deriving, re
}:
2019-05-07 11:31:57 +02:00
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "elpi is not available for OCaml ${ocaml.version}"
else
2018-09-20 07:45:31 +02:00
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-elpi-${version}";
2019-05-07 11:31:57 +02:00
version = "1.2.0";
2018-09-20 07:45:31 +02:00
src = fetchFromGitHub {
owner = "LPCIC";
repo = "elpi";
rev = "v${version}";
2019-05-07 11:31:57 +02:00
sha256 = "1n4jpidx0vk4y66bhd704ajn8n6f1fd5wsi1shj6wijfmjl14h7s";
2018-09-20 07:45:31 +02:00
};
buildInputs = [ ocaml findlib ppx_tools_versioned ];
propagatedBuildInputs = [ camlp5 ppx_deriving re ];
2018-09-20 07:45:31 +02:00
createFindlibDestdir = true;
preInstall = "make byte";
postInstall = ''
mkdir -p $out/bin
make install-bin BIN=$out/bin
make install-bin BYTE=1 BIN=$out/bin
'';
meta = {
description = "Embeddable λProlog Interpreter";
license = stdenv.lib.licenses.lgpl21Plus;
maintainers = [ stdenv.lib.maintainers.vbgl ];
inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
};
}