depot/third_party/nixpkgs/pkgs/development/tools/ijq/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

36 lines
909 B
Nix

{ buildGoModule, fetchFromSourcehut, lib, jq, installShellFiles, makeWrapper, scdoc }:
buildGoModule rec {
pname = "ijq";
version = "0.3.5";
src = fetchFromSourcehut {
owner = "~gpanders";
repo = pname;
rev = "v${version}";
sha256 = "sha256-0xLmjidPxjSkYmLI4lWieT2rswZsWBY/IUXFOrUFAMo=";
};
vendorSha256 = "sha256-7UuQXnQdlUMC0ZIgHydQ5bZMB5XrE7dhx5+1NI+zFkM=";
nativeBuildInputs = [ installShellFiles makeWrapper scdoc ];
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
postBuild = ''
scdoc < ijq.1.scd > ijq.1
installManPage ijq.1
'';
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;
maintainers = with maintainers; [ justinas ];
};
}