summary refs log tree commit diff
path: root/pkgs/development/tools/toluapp/default.nix
blob: 64a2f4346c794fb6195db88f39df1fde22609c12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchFromGitHub, scons, lua }:

stdenv.mkDerivation rec {
  version = "1.0.93";
  name = "toluapp-${version}";

  src = fetchFromGitHub {
    owner = "LuaDist";
    repo  = "toluapp";
    rev   = "${version}";
    sha256 = "0zd55bc8smmgk9j4cf0jpibb03lgsvl0knpwhplxbv93mcdnw7s0";
  };

  buildInputs = [ lua scons ];

  patches = [ ./environ-and-linux-is-kinda-posix.patch ];

  preConfigure = ''
    substituteInPlace config_posix.py \
      --replace /usr/local $out
  '';

  buildPhase = ''scons'';

  installPhase = ''scons install'';

  meta = with stdenv.lib; {
    description = "A tool to integrate C/Cpp code with Lua";
    homepage = http://www.codenix.com/~tolua/;
    license = licenses.mit;
    maintainers = with maintainers; [ vrthra ];
    platforms = with platforms; unix;
  };
}