tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
spigot: add a simple test
Anderson Torres
2 years ago
822dd9b4
5ff9d480
+28
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
sp
spigot
package.nix
tests
approximation.nix
+7
pkgs/by-name/sp/spigot/package.nix
···
1
{ lib
2
, stdenv
3
, fetchurl
0
4
, cmake
5
, gmp
6
, halibut
···
31
outputs = [ "out" "man" ];
32
33
strictDeps = true;
0
0
0
0
0
0
34
35
meta = {
36
homepage = "https://www.chiark.greenend.org.uk/~sgtatham/spigot/";
···
1
{ lib
2
, stdenv
3
, fetchurl
4
+
, callPackage
5
, cmake
6
, gmp
7
, halibut
···
32
outputs = [ "out" "man" ];
33
34
strictDeps = true;
35
+
36
+
passthru.tests = {
37
+
approximation = callPackage ./tests/approximation.nix {
38
+
spigot = finalAttrs.finalPackage;
39
+
};
40
+
};
41
42
meta = {
43
homepage = "https://www.chiark.greenend.org.uk/~sgtatham/spigot/";
+21
pkgs/by-name/sp/spigot/tests/approximation.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ lib
2
+
, stdenv
3
+
, spigot
4
+
}:
5
+
6
+
stdenv.mkDerivation {
7
+
pname = "spigot-approximation";
8
+
inherit (spigot) version;
9
+
10
+
nativeBuildInputs = [ spigot ];
11
+
12
+
dontInstall = true;
13
+
14
+
buildCommand = ''
15
+
[ "$(spigot -b2 -d32 '(pi/1-355/113)')" = "-0.00000000000000000000010001111001" ]
16
+
[ "$(spigot -b2 -d32 '(e/1-1457/536)')" = "-0.00000000000000000001110101101011" ]
17
+
touch $out
18
+
'';
19
+
20
+
meta.timeout = 10;
21
+
}