1 { lib, stdenv, fetchFromGitHub, bmake, cleanPackaging }:
5 version = "2023-06-03";
7 src = fetchFromGitHub {
10 # 2023-06-03, no version tags (yet)
11 rev = "dc881796aa691f1fddb1d01ec77216b34fe8134d";
12 hash = "sha256-Az5995/eGUHFL1C1WAdgh1td3goHUYgzWFeVFz2zb8g=";
13 fetchSubmodules = true;
16 outputs = [ "bin" "doc" "out" ];
18 nativeBuildInputs = [ bmake ];
19 enableParallelBuilding = true;
21 makeFlags = [ "-r" "PREFIX=$(bin)" ];
26 ${cleanPackaging.commonFileActions {
31 # TODO: this is just a docbook file, not a mangpage yet
32 # https://github.com/katef/kgt/issues/50
57 install -Dm755 build/bin/kgt $bin/bin/kgt
64 ${cleanPackaging.checkForRemainingFiles}
68 description = "BNF wrangling and railroad diagrams";
71 KGT: Kate's Grammar Tool
73 Input: Various BNF-like syntaxes
74 Output: Various BNF-like syntaxes, AST dumps, and Railroad Syntax Diagrams
76 homepage = "https://github.com/katef/kgt";
77 license = licenses.bsd2;
78 platforms = platforms.unix;
79 maintainers = with maintainers; [ Profpatsch ];