291 Commits

Author SHA1 Message Date
Sigmanificient 0bbc8dffae treewide: set meta.license on hooks 2026-05-25 13:48:20 +02:00
nixpkgs-ci[bot] dcaefd38ef Merge master into staging-next 2026-04-21 00:32:14 +00:00
Ben Siraphob 5fadc89f02 treewide: remove empty buildInputs assignments 2026-04-20 10:34:26 -07:00
Marc Jakobi 385a6721be buildLuarocksPackage: fix wrapping lua package binaries 2026-04-03 19:10:13 +02:00
Matthieu Coudron 5e40587385 buildLuarocksPackage: fix cross compilation wrapping (#481511)
(cherry picked from commit ca45c71bfc)
It looks like the rebuild costs won't be high really.
2026-03-13 13:47:09 +01:00
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
Doron Behar a486bc63cd lua{5_{1,2,3,4},jit}Packages.wrapLua: remove sed that does nothing
patchShebangs already takes care of this automatically and does it well,
before this hook runs.
2026-03-08 22:13:19 +02:00
Michael Daniels 4b7d598de4 Reapply "Merge branch 'staging-next' into staging"
This reverts commit 4982f4c206.

The eval failure was not introduced by my merge!
2026-02-27 19:47:50 -05:00
Michael Daniels 4982f4c206 Revert "Merge branch 'staging-next' into staging"
This reverts commit c00451dc71, reversing
changes made to 71467300b6.
2026-02-27 19:35:48 -05:00
Austin Horstman 6a76136306 build-luarocks-package: include nativeBuildInputs
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-02-27 09:49:14 -06:00
Marc Jakobi 4267c71982 lua5_5: build linux target 2026-01-30 15:33:40 +01:00
nixpkgs-ci[bot] 7673a2fb77 Merge staging-next into staging 2026-01-26 00:20:52 +00:00
Artturin 4054ea2cea luaPackages.wrapLua: Fix the wrapper on cross (#481464) 2026-01-25 21:21:13 +00:00
Matthieu Coudron ca520f49c3 bustedCheckHook: init (#481930) 2026-01-24 19:56:03 +00:00
teto 3485f095ad bustedCheckHook: init and convert luaPackages to use it
- add bustedCheckHook in the nativeCheckInputs and busted will run when
  doCheck is enabled. You can customize its call via "bustedFlags" and
  prevent it from running with "dontBustedCheck". If "nlua" is
  available, busted will automatically run busted with nlua as
  interpreter (already done in lux). Goal is to standardize the writing
  of tests so that if feels less like copy & paste.
- removed the default checkPhase from buildLuarocksPackage which was
  running "luarocks test". None of the plugins was using as far as I
  know  because no plugin out there (maybe 2 or 3) uses that ? it could
  be considered a breaking change but in practice I dont think it is.
2026-01-23 17:32:33 +01:00
Artturin e1e2f27c78 luaPackages.buildLuarocksPackage: Get the final derivation picked by
mkDerivation instead of using the raw list

```
   … while evaluating attribute 'propagatedBuildInputs' of derivation 'wrap-lua-hook'
     at /home/art/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:600:13:
      599|             depsHostHostPropagated = elemAt (elemAt propagatedDependencies 1) 0;
      600|             propagatedBuildInputs = elemAt (elemAt propagatedDependencies 1) 1;
         |             ^
      601|             depsTargetTargetPropagated = elemAt (elemAt propagatedDependencies 2) 0;
   … while calling the 'getAttr' builtin
     at «nix-internal»/derivation-internal.nix:50:17:
       49|     value = commonAttrs // {
       50|       outPath = builtins.getAttr outputName strict;
         |                 ^
       51|       drvPath = strict.drvPath;
   … while calling the 'derivationStrict' builtin
     at «nix-internal»/derivation-internal.nix:37:12:
       36|
       37|   strict = derivationStrict drvAttrs;
         |            ^
       38|
   … while evaluating derivation 'make-shell-wrapper-hook'
     whose name attribute is located at /home/art/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:541:13
   … while evaluating attribute 'shell' of derivation 'make-shell-wrapper-hook'
     at /home/art/nixgits/my-nixpkgs/pkgs/top-level/all-packages.nix:716:7:
      715|       # targetPackages.runtimeShell only exists when pkgs == targetPackages (when targetPackages is not  __raw)
      716|       shell =
         |       ^
      717|         if targetPackages ? runtimeShell then
   … while calling the 'throw' builtin
     at /home/art/nixgits/my-nixpkgs/pkgs/top-level/all-packages.nix:720:11:
      719|         else
      720|           throw "makeWrapper/makeShellWrapper must be in nativeBuildInputs";
         |           ^
      721|     };
   error: makeWrapper/makeShellWrapper must be in nativeBuildInputs
```
2026-01-20 15:20:05 +02:00
Matthieu Coudron e36daf16c4 buildLuarocksPackage: enable strictDeps by default (#478031) 2026-01-12 17:21:38 +00:00
teto b81acec358 buildLuarocksPackage: enable strictDeps by default
disabled strictDeps for derivations that fail until we fix them.
This change helps with new packages.
2026-01-12 00:13:48 +01:00
Marc Jakobi 1c3e8d2cb8 lua5_5: update tests 2026-01-07 23:00:27 +01:00
Marc Jakobi 05159343ea lua5_5: init at 5.5.0 2026-01-02 20:23:45 +01:00
Aliaksandr f60a6c51e6 treewide: prefer standard name for old and final Attrs 2025-12-13 23:29:51 +02:00
Aliaksandr aeea2cf596 lua-modules: remove old throwing aliases 2025-11-30 02:25:37 +02:00
Aliaksandr 03bb7d8195 all-packages: do not export lib functions from pkgs 2025-10-30 22:38:49 +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
Wolfgang Walther c6918cc335 lua54Packages.luarocksCheckHook: remove unused callPackage 2025-06-18 15:57:26 +02:00
Winter bf74f38c0f lua5_{2,4}: unbreak on darwin when __structuredAttrs is enabled 2025-05-11 00:39:10 -04:00
Austin Horstman 25e5402a49 tests/lua-5: format tweak 2025-03-16 10:35:03 -05:00
Austin Horstman e3864d7d89 tests/lua-5: fix checkInterpreterPath test name
Checking a path location, not a patch.
2025-03-15 09:44:49 -05:00
Austin Horstman 4249106f2e tests/lua-5: fix lint errors
Unnecessary parenthesis
2025-03-15 09:44:49 -05:00
Austin Horstman 609b8b61be tests/lua-5: fix checkPropogatedBuildInputs test
Dependencies changed in https://github.com/NixOS/nixpkgs/pull/342196
2025-03-15 09:44:31 -05:00
Peder Bergebakken Sundt 5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00
K900 796f4b7f8b lua: Don't flood stdout when included in mkShell (#369577) 2025-02-09 09:28:26 +03:00
Wolfgang Walther 7fea091aa8 {lua-5,luajit}: fix missing @ lua @ reference in utils.sh 2025-01-26 16:47:16 +01:00
YoshiRulz 09388f4eb3 lua: Don't flood stdout when included in mkShell
fixes 665f3f694
2025-01-01 14:34:05 +10:00
Silvan Mosberger 667d42c00d 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 https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev 57b193d8dd
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00
Wolfgang Walther e236ed1719 pkgs/development/interpreters/lua-5/hooks: remove unused setup-hook.sh
Oversight in 6427d04c23.
2024-11-15 20:10:27 +01:00
AwesomeQubic ea61f604da lua: set mainProgram (#352347) 2024-10-31 00:30:40 +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
Peder Bergebakken Sundt 8c8c27bb19 treewide: remove unused inputs 2024-09-18 01:00:07 +02:00
Sandro 021e453cc6 Merge pull request #328839 from trofi/lua5_4-update 2024-08-22 11:50:48 +02:00
Martin Weinelt 93f4195fe0 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/applications/graphics/seamly2d/default.nix
2024-07-26 18:05:04 +02:00
Sigmanificient 6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02: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
Matthieu C. 29cc0b4a6b generateLuarocksConfig: dont generate rocks_subdir by default
Goal is to make generateLuarocksConfig appropriate in more scenarios, in my case, to generate rocks.nvim luarocks config

We override the luarocks default for rocks_subdir to avoid conflicts when creating lua environments but it is not appropriate for other scenarios
so let's not default to it in the "lib" function.
2024-07-10 23:08:40 +02:00
github-actions[bot] 4bba3c5730 Merge master into staging-next 2024-07-05 12:01:14 +00:00
Matthieu C. 8a0c6be458 generateLuarocksConfig: dont hardcode local_cache
I tried using luaLib.generateLuarocksConfig outside nixpkgs, to generate a rocks.nvim config but it adds a `local_cache = ""` configuration line that is painful to remove so let's not add it in the first place, and let the caller set it if needed.
2024-07-05 13:32:47 +02:00
Martin Weinelt de245ec4a5 Merge remote-tracking branch 'origin/master' into staging-next 2024-06-25 13:00:25 +02:00