1{ lib, stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 pname = "json2tsv";
5 version = "1.1";
6
7 src = fetchurl {
8 url = "https://codemadness.org/releases/json2tsv/json2tsv-${version}.tar.gz";
9 hash = "sha256-7r5+YoZVivCqDbfFUqTB/x41DrZi7GZRVcJhGZCpw0o=";
10 };
11
12 postPatch = ''
13 substituteInPlace jaq --replace "json2tsv" "$out/bin/json2tsv"
14 '';
15
16 makeFlags = [ "RANLIB:=$(RANLIB)" ];
17
18 installFlags = [ "PREFIX=$(out)" ];
19
20 meta = with lib; {
21 description = "JSON to TSV converter";
22 homepage = "https://codemadness.org/json2tsv.html";
23 license = licenses.isc;
24 maintainers = with maintainers; [ sikmir ];
25 platforms = platforms.unix;
26 };
27}