2024-04-21 15:54:59 +00:00
|
|
|
{ lib, stdenv, fetchsvn, zlib, gmp, ecm }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "msieve";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1056";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchsvn {
|
|
|
|
url = "svn://svn.code.sf.net/p/msieve/code/trunk";
|
2024-07-27 06:49:29 +00:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-6ErVn4pYPMG5VFjOQURLsHNpN0pGdp55+rjY8988onU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib gmp ecm ];
|
|
|
|
|
|
|
|
ECM = if ecm == null then "0" else "1";
|
|
|
|
|
|
|
|
# Doesn't hurt Linux but lets clang-based platforms like Darwin work fine too
|
2021-02-19 19:06:45 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "all" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
cp msieve $out/bin/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "C library implementing a suite of algorithms to factor large integers";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "msieve";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.publicDomain;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://msieve.sourceforge.net/";
|
2021-01-17 00:15:33 +00:00
|
|
|
maintainers = [ lib.maintainers.roconnor ];
|
|
|
|
platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|