Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / luaformatter / default.nix
blobeb8b5a799ce1832bc6149ce6bee7acb9fbbd82e3
1 { lib, stdenv, fetchFromGitHub, substituteAll, antlr4_9, libargs, catch2, cmake, yaml-cpp }:
3 let
4   antlr4 = antlr4_9;
5 in
7 stdenv.mkDerivation rec {
8   pname = "luaformatter";
9   version = "1.3.6";
11   src = fetchFromGitHub {
12     owner = "Koihik";
13     repo = "LuaFormatter";
14     rev = version;
15     sha256 = "14l1f9hrp6m7z3cm5yl0njba6gfixzdirxjl8nihp9val0685vm0";
16   };
18   patches = [
19     (substituteAll {
20       src = ./fix-lib-paths.patch;
21       antlr4RuntimeCpp = antlr4.runtime.cpp.dev;
22       inherit libargs catch2 yaml-cpp;
23     })
24   ];
26   nativeBuildInputs = [ cmake ];
28   buildInputs = [ antlr4.runtime.cpp yaml-cpp ];
30   meta = with lib; {
31     description = "Code formatter for Lua";
32     homepage = "https://github.com/Koihik/LuaFormatter";
33     license = licenses.asl20;
34     platforms = platforms.all;
35     maintainers = with maintainers; [ figsoda ];
36     mainProgram = "lua-format";
37   };