2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, gmp }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ratpoints";
|
|
|
|
version = "2.1.3.p4";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.mathe2.uni-bayreuth.de/stoll/programs/ratpoints-${version}.tar.gz";
|
|
|
|
sha256 = "0zhad84sfds7izyksbqjmwpfw4rvyqk63yzdjd3ysd32zss5bgf4";
|
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://raw.githubusercontent.com/sagemath/sage/1615f58890e8f9881c4228c78a6b39b9aab1303a/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0q3wajncyfr3gahd8gwk9x7g56zw54lpywrl63lqk7drkf60mrcl";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ gmp ];
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
2022-10-30 15:09:59 +00:00
|
|
|
buildFlags = lib.optionals stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"];
|
2020-04-24 23:36:52 +00:00
|
|
|
installFlags = [ "INSTALL_DIR=$(out)" ];
|
|
|
|
|
|
|
|
preInstall = ''mkdir -p "$out"/{bin,share,lib,include}'';
|
|
|
|
|
|
|
|
meta = {
|
2021-02-05 17:12:51 +00:00
|
|
|
description = "A program to find rational points on hyperelliptic curves";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ratpoints";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.mathe2.uni-bayreuth.de/stoll/programs/";
|
|
|
|
};
|
|
|
|
}
|