fend: add install check

This checks if the binary is working correctly.
This commit is contained in:
Daniël de Kok 2021-02-16 08:46:13 +01:00
parent 8572994486
commit bbf5eff8b0

View file

@ -13,6 +13,12 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-e95DRhD22zvizUJOM2It45Bx05iK3KtaMgFPkMbR7iI=";
doInstallCheck = true;
installCheckPhase = ''
[[ "$($out/bin/fend "1 km to m")" = "1000 m" ]]
'';
meta = with lib; {
description = "Arbitrary-precision unit-aware calculator";
homepage = "https://github.com/printfn/fend";