nixpkgs/pkgs/development/tools/yq-go/default.nix

32 lines
788 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-08-23 11:26:08 +01:00
2020-02-22 00:39:23 +00:00
buildGoModule rec {
2019-08-23 11:26:08 +01:00
pname = "yq-go";
version = "3.3.1";
2019-08-23 11:26:08 +01:00
src = fetchFromGitHub {
owner = "mikefarah";
rev = version;
repo = "yq";
sha256 = "0fr6zwnij3r53dqdw43qfmp4nw26gv6zmj066l44fazka4fl25i6";
2019-08-23 11:26:08 +01:00
};
vendorSha256 = "1bjy3qr26zndr3dhh9gd33rhm5gy779525qgzjw4a4mla0p2q6kl";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/yq shell-completion --variation $shell > yq.$shell
installShellCompletion yq.$shell
done
'';
2019-08-23 11:26:08 +01:00
meta = with lib; {
2019-08-23 11:26:08 +01:00
description = "Portable command-line YAML processor";
2020-02-22 00:39:23 +00:00
homepage = "https://mikefarah.gitbook.io/yq/";
2019-08-23 11:26:08 +01:00
license = [ licenses.mit ];
maintainers = [ maintainers.lewo ];
};
}