Commit 32dec437 authored by Richard Ipsum's avatar Richard Ipsum
Browse files

lrexlib: 2.7.2 (broken) -> 2.8.0

The shared objects are not available in 'pcre.dev', so to build the rex_pcre.so
file we must specify 'pcre.out' as the directory to obtain shared objects
from, 'pcre.dev' is still needed for the header files though.
parent 157b5bd1
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -311,24 +311,23 @@ let

  lrexlib = buildLuaPackage rec {
    name = "lrexlib-${version}";
    version = "2.7.2";
    version = "2.8.0";
    src = fetchzip {
      url = "https://github.com/rrthomas/lrexlib/archive/150c251be57c4e569da0f48bf6b01fbca97179fe.zip";
      sha256 = "0acb3258681bjq61piz331r99bdff6cnkjaigq5phg3699iz5h75";
      url = "https://github.com/rrthomas/lrexlib/archive/rel-2-8-0.zip";
      sha256 = "1c62ny41b1ih6iddw5qn81gr6dqwfffzdp7q6m8x09zzcdz78zhr";
    };
    buildInputs = [ unzip luastdlib pcre luarocks oniguruma gnulib tre glibc ];

    buildPhase = let
      luaVariable = "LUA_PATH=${luastdlib}/share/lua/${lua.luaversion}/?.lua";
      luaVariable = ''LUA_PATH="${luastdlib}/share/lua/${lua.luaversion}/?/init.lua;${luastdlib}/share/lua/${lua.luaversion}/?.lua"'';

      pcreVariable = "PCRE_DIR=${pcre.dev}";
      pcreVariable = "PCRE_DIR=${pcre.out} PCRE_INCDIR=${pcre.dev}/include";
      onigVariable = "ONIG_DIR=${oniguruma}";
      gnuVariable = "GNU_INCDIR=${gnulib}/lib";
      treVariable = "TRE_DIR=${tre}";
      posixVariable = "POSIX_DIR=${glibc.dev}";
    in ''
      sed -e 's@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i;@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i ${pcreVariable} ${onigVariable} ${gnuVariable} ${treVariable} ${posixVariable};@' \
          -i Makefile
      sed -e 's@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i;@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i ${pcreVariable} ${onigVariable} ${gnuVariable} ${treVariable} ${posixVariable};@' -i Makefile
      ${luaVariable} make
    '';

@@ -341,7 +340,6 @@ let
      homepage = "https://github.com/lua-stdlib/lua-stdlib/";
      platforms = stdenv.lib.platforms.linux;
      license = stdenv.lib.licenses.mit;
      broken = true;
    };
  };