2022-05-20 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch }:
|
2019-10-10 02:00:00 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "jtc";
|
2021-12-01 04:20:00 +00:00
|
|
|
version = "1.76";
|
2019-10-10 02:00:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ldn-softdev";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-12-01 04:20:00 +00:00
|
|
|
sha256 = "sha256-VATRlOOV4wBInLOm9J0Dp2vhtL5mb0Yxdl/ya0JiqEU=";
|
2019-10-10 02:00:00 +00:00
|
|
|
};
|
|
|
|
|
2022-05-20 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
# Fix building with Clang. Removing with next release.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ldn-softdev/jtc/commit/92a5116e5524c0b6d2f539db7b5cc9fdd7c5b8ab.patch";
|
|
|
|
sha256 = "sha256-AAvDH0XsT8/CAguG611/odg0m1HR+veC0jbAw6KLHLM=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-10-10 02:00:00 +00:00
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
2021-12-01 04:20:00 +00:00
|
|
|
$CXX -o jtc -Wall -std=gnu++14 -Ofast -pthread -lpthread jtc.cpp
|
2019-10-10 02:00:00 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm755 -t $out/bin jtc
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-10 02:00:00 +00:00
|
|
|
description = "JSON manipulation and transformation tool";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "jtc";
|
2019-10-10 02:00:00 +00:00
|
|
|
homepage = "https://github.com/ldn-softdev/jtc";
|
|
|
|
license = licenses.mit;
|
2024-04-24 04:20:00 +00:00
|
|
|
maintainers = [ ];
|
2019-10-10 02:00:00 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|