2018-04-11 13:53:59 -07:00
|
|
|
{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null
|
|
|
|
, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
|
2016-10-17 10:21:39 -07:00
|
|
|
}:
|
2009-10-29 04:57:45 -07:00
|
|
|
|
|
|
|
let
|
2011-05-06 00:35:15 -07:00
|
|
|
name = "maxima";
|
2019-03-05 03:47:31 -08:00
|
|
|
version = "5.42.2";
|
2011-07-13 02:13:32 -07:00
|
|
|
|
|
|
|
searchPath =
|
2016-04-13 05:53:51 -07:00
|
|
|
stdenv.lib.makeBinPath
|
2016-10-17 10:21:39 -07:00
|
|
|
(stdenv.lib.filter (x: x != null) [ sbcl ecl rlwrap tk gnuplot ]);
|
2009-10-29 04:57:45 -07:00
|
|
|
in
|
2016-10-17 10:21:39 -07:00
|
|
|
stdenv.mkDerivation ({
|
2018-04-11 13:53:59 -07:00
|
|
|
inherit version;
|
2009-10-29 04:57:45 -07:00
|
|
|
name = "${name}-${version}";
|
2007-09-25 17:19:26 -07:00
|
|
|
|
2009-01-04 12:18:10 -08:00
|
|
|
src = fetchurl {
|
2009-10-29 04:57:45 -07:00
|
|
|
url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz";
|
2019-03-05 03:47:31 -08:00
|
|
|
sha256 = "0kdncy6137sg3rradirxzj10mkcvafxd892zlclwhr9sa7b12zhn";
|
2009-01-04 12:18:10 -08:00
|
|
|
};
|
2007-09-25 17:19:26 -07:00
|
|
|
|
2018-04-11 13:53:59 -07:00
|
|
|
buildInputs = stdenv.lib.filter (x: x != null) [
|
|
|
|
sbcl ecl texinfo perl python makeWrapper
|
2019-03-05 03:47:31 -08:00
|
|
|
gnuplot # required in the test suite
|
2018-04-11 13:53:59 -07:00
|
|
|
];
|
2011-07-13 02:13:32 -07:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Make sure that maxima can find its runtime dependencies.
|
|
|
|
for prog in "$out/bin/"*; do
|
2013-08-28 07:33:33 -07:00
|
|
|
wrapProgram "$prog" --prefix PATH ":" "$out/bin:${searchPath}"
|
2011-07-13 02:13:32 -07:00
|
|
|
done
|
|
|
|
# Move emacs modules and documentation into the right place.
|
2012-01-18 12:16:00 -08:00
|
|
|
mkdir -p $out/share/emacs $out/share/doc
|
2011-07-13 02:13:32 -07:00
|
|
|
ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp
|
|
|
|
ln -s ../maxima/${version}/doc $out/share/doc/maxima
|
2016-10-17 10:21:39 -07:00
|
|
|
''
|
|
|
|
+ (stdenv.lib.optionalString ecl-fasl ''
|
|
|
|
cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/"
|
|
|
|
'')
|
|
|
|
;
|
2010-11-05 07:35:37 -07:00
|
|
|
|
2018-04-11 13:53:59 -07:00
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-03-05 03:47:31 -08:00
|
|
|
# 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:
|
|
|
|
# (20 21 22)
|
|
|
|
# Error found in rtest_arag, problem:
|
|
|
|
# (error break)
|
|
|
|
# 3 tests failed out of 3,881 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.
|
|
|
|
doCheck = false; # try to re-enable after next version update
|
2011-07-13 02:13:32 -07:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2007-09-25 17:19:26 -07:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 07:21:08 -07:00
|
|
|
description = "Computer algebra system";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "http://maxima.sourceforge.net";
|
2014-06-18 21:19:00 -07:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2010-08-26 04:44:43 -07:00
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
|
2010-08-26 04:49:54 -07:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2016-05-16 13:30:20 -07:00
|
|
|
maintainers = [ stdenv.lib.maintainers.peti ];
|
2007-09-25 17:19:26 -07:00
|
|
|
};
|
2018-04-11 13:53:59 -07:00
|
|
|
})
|