diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-09-22 21:27:35 +0100 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-09-22 22:27:35 +0200 |
commit | a8413d816aadfa7b376dabc84777a21eca3dd210 (patch) | |
tree | 77e817df048af32368207a282ce8e144d8f0db37 /pkgs/top-level/lua-packages.nix | |
parent | 9fee74d61694184b41ad1a3aed6cf7a791ed77e8 (diff) |
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.
Diffstat (limited to 'pkgs/top-level/lua-packages.nix')
-rw-r--r-- | pkgs/top-level/lua-packages.nix | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index 7933ca46b98a..8d141d7e7c64 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -380,35 +380,36 @@ let luadbi = buildLuaPackage rec { name = "luadbi-${version}"; - version = "0.5"; - src = fetchurl { - url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/luadbi/luadbi.${version}.tar.gz"; - sha256 = "07ikxgxgfpimnwf7zrqwcwma83ss3wm2nzjxpwv2a1c0vmc684a9"; + version = "0.6"; + + src = fetchFromGitHub { + 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 = '' - substituteInPlace Makefile --replace CC=gcc CC=cc - '' + stdenv.lib.optionalString stdenv.isDarwin '' + buildInputs = [ mysql postgresql sqlite ]; + + preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace Makefile \ --replace '-shared' '-bundle -undefined dynamic_lookup -all_load' ''; - NIX_CFLAGS_COMPILE = [ - "-I${mysql.connector-c}/include/mysql" - "-L${mysql.connector-c}/lib/mysql" - "-I${postgresql}/include/server" + installFlags = [ + "LUA_CDIR=$(out)/lib/lua/${lua.luaversion}" + "LUA_LDIR=$(out)/share/lua/${lua.luaversion}" ]; - installPhase = '' - mkdir -p $out/lib/lua/${lua.luaversion} - install -p DBI.lua *.so $out/lib/lua/${lua.luaversion} - ''; + installTargets = [ + "install_lua" "install_mysql" "install_psql" "install_sqlite3" + ]; 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; }; }; |