further improvements to buildLuaPackage

This commit is contained in:
Domen Kožar
2014-09-23 13:56:46 +02:00
parent 111b5aa38c
commit 6e8056ada9
3 changed files with 13 additions and 9 deletions
+9 -5
View File
@@ -5,15 +5,19 @@
for each package in a separate file: the call to the function would
be almost as must code as the function itself. */
{fetchurl, stdenv, lua}:
{ fetchurl, stdenv, lua, callPackage }:
let self = _self; _self = with self; {
let
isLua51 = lua.luaversion == "5.1";
isLua52 = lua.luaversion == "5.2";
self = _self;
_self = with self; {
inherit (stdenv.lib) maintainers;
#define build lua package function
buildLuaPackage = import ../development/lua-modules/generic lua;
buildLuaPackage = callPackage ../development/lua-modules/generic lua;
fileSystem = buildLuaPackage {
filesystem = buildLuaPackage {
name = "filesystem-1.6.2";
src = fetchurl {
url = "https://github.com/keplerproject/luafilesystem/archive/v1_6_2.tar.gz";
@@ -33,7 +37,7 @@ let self = _self; _self = with self; {
url = "http://files.luaforge.net/releases/luasocket/luasocket/luasocket-${version}/luasocket-${version}.tar.gz";
sha256 = "19ichkbc4rxv00ggz8gyf29jibvc2wq9pqjik0ll326rrxswgnag";
};
disabled = lua.luaversion != "5.1";
disabled = isLua52;
patchPhase = ''
sed -e "s,^INSTALL_TOP_SHARE.*,INSTALL_TOP_SHARE=$out/share/lua/${lua.luaversion}," \
-e "s,^INSTALL_TOP_LIB.*,INSTALL_TOP_LIB=$out/lib/lua/${lua.luaversion}," \