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

let
  pname = "ecm";
  version = "7.0.4";
  name = "${pname}-${version}";
in

stdenv.mkDerivation {
  inherit name;

  src = fetchurl {
    url = "http://gforge.inria.fr/frs/download.php/file/36224/ecm-${version}.tar.gz";
    sha256 = "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc";
  };

  # See https://trac.sagemath.org/ticket/19233
  configureFlags = lib.optional stdenv.isDarwin "--disable-asm-redc";

  buildInputs = [ m4 gmp ];

  doCheck = true;

  meta = {
    description = "Elliptic Curve Method for Integer Factorization";
    license = lib.licenses.gpl2Plus;
    homepage = "http://ecm.gforge.inria.fr/";
    maintainers = [ lib.maintainers.roconnor ];
    platforms = with lib.platforms; linux ++ darwin;
  };
}