diff --git a/pkgs/by-name/pr/prmers/package.nix b/pkgs/by-name/pr/prmers/package.nix new file mode 100644 index 000000000000..d412b811d699 --- /dev/null +++ b/pkgs/by-name/pr/prmers/package.nix @@ -0,0 +1,60 @@ +{ + curl, + fetchFromGitHub, + gmp, + lib, + ocl-icd, + opencl-headers, + stdenv, + versionCheckHook, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "prmers"; + version = "4.15.35-alpha"; + + src = fetchFromGitHub { + owner = "cherubrock-seb"; + repo = "PrMers"; + tag = "v${finalAttrs.version}"; + hash = "sha256-LAbWyz1FT9Zza4gewgKeMvQt8rwkfBhHRWBGpN+DIXE="; + }; + + enableParallelBuilding = true; + + buildInputs = [ + curl + gmp + ocl-icd + opencl-headers + ]; + + installPhase = '' + runHook preInstall + + make install PREFIX=$out KERNEL_PATH=$out/bin/kernels + + runHook postInstall + ''; + + doInstallCheck = true; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + + versionCheckProgramArg = "-v"; + + meta = { + description = "GPU-accelerated Mersenne primality testing"; + longDescription = '' + PrMers is a high-performance GPU application for Lucas–Lehmer (LL), PRP, and P-1 testing of Mersenne numbers. + It uses OpenCL and integer NTT/IBDWT kernels and is built for long, reliable runs with checkpointing and PrimeNet submission. + ''; + homepage = "https://github.com/cherubrock-seb/PrMers"; + downloadPage = "https://github.com/cherubrock-seb/PrMers/releases/tag/v${finalAttrs.version}"; + maintainers = with lib.maintainers; [ dstremur ]; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + mainProgram = "prmers"; + }; +})