1{ stdenv, fetchFromGitHub, lua, pkgconfig }:
2
3stdenv.mkDerivation {
4 name = "luaffi-2013-11-08";
5 src = fetchFromGitHub {
6 owner = "jmckaskill";
7 repo = "luaffi";
8 rev = "abc638c9341025580099dcf77795c4b320ba0e63";
9 sha256 = "1hv1y9i66p473hfy36nqj220sfrxdmbd75c1gpjvpk8073vx55ac";
10 };
11
12 nativeBuildInputs = [ pkgconfig ];
13 buildInputs = [ lua ];
14
15 patches = [
16 ./makefile-errors.patch
17 ];
18
19 installPhase = ''
20 mkdir -p $out/lib
21 cp ffi.so $out/lib/ffi.so
22 '';
23
24 meta = with stdenv.lib; {
25 description = "Standalone FFI library for calling C functions from lua. Compatible with the luajit FFI interface.";
26 homepage = https://github.com/jmckaskill/luaffi;
27 maintainers = with maintainers; [ ma27 ];
28 license = licenses.mit;
29 platforms = platforms.unix;
30 };
31}