diff options
Diffstat (limited to 'pkgs/applications/science/math')
8 files changed, 124 insertions, 31 deletions
diff --git a/pkgs/applications/science/math/bliss/default.nix b/pkgs/applications/science/math/bliss/default.nix index b96aa60da686..1b7a97360079 100644 --- a/pkgs/applications/science/math/bliss/default.nix +++ b/pkgs/applications/science/math/bliss/default.nix @@ -21,11 +21,11 @@ stdenv.mkDerivation rec { ''; installPhase = '' - mkdir -p $out/bin $out/share/doc/bliss $out/lib $out/include + mkdir -p $out/bin $out/share/doc/bliss $out/lib $out/include/bliss mv bliss $out/bin mv html/* COPYING* $out/share/doc/bliss mv *.a $out/lib - mv *.h *.hh $out/include + mv *.h *.hh $out/include/bliss ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/science/math/clp/default.nix b/pkgs/applications/science/math/clp/default.nix index daa9a53c59a1..4899ebe42d77 100644 --- a/pkgs/applications/science/math/clp/default.nix +++ b/pkgs/applications/science/math/clp/default.nix @@ -1,24 +1,22 @@ { stdenv, fetchurl, zlib }: stdenv.mkDerivation rec { - version = "1.16.11"; - name = "clp-${version}"; - src = fetchurl { - url = "https://www.coin-or.org/download/source/Clp/Clp-${version}.tgz"; - sha256 = "0fazlqpp845186nmixa9f1xfxqqkdr1xj4va7q29m8594ca4a9dm"; - }; + version = "1.16.11"; + name = "clp-${version}"; + src = fetchurl { + url = "https://www.coin-or.org/download/source/Clp/Clp-${version}.tgz"; + sha256 = "0fazlqpp845186nmixa9f1xfxqqkdr1xj4va7q29m8594ca4a9dm"; + }; - propagatedBuildInputs = [ zlib ]; + propagatedBuildInputs = [ zlib ]; - doCheck = true; + doCheck = true; - checkTarget = "test"; - - meta = { - license = stdenv.lib.licenses.epl10; - homepage = https://projects.coin-or.org/Clp; - description = "An open-source linear programming solver written in C++"; - platforms = stdenv.lib.platforms.all; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - }; + meta = { + license = stdenv.lib.licenses.epl10; + homepage = https://projects.coin-or.org/Clp; + description = "An open-source linear programming solver written in C++"; + platforms = stdenv.lib.platforms.all; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; } diff --git a/pkgs/applications/science/math/gurobi/default.nix b/pkgs/applications/science/math/gurobi/default.nix new file mode 100644 index 000000000000..06d448f6252e --- /dev/null +++ b/pkgs/applications/science/math/gurobi/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, autoPatchelfHook, python }: + +stdenv.mkDerivation rec { + name = "gurobi-${version}"; + version = "8.0.1"; + + src = with stdenv.lib; fetchurl { + url = "http://packages.gurobi.com/${versions.majorMinor version}/gurobi${version}_linux64.tar.gz"; + sha256 = "0y3lb0mngnyn7ql4s2n8qxnr1d2xcjdpdhpdjdxc4sc8f2w2ih18"; + }; + + sourceRoot = "gurobi${builtins.replaceStrings ["."] [""] version}/linux64"; + + nativeBuildInputs = [ autoPatchelfHook ]; + buildInputs = [ (python.withPackages (ps: [ ps.gurobipy ])) ]; + + buildPhase = '' + cd src/build + make + cd ../.. + ''; + + installPhase = '' + mkdir -p $out/bin + cp bin/* $out/bin/ + rm $out/bin/gurobi.env + rm $out/bin/gurobi.sh + rm $out/bin/python2.7 + + cp lib/gurobi.py $out/bin/gurobi.sh + + mkdir -p $out/include + cp include/gurobi*.h $out/include/ + + mkdir -p $out/lib + cp lib/libgurobi*.so* $out/lib/ + cp lib/libgurobi*.a $out/lib/ + cp src/build/*.a $out/lib/ + ''; + + meta = with stdenv.lib; { + description = "Optimization solver for mathematical programming"; + homepage = https://www.gurobi.com; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ jfrankenau ]; + }; +} diff --git a/pkgs/applications/science/math/qalculate-gtk/default.nix b/pkgs/applications/science/math/qalculate-gtk/default.nix index 28bd31506874..7990088ffbe9 100644 --- a/pkgs/applications/science/math/qalculate-gtk/default.nix +++ b/pkgs/applications/science/math/qalculate-gtk/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "qalculate-gtk-${version}"; - version = "2.6.0"; + version = "2.6.1"; src = fetchFromGitHub { owner = "qalculate"; repo = "qalculate-gtk"; rev = "v${version}"; - sha256 = "0b2g9ziypcplczsm14b4i2k7vpiw9ll28qskv1fdhyqb0fij3qcx"; + sha256 = "19jw1w29x0r1qq5r8gmqrqr00ml2pfi2w433723vjzxpfg2pp70r"; }; patchPhase = '' diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix index 9ad112213ffd..afb230cf4287 100644 --- a/pkgs/applications/science/math/sage/default.nix +++ b/pkgs/applications/science/math/sage/default.nix @@ -14,16 +14,6 @@ let cvxopt = super.cvxopt.override { inherit glpk; }; - # https://github.com/sagemath/sagenb/issues/437 - flask-babel = super.flask-babel.overridePythonAttrs (attrs: rec { - version = "0.9"; - src = attrs.src.override { - inherit version; - sha256 = "0k7vk4k54y55ma0nx2k5s0phfqbriwslhy5shh3b0d046q7ibzaa"; - }; - doCheck = false; - }); - # python packages that appear unmaintained and were not accepted into the nixpkgs # tree because of that. These packages are only dependencies of the more-or-less # deprecated sagenb. However sagenb is still a default dependency and the doctests 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<long> v; diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 2eb7f8100597..d342fba21164 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -84,6 +84,12 @@ stdenv.mkDerivation rec { ]; packageUpgradePatches = [ + (fetchpatch { + name = "cypari2-1.2.1.patch"; + url = "https://git.sagemath.org/sage.git/patch/?h=62fe6eb15111327d930336d4252d5b23cbb22ab9"; + sha256 = "1xax7vvs8h4xip16xcsp47xdb6lig6f2r3pl8cksvlz8lhgbyxh2"; + }) + # matplotlib 2.2.2 deprecated `normed` (replaced by `density`). # This patch only ignores the warning. It would be equally easy to fix it # (by replacing all mentions of `normed` by `density`), but its better to @@ -170,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/applications/science/math/sage/sagenb.nix b/pkgs/applications/science/math/sage/sagenb.nix index 5ab387ebc5e1..cc883cc24b42 100644 --- a/pkgs/applications/science/math/sage/sagenb.nix +++ b/pkgs/applications/science/math/sage/sagenb.nix @@ -36,6 +36,14 @@ buildPythonPackage rec { # tests depend on sage doCheck = false; + patches = [ + # work with latest flask-babel + (fetchpatch { + url = "https://github.com/sagemath/sagenb/commit/ba065eca63dd34a383e4c7ba7561430a90fcd087.patch"; + sha256 = "1lamzsrgymdd618imrasjp6ivhw2aynh83gkybsd7pm1rzjcq4x8"; + }) + ]; + meta = with stdenv.lib; { description = "Sage Notebook"; license = licenses.gpl3Plus; |