fnlfmt: use included `Makefile` for build (#351547)

authored by Rick van Schijndel and committed by GitHub 3e46dff7 4472a2a1

+20 -14
+20 -14
pkgs/development/tools/fnlfmt/default.nix
··· 1 - { lib, stdenv, fetchFromSourcehut, luaPackages, lua }: 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromSourcehut, 5 + lua, 6 + luaPackages, 7 + }: 2 8 3 9 stdenv.mkDerivation rec { 4 10 pname = "fnlfmt"; ··· 15 21 16 22 buildInputs = [ lua ]; 17 23 18 - buildPhase = '' 19 - runHook preBuild 24 + makeFlags = [ 25 + "PREFIX=$(out)" 26 + "FENNEL=${luaPackages.fennel}/bin/fennel" 27 + ]; 28 + sourceRoot = [ "${src.name}/tags/${version}" ]; 20 29 21 - echo "#!${lua}/bin/lua" > fnlfmt 22 - ${luaPackages.fennel}/bin/fennel --require-as-include --compile tags/${version}/cli.fnl >> fnlfmt 23 - chmod +x fnlfmt 30 + doInstallCheck = true; 31 + installCheckPhase = '' 32 + runHook preInstallCheck 24 33 25 - runHook postBuild 26 - ''; 34 + $out/bin/fnlfmt --help > /dev/null 27 35 28 - installPhase = '' 29 - runHook preInstall 30 - install -D ./fnlfmt $out/bin/fnlfmt 31 - runHook postInstall 36 + runHook postInstallCheck 32 37 ''; 33 38 34 39 meta = with lib; { 35 40 description = "Formatter for Fennel"; 36 - homepage = "https://git.sr.ht/~technomancy/fnlfmt"; 37 - license = licenses.lgpl3Plus; 41 + homepage = src.meta.homepage; 42 + changelog = "${src.meta.homepage}/tree/${version}/changelog.md"; 43 + license = licenses.mit; 38 44 platforms = lua.meta.platforms; 39 45 maintainers = with maintainers; [ chiroptical ]; 40 46 mainProgram = "fnlfmt";