diff options
author | AndersonTorres <torres.anderson.85@protonmail.com> | 2022-01-07 23:46:34 -0300 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@protonmail.com> | 2022-01-07 23:51:20 -0300 |
commit | 6a252629526a004d16fa9b81a5cb4b6aaa2afa01 (patch) | |
tree | efe33a91101d2f3ec94e189561ec75f8df6fa0e3 /pkgs/tools/misc/spigot | |
parent | 5708e6aa25e3c33dd04a7485277fe08f86cc5b1f (diff) |
spigot: add installCheckPhase
Just some easy math functions.
Diffstat (limited to 'pkgs/tools/misc/spigot')
-rw-r--r-- | pkgs/tools/misc/spigot/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/tools/misc/spigot/default.nix b/pkgs/tools/misc/spigot/default.nix index fbbae937a8d9a..b2abec09741d8 100644 --- a/pkgs/tools/misc/spigot/default.nix +++ b/pkgs/tools/misc/spigot/default.nix @@ -33,6 +33,17 @@ stdenv.mkDerivation rec { strictDeps = true; + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + + [ `$out/bin/spigot -b 10 -d 10 e` == "2.7182818284" ] || exit 1 + [ `$out/bin/spigot -b 10 -d 10 pi` == "3.1415926535" ] || exit 1 + [ `$out/bin/spigot -b 10 -d 10 sqrt\(2\)` == "1.4142135623" ] || exit 1 + + runHook postInstallCheck + ''; + meta = with lib; { homepage = "https://www.chiark.greenend.org.uk/~sgtatham/spigot/"; description = "A command-line exact real calculator"; |