about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/maxima
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/maxima')
-rw-r--r--nixpkgs/pkgs/applications/science/math/maxima/5.41.nix102
-rw-r--r--nixpkgs/pkgs/applications/science/math/maxima/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/science/math/maxima/known-ecl-failures.patch21
3 files changed, 20 insertions, 138 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/maxima/5.41.nix b/nixpkgs/pkgs/applications/science/math/maxima/5.41.nix
deleted file mode 100644
index 829dffc6116e..000000000000
--- a/nixpkgs/pkgs/applications/science/math/maxima/5.41.nix
+++ /dev/null
@@ -1,102 +0,0 @@
-{ 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/nixpkgs/pkgs/applications/science/math/maxima/default.nix b/nixpkgs/pkgs/applications/science/math/maxima/default.nix
index 49ff0d5d5a05..cdc81a876465 100644
--- a/nixpkgs/pkgs/applications/science/math/maxima/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/maxima/default.nix
@@ -1,10 +1,10 @@
-{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null
-, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
+{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, autoreconfHook
+, rlwrap ? null, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
 }:
 
 let
   name    = "maxima";
-  version = "5.42.2";
+  version = "5.44.0";
 
   searchPath =
     stdenv.lib.makeBinPath
@@ -16,14 +16,20 @@ stdenv.mkDerivation ({
 
   src = fetchurl {
     url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz";
-    sha256 = "0kdncy6137sg3rradirxzj10mkcvafxd892zlclwhr9sa7b12zhn";
+    sha256 = "1v6jr5s6hhj6r18gfk6hgxk2qd6z1dxkrjq9ss2z1y6sqi45wgyr";
   };
 
+  nativeBuildInputs = [ autoreconfHook ];
+
   buildInputs = stdenv.lib.filter (x: x != null) [
     sbcl ecl texinfo perl python makeWrapper
     gnuplot   # required in the test suite
   ];
 
+  postPatch = ''
+    substituteInPlace doc/info/Makefile.am --replace "/usr/bin/env perl" "${perl}/bin/perl"
+  '';
+
   postInstall = ''
     # Make sure that maxima can find its runtime dependencies.
     for prog in "$out/bin/"*; do
@@ -57,13 +63,6 @@ stdenv.mkDerivation ({
       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 {
@@ -74,11 +73,13 @@ stdenv.mkDerivation ({
 
   # The test suite is disabled since 5.42.2 because of the following issues:
   #
-  #   Errors found in /build/maxima-5.42.2/share/linearalgebra/rtest_matrixexp.mac, problems:
+  #   Error(s) found:
+  #   /build/maxima-5.44.0/share/linearalgebra/rtest_matrixexp.mac problems:
   #   (20 21 22)
-  #   Error found in rtest_arag, problem:
-  #   (error break)
-  #   3 tests failed out of 3,881 total tests.
+  #   Tests that were expected to fail but passed:
+  #   /build/maxima-5.44.0/share/vector/rtest_vect.mac problem:
+  #   (19)
+  #   3 tests failed out of 16,184 total tests.
   #
   # These failures don't look serious. It would be nice to fix them, but I
   # don't know how and probably won't have the time to find out.
@@ -86,6 +87,10 @@ stdenv.mkDerivation ({
 
   enableParallelBuilding = true;
 
+  passthru = {
+    ecl = ecl;
+  };
+
   meta = {
     description = "Computer algebra system";
     homepage = "http://maxima.sourceforge.net";
diff --git a/nixpkgs/pkgs/applications/science/math/maxima/known-ecl-failures.patch b/nixpkgs/pkgs/applications/science/math/maxima/known-ecl-failures.patch
deleted file mode 100644
index f1d612d993e6..000000000000
--- a/nixpkgs/pkgs/applications/science/math/maxima/known-ecl-failures.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/tests/testsuite.lisp b/tests/testsuite.lisp
-index 45a81f4..36c35b8 100644
---- a/tests/testsuite.lisp
-+++ b/tests/testsuite.lisp
-@@ -25,13 +25,14 @@
-         ((mlist simp) "rtest10" 24 25)
-         ((mlist) "rtest11" #+(or gcl cmucl ccl64) 158 #+(or gcl cmucl ccl64) 174 #+gcl 175)
-         "rtest13" "rtest13s"
--        "rtest14"
-+        ;; "rtest14" ;; some tests sometimes fail with ecl, hard to reproduce. Observed failing: 250, 267, 297, 307, 310, 312, 315, 319
-         "rtest15"
- 	;; ccl versions 1.11 and earlier fail test 50.  Mark it as a
- 	;; known failure.  Presumably 1.12 will have this fixed.
-         ((mlist simp) "rtest16" #+ccl 50)
-         "rtestode" "rtestode_zp"
--        "rtest3" "rtest8"
-+        "rtest3"
-+        ((mlist simp) "rtest8" 104) ;; fails with ecl
-         ((mlist simp) "rtest12" 76 78)
-         "rexamples"
-         ((mlist simp) "rtesthyp" 105 112 113 123 124 128)