2019-12-08 07:56:32 +00:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, dune }:
|
|
|
|
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.07"
|
|
|
|
then throw "lua-ml is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lua-ml";
|
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
2020-08-01 16:30:02 +00:00
|
|
|
version = "0.9.1";
|
2019-12-08 07:56:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lindig";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${version}";
|
2020-08-01 16:30:02 +00:00
|
|
|
sha256 = "04lv98nxmzanvyn4c0k6k0ax29f5xfdl8qzpf5hwadslq213a044";
|
2019-12-08 07:56:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ];
|
|
|
|
|
|
|
|
buildFlags = [ "lib" ];
|
|
|
|
|
|
|
|
inherit (dune) installPhase;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An embeddable Lua 2.5 interpreter implemented in OCaml";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
license = stdenv.lib.licenses.bsd2;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|