blob: a5af9e844eca44b72fe6e8c23fd024d53de9879e (
plain) (
blame)
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
|
{ lib, stdenv, fetchsvn, zlib, gmp, ecm }:
stdenv.mkDerivation rec {
pname = "msieve";
version = "1056";
src = fetchsvn {
url = "svn://svn.code.sf.net/p/msieve/code/trunk";
rev = version;
hash = "sha256-6ErVn4pYPMG5VFjOQURLsHNpN0pGdp55+rjY8988onU=";
};
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
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "all" ];
installPhase = ''
mkdir -p $out/bin/
cp msieve $out/bin/
'';
meta = {
description = "C library implementing a suite of algorithms to factor large integers";
mainProgram = "msieve";
license = lib.licenses.publicDomain;
homepage = "http://msieve.sourceforge.net/";
maintainers = [ lib.maintainers.roconnor ];
platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
};
}
|