mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
luaPackages.plenary-nvim: add code to run tests
... but dont enable it just yet since it is so damn flaky. Passed on my laptop but not on CI.
This commit is contained in:
parent
3c5a7fc2a7
commit
9ba72f15d1
@ -2,6 +2,11 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, cargo
|
, cargo
|
||||||
, cmake
|
, cmake
|
||||||
|
|
||||||
|
# plenary utilities
|
||||||
|
, which
|
||||||
|
, findutils
|
||||||
|
, coreutils
|
||||||
, curl
|
, curl
|
||||||
, cyrus_sasl
|
, cyrus_sasl
|
||||||
, dbus
|
, dbus
|
||||||
@ -439,6 +444,32 @@ with prev;
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
plenary-nvim = prev.plenary-nvim.overrideAttrs (oa: {
|
||||||
|
postPatch = ''
|
||||||
|
sed -Ei lua/plenary/curl.lua \
|
||||||
|
-e 's@(command\s*=\s*")curl(")@\1${curl}/bin/curl\2@'
|
||||||
|
'';
|
||||||
|
|
||||||
|
# disabled for now because too flaky
|
||||||
|
doCheck = false;
|
||||||
|
# for env/find/ls
|
||||||
|
checkInputs = [
|
||||||
|
which
|
||||||
|
neovim-unwrapped
|
||||||
|
coreutils
|
||||||
|
findutils
|
||||||
|
];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
# remove failing tests, need internet access for instance
|
||||||
|
rm tests/plenary/job_spec.lua tests/plenary/scandir_spec.lua tests/plenary/curl_spec.lua
|
||||||
|
export HOME="$TMPDIR"
|
||||||
|
make test
|
||||||
|
runHook postCheck
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
# as advised in https://github.com/luarocks/luarocks/issues/1402#issuecomment-1080616570
|
# as advised in https://github.com/luarocks/luarocks/issues/1402#issuecomment-1080616570
|
||||||
# we shouldn't use luarocks machinery to build complex cmake components
|
# we shouldn't use luarocks machinery to build complex cmake components
|
||||||
libluv = stdenv.mkDerivation {
|
libluv = stdenv.mkDerivation {
|
||||||
|
Loading…
Reference in New Issue
Block a user