nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 lua,
7}:
8
9stdenv.mkDerivation rec {
10 version = "1.0.93";
11 pname = "toluapp";
12
13 src = fetchFromGitHub {
14 owner = "LuaDist";
15 repo = "toluapp";
16 rev = version;
17 sha256 = "0zd55bc8smmgk9j4cf0jpibb03lgsvl0knpwhplxbv93mcdnw7s0";
18 };
19
20 nativeBuildInputs = [ cmake ];
21 buildInputs = [ lua ];
22
23 patches = [
24 ./environ-and-linux-is-kinda-posix.patch
25 ./headers.patch
26 ];
27
28 postPatch = ''
29 substituteInPlace CMakeLists.txt --replace-fail \
30 'cmake_minimum_required ( VERSION 2.8 )' \
31 'cmake_minimum_required ( VERSION 4.0 )'
32 '';
33
34 strictDeps = true;
35
36 meta = {
37 description = "Tool to integrate C/Cpp code with Lua";
38 homepage = "http://www.codenix.com/~tolua/";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [ colinsane ];
41 mainProgram = "tolua++";
42 platforms = with lib.platforms; unix;
43 };
44}