2021-08-18 23:17:58 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, substituteAll, antlr4, libargs, catch2, cmake, libyamlcpp }:
|
2021-02-17 16:22:01 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "luaformatter";
|
2021-05-19 16:34:23 +02:00
|
|
|
version = "1.3.6";
|
2021-02-17 16:22:01 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-18 23:17:58 +02:00
|
|
|
owner = "Koihik";
|
|
|
|
repo = "LuaFormatter";
|
2021-02-17 16:22:01 +01:00
|
|
|
rev = version;
|
2021-08-18 23:17:58 +02:00
|
|
|
sha256 = "14l1f9hrp6m7z3cm5yl0njba6gfixzdirxjl8nihp9val0685vm0";
|
2021-02-17 16:22:01 +01:00
|
|
|
};
|
|
|
|
|
2021-08-18 23:17:58 +02:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-lib-paths.patch;
|
|
|
|
antlr4RuntimeCpp = antlr4.runtime.cpp.dev;
|
|
|
|
inherit libargs catch2 libyamlcpp;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-17 16:22:01 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2021-08-18 23:17:58 +02:00
|
|
|
buildInputs = [ antlr4.runtime.cpp libyamlcpp ];
|
2021-02-17 16:22:01 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-08-18 23:17:58 +02:00
|
|
|
description = "Code formatter for Lua";
|
|
|
|
homepage = "https://github.com/Koihik/LuaFormatter";
|
2021-02-17 16:22:01 +01:00
|
|
|
license = licenses.asl20;
|
2021-09-04 17:06:18 +02:00
|
|
|
platforms = platforms.all;
|
2021-08-18 23:17:58 +02:00
|
|
|
maintainers = with maintainers; [ figsoda SuperSandro2000 ];
|
2021-08-18 18:21:17 +02:00
|
|
|
mainProgram = "lua-format";
|
2021-02-17 16:22:01 +01:00
|
|
|
};
|
|
|
|
}
|