From 164e68c7d324b2d941057213fed4bc1cf2d60d56 Mon Sep 17 00:00:00 2001 From: wyvie Date: Tue, 23 Sep 2014 13:53:53 +0400 Subject: [PATCH] Added description to languages-support.xml --- doc/language-support.xml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/doc/language-support.xml b/doc/language-support.xml index e7ffa8af1183..79b56c572d69 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -330,6 +330,54 @@ Runtime) instead of the OpenJRE. +
Lua + + + Lua packages are built by the buildLuaPackage function. This function is + implemented + in + pkgs/development/lua-modules/generic/default.nix + and works similarly to buildPerlPackage. (See + for details.) + + + + Lua packages are defined + in pkgs/top-level/lua-packages.nix. + Most of them are simple. For example: + + +fileSystem = buildLuaPackage { + name = "filesystem-1.6.2"; + src = fetchurl { + url = "https://github.com/keplerproject/luafilesystem/archive/v1_6_2.tar.gz"; + sha256 = "1n8qdwa20ypbrny99vhkmx8q04zd2jjycdb5196xdhgvqzk10abz"; + }; + meta = { + homepage = "https://github.com/keplerproject/luafilesystem"; + hydraPlatforms = stdenv.lib.platforms.linux; + maintainers = with maintainers; [ flosse ]; + }; +}; + + + + + Though, more complicated package should be placed in a seperate file in + pkgs/development/lua-modules. + + + Lua packages accept additional parameter disabled, which defines + the condition of disabling package from luaPackages. For example, if package has + disabled assigned to lua.luaversion != "5.1", + it will not be included in any luaPackages except lua51Packages, making it + only be built for lua 5.1. + + +
+ +