mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
34 lines
808 B
Nix
34 lines
808 B
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "yq-go";
|
|
version = "3.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mikefarah";
|
|
rev = version;
|
|
repo = "yq";
|
|
sha256 = "1rvs27c5mz55zqq9c7yif0dms53bd30d8ylh45f3y3zgh82jihp8";
|
|
};
|
|
|
|
vendorSha256 = "0l5bhbp8dfq04hb4xcpx96ksfwx4xvk0pj5ma00rk3z913ikygcd";
|
|
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
for shell in bash fish zsh; do
|
|
$out/bin/yq shell-completion --variation $shell > yq.$shell
|
|
installShellCompletion yq.$shell
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Portable command-line YAML processor";
|
|
homepage = "https://mikefarah.gitbook.io/yq/";
|
|
license = [ licenses.mit ];
|
|
maintainers = [ maintainers.lewo ];
|
|
};
|
|
}
|