11 stdenv.mkDerivation rec {
14 srcVersion = "20210527.7dd3cfd";
17 url = "https://www.chiark.greenend.org.uk/~sgtatham/spigot/${pname}-${srcVersion}.tar.gz";
18 hash = "sha256-EBS3lgfLtsyBQ8mzoJPyZhRBJNmkVSeF5XecGgcvqtw=";
32 outputs = [ "out" "man" ];
36 doInstallCheck = true;
37 installCheckPhase = ''
38 runHook preInstallCheck
40 [ `$out/bin/spigot -b 10 -d 10 e` == "2.7182818284" ] || exit 1
41 [ `$out/bin/spigot -b 10 -d 10 pi` == "3.1415926535" ] || exit 1
42 [ `$out/bin/spigot -b 10 -d 10 sqrt\(2\)` == "1.4142135623" ] || exit 1
44 runHook postInstallCheck
48 homepage = "https://www.chiark.greenend.org.uk/~sgtatham/spigot/";
49 description = "A command-line exact real calculator";
50 license = licenses.mit;
51 maintainers = with maintainers; [ AndersonTorres mcbeth ];
52 platforms = platforms.unix;