+37
pkgs/development/ocaml-modules/ocaml-lua/default.nix
+37
pkgs/development/ocaml-modules/ocaml-lua/default.nix
···
···
1
+
{ lib, fetchFromGitHub, buildDunePackage, lua5_1, pkg-config }:
2
+
3
+
buildDunePackage {
4
+
pname = "ocaml-lua";
5
+
version = "1.8";
6
+
7
+
minimalOCamlVersion = "4.08";
8
+
9
+
src = fetchFromGitHub {
10
+
owner = "pdonadeo";
11
+
repo = "ocaml-lua";
12
+
# Take the latest commit, as some warnings have been fixed/suppressed
13
+
rev = "f44ad50c88bf999f48a13af663051493c89d7d02";
14
+
hash = "sha256-AXtKrty8JdI+yc+Y9EiufBbySlr49OyXW6wKwmDb0xo=";
15
+
};
16
+
17
+
# ocaml-lua vendors and builds Lua: replace that with the one from nixpkgs
18
+
postPatch = ''
19
+
rm -r src/lua_c
20
+
substituteInPlace src/dune \
21
+
--replace "-Ilua_c/lua515/src" "" \
22
+
--replace "(libraries unix threads lua_c)" \
23
+
"(libraries unix threads) (c_library_flags -llua)"
24
+
'';
25
+
26
+
nativeBuildInputs = [ pkg-config ];
27
+
buildInputs = [ lua5_1 ];
28
+
29
+
doCheck = true;
30
+
31
+
meta = {
32
+
description = "Lua bindings for OCaml";
33
+
homepage = "https://pdonadeo.github.io/ocaml-lua";
34
+
license = lib.licenses.mit;
35
+
maintainers = [ lib.maintainers.kenran ];
36
+
};
37
+
}
+2
pkgs/top-level/ocaml-packages.nix
+2
pkgs/top-level/ocaml-packages.nix