2021-11-07 13:50:48 +00:00
|
|
|
{ lib, stdenv, fetchurl, zlib, gmp, ecm }:
|
2011-04-21 13:48:07 +01:00
|
|
|
|
2021-11-07 13:50:48 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "msieve";
|
|
|
|
version = "1.53";
|
2011-04-21 13:48:07 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-07 13:50:48 +00:00
|
|
|
url = "mirror://sourceforge/msieve/msieve/Msieve%20v${version}/msieve${lib.replaceStrings ["."] [""] version}_src.tar.gz";
|
2017-05-26 23:14:20 +01:00
|
|
|
sha256 = "1d1vv7j4rh3nnxsmvafi73qy7lw7n3akjlm5pjl3m936yapvmz65";
|
|
|
|
};
|
2011-04-21 13:48:07 +01:00
|
|
|
|
2011-04-23 13:36:36 +01:00
|
|
|
buildInputs = [ zlib gmp ecm ];
|
|
|
|
|
|
|
|
ECM = if ecm == null then "0" else "1";
|
2011-04-21 13:48:07 +01:00
|
|
|
|
2017-05-26 23:14:20 +01:00
|
|
|
# Doesn't hurt Linux but lets clang-based platforms like Darwin work fine too
|
2021-02-16 11:48:46 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "all" ];
|
2011-04-21 13:48:07 +01:00
|
|
|
|
2017-05-26 23:14:20 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
cp msieve $out/bin/
|
|
|
|
'';
|
2011-04-21 13:48:07 +01:00
|
|
|
|
|
|
|
meta = {
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "A C library implementing a suite of algorithms to factor large integers";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.publicDomain;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://msieve.sourceforge.net/";
|
2021-01-15 13:21:58 +00:00
|
|
|
maintainers = [ lib.maintainers.roconnor ];
|
|
|
|
platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
|
2011-04-21 13:48:07 +01:00
|
|
|
};
|
|
|
|
}
|