Skip to content

Commit

Permalink
feat(nix): add neorocks to dev shell
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed May 3, 2023
1 parent 5766cb3 commit 72fd11f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
cabal-install
zlib
haskellPackages.neolua-bin
neorocks
])
++ (with pre-commit-hooks.packages.${system}; [
hlint
Expand Down
12 changes: 7 additions & 5 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ with final.lib; let

neovim-nightly = neovim-input.packages.${prev.system}.neovim;

mkNeoluaWrapper = neovim:
mkNeoluaWrapper = name: neovim:
final.pkgs.writeShellApplication {
name = "neolua";
inherit name;
checkPhase = "";
runtimeInputs = [
haskellPackages.neolua-bin
Expand All @@ -51,16 +51,16 @@ with final.lib; let
'';
};

neolua-stable-wrapper = mkNeoluaWrapper final.pkgs.neovim-unwrapped;
neolua-stable-wrapper = mkNeoluaWrapper "neolua" final.pkgs.neovim-unwrapped;

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

luajit = prev.pkgs.luajit.overrideDerivation (old: {
postPatch = ''
${old.postPatch}
mkdir -p $out/bin
ln -s ${neolua-stable-wrapper}/bin/neolua $out/bin/neolua
ln -s ${neolua-nightly-wrapper}/bin/neolua $out/bin/neolua-nightly
ln -s ${neolua-nightly-wrapper}/bin/neolua-nightly $out/bin/neolua-nightly
'';
});

Expand All @@ -74,6 +74,8 @@ with final.lib; let
luarocks
luajit
luajit.pkgs.dkjson
neolua-stable-wrapper
neolua-nightly-wrapper
];
};
in {
Expand Down

0 comments on commit 72fd11f

Please sign in to comment.