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";
|
2021-03-27 23:41:31 +00:00
|
|
|
version = "4.6.3";
|
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-03-27 23:41:31 +00:00
|
|
|
sha256 = "sha256-+qSGdskv8qUZRl7wYKn8WsgAcD8DYw1BwZnVKK6g/sI=";
|
2019-08-23 11:26:08 +01:00
|
|
|
};
|
|
|
|
|
2021-03-20 00:30:53 +00:00
|
|
|
vendorSha256 = "sha256-vpvIl1lfaziuoHs+oDEIztufH1somphiBAn6qTaQaZw=";
|
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
|
2021-01-19 05:58:34 +00:00
|
|
|
$out/bin/yq shell-completion $shell > yq.$shell
|
2020-06-12 00:24:58 +01:00
|
|
|
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
|
|
|
}
|