depot/third_party/nixpkgs/pkgs/development/tools/luaformatter/default.nix
Default email a3d4720129 Project import generated by Copybara.
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
2022-12-28 22:21:41 +01:00

38 lines
914 B
Nix

{ lib, stdenv, fetchFromGitHub, substituteAll, antlr4_9, libargs, catch2, cmake, libyamlcpp }:
let
antlr4 = antlr4_9;
in
stdenv.mkDerivation rec {
pname = "luaformatter";
version = "1.3.6";
src = fetchFromGitHub {
owner = "Koihik";
repo = "LuaFormatter";
rev = version;
sha256 = "14l1f9hrp6m7z3cm5yl0njba6gfixzdirxjl8nihp9val0685vm0";
};
patches = [
(substituteAll {
src = ./fix-lib-paths.patch;
antlr4RuntimeCpp = antlr4.runtime.cpp.dev;
inherit libargs catch2 libyamlcpp;
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [ antlr4.runtime.cpp libyamlcpp ];
meta = with lib; {
description = "Code formatter for Lua";
homepage = "https://github.com/Koihik/LuaFormatter";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ figsoda SuperSandro2000 ];
mainProgram = "lua-format";
};
}