You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
luarocks exists as a luarocks package that other luarocks packages can depend on.
When trying to build a rockspec that depends on luarocks with buildLuarocksPackage, it fails.
> Running phase: installPhase
> Missing dependencies for testpackage scm-1:
> luarocks (not installed)
>
> testpackage scm-1 depends on lua >= 5.1 (5.1-1 provided by VM: success)
> testpackage scm-1 depends on luarocks (not installed)
> Warning: Failed searching manifest: Failed downloading https://luarocks.org/manifest-5.1 - no downloader tool available,
please install wget or curl in your system
>
> Error: Could not satisfy dependency luarocks: No results matching query were found for Lua 5.1.
For full logs, run 'nix log /nix/store/rnbmdmw05596619d3nsvzrwflqxh6gi6-lua5.1-testpackage-scm-1.drv'.
The rocks_trees entry in the generated luarocks config contains an entry for luarocks, but luarocks doesn't recognise it and tries to download the package instead.
A workaround is to use luarocks-nix to generate a buildLuarocksPackage expression for luarocks (luarocks nix luarocks),
and to add that package to the testpackage's propagatedBuildInputs instead of the luarocks package from nixpkgs.
thanks for creating the test repo, it's helpful. I've looked at the generated LUAROCKS_CONFIG and all looks good and I think luarocks just doesn't recognize the installed luarocks because of luarocks/luarocks#1659
My first thought would have been to rename the current luarocks into a luarocks_bootstrap and add a generated luarocks derivation, for which we could run the tests without the cyclic dependency luarocks -> busted -> luarocks.
While this might be the best outcome longterm, I am looking into the quickfix which would be to generate the manifest for the current luarocks
teto
added a commit
to teto/nixpkgs
that referenced
this issue
May 31, 2024
When installing a lua package that depends on luarocks, luarocks was not
capable of recognizing the luarocks module: NixOS#316009 .
As explained here luarocks/luarocks#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.
Describe the bug
luarocks exists as a luarocks package that other luarocks packages can depend on.
When trying to build a rockspec that depends on luarocks with
buildLuarocksPackage
, it fails.The
rocks_trees
entry in the generated luarocks config contains an entry for luarocks, but luarocks doesn't recognise it and tries to download the package instead.Steps To Reproduce
I have created a repository to reproduce it with: https://github.com/mrcjkb/nix-luarocks-repro
nix build .#testpackage
A workaround is to use
luarocks-nix
to generate abuildLuarocksPackage
expression for luarocks (luarocks nix luarocks
),and to add that package to the
testpackage
'spropagatedBuildInputs
instead of theluarocks
package from nixpkgs.Notify maintainers
@teto
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: