2014-09-19 21:40:37 +02:00
|
|
|
/* This file defines the composition for Lua packages. It has
|
|
|
|
been factored out of all-packages.nix because there are many of
|
|
|
|
them. Also, because most Nix expressions for Lua packages are
|
|
|
|
trivial, most are actually defined here. I.e. there's no function
|
|
|
|
for each package in a separate file: the call to the function would
|
|
|
|
be almost as must code as the function itself. */
|
|
|
|
|
2018-07-21 02:44:44 +02:00
|
|
|
{ fetchurl, stdenv, lua, callPackage, unzip, zziplib, pkgconfig
|
|
|
|
, pcre, oniguruma, gnulib, tre, glibc, sqlite, openssl, expat
|
2018-12-02 12:41:15 +01:00
|
|
|
, glib, gobject-introspection, libevent, zlib, autoreconfHook, gnum4
|
2017-12-26 19:40:42 +01:00
|
|
|
, mysql, postgresql, cyrus_sasl
|
2018-02-25 21:48:48 +01:00
|
|
|
, fetchFromGitHub, libmpack, which, fetchpatch, writeText
|
2019-01-30 15:13:15 +01:00
|
|
|
, pkgs
|
|
|
|
, fetchgit
|
|
|
|
, lib
|
2014-10-12 21:04:52 +02:00
|
|
|
}:
|
2014-09-19 21:40:37 +02:00
|
|
|
|
2014-09-23 13:56:29 +02:00
|
|
|
let
|
2019-01-30 15:13:15 +01:00
|
|
|
packages = ( self:
|
|
|
|
|
|
|
|
let
|
|
|
|
luaAtLeast = lib.versionAtLeast lua.luaversion;
|
|
|
|
luaOlder = lib.versionOlder lua.luaversion;
|
|
|
|
isLua51 = (lib.versions.majorMinor lua.version) == "5.1";
|
|
|
|
isLua52 = (lib.versions.majorMinor lua.version) == "5.2";
|
2018-07-06 00:06:48 +02:00
|
|
|
isLua53 = lua.luaversion == "5.3";
|
2017-10-09 14:21:48 +02:00
|
|
|
isLuaJIT = (builtins.parseDrvName lua.name).name == "luajit";
|
2017-01-27 11:49:04 +01:00
|
|
|
|
2019-01-30 15:13:15 +01:00
|
|
|
lua-setup-hook = callPackage ../development/interpreters/lua-5/setup-hook.nix { };
|
|
|
|
|
|
|
|
# Check whether a derivation provides a lua module.
|
|
|
|
hasLuaModule = drv: drv ? luaModule ;
|
|
|
|
|
|
|
|
callPackage = pkgs.newScope self;
|
|
|
|
|
|
|
|
requiredLuaModules = drvs: with stdenv.lib; let
|
|
|
|
modules = filter hasLuaModule drvs;
|
|
|
|
in unique ([lua] ++ modules ++ concatLists (catAttrs "requiredLuaModules" modules));
|
|
|
|
|
|
|
|
# Convert derivation to a lua module.
|
|
|
|
toLuaModule = drv:
|
|
|
|
drv.overrideAttrs( oldAttrs: {
|
|
|
|
# Use passthru in order to prevent rebuilds when possible.
|
|
|
|
passthru = (oldAttrs.passthru or {})// {
|
|
|
|
luaModule = lua;
|
|
|
|
requiredLuaModules = requiredLuaModules drv.propagatedBuildInputs;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2017-01-27 11:49:04 +01:00
|
|
|
platformString =
|
|
|
|
if stdenv.isDarwin then "macosx"
|
|
|
|
else if stdenv.isFreeBSD then "freebsd"
|
|
|
|
else if stdenv.isLinux then "linux"
|
|
|
|
else if stdenv.isSunOS then "solaris"
|
|
|
|
else throw "unsupported platform";
|
|
|
|
|
2019-02-04 12:30:58 +01:00
|
|
|
buildLuaApplication = args: buildLuarocksPackage ({namePrefix="";} // args );
|
|
|
|
|
|
|
|
buildLuarocksPackage = with pkgs.lib; makeOverridable( callPackage ../development/interpreters/lua-5/build-lua-package.nix {
|
|
|
|
inherit toLuaModule;
|
2019-02-17 13:18:49 +01:00
|
|
|
inherit lua;
|
2019-02-04 12:30:58 +01:00
|
|
|
});
|
2019-01-30 15:13:15 +01:00
|
|
|
in
|
|
|
|
with self; {
|
|
|
|
|
|
|
|
getLuaPathList = majorVersion: [
|
|
|
|
"lib/lua/${majorVersion}/?.lua" "share/lua/${majorVersion}/?.lua"
|
|
|
|
"share/lua/${majorVersion}/?/init.lua" "lib/lua/${majorVersion}/?/init.lua"
|
|
|
|
];
|
|
|
|
getLuaCPathList = majorVersion: [
|
|
|
|
"lib/lua/${majorVersion}/?.so" "share/lua/${majorVersion}/?.so" "share/lua/${majorVersion}/?/init.so"
|
|
|
|
];
|
2014-09-19 21:40:37 +02:00
|
|
|
|
2016-06-12 04:11:31 +02:00
|
|
|
# helper functions for dealing with LUA_PATH and LUA_CPATH
|
|
|
|
getPath = lib : type : "${lib}/lib/lua/${lua.luaversion}/?.${type};${lib}/share/lua/${lua.luaversion}/?.${type}";
|
|
|
|
getLuaPath = lib : getPath lib "lua";
|
|
|
|
getLuaCPath = lib : getPath lib "so";
|
|
|
|
|
2014-09-19 21:40:37 +02:00
|
|
|
#define build lua package function
|
2018-02-25 21:48:48 +01:00
|
|
|
buildLuaPackage = callPackage ../development/lua-modules/generic {
|
|
|
|
inherit lua writeText;
|
|
|
|
};
|
2014-09-19 21:40:37 +02:00
|
|
|
|
2019-01-30 15:13:15 +01:00
|
|
|
|
|
|
|
inherit toLuaModule lua-setup-hook;
|
2019-02-04 12:30:58 +01:00
|
|
|
inherit buildLuarocksPackage buildLuaApplication;
|
2019-01-30 15:13:15 +01:00
|
|
|
inherit requiredLuaModules luaOlder luaAtLeast
|
2019-02-14 06:32:04 +01:00
|
|
|
isLua51 isLua52 isLua53 isLuaJIT lua callPackage;
|
2019-01-30 15:13:15 +01:00
|
|
|
|
2019-02-04 12:30:58 +01:00
|
|
|
# wraps programs in $out/bin with valid LUA_PATH/LUA_CPATH
|
|
|
|
wrapLua = callPackage ../development/interpreters/lua-5/wrap-lua.nix {
|
|
|
|
inherit lua; inherit (pkgs) makeSetupHook makeWrapper;
|
|
|
|
};
|
|
|
|
|
2014-09-23 16:01:02 +02:00
|
|
|
luarocks = callPackage ../development/tools/misc/luarocks {
|
|
|
|
inherit lua;
|
|
|
|
};
|
|
|
|
|
2019-01-22 07:06:07 +01:00
|
|
|
luarocks-nix = callPackage ../development/tools/misc/luarocks/luarocks-nix.nix { };
|
|
|
|
|
2018-02-25 22:12:31 +01:00
|
|
|
bit32 = buildLuaPackage rec {
|
|
|
|
version = "5.3.0";
|
|
|
|
name = "bit32-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "keplerproject";
|
|
|
|
repo = "lua-compat-5.2";
|
|
|
|
rev = "bitlib-${version}";
|
|
|
|
sha256 = "1ipqlbvb5w394qwhm2f3w6pdrgy8v4q8sps5hh3pqz14dcqwakhj";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cc ${if stdenv.isDarwin then "-bundle -undefined dynamic_lookup -all_load" else "-shared"} -Ic-api lbitlib.c -o bit32.so
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/lua/${lua.luaversion}
|
|
|
|
install -p bit32.so $out/lib/lua/${lua.luaversion}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua 5.2 bit manipulation library";
|
|
|
|
homepage = "http://www.lua.org/manual/5.2/manual.html#6.7";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lblasc ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-07-30 17:08:48 +02:00
|
|
|
compat53 = buildLuaPackage rec {
|
|
|
|
version = "0.7";
|
|
|
|
name = "compat53-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "keplerproject";
|
|
|
|
repo = "lua-compat-5.3";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "02a14nvn7aggg1yikj9h3dcf8aqjbxlws1bfvqbpfxv9d5phnrpz";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
CFLAGS+=" -shared $(pkg-config --libs ${if isLuaJIT then "luajit" else "lua"})"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cc lstrlib.c $CFLAGS -o string.so
|
|
|
|
cc ltablib.c $CFLAGS -o table.so
|
|
|
|
cc lutf8lib.c $CFLAGS -o utf8.so
|
|
|
|
'';
|
|
|
|
|
2019-05-01 10:57:13 +02:00
|
|
|
# The hook in ../development/lua-modules/generic/default.nix
|
|
|
|
# is strict about share vs. lib for _PATH and _CPATH.
|
2018-07-30 17:08:48 +02:00
|
|
|
installPhase = ''
|
2019-05-01 10:57:13 +02:00
|
|
|
install -Dt "$out/share/lua/${lua.luaversion}/compat53" compat53/*.lua
|
|
|
|
install -Dt "$out/lib/lua/${lua.luaversion}/compat53" *.so
|
2018-07-30 17:08:48 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Compatibility module providing Lua-5.3-style APIs for Lua 5.2 and 5.1";
|
|
|
|
homepage = "https://github.com/keplerproject/lua-compat-5.3";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vcunat ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-03-04 12:36:23 +01:00
|
|
|
cqueues = buildLuaPackage rec {
|
|
|
|
name = "cqueues-${version}";
|
|
|
|
version = "20171014";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.25thandclement.com/~william/projects/releases/${name}.tgz";
|
|
|
|
sha256 = "1dabhpn6r0hlln8vx9hxm34pfcm46qzgpb2apmziwg5z51fi4ksb";
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''export prefix=$out'';
|
|
|
|
|
2019-04-23 10:52:43 +02:00
|
|
|
# https://github.com/wahern/cqueues/issues/216
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-DCQUEUES_VERSION=${version}" ];
|
|
|
|
|
2019-03-04 12:36:23 +01:00
|
|
|
nativeBuildInputs = [ gnum4 ];
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A type of event loop for Lua";
|
|
|
|
homepage = "https://www.25thandclement.com/~william/projects/cqueues.html";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vcunat ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-03-01 01:57:02 +01:00
|
|
|
luacyrussasl = buildLuaPackage rec {
|
|
|
|
version = "1.1.0";
|
|
|
|
name = "lua-cyrussasl-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JorjBauer";
|
|
|
|
repo = "lua-cyrussasl";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "14kzm3vk96k2i1m9f5zvpvq4pnzaf7s91h5g4h4x2bq1mynzw2s1";
|
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
CFLAGS="-O2 -fPIC"
|
|
|
|
LDFLAGS="-O -shared -fpic -lsasl2"
|
|
|
|
LUAPATH="$out/share/lua/${lua.luaversion}"
|
|
|
|
CPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
);
|
|
|
|
mkdir -p $out/{share,lib}/lua/${lua.luaversion}
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ cyrus_sasl ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://github.com/JorjBauer/lua-cyrussasl";
|
|
|
|
description = "Cyrus SASL library for Lua 5.1+";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-02 17:08:56 +02:00
|
|
|
luaexpat = buildLuaPackage rec {
|
|
|
|
version = "1.3.0";
|
|
|
|
name = "expat-${version}";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2014-09-02 17:08:56 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://matthewwild.co.uk/projects/luaexpat/luaexpat-${version}.tar.gz";
|
|
|
|
sha256 = "1hvxqngn0wf5642i5p3vcyhg3pmp102k63s9ry4jqyyqc1wkjq6h";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ expat ];
|
|
|
|
|
2017-01-31 06:05:07 +01:00
|
|
|
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
|
|
|
|
'';
|
|
|
|
|
2014-09-02 17:08:56 +02:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2016-06-09 16:36:09 +02:00
|
|
|
LUA_LDIR="$out/share/lua/${lua.luaversion}"
|
2014-09-02 17:08:56 +02:00
|
|
|
LUA_INC="-I${lua}/include" LUA_CDIR="$out/lib/lua/${lua.luaversion}"
|
2015-10-15 13:57:38 +02:00
|
|
|
EXPAT_INC="-I${expat.dev}/include");
|
2014-09-02 17:08:56 +02:00
|
|
|
'';
|
|
|
|
|
2018-07-05 23:49:08 +02:00
|
|
|
disabled = isLua53 || isLuaJIT;
|
2017-10-09 14:27:42 +02:00
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "SAX XML parser based on the Expat library";
|
2014-09-02 17:08:56 +02:00
|
|
|
homepage = "http://matthewwild.co.uk/projects/luaexpat";
|
2017-10-13 05:48:17 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ flosse ];
|
|
|
|
platforms = platforms.unix;
|
2014-09-02 17:08:56 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-03-01 01:57:02 +01:00
|
|
|
luadbi = buildLuaPackage rec {
|
|
|
|
name = "luadbi-${version}";
|
2019-01-04 08:14:12 +01:00
|
|
|
version = "0.7.1";
|
2018-09-22 22:27:35 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mwild1";
|
|
|
|
repo = "luadbi";
|
|
|
|
rev = "v${version}";
|
2019-01-04 08:14:12 +01:00
|
|
|
sha256 = "01i8018zb7w2bhaqglm7cnvbiirgd95b9d07irgz3sci91p08cwp";
|
2017-03-01 01:57:02 +01:00
|
|
|
};
|
|
|
|
|
2018-09-22 22:27:35 +02:00
|
|
|
MYSQL_INC="-I${mysql.connector-c}/include/mysql";
|
|
|
|
|
2019-01-04 08:14:12 +01:00
|
|
|
buildInputs = [ mysql.client mysql.connector-c postgresql sqlite ];
|
2017-03-01 01:57:02 +01:00
|
|
|
|
2018-09-22 22:27:35 +02:00
|
|
|
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
|
2017-12-09 12:52:28 +01:00
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
|
|
|
|
'';
|
|
|
|
|
2018-09-22 22:27:35 +02:00
|
|
|
installFlags = [
|
|
|
|
"LUA_CDIR=$(out)/lib/lua/${lua.luaversion}"
|
|
|
|
"LUA_LDIR=$(out)/share/lua/${lua.luaversion}"
|
2017-03-01 01:57:02 +01:00
|
|
|
];
|
|
|
|
|
2018-09-22 22:27:35 +02:00
|
|
|
installTargets = [
|
|
|
|
"install_lua" "install_mysql" "install_psql" "install_sqlite3"
|
|
|
|
];
|
2017-03-01 01:57:02 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-09-22 22:27:35 +02:00
|
|
|
homepage = https://github.com/mwild1/luadbi;
|
|
|
|
license = licenses.mit;
|
2017-03-01 01:57:02 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-02 17:08:56 +02:00
|
|
|
luafilesystem = buildLuaPackage rec {
|
2018-04-30 10:59:57 +02:00
|
|
|
version = "1.7.0";
|
2017-03-01 01:57:02 +01:00
|
|
|
name = "filesystem-${version}";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "keplerproject";
|
|
|
|
repo = "luafilesystem";
|
2017-03-01 01:57:02 +01:00
|
|
|
rev = "v${stdenv.lib.replaceChars ["."] ["_"] version}";
|
2018-04-30 10:59:57 +02:00
|
|
|
sha256 = "0fibrasshlgpa71m9wkpjxwmylnxpcf06rpqbaa0qwvqh94nhwby";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
2017-10-13 05:46:51 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace config --replace "CC= gcc" "";
|
|
|
|
''
|
2017-02-07 21:08:55 +01:00
|
|
|
+ stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace config \
|
|
|
|
--replace 'LIB_OPTION= -shared' '###' \
|
|
|
|
--replace '#LIB_OPTION= -bundle' 'LIB_OPTION= -bundle'
|
|
|
|
substituteInPlace Makefile --replace '10.3' '10.5'
|
|
|
|
'';
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua library complementing filesystem-related functions";
|
2014-09-19 21:40:37 +02:00
|
|
|
homepage = "https://github.com/keplerproject/luafilesystem";
|
2017-10-13 05:48:17 +02:00
|
|
|
license = licenses.mit;
|
2014-09-19 21:40:37 +02:00
|
|
|
maintainers = with maintainers; [ flosse ];
|
2017-10-13 05:48:17 +02:00
|
|
|
platforms = platforms.unix;
|
2014-09-19 21:40:37 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-07-30 16:40:41 +02:00
|
|
|
luaossl = buildLuaPackage rec {
|
|
|
|
name = "luaossl-${version}";
|
|
|
|
version = "20170903";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.25thandclement.com/~william/projects/releases/${name}.tgz";
|
|
|
|
sha256 = "10392bvd0lzyibipblgiss09zlqh3a5zgqg1b9lgbybpqb9cv2k3";
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''export prefix=$out'';
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Comprehensive binding to OpenSSL for Lua 5.1+";
|
|
|
|
homepage = "https://www.25thandclement.com/~william/projects/luaossl.html";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vcunat ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-02-18 22:48:50 +01:00
|
|
|
luaposix = buildLuaPackage rec {
|
|
|
|
name = "posix-${version}";
|
2018-02-24 08:26:05 +01:00
|
|
|
version = "34.0.4";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luaposix";
|
|
|
|
repo = "luaposix";
|
|
|
|
rev = "release-v${version}";
|
2018-02-24 08:26:05 +01:00
|
|
|
sha256 = "0p5583vidsm7s97zihf47c34vscwgbl86axrnj44j328v45kxb2z";
|
2017-02-18 22:48:50 +01:00
|
|
|
};
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2019-03-20 09:38:04 +01:00
|
|
|
propagatedBuildInputs = [ std_normalize bit32 ];
|
2018-02-24 08:26:05 +01:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
${lua}/bin/lua build-aux/luke \
|
|
|
|
package="luaposix" \
|
|
|
|
version="${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
${lua}/bin/lua build-aux/luke install --quiet \
|
|
|
|
INST_LIBDIR="$out/lib/lua/${lua.luaversion}" \
|
|
|
|
INST_LUADIR="$out/share/lua/${lua.luaversion}"
|
|
|
|
'';
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-02-18 22:48:50 +01:00
|
|
|
description = "Lua bindings for POSIX API";
|
|
|
|
homepage = "https://github.com/luaposix/luaposix";
|
2017-10-13 05:48:17 +02:00
|
|
|
license = licenses.mit;
|
2018-02-24 08:26:05 +01:00
|
|
|
maintainers = with maintainers; [ vyp lblasc ];
|
2017-10-13 05:48:17 +02:00
|
|
|
platforms = platforms.unix;
|
2017-02-18 22:48:50 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-02 17:08:56 +02:00
|
|
|
luasec = buildLuaPackage rec {
|
2017-01-27 11:37:55 +01:00
|
|
|
name = "sec-0.6";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2015-07-19 23:19:20 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "brunoos";
|
|
|
|
repo = "luasec";
|
2017-01-27 11:37:55 +01:00
|
|
|
rev = "lua${name}";
|
|
|
|
sha256 = "0wv8l7f7na7kw5xn8mjik2wpxbizl7zvvp5s7fcwvz9kl5jdpk5b";
|
2014-09-02 17:08:56 +02:00
|
|
|
};
|
|
|
|
|
2019-05-01 11:08:08 +02:00
|
|
|
propagatedBuildInputs = [ luasocket ];
|
2014-09-02 17:08:56 +02:00
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2017-01-27 11:49:04 +01:00
|
|
|
${platformString}
|
2019-05-01 11:08:08 +02:00
|
|
|
LUAPATH="$out/share/lua/${lua.luaversion}"
|
2014-09-02 17:08:56 +02:00
|
|
|
LUACPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INC_PATH="-I${lua}/include"
|
|
|
|
LIB_PATH="-L$out/lib");
|
|
|
|
'';
|
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua binding for OpenSSL library to provide TLS/SSL communication";
|
2014-09-02 17:08:56 +02:00
|
|
|
homepage = "https://github.com/brunoos/luasec";
|
2017-10-13 05:48:17 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ flosse ];
|
|
|
|
platforms = platforms.unix;
|
2014-09-02 17:08:56 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-09-23 16:01:02 +02:00
|
|
|
luasocket = buildLuaPackage rec {
|
|
|
|
name = "socket-${version}";
|
2015-07-19 23:20:12 +02:00
|
|
|
version = "3.0-rc1";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "diegonehab";
|
|
|
|
repo = "luasocket";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1chs7z7a3i3lck4x7rz60ziwbf793gw169hpjdfca8y4yf1hzsxk";
|
2014-09-19 21:40:37 +02:00
|
|
|
};
|
2015-07-19 23:20:12 +02:00
|
|
|
|
2016-09-17 13:10:01 +02:00
|
|
|
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
|
2018-11-29 03:46:20 +01:00
|
|
|
substituteInPlace src/makefile \
|
2016-08-24 21:26:53 +02:00
|
|
|
--replace 10.3 10.5
|
2014-09-19 21:40:37 +02:00
|
|
|
'';
|
2015-07-19 23:20:12 +02:00
|
|
|
|
2016-09-17 13:10:01 +02:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
LUAV=${lua.luaversion}
|
2017-01-27 11:49:04 +01:00
|
|
|
PLAT=${platformString}
|
2018-11-29 03:46:20 +01:00
|
|
|
CC=''${CC}
|
|
|
|
LD=''${CC}
|
2016-09-17 13:14:54 +02:00
|
|
|
prefix=$out
|
2016-09-17 13:10:01 +02:00
|
|
|
);
|
|
|
|
'';
|
|
|
|
|
2018-04-25 05:20:18 +02:00
|
|
|
doCheck = false; # fails to find itself
|
|
|
|
|
2017-03-01 01:57:02 +01:00
|
|
|
installTargets = [ "install" "install-unix" ];
|
|
|
|
|
2016-09-25 16:18:08 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-10-13 05:48:17 +02:00
|
|
|
description = "Network support for Lua";
|
2014-09-19 21:40:37 +02:00
|
|
|
homepage = "http://w3.impa.br/~diego/software/luasocket/";
|
2017-10-13 05:48:17 +02:00
|
|
|
license = licenses.mit;
|
2018-01-17 06:13:23 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-10-13 05:48:17 +02:00
|
|
|
platforms = with platforms; darwin ++ linux ++ freebsd ++ illumos;
|
2014-09-19 21:40:37 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-09-24 16:02:02 +02:00
|
|
|
luxio = buildLuaPackage rec {
|
|
|
|
name = "luxio-${version}";
|
|
|
|
version = "13";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-09-24 16:02:02 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://git.gitano.org.uk/luxio.git/snapshot/luxio-luxio-13.tar.bz2";
|
|
|
|
sha256 = "1hvwslc25q7k82rxk461zr1a2041nxg7sn3sw3w0y5jxf0giz2pz";
|
|
|
|
};
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-09-24 16:44:43 +02:00
|
|
|
nativeBuildInputs = [ which pkgconfig ];
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-09-24 16:44:43 +02:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-09-24 16:02:02 +02:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
|
|
|
INST_LIBDIR="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INST_LUADIR="$out/share/lua/${lua.luaversion}"
|
|
|
|
LUA_BINDIR="$out/bin"
|
2017-09-24 16:44:43 +02:00
|
|
|
INSTALL=install
|
2017-09-24 16:02:02 +02:00
|
|
|
);
|
|
|
|
'';
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lightweight UNIX I/O and POSIX binding for Lua";
|
|
|
|
homepage = "https://www.gitano.org.uk/luxio/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ richardipsum ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2017-09-24 16:02:02 +02:00
|
|
|
};
|
|
|
|
|
2014-09-23 16:01:02 +02:00
|
|
|
luazip = buildLuaPackage rec {
|
|
|
|
name = "zip-${version}";
|
2017-10-13 05:48:17 +02:00
|
|
|
version = "2007-10-30";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luaforge";
|
|
|
|
repo = "luazip";
|
|
|
|
rev = "0b8f5c958e170b1b49f05bc267bc0351ad4dfc44";
|
2015-05-30 20:58:03 +02:00
|
|
|
sha256 = "0zrrwhmzny5zbpx91bjbl77gzkvvdi3qhhviliggp0aj8w3faxsr";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
buildInputs = [ zziplib ];
|
|
|
|
|
2014-09-23 16:01:02 +02:00
|
|
|
patches = [ ../development/lua-modules/zip.patch ];
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
# Does not currently work under Lua 5.2 or LuaJIT.
|
2018-07-05 23:49:08 +02:00
|
|
|
disabled = isLua52 || isLua53 || isLuaJIT;
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua library to read files stored inside zip files";
|
2014-09-23 16:01:02 +02:00
|
|
|
homepage = "https://github.com/luaforge/luazip";
|
2017-10-13 05:48:17 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-03-19 12:31:36 +01:00
|
|
|
luazlib = buildLuaPackage rec {
|
|
|
|
name = "zlib-${version}";
|
2017-01-31 21:13:24 +01:00
|
|
|
version = "1.1";
|
2015-03-19 12:31:36 +01:00
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "brimworks";
|
|
|
|
repo = "lua-zlib";
|
|
|
|
rev = "v${version}";
|
2017-01-31 21:13:24 +01:00
|
|
|
sha256 = "1520lk4xpf094xn2zallqgqhs0zb4w61l49knv9y8pmhkdkxzzgy";
|
2015-03-19 12:31:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2017-10-13 05:46:51 +02:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile --replace gcc cc --replace "-llua" ""
|
|
|
|
'';
|
2017-01-31 04:00:11 +01:00
|
|
|
|
2015-03-19 12:31:36 +01:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(
|
2017-01-27 11:49:04 +01:00
|
|
|
${platformString}
|
2015-03-19 12:31:36 +01:00
|
|
|
LUAPATH="$out/share/lua/${lua.luaversion}"
|
|
|
|
LUACPATH="$out/lib/lua/${lua.luaversion}"
|
|
|
|
INCDIR="-I${lua}/include"
|
2017-01-31 04:00:11 +01:00
|
|
|
LIBDIR="-L${lua}/lib");
|
2015-03-19 12:31:36 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = "mkdir -p $out/lib/lua/${lua.luaversion}";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-10-13 05:48:17 +02:00
|
|
|
description = "Simple streaming interface to zlib for Lua";
|
2015-03-19 12:31:36 +01:00
|
|
|
homepage = https://github.com/brimworks/lua-zlib;
|
|
|
|
license = licenses.mit;
|
2017-10-13 05:48:17 +02:00
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
platforms = platforms.unix;
|
2015-03-19 12:31:36 +01:00
|
|
|
};
|
|
|
|
};
|
2017-03-30 20:06:37 +02:00
|
|
|
|
2015-03-19 12:31:36 +01:00
|
|
|
|
2017-10-31 11:38:12 +01:00
|
|
|
luastdlib = buildLuaPackage rec {
|
|
|
|
name = "stdlib-${version}";
|
|
|
|
version = "41.2.1";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-10-31 11:38:12 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lua-stdlib";
|
|
|
|
repo = "lua-stdlib";
|
|
|
|
rev = "release-v${version}";
|
|
|
|
sha256 = "03wd1qvkrj50fjszb2apzdkc8d5bpfbbi9pajl0vbrlzzmmi3jlq";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-09-19 04:27:05 +02:00
|
|
|
nativeBuildInputs = [ autoreconfHook unzip ];
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "General Lua libraries";
|
|
|
|
homepage = "https://github.com/lua-stdlib/lua-stdlib";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
lrexlib = buildLuaPackage rec {
|
|
|
|
name = "lrexlib-${version}";
|
2017-07-08 20:42:16 +02:00
|
|
|
version = "2.8.0";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rrthomas";
|
|
|
|
repo = "lrexlib";
|
|
|
|
rev = "rel-2-8-0";
|
2017-07-08 20:42:16 +02:00
|
|
|
sha256 = "1c62ny41b1ih6iddw5qn81gr6dqwfffzdp7q6m8x09zzcdz78zhr";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
buildInputs = [ luastdlib pcre luarocks oniguruma gnulib tre glibc ];
|
2014-09-23 16:01:02 +02:00
|
|
|
|
|
|
|
buildPhase = let
|
2017-07-08 20:42:16 +02:00
|
|
|
luaVariable = ''LUA_PATH="${luastdlib}/share/lua/${lua.luaversion}/?/init.lua;${luastdlib}/share/lua/${lua.luaversion}/?.lua"'';
|
|
|
|
pcreVariable = "PCRE_DIR=${pcre.out} PCRE_INCDIR=${pcre.dev}/include";
|
2014-09-23 16:01:02 +02:00
|
|
|
onigVariable = "ONIG_DIR=${oniguruma}";
|
|
|
|
gnuVariable = "GNU_INCDIR=${gnulib}/lib";
|
|
|
|
treVariable = "TRE_DIR=${tre}";
|
2016-08-30 02:11:09 +02:00
|
|
|
posixVariable = "POSIX_DIR=${glibc.dev}";
|
2014-09-23 16:01:02 +02:00
|
|
|
in ''
|
2017-07-08 20:42:16 +02:00
|
|
|
sed -e 's@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i;@$(LUAROCKS) $(LUAROCKS_COMMAND) $$i ${pcreVariable} ${onigVariable} ${gnuVariable} ${treVariable} ${posixVariable};@' -i Makefile
|
2014-09-23 16:01:02 +02:00
|
|
|
${luaVariable} make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv $out;
|
|
|
|
cp -r luarocks/lib $out;
|
|
|
|
'';
|
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua bindings of various regex library APIs";
|
|
|
|
homepage = "https://github.com/rrthomas/lrexlib";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
luasqlite3 = buildLuaPackage rec {
|
|
|
|
name = "sqlite3-${version}";
|
2017-10-13 05:48:17 +02:00
|
|
|
version = "2.3.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LuaDist";
|
|
|
|
repo = "luasql-sqlite3";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "05k8zs8nsdmlwja3hdhckwknf7ww5cvbp3sxhk2xd1i3ij6aa10b";
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
|
2018-07-05 23:49:08 +02:00
|
|
|
disabled = isLua53;
|
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
buildInputs = [ sqlite ];
|
2014-09-23 16:01:02 +02:00
|
|
|
|
|
|
|
patches = [ ../development/lua-modules/luasql.patch ];
|
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Database connectivity for Lua";
|
2014-09-23 16:01:02 +02:00
|
|
|
homepage = "https://github.com/LuaDist/luasql-sqlite3";
|
2017-10-13 05:48:17 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.linux;
|
2014-09-23 16:01:02 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-07-08 09:19:43 +02:00
|
|
|
lfs = buildLuaPackage rec {
|
|
|
|
name = "lfs-${version}";
|
|
|
|
version = "1.7.0.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "keplerproject";
|
|
|
|
repo = "luafilesystem";
|
|
|
|
rev = "v" + stdenv.lib.replaceStrings ["."] ["_"] version;
|
|
|
|
sha256 = "0zmprgkm9zawdf9wnw0v3w6ibaj442wlc6alp39hmw610fl4vghi";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Portable library for filesystem operations";
|
|
|
|
homepage = https://keplerproject.github.com/luafilesystem;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vcunat ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-11-27 21:04:28 +01:00
|
|
|
lpeg = buildLuaPackage rec {
|
|
|
|
name = "lpeg-${version}";
|
2018-07-06 00:06:48 +02:00
|
|
|
version = "1.0.1";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2014-11-27 21:04:28 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.inf.puc-rio.br/~roberto/lpeg/${name}.tar.gz";
|
2018-07-06 00:06:48 +02:00
|
|
|
sha256 = "62d9f7a9ea3c1f215c77e0cadd8534c6ad9af0fb711c3f89188a8891c72f026b";
|
2014-11-27 21:04:28 +01:00
|
|
|
};
|
|
|
|
|
2015-02-09 21:11:19 +01:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(CC=$CC);
|
|
|
|
'';
|
|
|
|
|
2017-01-27 11:49:04 +01:00
|
|
|
buildFlags = platformString;
|
2015-02-09 21:11:19 +01:00
|
|
|
|
2014-11-27 21:04:28 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/lua/${lua.luaversion}
|
|
|
|
install -p lpeg.so $out/lib/lua/${lua.luaversion}
|
|
|
|
install -p re.lua $out/lib/lua/${lua.luaversion}
|
|
|
|
'';
|
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Parsing Expression Grammars For Lua";
|
2014-11-27 21:04:28 +01:00
|
|
|
homepage = "http://www.inf.puc-rio.br/~roberto/lpeg/";
|
2017-10-13 05:48:17 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = platforms.all;
|
2014-11-27 21:04:28 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-02-18 01:12:43 +01:00
|
|
|
cjson = buildLuaPackage rec {
|
|
|
|
name = "cjson-${version}";
|
|
|
|
version = "2.1.0";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2015-02-18 01:12:43 +01:00
|
|
|
src = fetchurl {
|
2017-10-13 05:48:17 +02:00
|
|
|
url = "http://www.kyne.com.au/~mark/software/download/lua-${name}.tar.gz";
|
2015-02-18 01:12:43 +01:00
|
|
|
sha256 = "0y67yqlsivbhshg8ma535llz90r4zag9xqza5jx0q7lkap6nkg2i";
|
|
|
|
};
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2015-02-18 01:12:43 +01:00
|
|
|
preBuild = ''
|
|
|
|
sed -i "s|/usr/local|$out|" Makefile
|
|
|
|
'';
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2015-02-18 01:12:43 +01:00
|
|
|
makeFlags = [ "LUA_VERSION=${lua.luaversion}" ];
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2015-02-18 01:12:43 +01:00
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/share/lua/${lua.luaversion}/cjson/tests
|
|
|
|
'';
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2015-02-18 01:12:43 +01:00
|
|
|
installTargets = "install install-extra";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-10-09 14:27:42 +02:00
|
|
|
disabled = isLuaJIT;
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2015-02-18 01:12:43 +01:00
|
|
|
description = "Lua C extension module for JSON support";
|
2017-10-13 05:48:17 +02:00
|
|
|
homepage = "https://www.kyne.com.au/~mark/software/lua-cjson.php";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
2015-02-18 01:12:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-06-04 17:58:01 +02:00
|
|
|
mpack = buildLuaPackage rec {
|
2017-11-20 23:44:47 +01:00
|
|
|
name = "mpack-${version}";
|
|
|
|
version = "1.0.7";
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-11-10 02:06:33 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "libmpack";
|
|
|
|
repo = "libmpack-lua";
|
2017-11-20 23:44:47 +01:00
|
|
|
rev = version;
|
2018-04-10 17:23:40 +02:00
|
|
|
sha256 = "0l4k7qmwaa0zpxrlp27yp4pbbyiz3zgxywkm543q6wkzn6wmq8l8";
|
2017-11-10 02:06:33 +01:00
|
|
|
};
|
2017-10-13 05:48:17 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2017-11-20 23:44:47 +01:00
|
|
|
buildInputs = [ libmpack ];
|
2016-06-04 17:58:01 +02:00
|
|
|
dontBuild = true;
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2017-11-20 23:44:47 +01:00
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '-shared' '-bundle -undefined dynamic_lookup -all_load'
|
2016-06-04 17:58:01 +02:00
|
|
|
'';
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2016-06-04 17:58:01 +02:00
|
|
|
installFlags = [
|
|
|
|
"USE_SYSTEM_LUA=yes"
|
2017-11-10 02:06:33 +01:00
|
|
|
"USE_SYSTEM_MPACK=yes"
|
2017-11-20 23:44:47 +01:00
|
|
|
"MPACK_LUA_VERSION=${lua.version}"
|
|
|
|
"LUA_CMOD_INSTALLDIR=$(out)/lib/lua/${lua.luaversion}"
|
2016-06-04 17:58:01 +02:00
|
|
|
];
|
2017-10-13 05:48:17 +02:00
|
|
|
|
2018-05-29 17:06:38 +02:00
|
|
|
hardeningDisable = [ "fortify" ];
|
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Lua bindings for libmpack";
|
|
|
|
homepage = "https://github.com/libmpack/libmpack-lua";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ vyp ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-06-04 17:58:01 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-02-05 16:00:19 +01:00
|
|
|
vicious = toLuaModule(stdenv.mkDerivation rec {
|
2015-08-06 08:29:07 +02:00
|
|
|
name = "vicious-${version}";
|
2017-12-22 10:06:27 +01:00
|
|
|
version = "2.3.1";
|
2015-08-06 08:29:07 +02:00
|
|
|
|
2017-03-30 20:06:37 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "vicious";
|
|
|
|
rev = "v${version}";
|
2017-12-22 10:06:27 +01:00
|
|
|
sha256 = "1yzhjn8rsvjjsfycdc993ms6jy2j5jh7x3r2ax6g02z5n0anvnbx";
|
2015-08-06 08:29:07 +02:00
|
|
|
};
|
|
|
|
|
2017-10-13 05:48:17 +02:00
|
|
|
buildInputs = [ lua ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/lua/${lua.luaversion}/
|
|
|
|
cp -r . $out/lib/lua/${lua.luaversion}/vicious/
|
|
|
|
printf "package.path = '$out/lib/lua/${lua.luaversion}/?/init.lua;' .. package.path\nreturn require((...) .. '.init')\n" > $out/lib/lua/${lua.luaversion}/vicious.lua
|
|
|
|
'';
|
|
|
|
|
2015-08-06 08:29:07 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-12-22 10:06:27 +01:00
|
|
|
description = "A modular widget library for the awesome window manager";
|
2017-03-30 20:06:37 +02:00
|
|
|
homepage = https://github.com/Mic92/vicious;
|
2015-08-06 08:29:07 +02:00
|
|
|
license = licenses.gpl2;
|
2017-03-30 20:06:37 +02:00
|
|
|
maintainers = with maintainers; [ makefu mic92 ];
|
2015-08-06 08:29:07 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2019-02-05 16:00:19 +01:00
|
|
|
});
|
2015-08-06 08:29:07 +02:00
|
|
|
|
2019-01-30 15:13:15 +01:00
|
|
|
});
|
2019-03-07 07:09:33 +01:00
|
|
|
in packages
|