base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / jt / jtc / package.nix
blobf368a460463d7b7d8c0e58c5f441b3f3228073d8
1 { lib, stdenv, fetchFromGitHub, fetchpatch }:
3 stdenv.mkDerivation rec {
4   pname = "jtc";
5   version = "1.76";
7   src = fetchFromGitHub {
8     owner = "ldn-softdev";
9     repo = pname;
10     rev = version;
11     sha256 = "sha256-VATRlOOV4wBInLOm9J0Dp2vhtL5mb0Yxdl/ya0JiqEU=";
12   };
14   patches = [
15     # Fix building with Clang. Removing with next release.
16     (fetchpatch {
17       url = "https://github.com/ldn-softdev/jtc/commit/92a5116e5524c0b6d2f539db7b5cc9fdd7c5b8ab.patch";
18       sha256 = "sha256-AAvDH0XsT8/CAguG611/odg0m1HR+veC0jbAw6KLHLM=";
19     })
20   ];
22   buildPhase = ''
23     runHook preBuild
25     $CXX -o jtc -Wall -std=gnu++14 -Ofast -pthread -lpthread jtc.cpp
27     runHook postBuild
28   '';
30   installPhase = ''
31     runHook preInstall
33     install -Dm755 -t $out/bin jtc
35     runHook postInstall
36   '';
38   meta = with lib; {
39     description = "JSON manipulation and transformation tool";
40     mainProgram = "jtc";
41     homepage = "https://github.com/ldn-softdev/jtc";
42     license = licenses.mit;
43     maintainers = [ ];
44     platforms = platforms.all;
45   };