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
right now the src is ignored in:
```
lush-nvim = buildNeovimPlugin {
pname = "lush.nvim";
version = "2022-08-09";
src = fetchFromGitHub {
owner = "rktjmp";
repo = "lush.nvim";
rev = "6b9f399245de7bea8dac2c3bf91096ffdedfcbb7";
sha256 = "0rb77rwmbm438bmbjfk5hwrrcn5sihsa1413bdpc27rw3rrn8v8z";
};
meta.homepage = "https://github.com/rktjmp/lush.nvim/";
};
```
which is very confusing. With this PR, we correctly override the src and
the version of the package. We introduce a rockspecVersion attribute of
lua package to be able to still find the rockspec when the
"version" field needs to be different than "rockspecVersion".
Since the Nix command used is an implementation detail of the script,
it's the script that will have to be updated if the command changes,
it's the script that should be opting into this, rather than making
the user do it globally.
Since c0972c16dc ("update-python-libraries: add missing dependency nix"),
Nix will be provided as a dependency, so we know we'll always be using
a modern version and no longer need the fallback.
*Flags implies a list
slightly relevant:
> stdenv: start deprecating non-list configureFlags https://github.com/NixOS/nixpkgs/pull/173172
the makeInstalledTests function in `nixos/tests/installed-tests/default.nix` isn't available outside of nixpkgs so
it's not a breaking change
Currently, `pkgs.ruby` is ruby 2.7.6, which is in 'security updates
only' mode and scheduled to go EOL April 2023. Updating `pkgs.ruby`
to be ruby 3.1 would be a rather large change, but using ruby 3 to
bootstrap building ruby itself would be a nice first step in that
direction.
Tested with asciidoctor that this indeed now allows building a ruby
application without getting ruby 2.7 in the build closure.
Also fixes#192729