2020-06-12 00:24:58 +01:00
|
|
|
{ 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";
|
2020-09-27 05:06:25 +01:00
|
|
|
version = "3.4.0";
|
2019-08-23 11:26:08 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mikefarah";
|
|
|
|
rev = version;
|
|
|
|
repo = "yq";
|
2020-09-27 05:06:25 +01:00
|
|
|
sha256 = "1rvs27c5mz55zqq9c7yif0dms53bd30d8ylh45f3y3zgh82jihp8";
|
2019-08-23 11:26:08 +01:00
|
|
|
};
|
|
|
|
|
2020-09-27 05:06:25 +01:00
|
|
|
vendorSha256 = "0l5bhbp8dfq04hb4xcpx96ksfwx4xvk0pj5ma00rk3z913ikygcd";
|
2020-06-12 00:24:58 +01:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-12 00:24:58 +01:00
|
|
|
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
|
|
|
|
2020-03-01 23:20:12 +00: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 ];
|
|
|
|
};
|
2020-06-12 00:24:58 +01:00
|
|
|
}
|