about summary refs log tree commit diff
path: root/pkgs/development/interpreters/lua-5
AgeCommit message (Collapse)AuthorFilesLines
12 daysMerge pull request #328839 from trofi/lua5_4-updateSandro1-2/+2
2024-07-26Merge remote-tracking branch 'origin/master' into staging-nextMartin Weinelt1-2/+1
Conflicts: - pkgs/applications/graphics/seamly2d/default.nix
2024-07-26treewide: remove unused lib (and other) argumentsSigmanificient1-2/+1
2024-07-21lua5_4: 5.4.6 -> 5.4.7Sergei Trofimovich1-2/+2
Changes: https://www.lua.org/work/diffs-lua-5.4.6-lua-5.4.7.html
2024-07-10generateLuarocksConfig: dont generate rocks_subdir by defaultMatthieu C.1-1/+4
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-05Merge master into staging-nextgithub-actions[bot]1-0/+2
2024-07-05generateLuarocksConfig: dont hardcode local_cacheMatthieu C.1-0/+2
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-06-25Merge remote-tracking branch 'origin/master' into staging-nextMartin Weinelt1-2/+2
2024-06-24luarocks: use self.pname for an effective overrideAttrsMatthieu C.1-2/+2
luarocks-nix store path was ..luarocks-version instead of ...luarocks-nix-version. This fixes it
2024-06-12lua: take into propagated-build-inputs when building LUA_PATHMatthieu C.5-47/+97
so far we ignored propagated-build-inputs
2024-05-31luaPackages.luarocks: generate luarocks as wellMatthieu C.1-3/+3
When installing a lua package that depends on luarocks, luarocks was not capable of recognizing the luarocks module: https://github.com/NixOS/nixpkgs/issues/316009 . As explained here https://github.com/luarocks/luarocks/issues/1659, luarocks needs a manifest to recognize the package. I first attempted to generate a manifest with `luarocks-admin make-manifest` on our current manual luarocks derivation but this ended up being too hackish as the `make-manifest` requires a .rockspec or .rock to work, which we had not. It seemed simpled to just rename the current manual luarocks derivation to luarocks_bootstrap in order to break cyclic dependencies in buildLuarocksPackage and add a generated luarocks derivation. Previously it was impossible to test luarocks because of the cyclic dependency but we will now be able to test the generated derivation.
2024-05-24pkgs/development: remove unused fetchpatch argumentsSigmanificient1-1/+1
2024-05-01lua:: reworked setup-hook to source utils.shMatthieu C.8-73/+70
which contains lua shell utilities that can be reused during the creation of an environment. Makes sense because the generation of LUA_PATH is a bit different than other ecosystems.
2024-05-01lua: fixed the way to create environmentsMatthieu C.2-1/+2
`paths = requiredLuaModules (extraLibs ++ [ lua ] );` would discard lua and so in absence of a propagated lua, the lua.withPackages would return an empty bin/ directory.
2024-04-15Revert #303176: "buildLuarocksPackage: rework fixup phase"Vladimír Čunát1-7/+3
This reverts commit ddefcf284ce57b2ebe042eba75feec70cfb19268. Breakages need figuring out, reverting for now: https://github.com/NixOS/nixpkgs/pull/303176#issuecomment-2053910614
2024-04-11buildLuarocksPackage: rework fixup phaseMatthieu Coudron1-3/+7
I was working on lua tests, enabling nlua and I started overriding postFixup, which removed the default phase for build-luarocks-package so instead let's make it a proper phase.
2024-04-02lua: fix setup-hook *.lua matchingMatthieu Coudron1-2/+2
the setup-hook checks if a derivation contains lua files matching lua_path patterns. We use bash's globstar extension for that but `**.lua` doesn't return files in subfolders, it has to be `**/*.lua`. Adjust the pattern accordingly.
2024-04-02lua.tests.checkSetupHook: test lua setup hook for http packageMatthieu Coudron2-0/+16
the 'http' package is an interesting one to test because all its lua files are in a 'http' subfolder, ie., there is no share/lua/5.1/*.lua, only share/lua/5.1/http/*.lua files unlike most packages. This tests we can match those subfolders.
2024-03-16lua: update setup-hook to limit LUA_PATH sizeMatthieu Coudron1-6/+9
now that the lua interpreters include working directories with `./?.lua` in LUA_PATH, the current test includes every derivation which quickly becomes unreadable and unpractical. The test is adapted to add a folder only if it can find lua files in the subfolder.
2024-03-16lua.tests: update golden values for default LUA_PATHMatthieu Coudron2-22/+38
when LUA_PATH contains `;;`, it is replaced by `;LUA_PATH_DEFAULT;` in lua 5.1: Updated https://github.com/lua/lua/blob/69ea087dff1daba25a2000dfb8f1883c17545b7a/loadlib.c#L599 More recent versions might be smarter ? https://github.com/lua/lua/blob/65b07dd53d7938a60112fc4473f5cad3473e3534/loadlib.c#L301
2024-03-16lua: smarter/more correct patchingMatthieu Coudron2-16/+10
In order to have the 'reset' LUA_PATH (aka `;;`) work, and for purity reasons(removing /usr paths) we(I) decided to patch the lua interpreters default LUA_PATH. Turns out the interpreters have different defaults and the patch was too coarse. There is smarter patching that can be done via LUA_ROOT. Also luajit doesn't need patching at all since LUA_ROOT is set via the build system.
2024-03-11lua: actually fix longstanding bug in lua envHook causing relative module ↵binarycat1-0/+5
imports to stop working somehow, between all my testing, all the code review, and my code being copy-pasted into other people's PRs, noone noticed the glaring issue in the singular line of code i committed. there was a missing negation. this has now been fixed.
2024-02-17buildLuarocksPackage: accept structured luarocks configMatthieu Coudron1-13/+27
There is an arbitrary mapping being done right now between nixpkgs lua infrastructre and luarocks config schema. This is confusing if you use lua so let's make it possible to use the lua names in the nixpkgs, thanks to the lib.generators.toLua convertor. The only nixpkgs thing to remember should be to put the config into `luarocksConfig` `buildLuarocksPackage.extraVariables` should become `buildLuarocksPackage.luarocksConfig.variables`
2024-02-12buildLuarocksPackage: ability to self reference extraConfig (#288253)Matthieu Coudron1-2/+2
makes overrideAttrs for lua packages even more powerful. As a consequence, it simplifies the implementation of buildNeovimPlugin.
2024-02-11buildLuarocksPackage: remove rockspecDir (#288036)Matthieu Coudron1-3/+1
it was used only once and complexifies the buildLuarocksPackage function uselessly. because buildLuarocksPackage accepts ... args, it wont trigger eval failures but this may break out of tree packages where the build can't find the rockspec anymore. Specify the path via `knownRockspec` if that's the case.
2024-02-06lua.tests: add test for relative importMatthieu Coudron3-8/+31
better error message as well extracted from https://github.com/NixOS/nixpkgs/pull/273342 written by heyarne
2023-12-31Merge branch 'master' into staging-nextJan Tojnar1-2/+2
; Conflicts: ; pkgs/development/lua-modules/generated-packages.nix ; pkgs/development/lua-modules/overrides.nix
2023-12-30lua-wrapper: fix luaPath and luaCpath definitionsSergei Trofimovich1-2/+2
Before the change: $ nix-instantiate --eval --strict --expr 'with import ./. {}; with corsix-th.luaEnv; [luaPath luaCpath]' error: error: attribute 'lib' missing After the change: $ nix-instantiate --eval --strict --expr 'with import ./. {}; with corsix-th.luaEnv; [luaPath luaCpath]' [ "/nix/store/f17ah5zjri1yjacc1c50g9xlr8qqwbgh-lua-5.2.4-env/share/lua/5.2/?.lua;/nix/store/f17ah5zjri1yjacc1c50g9xlr8qqwbgh-lua-5.2.4-env/share/lua/5.2/?/init.lua" "/nix/store/f17ah5zjri1yjacc1c50g9xlr8qqwbgh-lua-5.2.4-env/lib/lua/5.2/?.so" ]
2023-12-15Merge staging-next into staginggithub-actions[bot]1-1/+2
2023-12-15treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobsAdam Joseph1-1/+2
2023-12-13Merge #224295: lua: split manual into separate outputVladimír Čunát1-0/+4
...into staging
2023-11-24buildLuarocksPackage: save luarocks config as derivation (#269402)Matthieu Coudron1-7/+8
* buildLuarocksPackage: save luarocks config as derivation while debugging luarocks packages, it's exhausting to have to build them, look at what random folder they've been built to finally look for their config. With this you can run nix build lua51Packages.plenary-nvim.configFile -f . and infer what luarocks will do. * Update pkgs/development/interpreters/lua-5/build-luarocks-package.nix Co-authored-by: Marc Jakobi <mrcjkb89@outlook.com> --------- Co-authored-by: Marc Jakobi <mrcjkb89@outlook.com>
2023-11-23lua: use finalAttrs for interpreters (#264381)Matthieu Coudron1-27/+30
2023-10-14luaPackages: introduce an alias mechanismMatthieu Coudron1-1/+7
so that we can deprecate modules
2023-08-14treewide: use uncurried version of makeScopeWithSplicingAdam Joseph1-8/+5
2023-07-28Revert "lib.customisation: uncurry makeScopeWithSplicing"Silvan Mosberger1-4/+7
2023-07-28lib.makeScopeWithSplicing: provide default for keep,extraArtturin1-3/+1
These are often unneeded by the user.
2023-07-27lib.customisation: uncurry makeScopeWithSplicingAdam Joseph1-5/+4
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-10buildLuarocksPackage: rename file to match its roleMatthieu Coudron1-0/+0
2023-06-25treewide: use optionalAttrs instead of 'else {}'Felix Buehler1-1/+1
2023-06-06Update pkgs/development/interpreters/lua-5/interpreter.nixDmitry Bogatov1-1/+1
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-05-26lua5_4: 5.4.4 -> 5.4.6Weijia Wang1-20/+3
2023-05-09buildLuaPackage: fix crossAdam Joseph1-1/+2
buildLuaPackage accesses lua.pkgs.luarocks, which became unspliced at some point. Let's use callPackage to get it, so we can be sure it will be spliced.
2023-05-06trivial-builders: move into the directory named alike (#223429)Sandro1-1/+1
While searching for something different I wondered why there is a trivial-builders.nix file next to the trivial-builders directory where only tests live. Lets fix that.
2023-04-27buildLuarocksPackage: fixes attributes being ignoredMatthieu Coudron1-5/+5
follow up of https://github.com/NixOS/nixpkgs/pull/224553 where some arguments got ignored whil they were before taken into account.
2023-04-22buildLuaPackage: enable __structuredAttrs rocksMatthieu Coudron1-62/+56
it makes overriding easier, instead of having to know internals to decide which of `sqlite = prev.luaLib.overrideLuarocks prev.sqlite (drv: {` or `sqlite = prev.sqlite.overrideAttrs (drv: {` just use the latter
2023-04-20build-lua-package.nix: change self to finalAttrsAnderson Torres1-4/+4
2023-04-01lua: split manual into separate outputDmitry Bogatov1-0/+4
Also, make sure that "doc" outputs of different versions of lua are co-installable, so user can install multiple manuals and read them side-by-side.
2023-03-29Merge #223349: lua*Packages: fix the default namePrefixVladimír Čunát1-1/+1
...into staging
2023-03-27Revert "buildLuaPackage: throw instead of marking as broken package"Florian Klink1-1/+1
This reverts commit 0cd595cdb3b4f39ef5b903b64b45534ea9bc63ff. It's causing build failures for knot-resolver and others. Workaround for https://github.com/NixOS/nixpkgs/issues/223437