forked from mirrors/nixpkgs
luaPackages.luadbi: 0.5 -> 0.6 (#47156)
Switch to maintained fork that is compatible with lua5.2/lua5.3. This package was tested with prosody.
This commit is contained in:
parent
9fee74d616
commit
a8413d816a
|
@ -380,35 +380,36 @@ let
|
||||||
|
|
||||||
luadbi = buildLuaPackage rec {
|
luadbi = buildLuaPackage rec {
|
||||||
name = "luadbi-${version}";
|
name = "luadbi-${version}";
|
||||||
version = "0.5";
|
version = "0.6";
|
||||||
src = fetchurl {
|
|
||||||
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/luadbi/luadbi.${version}.tar.gz";
|
src = fetchFromGitHub {
|
||||||
sha256 = "07ikxgxgfpimnwf7zrqwcwma83ss3wm2nzjxpwv2a1c0vmc684a9";
|
owner = "mwild1";
|
||||||
|
repo = "luadbi";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1cpl84pl75wqd9zph3w4srd5lxij359p8xmmf7xpdbxz67695vah";
|
||||||
};
|
};
|
||||||
sourceRoot = ".";
|
|
||||||
|
|
||||||
buildInputs = [ mysql.connector-c postgresql sqlite ];
|
MYSQL_INC="-I${mysql.connector-c}/include/mysql";
|
||||||
|
|
||||||
preConfigure = ''
|
buildInputs = [ mysql postgresql sqlite ];
|
||||||
substituteInPlace Makefile --replace CC=gcc CC=cc
|
|
||||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
|
--replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
installFlags = [
|
||||||
"-I${mysql.connector-c}/include/mysql"
|
"LUA_CDIR=$(out)/lib/lua/${lua.luaversion}"
|
||||||
"-L${mysql.connector-c}/lib/mysql"
|
"LUA_LDIR=$(out)/share/lua/${lua.luaversion}"
|
||||||
"-I${postgresql}/include/server"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installTargets = [
|
||||||
mkdir -p $out/lib/lua/${lua.luaversion}
|
"install_lua" "install_mysql" "install_psql" "install_sqlite3"
|
||||||
install -p DBI.lua *.so $out/lib/lua/${lua.luaversion}
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://code.google.com/archive/p/luadbi/";
|
homepage = https://github.com/mwild1/luadbi;
|
||||||
|
license = licenses.mit;
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = stdenv.lib.platforms.unix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue