nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 32 lines 830 B view raw
1{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, dune }: 2 3if !stdenv.lib.versionAtLeast ocaml.version "4.07" 4then throw "lua-ml is not available for OCaml ${ocaml.version}" 5else 6 7stdenv.mkDerivation rec { 8 pname = "lua-ml"; 9 name = "ocaml${ocaml.version}-${pname}-${version}"; 10 version = "0.9"; 11 12 src = fetchFromGitHub { 13 owner = "lindig"; 14 repo = pname; 15 rev = "${version}"; 16 sha256 = "09lj6qykg15fdf65in7xdry0jcifcr8vqbvz85v12gwfckmmxjir"; 17 }; 18 19 buildInputs = [ ocaml findlib ocamlbuild ]; 20 21 buildFlags = [ "lib" ]; 22 23 inherit (dune) installPhase; 24 25 meta = { 26 description = "An embeddable Lua 2.5 interpreter implemented in OCaml"; 27 inherit (src.meta) homepage; 28 inherit (ocaml.meta) platforms; 29 license = stdenv.lib.licenses.bsd2; 30 maintainers = [ stdenv.lib.maintainers.vbgl ]; 31 }; 32}