1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/yq-go/default.nix

34 lines
800 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";
2021-01-19 05:58:34 +00:00
version = "4.4.1";
2019-08-23 11:26:08 +01:00
src = fetchFromGitHub {
owner = "mikefarah";
2021-01-19 05:58:34 +00:00
rev = "v${version}";
2019-08-23 11:26:08 +01:00
repo = "yq";
2021-01-19 05:58:34 +00:00
sha256 = "sha256-U1nMSwWKzPvyvxUx8J50AMB251ET4s9xcSrjGGjkYus=";
2019-08-23 11:26:08 +01:00
};
2021-01-19 05:58:34 +00:00
vendorSha256 = "sha256-CUELy6ajaoVzomY5lMen24DFJke3IyFzqWYyF7sws5g=";
doCheck = false;
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash fish zsh; do
2021-01-19 05:58:34 +00:00
$out/bin/yq shell-completion $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 ];
};
}