push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
lua,
}:
stdenv.mkDerivation rec {
version = "1.0.93";
pname = "toluapp";
src = fetchFromGitHub {
owner = "LuaDist";
repo = "toluapp";
rev = version;
sha256 = "0zd55bc8smmgk9j4cf0jpibb03lgsvl0knpwhplxbv93mcdnw7s0";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ lua ];
patches = [
./environ-and-linux-is-kinda-posix.patch
./headers.patch
];
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
'cmake_minimum_required ( VERSION 2.8 )' \
'cmake_minimum_required ( VERSION 4.0 )'
'';
strictDeps = true;
meta = with lib; {
description = "Tool to integrate C/Cpp code with Lua";
homepage = "http://www.codenix.com/~tolua/";
license = licenses.mit;
maintainers = with lib.maintainers; [ colinsane ];
mainProgram = "tolua++";
platforms = with platforms; unix;
};
}

View File

@@ -0,0 +1,36 @@
As it turns out, scons doesn't inherit environment variables by
default. Debugging this was very pleasant. -- oxij
diff --git a/SConstruct b/SConstruct
index 5c1e774..66aa4c8 100644
--- a/SConstruct
+++ b/SConstruct
@@ -5,13 +5,11 @@ tools = ['default']
if os.name == 'nt':
tools = ['mingw']
-env = Environment(tools = tools)
+env = Environment(tools = tools, ENV = os.environ)
options_file = None
-if sys.platform == 'linux2':
- options_file = "linux"
-elif 'msvc' in env['TOOLS']:
+if 'msvc' in env['TOOLS']:
options_file = "msvc"
else:
options_file = "posix"
diff --git a/config_posix.py b/config_posix.py
index 2bb696c..eb4eb9b 100644
--- a/config_posix.py
+++ b/config_posix.py
@@ -16,7 +16,7 @@ CCFLAGS = ['-O2', '-ansi', '-Wall']
prefix = '/usr/local'
# libraries
-LIBS = ['lua', 'lualib', 'm']
+LIBS = ['lua', 'liblua', 'm']

View File

@@ -0,0 +1,15 @@
diff --git a/include/tolua++.h b/include/tolua++.h
index ed53449..f57d56d 100644
--- a/include/tolua++.h
+++ b/include/tolua++.h
@@ -43,8 +43,8 @@ extern "C" {
typedef int lua_Object;
-#include "lua.h"
-#include "lauxlib.h"
+#include <lua.h>
+#include <lauxlib.h>
struct tolua_Error
{