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

34 lines
800 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-08-23 03:26:08 -07:00
2020-02-21 16:39:23 -08:00
buildGoModule rec {
2019-08-23 03:26:08 -07:00
pname = "yq-go";
2021-02-25 10:57:52 -08:00
version = "4.6.1";
2019-08-23 03:26:08 -07:00
src = fetchFromGitHub {
owner = "mikefarah";
2021-01-18 21:58:34 -08:00
rev = "v${version}";
2019-08-23 03:26:08 -07:00
repo = "yq";
2021-02-25 10:57:52 -08:00
sha256 = "sha256-pP00y9auYeuz0NSA+QrnGybW5T7TfGFFw/FMPu/JXjM=";
2019-08-23 03:26:08 -07:00
};
2021-02-20 22:56:03 -08:00
vendorSha256 = "sha256-66ccHSKpl6yB/NVhZ1X0dv4wnGCJAMvZhpKu2vF+QT4=";
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
2021-01-18 21:58:34 -08:00
$out/bin/yq shell-completion $shell > yq.$shell
installShellCompletion yq.$shell
done
'';
2019-08-23 03:26:08 -07:00
meta = with lib; {
2019-08-23 03:26:08 -07:00
description = "Portable command-line YAML processor";
2020-02-21 16:39:23 -08:00
homepage = "https://mikefarah.gitbook.io/yq/";
2019-08-23 03:26:08 -07:00
license = [ licenses.mit ];
maintainers = [ maintainers.lewo ];
};
}