1{ lib, stdenv, fetchFromGitHub }:
2
3stdenv.mkDerivation rec {
4 pname = "jtc";
5 version = "1.75d";
6
7 src = fetchFromGitHub {
8 owner = "ldn-softdev";
9 repo = pname;
10 rev = version;
11 sha256 = "0vgb5hcgml0vmdal494231jq6dlr0qgssqhnrgsvqqjapy8xhnpw";
12 };
13
14 buildPhase = ''
15 runHook preBuild
16
17 $CXX -o jtc -Wall -std=gnu++14 -Ofast jtc.cpp
18
19 runHook postBuild
20 '';
21
22 installPhase = ''
23 runHook preInstall
24
25 install -Dm755 -t $out/bin jtc
26
27 runHook postInstall
28 '';
29
30 meta = with lib; {
31 description = "JSON manipulation and transformation tool";
32 homepage = "https://github.com/ldn-softdev/jtc";
33 license = licenses.mit;
34 maintainers = [ maintainers.marsam ];
35 platforms = platforms.all;
36 };
37}