2021-06-24 03:57:27 +01:00
|
|
|
{ buildGoModule, fetchFromSourcehut, lib, jq, installShellFiles, makeWrapper, scdoc }:
|
2021-01-25 18:14:04 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ijq";
|
2021-07-30 13:23:52 +01:00
|
|
|
version = "0.3.6";
|
2021-01-25 18:14:04 +00:00
|
|
|
|
2021-06-24 03:57:27 +01:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~gpanders";
|
|
|
|
repo = pname;
|
2021-01-25 18:14:04 +00:00
|
|
|
rev = "v${version}";
|
2021-07-30 13:23:52 +01:00
|
|
|
sha256 = "sha256-mPO3P+NGFIoHuvMFwj87S8H8LQx7QpfPy2zi91la2C0=";
|
2021-01-25 18:14:04 +00:00
|
|
|
};
|
|
|
|
|
2021-07-30 13:23:52 +01:00
|
|
|
vendorSha256 = "sha256-HbrmfZ/P5bUF7Qio5L1sb/HAYk/tL2SOmxHCXvSw72I=";
|
2021-01-25 18:14:04 +00:00
|
|
|
|
2021-06-24 03:57:27 +01: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 18:14:04 +00: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 13:23:52 +01:00
|
|
|
maintainers = with maintainers; [ justinas SuperSandro2000 ];
|
2021-01-25 18:14:04 +00:00
|
|
|
};
|
|
|
|
}
|