diff --git a/pkgs/applications/science/math/sage/patches/eclib-20180710.patch b/pkgs/applications/science/math/sage/patches/eclib-20180710.patch new file mode 100644 index 000000000000..d06e1e6cedf2 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/eclib-20180710.patch @@ -0,0 +1,40 @@ +diff --git a/src/sage/interfaces/mwrank.py b/src/sage/interfaces/mwrank.py +index 4417b59276..ae57ca2991 100644 +--- a/src/sage/interfaces/mwrank.py ++++ b/src/sage/interfaces/mwrank.py +@@ -54,8 +54,9 @@ def Mwrank(options="", server=None, server_tmpdir=None): + sage: M = Mwrank('-v 0 -l') + sage: print(M('0 0 1 -1 0')) + Curve [0,0,1,-1,0] : Rank = 1 +- Generator 1 is [0:-1:1]; height 0.0511114082399688 +- Regulator = 0.0511114082399688 ++ Generator 1 is [0:-1:1]; height 0.051111408239969 ++ Regulator = 0.051111408239969 ++ + """ + global instances + try: +diff --git a/src/sage/libs/eclib/wrap.cpp b/src/sage/libs/eclib/wrap.cpp +index 5fd5693b53..d12468faa8 100644 +--- a/src/sage/libs/eclib/wrap.cpp ++++ b/src/sage/libs/eclib/wrap.cpp +@@ -133,8 +133,8 @@ char* Curvedata_isogeny_class(struct Curvedata* E, int verbose) + + + int mw_process(struct Curvedata* curve, struct mw* m, +- const struct bigint* x, const struct bigint* y, +- const struct bigint* z, int sat) ++ const bigint* x, const bigint* y, ++ const bigint* z, int sat) + { + Point P(*curve, *x, *y, *z); + if (!P.isvalid()) +@@ -188,7 +188,7 @@ int mw_rank(struct mw* m) + } + + /* Returns index and unsat long array, which user must deallocate */ +-int mw_saturate(struct mw* m, struct bigint* index, char** unsat, ++int mw_saturate(struct mw* m, bigint* index, char** unsat, + long sat_bd, int odd_primes_only) + { + vector v; diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 348adf5d5095..d342fba21164 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -176,6 +176,9 @@ stdenv.mkDerivation rec { # https://trac.sagemath.org/ticket/24838 rebased ./patches/pynac-0.7.22.patch + + # https://trac.sagemath.org/ticket/25862 + ./patches/eclib-20180710.patch ]; patches = nixPatches ++ packageUpgradePatches; diff --git a/pkgs/development/libraries/eclib/default.nix b/pkgs/development/libraries/eclib/default.nix index b2a224e10b11..e4d1fa2073fa 100644 --- a/pkgs/development/libraries/eclib/default.nix +++ b/pkgs/development/libraries/eclib/default.nix @@ -1,5 +1,6 @@ { stdenv , fetchFromGitHub +, fetchpatch , autoreconfHook , libtool , gettext @@ -17,13 +18,25 @@ assert withFlint -> flint != null; stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "eclib"; - version = "20171219"; + version = "20180710"; # upgrade might break the sage interface + # sage tests to run: + # src/sage/interfaces/mwrank.py + # src/sage/libs/eclib + # ping @timokau for more info src = fetchFromGitHub { owner = "JohnCremona"; repo = "${pname}"; rev = "v${version}"; - sha256 = "1yw488ng0labpxqqpxq0710qnndxl8plvcaqklpbwwd62a47knlr"; + sha256 = "1kmwpw971sipb4499c9b35q5pz6sms5qndqrvq7396d8hhwjg1i2"; }; + patches = [ + # One of the headers doesn't get installed. + # See https://github.com/NixOS/nixpkgs/pull/43476. + (fetchpatch { + url = "https://github.com/JohnCremona/eclib/pull/42/commits/c9b96429815e31a6e3372c106e31eef2a96431f9.patch"; + sha256 = "0cw26h94m66rbh8jjsfnb1bvc6z7ybh8zcp8xl5nhxjxiawhcl73"; + }) + ]; buildInputs = [ pari ntl @@ -35,12 +48,12 @@ stdenv.mkDerivation rec { autoreconfHook ]; doCheck = true; - meta = { + meta = with stdenv.lib; { inherit version; description = ''Elliptic curve tools''; homepage = https://github.com/JohnCremona/eclib; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ raskin timokau ]; + platforms = platforms.all; }; } diff --git a/pkgs/development/python-modules/cvxopt/default.nix b/pkgs/development/python-modules/cvxopt/default.nix index e17bd38da02b..906e2c0bbe4a 100644 --- a/pkgs/development/python-modules/cvxopt/default.nix +++ b/pkgs/development/python-modules/cvxopt/default.nix @@ -46,6 +46,11 @@ buildPythonPackage rec { export CVXOPT_FFTW_INC_DIR=${fftw.dev}/include ''; + # https://github.com/cvxopt/cvxopt/issues/122 + # This is fixed on staging (by #43234, status 2018-07-15), but until that + # lands we should disable the tests. Otherwise the 99% of use cases that + # should be unaffected by that failure are affected. + doCheck = false; checkPhase = '' ${python.interpreter} -m unittest discover -s tests '';