2021-06-24 04:57:27 +02:00
|
|
|
{ buildGoModule, fetchFromSourcehut, lib, jq, installShellFiles, makeWrapper, scdoc }:
|
2021-01-25 19:14:04 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ijq";
|
2022-09-05 16:57:36 +02:00
|
|
|
version = "0.4.1";
|
2021-01-25 19:14:04 +01:00
|
|
|
|
2021-06-24 04:57:27 +02:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~gpanders";
|
|
|
|
repo = pname;
|
2021-01-25 19:14:04 +01:00
|
|
|
rev = "v${version}";
|
2022-09-05 16:57:36 +02:00
|
|
|
sha256 = "sha256-WTA14W8JFHdouDgWmsc4wMygnwlANPjSYCAhxFVrwAA=";
|
2021-01-25 19:14:04 +01:00
|
|
|
};
|
|
|
|
|
2023-09-13 06:44:46 +02:00
|
|
|
vendorHash = "sha256-DX8m5FsqMZnzk1wgJA/ESZl0QeDv3p9huF4h1HY9DIA=";
|
2021-01-25 19:14:04 +01:00
|
|
|
|
2021-06-24 04:57:27 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper scdoc ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
scdoc < ijq.1.scd > ijq.1
|
|
|
|
installManPage ijq.1
|
|
|
|
'';
|
2021-01-25 19:14:04 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/ijq" \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ jq ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Interactive wrapper for jq";
|
|
|
|
homepage = "https://git.sr.ht/~gpanders/ijq";
|
|
|
|
license = licenses.gpl3Plus;
|
2021-07-30 14:23:52 +02:00
|
|
|
maintainers = with maintainers; [ justinas SuperSandro2000 ];
|
2021-01-25 19:14:04 +01:00
|
|
|
};
|
|
|
|
}
|