biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / science / math / ratpoints / default.nix
blob69b972fe9790703735a1b55e0946f0c51453ef5a
1 { lib, stdenv, fetchurl, fetchpatch, gmp }:
2 stdenv.mkDerivation rec {
3   pname = "ratpoints";
4   version = "2.1.3.p4";
6   src = fetchurl {
7     url = "http://www.mathe2.uni-bayreuth.de/stoll/programs/ratpoints-${version}.tar.gz";
8     sha256 = "0zhad84sfds7izyksbqjmwpfw4rvyqk63yzdjd3ysd32zss5bgf4";
9   };
11   enableParallelBuilding = true;
13   patches = [
14     (fetchpatch {
15       url = "https://raw.githubusercontent.com/sagemath/sage/1615f58890e8f9881c4228c78a6b39b9aab1303a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch";
16       sha256 = "0q3wajncyfr3gahd8gwk9x7g56zw54lpywrl63lqk7drkf60mrcl";
17     })
18   ];
20   buildInputs = [ gmp ];
22   makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
23   buildFlags = lib.optionals stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"];
24   installFlags = [ "INSTALL_DIR=$(out)" ];
26   preInstall = ''mkdir -p "$out"/{bin,share,lib,include}'';
28   meta = {
29     description = "A program to find rational points on hyperelliptic curves";
30     mainProgram = "ratpoints";
31     license = lib.licenses.gpl2Plus;
32     maintainers = [lib.maintainers.raskin];
33     platforms = lib.platforms.unix;
34     homepage = "http://www.mathe2.uni-bayreuth.de/stoll/programs/";
35   };