From e2b287b32a0fa22845e641750111eeebdc289b75 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 7 Mar 2019 16:08:10 +0100 Subject: [PATCH 1/2] maxima: remove ecl known-failures patch It doesn't apply anymore since the recent update. Since the testsuite is completely disabled now, there is little point in rebasing it. --- pkgs/applications/science/math/maxima/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix index 39ed763413be..5843f38a74a8 100644 --- a/pkgs/applications/science/math/maxima/default.nix +++ b/pkgs/applications/science/math/maxima/default.nix @@ -70,10 +70,6 @@ stdenv.mkDerivation ({ url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/maxima.system.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; sha256 = "18zafig8vflhkr80jq2ivk46k92dkszqlyq8cfmj0b2vcfjwwbar"; }) - # There are some transient test failures. I hope this disables all those tests. - # If those test failures ever happen in the non-ecl version, that should be - # reportetd upstream. - ./known-ecl-failures.patch ]; # The test suite is disabled since 5.42.2 because of the following issues: From 23908a0ee33544f1bdbf5bd6bfb3b0152fb698cf Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sat, 9 Mar 2019 17:23:57 +0100 Subject: [PATCH 2/2] sage: downgrade maxima to 5.41 See discussion at https://github.com/NixOS/nixpkgs/commit/82254747af35f3e0e0d6f78023ded3a81e25331b. --- .../applications/science/math/maxima/5.41.nix | 102 ++++++++++++++++++ .../science/math/sage/default.nix | 11 +- pkgs/top-level/all-packages.nix | 6 ++ 3 files changed, 115 insertions(+), 4 deletions(-) create mode 100644 pkgs/applications/science/math/maxima/5.41.nix diff --git a/pkgs/applications/science/math/maxima/5.41.nix b/pkgs/applications/science/math/maxima/5.41.nix new file mode 100644 index 000000000000..583391d08dde --- /dev/null +++ b/pkgs/applications/science/math/maxima/5.41.nix @@ -0,0 +1,102 @@ +{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null +, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false +}: + +let + name = "maxima"; + # old version temporarily kept for sage, see discussion at + # https://github.com/NixOS/nixpkgs/commit/82254747af35f3e0e0d6f78023ded3a81e25331b + version = "5.41.0"; + + searchPath = + stdenv.lib.makeBinPath + (stdenv.lib.filter (x: x != null) [ sbcl ecl rlwrap tk gnuplot ]); +in +stdenv.mkDerivation ({ + inherit version; + name = "${name}-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz"; + sha256 = "0x0n81z0s4pl8nwpf7ivlsbvsdphm9w42250g7qdkizl0132by6s"; + }; + + buildInputs = stdenv.lib.filter (x: x != null) [ + sbcl ecl texinfo perl python makeWrapper + ]; + + postInstall = '' + # Make sure that maxima can find its runtime dependencies. + for prog in "$out/bin/"*; do + wrapProgram "$prog" --prefix PATH ":" "$out/bin:${searchPath}" + done + # Move emacs modules and documentation into the right place. + mkdir -p $out/share/emacs $out/share/doc + ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp + ln -s ../maxima/${version}/doc $out/share/doc/maxima + '' + + (stdenv.lib.optionalString ecl-fasl '' + cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/" + '') + ; + + patches = [ + # fix path to info dir (see https://trac.sagemath.org/ticket/11348) + (fetchpatch { + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/infodir.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; + sha256 = "09v64n60f7i6frzryrj0zd056lvdpms3ajky4f9p6kankhbiv21x"; + }) + + # fix https://sourceforge.net/p/maxima/bugs/2596/ + (fetchpatch { + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/matrixexp.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; + sha256 = "06961hn66rhjijfvyym21h39wk98sfxhp051da6gz0n9byhwc6zg"; + }) + + # undo https://sourceforge.net/p/maxima/code/ci/f5e9b0f7eb122c4e48ea9df144dd57221e5ea0ca, see see https://trac.sagemath.org/ticket/13364#comment:93 + (fetchpatch { + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/undoing_true_false_printing_patch.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; + sha256 = "0fvi3rcjv6743sqsbgdzazy9jb6r1p1yq63zyj9fx42wd1hgf7yx"; + }) + + # upstream bug https://sourceforge.net/p/maxima/bugs/2520/ (not fixed) + # introduced in https://trac.sagemath.org/ticket/13364 + (fetchpatch { + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/0001-taylor2-Avoid-blowing-the-stack-when-diff-expand-isn.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; + sha256 = "0xa0b6cr458zp7lc7qi0flv5ar0r3ivsqhjl0c3clv86di2y522d"; + }) + ] ++ stdenv.lib.optionals ecl-fasl [ + # build fasl, needed for ECL support + (fetchpatch { + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/maxima.system.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; + sha256 = "18zafig8vflhkr80jq2ivk46k92dkszqlyq8cfmj0b2vcfjwwbar"; + }) + # There are some transient test failures. I hope this disables all those tests. + # If those test failures ever happen in the non-ecl version, that should be + # reportetd upstream. + ./known-ecl-failures.patch + ]; + + # Failures in the regression test suite won't abort the build process. We run + # the suite only so that potential errors show up in the build log. See also: + # https://sourceforge.net/tracker/?func=detail&aid=3365831&group_id=4933&atid=104933. + doCheck = true; + + enableParallelBuilding = true; + + meta = { + description = "Computer algebra system"; + homepage = http://maxima.sourceforge.net; + license = stdenv.lib.licenses.gpl2; + + longDescription = '' + Maxima is a fairly complete computer algebra system written in + lisp with an emphasis on symbolic computation. It is based on + DOE-MACSYMA and licensed under the GPL. Its abilities include + symbolic integration, 3D plotting, and an ODE solver. + ''; + + platforms = stdenv.lib.platforms.unix; + maintainers = [ stdenv.lib.maintainers.peti ]; + }; +}) diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix index ddb22bcb1ef2..92ec32d5cc52 100644 --- a/pkgs/applications/science/math/sage/default.nix +++ b/pkgs/applications/science/math/sage/default.nix @@ -60,7 +60,7 @@ let # the files its looking fore are located. Also see `sage-env`. env-locations = callPackage ./env-locations.nix { inherit pari_data ecl; - inherit singular; + inherit singular maxima-ecl; cysignals = python.pkgs.cysignals; three = nodePackages.three; mathjax = nodePackages.mathjax; @@ -71,21 +71,21 @@ let sage-env = callPackage ./sage-env.nix { sagelib = python.pkgs.sagelib; inherit env-locations; - inherit python ecl singular palp flint pynac pythonEnv; + inherit python ecl singular palp flint pynac pythonEnv maxima-ecl; pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig }; # The documentation for sage, building it takes a lot of ram. sagedoc = callPackage ./sagedoc.nix { inherit sage-with-env; - inherit python; + inherit python maxima-ecl; }; # sagelib with added wrappers and a dependency on sage-tests to make sure thet tests were run. sage-with-env = callPackage ./sage-with-env.nix { inherit pythonEnv; inherit sage-env; - inherit pynac singular; + inherit pynac singular maxima-ecl; pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig three = nodePackages.three; }; @@ -129,6 +129,9 @@ let singular = pkgs.singular.override { inherit flint; }; + # https://trac.sagemath.org/ticket/26625 + maxima-ecl = pkgs.maxima-ecl-5_41; + # *not* to confuse with the python package "pynac" pynac = pkgs.pynac.override { inherit singular flint; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1bd89ccd8572..7b3c985ef0d9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22058,6 +22058,12 @@ in ecl-fasl = true; sbcl = null; }; + # old version temporarily kept for sage + maxima-ecl-5_41 = callPackage ../applications/science/math/maxima/5.41.nix { + ecl = ecl_16_1_2; + ecl-fasl = true; + sbcl = null; + }; mxnet = callPackage ../applications/science/math/mxnet { inherit (linuxPackages) nvidia_x11;