summary refs log tree commit diff
path: root/pkgs/applications/science/math/msieve/default.nix
blob: e01b9654711b1d8a9f4456dccba43886a98a5bed (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
{stdenv, fetchurl, zlib, gmp, ecm }:

stdenv.mkDerivation {
  name = "msieve-1.48";

  src = fetchurl {
      url = mirror://sourceforge/msieve/msieve/Msieve%20v1.48/msieve148.tar.gz;
      sha256 = "05cm23mpfsbwssqda243sbi8m31j783qx89x9gl7sy8a4dnv7h63";
    };

  buildInputs = [ zlib gmp ecm ];

  ECM = if ecm == null then "0" else "1";

  buildFlags = if stdenv.system == "x86_64-linux" then "x86_64"
               else if stdenv.system == "i686-linux" then "x86"
               else "generic";

  installPhase = ''mkdir -p $out/bin/
                   cp msieve $out/bin/'';

  meta = {
    description = "A C library implementing a suite of algorithms to factor large integers";
    license = stdenv.lib.licenses.publicDomain;
    homepage = http://msieve.sourceforge.net/;
    maintainers = [ stdenv.lib.maintainers.roconnor ];
    platforms = stdenv.lib.platforms.linux;
  };
}