Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, substituteAll, antlr4_9, libargs, catch2, cmake, yaml-cpp }: 2 3let 4 antlr4 = antlr4_9; 5in 6 7stdenv.mkDerivation rec { 8 pname = "luaformatter"; 9 version = "1.3.6"; 10 11 src = fetchFromGitHub { 12 owner = "Koihik"; 13 repo = "LuaFormatter"; 14 rev = version; 15 sha256 = "14l1f9hrp6m7z3cm5yl0njba6gfixzdirxjl8nihp9val0685vm0"; 16 }; 17 18 patches = [ 19 (substituteAll { 20 src = ./fix-lib-paths.patch; 21 antlr4RuntimeCpp = antlr4.runtime.cpp.dev; 22 inherit libargs catch2 yaml-cpp; 23 }) 24 ]; 25 26 nativeBuildInputs = [ cmake ]; 27 28 buildInputs = [ antlr4.runtime.cpp yaml-cpp ]; 29 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 SuperSandro2000 ]; 36 mainProgram = "lua-format"; 37 }; 38}