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