Commit Graph

72 Commits

Author SHA1 Message Date
Doron Behar
7b9e4c7595 buildLuarocksPackage: fix cross compilation wrapping
- Make `lua` gain `luaOnBuildFor{Build,Host,Target}` and alike attributes.
- wrapLua: correctly substitute build & host lua & luarocks_bootstrap
- Disallow build platform references when using `buildLuarocksPackage`
  in cross building.
2026-03-09 18:39:19 +02:00
Marc Jakobi
05159343ea lua5_5: init at 5.5.0 2026-01-02 20:23:45 +01:00
Aliaksandr
aeea2cf596 lua-modules: remove old throwing aliases 2025-11-30 02:25:37 +02:00
Wolfgang Walther
91a8fee3aa treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.
2025-10-05 10:52:03 +02:00
Wolfgang Walther
4fbb23ef4e top-level/release-attrpaths-superset: remove __attrsFailEvaluation (#428015) 2025-07-24 19:45:36 +00:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Wolfgang Walther
59233ecd0d top-level/release-attrpaths-superset: remove __attrsFailEvaluation
This doesn't seem to be necessary anymore. I confirmed by:
- Adding a lib.warn into the __attrsFailsEvaluation branch - never got
any.
- Removing it everywhere and running full Eval on it - no errors, no
rebuilds.
2025-07-23 19:23:23 +02:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Sergei Trofimovich
69ba3f70eb lua5_4: 5.4.6 -> 5.4.7
Changes: https://www.lua.org/work/diffs-lua-5.4.6-lua-5.4.7.html
2024-07-21 07:24:01 +01:00
Sigmanificient
203a48ad35 pkgs/development: remove unused fetchpatch arguments 2024-05-24 02:53:57 +02:00
Matthieu Coudron
ff5b2d7d00 lua.tests: add test for relative import
better error message as well
extracted from https://github.com/NixOS/nixpkgs/pull/273342

written by heyarne
2024-02-06 23:21:41 +01:00
Adam Joseph
80472e3754 treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobs 2023-12-15 05:13:46 -08:00
Matthieu Coudron
64b50c6f93 luaPackages: introduce an alias mechanism
so that we can deprecate modules
2023-10-14 22:03:12 +02:00
Adam Joseph
cbc8aa437c treewide: use uncurried version of makeScopeWithSplicing 2023-08-14 02:51:10 +03:00
Silvan Mosberger
a0b8caf3bc Revert "lib.customisation: uncurry makeScopeWithSplicing" 2023-07-28 23:04:09 +02:00
Artturin
3716ef19d8 lib.makeScopeWithSplicing: provide default for keep,extra
These are often unneeded by the user.
2023-07-28 17:41:01 +03:00
Adam Joseph
cb13669b00 lib.customisation: uncurry makeScopeWithSplicing
Deeply-curried functions are pretty error-prone in untyped languages
like Nix.  This is a particularly bad case because
`top-level/splice.nix` *also* declares a makeScopeWithSplicing, but
it takes *two fewer arguments*.

Let's switch to attrset-passing form, to provide some minimal level
of sanity-checking.
2023-07-27 21:31:59 -07:00
Weijia Wang
c5f569a09a lua5_4: 5.4.4 -> 5.4.6 2023-05-26 09:19:41 +03:00
Artturi
f56de234bb Merge pull request #207652 from Artturin/splicenixfmt 2023-01-07 17:42:25 +02:00
Sandro Jäckel
56acc4566e luajit_openresty: init at 2.1-20220915 2022-12-26 02:57:06 +01:00
Sandro
f4c3e67d80 Merge pull request #206807 from SuperSandro2000/lua-sourceVersion 2022-12-25 21:42:47 +01:00
Artturin
58fa78077c treewide: use splicing convenience functions 2022-12-25 14:05:03 +02:00
Sandro Jäckel
b374880027 interpreters/lua: replace sourceVersion with lib.versions 2022-12-22 05:14:31 +01:00
figsoda
ec8cb34358 treewide: fix typos 2022-12-17 19:39:44 -05:00
github-actions[bot]
182a2100db Merge master into staging-next 2022-10-14 00:04:53 +00:00
Matthieu Coudron
c4b5c2574b lua: test the interpreter
Test with:
nix-build -A lua.tests pass

Tests are very limited for now, goal is mostly to put the infra into
place and enrich the tests when dealing with lua issues.
add luaPath/luaCpath as passthrough
makes it easier to generate LUA_PATH/LUA_CPATH
2022-10-14 00:10:40 +02:00
Vladimír Čunát
00a757ed3f Merge branch 'master' into staging 2022-10-13 08:27:55 +02:00
Yorick van Pelt
5af1ad13f6 lua: 5.4.3 -> 5.4.4
CVE-2021-44647, CVE-2021-44964, CVE-2021-43519
2022-10-11 12:25:51 +02:00
Stéphan Kochen
2623fc4a78 lua: add back Darwin makeBinaryWrapper fix 2022-10-09 12:15:14 +02:00
Artturin
39571bd6fa luaPackages: copy passthruFun from python 2022-08-26 20:55:30 +03:00
Robert Scott
dd107ca580 lua5_4: add patch for CVE-2022-33099 2022-07-23 13:37:52 +01:00
Robin Gloster
5a7d0b6b34 lua5_4: fix CVE-2022-28805 2022-05-30 21:04:17 +02:00
Robin Gloster
04d41ba8cc lua5_2: add patch for CVE-2022-28805
Derived from 1f3c6f4534
2022-05-30 21:04:16 +02:00
Vladimír Čunát
4ddea71bbd Re-Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)"
This reverts commit 9f4060c552.
After the previous merge commit this should work now.
2022-05-23 10:28:05 +02:00
Vladimír Čunát
9f4060c552 Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)"
This reverts commit 92f4c6ed82.
On aarch64-darwin this completely broke lua instead of improving it;
let's revert at least until that's resolved.
https://github.com/NixOS/nixpkgs/pull/172749#issuecomment-1133759233
2022-05-22 15:45:36 +02:00
Jeremy Wall
92f4c6ed82 lua: fix on darwin by using makeBinaryWrapper (#172749) 2022-05-17 09:45:38 +00:00
Luka Blaskovic
d5fe0d2b6e Revert "luajit_openresty: init"
This reverts commit 0b467dfa95.
2021-08-25 10:33:56 +00:00
Gregory Anders
0b467dfa95 luajit_openresty: init 2021-08-19 05:52:24 -06:00
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
Janne Heß
cf7fde4b02 lua5_4: 5.4.2 -> 5.4.3 2021-05-31 22:22:11 +02: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
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
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
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
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
Pierre Bourdon
1b7783072c lua5_1: rename patch file to match its CVE id 2019-10-02 22:13:12 +02:00