diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index 9433172f63a8..1144bc723254 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -5,6 +5,7 @@ cqueues dkjson fifo inspect +lgi lpeg_patterns lrexlib-gnu, lrexlib-posix, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index e974bf42bee7..b7224aa334db 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -150,6 +150,26 @@ inspect = buildLuarocksPackage { }; }; }; +lgi = buildLuarocksPackage { + pname = "lgi"; + version = "0.9.2-1"; + + src = fetchurl { + url = https://luarocks.org/lgi-0.9.2-1.src.rock; + sha256 = "07ajc5pdavp785mdyy82n0w6d592n96g95cvq025d6i0bcm2cypa"; + }; + disabled = ( luaOlder "5.1"); + propagatedBuildInputs = [lua ]; + buildType="make"; + + meta = { + homepage = "http://github.com/pavouk/lgi"; + description="Lua bindings to GObject libraries"; + license = { + fullName = "MIT/X11"; + }; + }; +}; lpeg_patterns = buildLuarocksPackage { pname = "lpeg_patterns"; version = "0.5-0"; diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 41b395d885b1..1fcc49bf5468 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -18,6 +18,17 @@ with super; ''; }); + lgi = super.lgi.overrideAttrs(oa: { + nativeBuildInputs = [ pkgs.pkgconfig ]; + buildInputs = with pkgs; oa.buildInputs ++ [ glib gobjectIntrospection]; + patches = [ + (pkgs.fetchpatch { + name = "lgi-find-cairo-through-typelib.patch"; + url = "https://github.com/psychon/lgi/commit/46a163d9925e7877faf8a4f73996a20d7cf9202a.patch"; + sha256 = "0gfvvbri9kyzhvq3bvdbj2l6mwvlz040dk4mrd5m9gz79f7w109c"; + }) + ]; + }); ltermbox = super.ltermbox.override( { disabled = !isLua51 || isLuaJIT; diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index 8c039cbf3a2a..7a1738b0f3ee 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -871,43 +871,6 @@ with self; { }; }; - lgi = toLuaModule(stdenv.mkDerivation rec { - name = "lgi-${version}"; - version = "0.9.2"; - - src = fetchFromGitHub { - owner = "pavouk"; - repo = "lgi"; - rev = version; - sha256 = "03rbydnj411xpjvwsyvhwy4plm96481d7jax544mvk7apd8sd5jj"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ glib gobject-introspection lua ]; - - makeFlags = [ "LUA_VERSION=${lua.luaversion}" ]; - - preBuild = '' - sed -i "s|/usr/local|$out|" lgi/Makefile - ''; - - patches = [ - (fetchpatch { - name = "lgi-find-cairo-through-typelib.patch"; - url = "https://github.com/psychon/lgi/commit/46a163d9925e7877faf8a4f73996a20d7cf9202a.patch"; - sha256 = "0gfvvbri9kyzhvq3bvdbj2l6mwvlz040dk4mrd5m9gz79f7w109c"; - }) - ]; - - meta = with stdenv.lib; { - description = "GObject-introspection based dynamic Lua binding to GObject based libraries"; - homepage = https://github.com/pavouk/lgi; - license = licenses.mit; - maintainers = with maintainers; [ lovek323 rasendubi ]; - platforms = platforms.unix; - }; - }); - mpack = buildLuaPackage rec { name = "mpack-${version}"; version = "1.0.7";