From 9f6537f090f760053cb6ed393ea9ae951f4e196f Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sun, 24 Apr 2022 20:09:54 +0200 Subject: [PATCH] fennel: Add direct readline dependency --- overlay-patches.nix | 11 ++++++++++- programs/nvim/default.nix | 4 +--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/overlay-patches.nix b/overlay-patches.nix index e73d058..6e563b1 100644 --- a/overlay-patches.nix +++ b/overlay-patches.nix @@ -1,7 +1,16 @@ self: super: { fennel-luajit = super.fennel.overrideAttrs ( + let + luaPackages = with super.luajitPackages; [ readline ]; + in o: rec { - buildInputs = [ super.luajit ]; + buildInputs = [ super.luajit super.makeWrapper ] ++ luaPackages; + + postInstall = o.postInstall or "" + '' + wrapProgram $out/bin/fennel \ + --suffix LUA_CPATH ";" "${super.lib.concatMapStringsSep ";" super.luajitPackages.getLuaCPath luaPackages}" \ + --suffix LUA_PATH ";" "${super.lib.concatMapStringsSep ";" super.luajitPackages.getLuaPath luaPackages}" + ''; } ); } diff --git a/programs/nvim/default.nix b/programs/nvim/default.nix index e7fcf6e..9b0098c 100644 --- a/programs/nvim/default.nix +++ b/programs/nvim/default.nix @@ -46,7 +46,7 @@ in sumneko-lua-language-server taplo-lsp - # LSP Tools + # Diagnostic Tools deadnix hadolint fennel-luajit @@ -56,8 +56,6 @@ in statix ]; - extraLuaPackages = with pkgs.luajitPackages; [ readline ]; - plugins = (with customPlugins; [ # Fixes impatient-nvim