dasel: add installCheckPhase test

This commit is contained in:
0x4A6F 2020-12-20 19:41:51 +00:00
parent a333985d59
commit 51031a8d73
No known key found for this signature in database
GPG key ID: 8DEDBA5BE07080E1

View file

@ -20,6 +20,17 @@ buildGoModule rec {
-ldflags=-s -w -X github.com/tomwright/dasel/internal.Version=${version}
'';
doInstallCheck = true;
installCheckPhase = ''
if [[ "$("$out/bin/${pname}" --version)" == "${pname} version ${version}" ]]; then
echo "" | $out/bin/dasel put object -p yaml -t string -t int "my.favourites" colour=red number=3 | grep -q red
echo '${pname} smoke check passed'
else
echo '${pname} smoke check failed'
return 1
fi
'';
meta = with stdenv.lib; {
description = "Query and update data structures from the command line";
longDescription = ''