diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/doc/languages-frameworks/lua.section.md | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/doc/languages-frameworks/lua.section.md')
-rw-r--r-- | nixpkgs/doc/languages-frameworks/lua.section.md | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/nixpkgs/doc/languages-frameworks/lua.section.md b/nixpkgs/doc/languages-frameworks/lua.section.md index 17b80f07d3e1..2ed02ab9d6c7 100644 --- a/nixpkgs/doc/languages-frameworks/lua.section.md +++ b/nixpkgs/doc/languages-frameworks/lua.section.md @@ -129,16 +129,21 @@ Let's present the luarocks way first and the manual one in a second time. ### Packaging a library on luarocks {#packaging-a-library-on-luarocks} [Luarocks.org](https://luarocks.org/) is the main repository of lua packages. -The site proposes two types of packages, the rockspec and the src.rock +The site proposes two types of packages, the `rockspec` and the `src.rock` (equivalent of a [rockspec](https://github.com/luarocks/luarocks/wiki/Rockspec-format) but with the source). -These packages can have different build types such as `cmake`, `builtin` etc . -Luarocks-based packages are generated in pkgs/development/lua-modules/generated-packages.nix from -the whitelist maintainers/scripts/luarocks-packages.csv and updated by running maintainers/scripts/update-luarocks-packages. +Luarocks-based packages are generated in [pkgs/development/lua-modules/generated-packages.nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/lua-modules/generated-packages.nix) from +the whitelist maintainers/scripts/luarocks-packages.csv and updated by running +the script +[maintainers/scripts/update-luarocks-packages](https://github.com/NixOS/nixpkgs/tree/master/maintainers/scripts/update-luarocks-packages): + +```sh +./maintainers/scripts/update-luarocks-packages update +``` [luarocks2nix](https://github.com/nix-community/luarocks) is a tool capable of generating nix derivations from both rockspec and src.rock (and favors the src.rock). The automation only goes so far though and some packages need to be customized. -These customizations go in `pkgs/development/lua-modules/overrides.nix`. +These customizations go in [pkgs/development/lua-modules/overrides.nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/lua-modules/overrides.nix). For instance if the rockspec defines `external_dependencies`, these need to be manually added to the overrides.nix. You can try converting luarocks packages to nix packages with the command `nix-shell -p luarocks-nix` and then `luarocks nix PKG_NAME`. @@ -183,7 +188,7 @@ luaposix = buildLuarocksPackage { src = fetchurl { url = "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/luaposix-34.0.4-1.src.rock"; - sha256 = "0yrm5cn2iyd0zjd4liyj27srphvy0gjrjx572swar6zqr4dwjqp2"; + hash = "sha256-4mLJG8n4m6y4Fqd0meUDfsOb9RHSR0qa/KD5KCwrNXs="; }; disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); propagatedBuildInputs = [ bit32 lua std_normalize ]; @@ -200,7 +205,7 @@ luaposix = buildLuarocksPackage { The `buildLuarocksPackage` delegates most tasks to luarocks: * it adds `luarocks` as an unpacker for `src.rock` files (zip files really). -* configurePhase` writes a temporary luarocks configuration file which location +* `configurePhase` writes a temporary luarocks configuration file which location is exported via the environment variable `LUAROCKS_CONFIG`. * the `buildPhase` does nothing. * `installPhase` calls `luarocks make --deps-mode=none --tree $out` to build and |