git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commita8413d816aadfa7b376dabc84777a21eca3dd210 authorJörg Thalheim <Mic92@users.noreply.github.com> dateSat 22 Sep 2018, 21:27 (8 years ago) parent9fee74d
1 file changed+19−18
pkgs/top-level/lua-packages.nix+19−18
pkgs/top-level/lua-packages.nix+19−18
@@ -380,35 +380,36 @@ let
380380
381381 luadbi = buildLuaPackage rec {
382382 name = "luadbi-${version}";
383− version = "0.5";
384− src = fetchurl {
385− url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/luadbi/luadbi.${version}.tar.gz";
386− sha256 = "07ikxgxgfpimnwf7zrqwcwma83ss3wm2nzjxpwv2a1c0vmc684a9";
383+ version = "0.6";
384+
385+ src = fetchFromGitHub {
386+ owner = "mwild1";
387+ repo = "luadbi";
388+ rev = "v${version}";
389+ sha256 = "1cpl84pl75wqd9zph3w4srd5lxij359p8xmmf7xpdbxz67695vah";
387390 };
388− sourceRoot = ".";
389391
390− buildInputs = [ mysql.connector-c postgresql sqlite ];
392+ MYSQL_INC="-I${mysql.connector-c}/include/mysql";
391393
392− preConfigure = ''
393− substituteInPlace Makefile --replace CC=gcc CC=cc
394− '' + stdenv.lib.optionalString stdenv.isDarwin ''
394+ buildInputs = [ mysql postgresql sqlite ];
395+
396+ preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
395397 substituteInPlace Makefile \
396398 --replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
397399 '';
398400
399− NIX_CFLAGS_COMPILE = [
400− "-I${mysql.connector-c}/include/mysql"
401− "-L${mysql.connector-c}/lib/mysql"
402− "-I${postgresql}/include/server"
401+ installFlags = [
402+ "LUA_CDIR=$(out)/lib/lua/${lua.luaversion}"
403+ "LUA_LDIR=$(out)/share/lua/${lua.luaversion}"
403404 ];
404405
405− installPhase = ''
406− mkdir -p $out/lib/lua/${lua.luaversion}
407− install -p DBI.lua *.so $out/lib/lua/${lua.luaversion}
408− '';
406+ installTargets = [
407+ "install_lua" "install_mysql" "install_psql" "install_sqlite3"
408+ ];
409409
410410 meta = with stdenv.lib; {
411− homepage = "https://code.google.com/archive/p/luadbi/";
411+ homepage = https://github.com/mwild1/luadbi;
412+ license = licenses.mit;
412413 platforms = stdenv.lib.platforms.unix;
413414 };
414415 };