Commit Graph

19 Commits

Author SHA1 Message Date
Artturin
1d93a080a6 lua: add conditional to use linux-readline as the plat on 5.4+
since 5.4 linux plat no longer builds with readline support

Closes https://github.com/NixOS/nixpkgs/issues/141701
2021-10-16 20:18:59 +02:00
Matthieu Coudron
496b8abf78 Apply suggestions from code review
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-09-12 03:03:56 +02:00
Matthieu Coudron
88842910b5 lua: introduced a lua lib
Goal is to improve separation between packages and utilities.
Can help with autocompletion/navigate nixpkgs faster.
Also it will help standardize how LUA_PATH is exported across packages,
so that one can more easily make lua changes across nixpkgs (for
    instance changing where lua modules are installed).
2021-09-12 03:03:56 +02:00
Marco A L Barbosa
8f8b8d5000 lua: support static only builds 2021-06-22 11:34:33 -03:00
Alyssa Ross
665732d877 lua: fix linkage
This fixes a couple of problems:

 * Lua 5.1 doesn't have SYSLIBS, so wasn't being linked with any
   libraries.

 * SYSLIBS doesn't include -lm, so we had to add that manually to
   pkgconfig.  LIBS includes -lm, so we don't need that hack any more.
2021-05-15 09:33:46 -07:00
Alyssa Ross
399223fdf7 Revert "lua5_*: tweak linking libraries"
This reverts commit 539ad4f811.

The correct fix here is to fix our addition to the Makefile.
2021-05-15 09:33:46 -07:00
Vladimír Čunát
539ad4f811
lua5_*: tweak linking libraries
All liblua.so were missing a library or two;
I'm not sure if there's a better way to add them.  Check:
ldd -r ./result/lib/liblua.so
2021-05-15 09:36:05 +02:00
Vladimír Čunát
55282bd6f6
lua5_1: fixup a recent regression
Commit 57832e625c (PR #119860) switched to using SYSCFLAGS,
but lua 5.1 calls it MYCFLAGS.  We noticed due to broken luarocks build:
https://hydra.nixos.org/build/142663274
2021-05-14 22:08:38 +02:00
Alyssa Ross
25d4f0d334
lua: use stdenv.cc.targetPrefix
This evaluates to an empty string when not cross compiling, so by
using this instead of stdenv.hostPlatform.config we can eliminate a
conditional.
2021-04-19 16:58:32 +00:00
Alyssa Ross
34f8d7e15a
lua: one dso patch to rule them all
We do this same patch in three different ways for four different Lua
versions, even though the structure of the Makefile barely changes
between releases.  We can easily consolidate this by just modifying
the Makefile ourselves instead of using patches (Makefiles are very
amenable to this).
2021-04-19 16:58:26 +00:00
Alyssa Ross
936b27b5d4
lua: support non-Linux non-Darwin operating systems 2021-04-19 13:05:06 +00:00
Alyssa Ross
57832e625c
lua: don't always set LUA_USE_LINUX
This is supposed to be automatically set by Lua's Makefile if PLAT is
set appropriately, but it was being overridden by us overridding
CFLAGS.  Setting it manually was a hack.  The correct thing to do was
to make sure SYSCFLAGS (where Lua's Makefile puts LUA_USE_LINUX) was
still included in our custom CFLAGS.
2021-04-19 12:57:35 +00:00
jakobrs
460b9f53b2 lua: Add more symlinks to lua.pc
This creates a symlink to lua.pc for every name of the file used by Arch:

For a version of Lua (for example, 5.4) we now have:
- lib/pkgconfig/lua.pc
- lib/pkgconfig/lua-5.4.pc
- lib/pkgconfig/lua5.4.pc
- lib/pkgconfig/lua54.pc
2021-01-24 11:01:04 +01:00
Ben Siraphob
001c0cbe54 pkgs/development/interpreters: stdenv.lib -> lib 2021-01-23 20:29:03 +07:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Chuck
d13360bfb7 lua5: Fix src URLs
The 672c3c1d2a refactor accidentally
dropped the last version component from the source URLs.  This change
puts its back.

$ for lua in lua5_{1,2,3};do nix-instantiate --json --eval . -A $lua.src.urls | jq -r '.[]' | xargs nix-prefetch-url; done

Before this change:

lua-5.1.tar.gz 1hbjhh211p82vhwqhx4mmhmvhv56060acnka80gbmfdk3q3bjnvz (wrong hash because this is lua 5.1.0.  We want 5.1.5 )
lua-5.2.tar.gz HTTP error 404
lua-5.3.tar.gz HTTP error 404

After this change:

lua-5.1.5.tar.gz 0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16
lua-5.2.4.tar.gz 0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr <-- Desired hash
lua-5.3.5.tar.gz 1b2qn2rv96nmbm6zab4l877bd4zq7wpwm8drwjiy2ih4jqzysbhc

Converted to base16 with `nix-hash --type sha256 --to-base16`:

lua-5.1.5.tar.gz 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 <-- Desired hash
lua-5.2.4.tar.gz b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b
lua-5.3.5.tar.gz 0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac <-- Desired hash
2020-01-31 18:00:45 -08:00
Vika
68847aeef4 lua: fix cross-compilation; fixes #66742
The makefile isn't able to find the toolchain when cross-compiling. I
helped it a little bit by adding the parameters explicitly.
2019-08-19 12:04:26 +03:00
Will Dietz
4e09baaaa2 fix lua53Packages.lua 2019-04-27 13:39:43 -05:00
Matthieu Coudron
672c3c1d2a
lua: merge lua5.X interpreters (#59919)
lua: merge lua5.X interpreters

similar to what was done for python.
Makes it easier to change the passthru settings and the lua infrastructure.
2019-04-27 22:00:12 +09:00