rix101/pkgs/fennel-ls/default.nix
reo101 b35e6362a0
feat(packages): add fennel and fennel-ls
Built using `dream2nix`, based on my (reo101) forks of both projects
2024-09-15 15:10:30 +03:00

55 lines
1.3 KiB
Nix

{ config
, lib
, dream2nix
, ...
}: {
imports = [
dream2nix.modules.dream2nix.mkDerivation
];
deps = { nixpkgs, ... }: {
# Fetchers
inherit (nixpkgs)
fetchFromGitHub
;
# Build inputs
lua = nixpkgs.luajit;
fennel = config.deps.lua.pkgs.fennel;
};
name = "fennel-ls";
version = "0.1.2-dev";
mkDerivation = {
src = config.deps.fetchFromGitHub {
owner = "reo101";
repo = config.name;
rev = "3099ba016b346696b8600dfbdffd9a66704f83f9";
hash = "sha256-H5znjiYuQEbNG2WyTvH1CbnSk5PzaoPNg+xc+y66Gq0=";
};
makeFlags = [
"PREFIX=$(out)"
"LUA=${lib.getExe' config.deps.lua "lua"}"
"FENNEL=${lib.getExe' config.deps.fennel "fennel"}"
"EXE=${config.mkDerivation.meta.mainProgram}"
];
nativeBuildInputs = with config.deps; [
];
buildInputs = with config.deps; [
# NOTE: `lua` and `fennel` provisioned using their corresponding `makeFlags`
];
meta = with lib; {
description = "A language server for intelligent editing of the Fennel Programming Language";
homepage = "https://github.com/reo101/fennel-ls";
license = licenses.mit;
maintainers = with maintainers; [ reo101 ];
inherit (config.deps.lua.meta) platforms;
mainProgram = "fennel-ls";
};
};
}