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}: 2 stdenv.mkDerivation rec { 3 name = "ratpoints-${version}"; 4 - version = "2.1.3"; 5 src = fetchurl { 6 url = "http://www.mathe2.uni-bayreuth.de/stoll/programs/ratpoints-${version}.tar.gz"; 7 sha256 = "0zhad84sfds7izyksbqjmwpfw4rvyqk63yzdjd3ysd32zss5bgf4"; 8 }; 9 - buildInputs = [gmp]; 10 - makeFlags = "INSTALL_DIR=$(out)"; 11 preInstall = ''mkdir -p "$out"/{bin,share,lib,include}''; 12 meta = { 13 inherit version; 14 description = ''A program to find rational points on hyperelliptic curves''; 15 license = stdenv.lib.licenses.gpl2Plus; 16 maintainers = [stdenv.lib.maintainers.raskin]; 17 - platforms = stdenv.lib.platforms.linux; 18 homepage = http://www.mathe2.uni-bayreuth.de/stoll/programs/; 19 updateWalker = true; 20 };
··· 1 + { stdenv, fetchurl, fetchpatch, gmp }: 2 stdenv.mkDerivation rec { 3 name = "ratpoints-${version}"; 4 + version = "2.1.3.p4"; 5 + 6 src = fetchurl { 7 url = "http://www.mathe2.uni-bayreuth.de/stoll/programs/ratpoints-${version}.tar.gz"; 8 sha256 = "0zhad84sfds7izyksbqjmwpfw4rvyqk63yzdjd3ysd32zss5bgf4"; 9 }; 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 + 26 preInstall = ''mkdir -p "$out"/{bin,share,lib,include}''; 27 + 28 meta = { 29 inherit version; 30 description = ''A program to find rational points on hyperelliptic curves''; 31 license = stdenv.lib.licenses.gpl2Plus; 32 maintainers = [stdenv.lib.maintainers.raskin]; 33 + platforms = stdenv.lib.platforms.unix; 34 homepage = http://www.mathe2.uni-bayreuth.de/stoll/programs/; 35 updateWalker = true; 36 };