about summary refs log tree commit diff
path: root/pkgs/development/tools/jtc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/jtc/default.nix')
-rw-r--r--pkgs/development/tools/jtc/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/tools/jtc/default.nix b/pkgs/development/tools/jtc/default.nix
new file mode 100644
index 0000000000000..4dcc15089fe07
--- /dev/null
+++ b/pkgs/development/tools/jtc/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "jtc";
+  version = "1.74";
+
+  src = fetchFromGitHub {
+    owner = "ldn-softdev";
+    repo = pname;
+    rev = version;
+    sha256 = "04hzamgs4k0x58cf4dw0a46kyw79yvcd5vazbklbjl6ap3rmnrx3";
+  };
+
+  buildPhase = ''
+    runHook preBuild
+
+    $CXX -o jtc -Wall -std=gnu++14 -Ofast jtc.cpp
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 -t $out/bin jtc
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "JSON manipulation and transformation tool";
+    homepage = "https://github.com/ldn-softdev/jtc";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.all;
+  };
+}