nixpkgs/pkgs/development/tools/jtc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.0 KiB
Nix
Raw Normal View History

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";
version = "1.76";
2019-10-10 02:00:00 +00:00
src = fetchFromGitHub {
owner = "ldn-softdev";
repo = pname;
rev = version;
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
$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
'';
meta = with lib; {
2019-10-10 02:00:00 +00:00
description = "JSON manipulation and transformation tool";
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;
};
}