From 3904d5445d742b4669f0fd8e786ae8b6f95faed6 Mon Sep 17 00:00:00 2001 From: Olav Date: Wed, 18 Feb 2015 00:12:43 +0000 Subject: [PATCH] Add lua package for cjson --- pkgs/top-level/lua-packages.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index eeff4a47f9e1..fd3b6713e2e2 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -242,6 +242,27 @@ let }; }; + cjson = buildLuaPackage rec { + name = "cjson-${version}"; + version = "2.1.0"; + src = fetchurl { + url = "http://www.kyne.com.au/~mark/software/download/lua-cjson-2.1.0.tar.gz"; + sha256 = "0y67yqlsivbhshg8ma535llz90r4zag9xqza5jx0q7lkap6nkg2i"; + }; + preBuild = '' + sed -i "s|/usr/local|$out|" Makefile + ''; + makeFlags = [ "LUA_VERSION=${lua.luaversion}" ]; + postInstall = '' + rm -rf $out/share/lua/${lua.luaversion}/cjson/tests + ''; + installTargets = "install install-extra"; + meta = { + description = "Lua C extension module for JSON support"; + license = stdenv.lib.licenses.mit; + }; + }; + luaMessagePack = buildLuaPackage rec { name = "lua-MessagePack-${version}"; version = "0.3.1";