Skip to content

Commit

Permalink
fnlfmt: use included Makefile for build
Browse files Browse the repository at this point in the history
Solves missing `fnlfmt` pagkage error since it is not being inlined
  • Loading branch information
joshbode committed Oct 27, 2024
1 parent 79ed655 commit fc3a66c
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions pkgs/development/tools/fnlfmt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,15 @@ stdenv.mkDerivation rec {
hash = "sha256-LYHhKC8iA4N8DdCH8GfSOkN/e+W3YjkFhVSDQraKoFk=";
};

nativeBuildInputs = [ luaPackages.fennel ];
nativeBuildInputs = [ lua luaPackages.fennel ];

buildInputs = [ lua ];
makeFlags = [ "PREFIX=$(out)" ];
sourceRoot = [ "${src.name}/tags/${version}" ];

buildPhase = ''
runHook preBuild
echo "#!${lua}/bin/lua" > fnlfmt
${luaPackages.fennel}/bin/fennel --require-as-include --compile tags/${version}/cli.fnl >> fnlfmt
chmod +x fnlfmt
runHook postBuild
'';

installPhase = ''
runHook preInstall
install -D ./fnlfmt $out/bin/fnlfmt
runHook postInstall
'';

meta = with lib; {
meta = with lib; rec {
description = "Formatter for Fennel";
homepage = "https://git.sr.ht/~technomancy/fnlfmt";
homepage = "https://git.sr.ht/${src.owner}/${src.repo}";
changelog = "${homepage}/tree/${version}/changelog.md";
license = licenses.lgpl3Plus;
platforms = lua.meta.platforms;
maintainers = with maintainers; [ chiroptical ];
Expand Down

0 comments on commit fc3a66c

Please sign in to comment.