add fennel-ls to shell derivation

I'm unsure whether it's actually useful or not, haven't tried it yet
This commit is contained in:
Daniel Barlow 2025-06-05 23:03:08 +01:00
parent 63e592d33d
commit cdd7ea3a94
2 changed files with 25 additions and 1 deletions

View File

@ -84,4 +84,9 @@ in stdenv.mkDerivation {
icon = "nix-snowflake"; # "${placeholder "out"}/share/icons/${pname}.svg";
})
];
passthru = {
inherit lua luaPackages;
};
}

View File

@ -1,8 +1,27 @@
with import <nixpkgs> {};
let package = pkgs.callPackage ./. {};
let
package = pkgs.callPackage ./. {};
fennel-ls1 =
let inherit (pkgs) stdenv pandoc;
in stdenv.mkDerivation {
name = "fennel-ls";
buildInputs = [ package.lua ];
nativeBuildInputs = [ pandoc ];
makeFlags = [ "PREFIX=\\$out" ];
src = fetchFromSourcehut {
owner ="~xerool";
repo ="fennel-ls";
rev = "552b03b983c18d7db5053350711bef9088cc9110";
hash = "sha256-npR10hzPYgDPbKWB5ueq8cXAWYvUEbVVJ1R/EEdCnVY=";
};
};
fennel-ls = pkgs.fennel-ls.override { inherit (package) lua luaPackages; };
in
package.overrideAttrs(o: {
nativeBuildInputs = [ fennel-ls ] ++ o.nativeBuildInputs;
shellHook = ''
mkdir -p bin
( cd bin && ln -sf `type -p fennel-ls` `type -p fennel` . )
export LUA_CPATH=$(lua -e "print(package.cpath)")
export LUA_PATH=$(lua -e "print(package.path)")\;$RXI_JSON/share/lua/5.3/?.lua
'';