yq-go: add updateScript
This commit is contained in:
parent
2788ca785c
commit
d130d6d69f
@ -6,6 +6,7 @@
|
|||||||
installShellFiles,
|
installShellFiles,
|
||||||
runCommand,
|
runCommand,
|
||||||
yq-go,
|
yq-go,
|
||||||
|
nix-update-script,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule (finalAttrs: {
|
buildGoModule (finalAttrs: {
|
||||||
@ -30,11 +31,14 @@ buildGoModule (finalAttrs: {
|
|||||||
--zsh <($out/bin/yq shell-completion zsh)
|
--zsh <($out/bin/yq shell-completion zsh)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests = {
|
passthru = {
|
||||||
simple = runCommand "${finalAttrs.pname}-test" { } ''
|
tests = {
|
||||||
echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
|
simple = runCommand "${finalAttrs.pname}-test" { } ''
|
||||||
[ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
|
echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
|
||||||
'';
|
[ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
updateScript = nix-update-script { };
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user