diff options
author | wyvie <elijahrum@gmail.com> | 2014-09-23 13:53:53 +0400 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2014-09-23 13:56:45 +0200 |
commit | 164e68c7d324b2d941057213fed4bc1cf2d60d56 (patch) | |
tree | 1c8c77f246efb9b9a49ba224662f29ee967fa54d /doc/language-support.xml | |
parent | 124ccae2e85ac293ced73fe9d221042cb3d0a54f (diff) |
Added description to languages-support.xml
Diffstat (limited to 'doc/language-support.xml')
-rw-r--r-- | doc/language-support.xml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/language-support.xml b/doc/language-support.xml index e7ffa8af11838..79b56c572d692 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -330,6 +330,54 @@ Runtime) instead of the OpenJRE.</para> </section> +<section xml:id="ssec-language-lua"><title>Lua</title> + +<para> + Lua packages are built by the <varname>buildLuaPackage</varname> function. This function is + implemented + in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules/generic/default.nix"> + <filename>pkgs/development/lua-modules/generic/default.nix</filename></link> + and works similarly to <varname>buildPerlPackage</varname>. (See + <xref linkend="ssec-language-perl"/> for details.) +</para> + +<para> + Lua packages are defined + in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/lua-packages.nix"><filename>pkgs/top-level/lua-packages.nix</filename></link>. + Most of them are simple. For example: + + <programlisting> +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 ]; + }; +}; + </programlisting> +</para> + +<para> + Though, more complicated package should be placed in a seperate file in + <link + xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules"><filename>pkgs/development/lua-modules</filename></link>. +</para> +<para> + Lua packages accept additional parameter <varname>disabled</varname>, which defines + the condition of disabling package from luaPackages. For example, if package has + <varname>disabled</varname> assigned to <literal>lua.luaversion != "5.1"</literal>, + it will not be included in any luaPackages except lua51Packages, making it + only be built for lua 5.1. +</para> + +</section> + + <!-- <section><title>Haskell</title> |