@@ -1,4 +1,4 @@
1−{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
1+{ lib, buildGoModule, fetchFromGitHub, installShellFiles, runCommand, yq-go }:
22
33buildGoModule rec {
44 pname = "yq-go";
@@ -24,6 +24,13 @@ buildGoModule rec {
2424 done
2525 '';
2626
27+ passthru.tests = {
28+ simple = runCommand "${pname}-test" {} ''
29+ echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
30+ [ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
31+ '';
32+ };
33+
2734 meta = with lib; {
2835 description = "Portable command-line YAML processor";
2936 homepage = "https://mikefarah.gitbook.io/yq/";