Merge pull request #45009 from jbaum98/ratpoints-darwin

ratpoints: 2.1.3 -> 2.1.3.p4; add darwin support

authored by adisbladis and committed by GitHub 2937e736 0ee6d7e3

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