further improvements to buildLuaPackage
This commit is contained in:
parent
111b5aa38c
commit
6e8056ada9
@ -1,4 +1,4 @@
|
||||
{ fetchurl, pkgs, stdenv, makeWrapper, qt5, yajl, libzip, hunspell, lua5_1, boost, fileSystem }:
|
||||
{ fetchurl, pkgs, stdenv, makeWrapper, qt5, yajl, libzip, hunspell, lua5_1, boost, filesystem }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mudlet-${version}";
|
||||
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "c7b9a383d2cf393da730ce07ac8f06478eaec1fdf730054e837e58c598222d38";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgs.unzip qt5 lua5_1 hunspell libzip yajl boost makeWrapper fileSystem ];
|
||||
buildInputs = [ pkgs.unzip qt5 lua5_1 hunspell libzip yajl boost makeWrapper filesystem ];
|
||||
|
||||
configurePhase = "cd src && qmake";
|
||||
|
||||
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# ln -s $out/mudlet $out/bin/mudlet
|
||||
makeWrapper $out/mudlet $out/bin/mudlet \
|
||||
--set LUA_CPATH "${fileSystem}/lib/lua/5.1/?.so"
|
||||
--set LUA_CPATH "${filesystem}/lib/lua/5.1/?.so"
|
||||
'';
|
||||
|
||||
patches = [ ./libs.patch ];
|
||||
|
@ -9693,7 +9693,7 @@ let
|
||||
mrxvt = callPackage ../applications/misc/mrxvt { };
|
||||
|
||||
mudlet = callPackage ../games/mudlet {
|
||||
inherit (lua51Packages) fileSystem;
|
||||
inherit (lua51Packages) filesystem;
|
||||
};
|
||||
|
||||
multisync = callPackage ../applications/misc/multisync {
|
||||
|
@ -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}," \
|
||||
|
Loading…
Reference in New Issue
Block a user