Skip to content

Commit

Permalink
fix(neorocksTest): use lua51Packages instead of luajitPackages
Browse files Browse the repository at this point in the history
...as this is whan the Nix Neovim derivation uses
  • Loading branch information
mrcjkb committed Dec 9, 2023
1 parent 917f942 commit 10fa1da
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,25 @@ with prev.lib; let

neolua-nightly-wrapper = mkNeoluaWrapper "neolua-nightly" neovim-nightly;

luajit =
(prev.pkgs.luajit.overrideAttrs (old: {
lua5_1 =
(prev.pkgs.lua5_1.overrideAttrs (old: {
postInstall = ''
${old.postInstall}
ln -s ${neolua-stable-wrapper}/bin/neolua $out/bin/neolua
ln -s ${neolua-nightly-wrapper}/bin/neolua-nightly $out/bin/neolua-nightly
'';
}))
.override {
self = luajit;
self = lua5_1;
};

mkNeorocks = neolua-pkgs:
prev.pkgs.symlinkJoin {
name = "neorocks";
paths =
[
final.luajit
final.luajitPackages.luarocks
final.lua5_1
final.lua51Packages.luarocks
]
++ neolua-pkgs;
};
Expand Down Expand Up @@ -105,16 +105,16 @@ with prev.lib; let
];
neolua-wrapper = mkNeoluaWrapper "neolua" neovim;

luajit = prev.pkgs.luajit;
lua5_1 = prev.pkgs.lua5_1;

busted = luajit.pkgs.busted.overrideAttrs (oa: {
busted = lua5_1.pkgs.busted.overrideAttrs (oa: {
postInstall = ''
${oa.postInstall}
substituteInPlace ''$out/bin/busted \
--replace "${luajit}/bin/luajit" "${neolua-wrapper}/bin/neolua"
--replace "${lua5_1}/bin/lua" "${neolua-wrapper}/bin/neolua"
'';
});
in (luajit.pkgs.buildLuarocksPackage (rest
in (lua5_1.pkgs.buildLuarocksPackage (rest
// {
inherit
src
Expand All @@ -129,7 +129,7 @@ with prev.lib; let
[
busted
]
++ luaPackages luajit.pkgs;
++ luaPackages lua5_1.pkgs;
doCheck = true;
nativeCheckInputs = extraPackages;
}));
Expand All @@ -142,5 +142,5 @@ in {
neolua-stable-wrapper
neolua-nightly-wrapper
;
luajitPackages = luajit.pkgs;
lua51Packages = lua5_1.pkgs;
}

0 comments on commit 10fa1da

Please sign in to comment.