1 { lib, buildGoModule, fetchFromGitHub, installShellFiles, runCommand, yq-go }:
7 src = fetchFromGitHub {
11 hash = "sha256-AQOHVuDREp6OpwlPFwpCUOQACOsDRH0uM6WwKyEK4JI=";
14 vendorHash = "sha256-9GCqZS0fguJo8GkVPMgbstEVzrjIS0kdbNQEaT1HSFI=";
16 nativeBuildInputs = [ installShellFiles ];
19 installShellCompletion --cmd yq \
20 --bash <($out/bin/yq shell-completion bash) \
21 --fish <($out/bin/yq shell-completion fish) \
22 --zsh <($out/bin/yq shell-completion zsh)
26 simple = runCommand "${pname}-test" { } ''
27 echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
28 [ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
33 description = "Portable command-line YAML processor";
34 homepage = "https://mikefarah.gitbook.io/yq/";
35 changelog = "https://github.com/mikefarah/yq/raw/v${version}/release_notes.txt";
37 license = [ licenses.mit ];
38 maintainers = with maintainers; [ lewo SuperSandro2000 ];