1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00
Commit graph

152 commits

Author SHA1 Message Date
Marco A L Barbosa 0e4c13ba16 lua: remove unecessary postBuild for lua 5.3
I Think this is not necessary anymore since 34f8d7e15a
2021-06-22 11:34:50 -03:00
Marco A L Barbosa 8f8b8d5000 lua: support static only builds 2021-06-22 11:34:33 -03:00
Janne Heß cf7fde4b02 lua5_4: 5.4.2 -> 5.4.3 2021-05-31 22:22:11 +02: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 1758c0ac65 lua5_4: fix eval
This patch was removed in 34f8d7e15a ("lua: one dso patch to rule
them all"), and the reference to it in lua5_4 was removed at the time,
but it seems to have found its way back somehow (probably through a
merge?).

(cherry picked from commit 5b278213a2)
2021-05-15 09:33:46 -07:00
Alyssa Ross 3f5ecec613 Revert "staging-next: lua5: fix eval, add lib.so.patch"
This reverts commit 537a1940e8.

This patch was deliberately removed in 34f8d7e15a ("lua: one dso
patch to rule them all").  The correct fix is to remove the reference
to it that was reintroduced, rather than re-adding the patch.
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
Jonathan Ringer 537a1940e8
staging-next: lua5: fix eval, add lib.so.patch 2021-05-14 23:38:34 -07:00
Jonathan Ringer 0546e68ef7
Merge remote-tracking branch 'origin/master' into staging-next 2021-05-14 21:57:09 -07:00
Konstantin Alekseev feb867f2fd
lua-5.4: fix build on darwin (#123028) 2021-05-14 16:38:50 -04: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 8abdf1db65
lua: don't try to -ldl -lm on non-Linux OSes
On other OSes, like NetBSD, these are part of libc.  Fortunately, the
Lua Makefile already knows about this, and has a SYSLIBS variable we
can use for this.
2021-04-19 16:58:29 +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
sternenseemann c2a89d5bca development/interpreters/lua-5: remove unused files
These nix expressions from the lua-5 directory are imported nowhere and
can be removed safely.
2021-03-02 15:32:22 +01:00
volth bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07: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
Daniel Nagy 9ce1ebb3c2
lua5_3: 5.3.5 -> 5.3.6
We also remove the CVE-2019-6706 patch because it has been merged
upstream. See:

https://www.lua.org/work/diffs-lua-5.3.5-lua-5.3.6.html
2020-12-29 23:28:17 +01:00
Arnout Engelen d29ab49bb9 lua: add 5.4.2 2020-12-27 16:01:28 +01:00
Michael Reilly 84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Matthieu Coudron 006aeb5704 buidLuarocksPackage: add a checkPhase 2020-02-26 01:14:30 +01:00
Matthieu Coudron 6eeb434b33 buildLuarocksPackage: extraVariables is now an attrset 2020-02-26 01:14:29 +01:00
Matthieu Coudron 7aee5b838b build-lua-package: dont patchShebangs folder
It can be source of trouble for some read-only folders (libluv for
instance) and slow down install.
2020-02-25 17:34:29 +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
John Ericson d0d5136cce Merge remote-tracking branch 'upstream/master' into wrapper-pname-support 2019-11-24 17:25:07 +00:00
John Ericson 9b090ccbca treewide: Get rid of most parseDrvName without breaking compat
That is because this commit should be merged to both master and
release-19.09.
2019-11-24 17:22:28 +00:00
John Ericson 505dcb3b73
Merge pull request #73946 from Ericson2314/fix-lua-env
lua wrapper: Fix bash error
2019-11-23 12:38:44 -05:00
John Ericson a610a38cb5 lua wrapper: Fix bash error
Recently, we made it harder for external code to use some stdenv-only bash
variables by unsetting them in [1] But Lua's `withPackages` was sourcing some
setup hooks in [2], which required those bash variables.

I say great! We caught something bad: Lua should use normal dependencies, even
though that is harder with `buildEnv`. Now it works that way, and everything is
fine.

[1]: 9d3911f806/pkgs/stdenv/generic/setup.sh (L574-L578)

[2]: 9d3911f806/pkgs/development/interpreters/lua-5/wrapper.nix (L23-L27)

CC @matthewbauer
2019-11-22 19:47:27 -05:00
Christian Kauhaus 9a1e9258f6 lua-5.3: add patch for CVE-2019-6706
Taken from
http://launchpadlibrarian.net/417853567/lua5.3_5.3.3-1_5.3.3-1ubuntu0.18.10.1.diff.gz
and adapted to our needs.

Re #54799
2019-11-21 11:10:45 +01:00
Frederik Rietdijk 73b88e17dd Merge staging-next into staging 2019-11-11 12:09:26 +01:00
John Ericson aaf0fd2c44 lua-5 setup hook: LUA_PATH and LUA_CPATH can be undefined 2019-11-08 13:24:20 -05:00
Pierre Bourdon 1b7783072c
lua5_1: rename patch file to match its CVE id 2019-10-02 22:13:12 +02:00
Alexei Robyn c62337d9c7 lua*Packages: Consolidate separate setup hooks together
- Lua packages now consistently use LUA_PATH/LUA_CPATH rather than a mix
  of those and NIX_LUA_PATH/NIX_LUA_CPATH
- Lua libraries are now consistently only added to the search path
variables if:
    1) The library actually has a corresponding directory to search
    2) The library is not already present in the search path
  This should help prevent the search paths from growing overly large
- Fixed bugs in some path helpers
- Changed the affected shell script indentation to 2 spaces; nixpkgs
  shell scripts are inconsistently split between 2 and 4 space
  indentation, but 2 matches better with the Nix expressions, so IMO it
  makes more sense
2019-09-01 17:42:20 +02:00
Frederik Rietdijk ad1d58c622 Merge staging-next into staging 2019-08-31 10:04:20 +02:00
Frederik Rietdijk fc74ba8291 Merge master into staging-next 2019-08-31 09:50:38 +02:00
zimbatm 80a3988150
remove empty nix file
Nix repl hangs when evaluating empty files.

    find -name "*.nix" -empty -delete
2019-08-31 00:00:29 +02:00
volth 08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
Vladimír Čunát 2e6bf42a22
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
2019-08-24 08:55:37 +02: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
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
Alexei Robyn f2aa671ad7 luajitPackages: Improve derivation names
`"lua" + lua.luaversion + "-"` resolves to "lua51-" for both Lua
5.1 and LuaJIT packages. With this, LuaJIT packages instead get
`lua.name + "-"`, which currently resolves to "luajit-2.1.0-beta3-".
This makes it easy to distinguish the two in store paths etc.
2019-06-24 04:04:37 +02:00
Matthieu Coudron c33153bf13
Merge pull request #63108 from Shados/lua-packaging-improvements-pr
Lua/luarocks packaging improvements
2019-06-19 14:23:31 +02:00
volth f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Alexei Robyn 8eabbb3d20 buildLuarocksPackage: Several improvements
Summary of main changes:
- Now makes use of luarocks dependency resolution (builds will fail if
  rockspec dependencies are unmet)
- Renamed argument `external_deps` -> `exernalDeps` and add
  functionality to handle external dependencies that are multiple-output
  derivations
- Added an `extraVariables` argument for appending to the contents of
  luarocks config `variables` table
- The `rockspecFilename` argument default is now actually used
- The `disabled` argument can now be overriden with a less-restrictive
  check, as it now just sets `meta.broken` instead of throwing an error
  during eval
- The `doCheck` argument is now actually honored if set to `true`
2019-06-13 20:53:53 +10:00
Matthieu Coudron f67d8591a1 lua: removed zip.nix orphan file
I couldn't find any reference to it and luazip was already packaged in
lua-packages.nix (now generated).
2019-06-05 16:21:18 +09:00
Will Dietz 4e09baaaa2 fix lua53Packages.lua 2019-04-27 13:39:43 -05:00