blob: 57e4d45c8140b798c75afd9718e9aa13ea4b31e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
{
lib,
stdenvNoCC,
fetchurl,
makeBinaryWrapper,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "y-cruncher";
version = "0.8.7.9547";
src = fetchurl {
url = "https://github.com/Mysticial/y-cruncher/releases/download/v${finalAttrs.version}/y-cruncher.v${finalAttrs.version}-static.tar.xz";
hash = "sha256-4i/zRPQnY1INIzHxntYXfzp8eKxb1GLpwGDDgmcYFJA=";
};
nativeBuildInputs = [
makeBinaryWrapper
];
installPhase = ''
runHook preInstall
install -Dm755 y-cruncher -t $out/lib/y-cruncher/
install -Dm755 Binaries/*~* -t $out/lib/y-cruncher/Binaries/
install -Dm644 Binaries/Digits/*.txt -t $out/lib/y-cruncher/Binaries/Digits/
install -Dm644 Custom\ Formulas/*.cfg -t $out/lib/y-cruncher/Custom\ Formulas/
makeWrapper $out/lib/y-cruncher/y-cruncher $out/bin/y-cruncher
install -Dm644 "Command Lines.txt" -t $out/share/doc/y-cruncher/
install -Dm644 "Read Me.txt" -t $out/share/doc/y-cruncher/
install -Dm644 "Username.txt" -t $out/share/doc/y-cruncher/
install -Dm644 Binaries/*.txt -t $out/share/doc/y-cruncher/
install -Dm644 Custom\ Formulas/#README.txt -t $out/share/doc/y-cruncher/
runHook postInstall
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Compute Pi and other constants to billions of digits";
longDescription = ''
How fast can your computer compute Pi?
y-cruncher is a program that can compute Pi and other constants
to trillions of digits.
It is the first of its kind that is multi-threaded and scalable
to multi-core systems. Ever since its launch in 2009, it has
become a common benchmarking and stress-testing application for
overclockers and hardware enthusiasts.
y-cruncher has been used to set several world records for the
most digits of Pi ever computed.
'';
homepage = "https://www.numberworld.org/y-cruncher/";
downloadPage = "https://www.numberworld.org/y-cruncher/#Download";
changelog = "https://www.numberworld.org/y-cruncher/version_history.html";
license = with lib.licenses; [
unfree
asl20 # Apache Commons + HTTP Client
bsd3 # Intel Cilk Run-Time Library
];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = [ ];
mainProgram = "y-cruncher";
platforms = lib.platforms.linux;
};
})
|