2016-10-17 19:21:39 +02:00
|
|
|
{ stdenv, fetchurl, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null,
|
|
|
|
tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
|
|
|
|
}:
|
2009-10-29 12:57:45 +01:00
|
|
|
|
|
|
|
let
|
2011-05-06 09:35:15 +02:00
|
|
|
name = "maxima";
|
2017-11-14 13:20:23 +01:00
|
|
|
version = "5.41.0";
|
2011-07-13 11:13:32 +02:00
|
|
|
|
|
|
|
searchPath =
|
2016-04-13 14:53:51 +02:00
|
|
|
stdenv.lib.makeBinPath
|
2016-10-17 19:21:39 +02:00
|
|
|
(stdenv.lib.filter (x: x != null) [ sbcl ecl rlwrap tk gnuplot ]);
|
2009-10-29 12:57:45 +01:00
|
|
|
in
|
2016-10-17 19:21:39 +02:00
|
|
|
stdenv.mkDerivation ({
|
2009-10-29 12:57:45 +01:00
|
|
|
name = "${name}-${version}";
|
2007-09-26 02:19:26 +02:00
|
|
|
|
2009-01-04 21:18:10 +01:00
|
|
|
src = fetchurl {
|
2009-10-29 12:57:45 +01:00
|
|
|
url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz";
|
2017-11-14 13:20:23 +01:00
|
|
|
sha256 = "0x0n81z0s4pl8nwpf7ivlsbvsdphm9w42250g7qdkizl0132by6s";
|
2009-01-04 21:18:10 +01:00
|
|
|
};
|
2007-09-26 02:19:26 +02:00
|
|
|
|
2016-10-17 19:21:39 +02:00
|
|
|
buildInputs = stdenv.lib.filter (x: x != null)
|
|
|
|
[sbcl ecl texinfo perl python makeWrapper];
|
2011-07-13 11:13:32 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# Make sure that maxima can find its runtime dependencies.
|
|
|
|
for prog in "$out/bin/"*; do
|
2013-08-28 16:33:33 +02:00
|
|
|
wrapProgram "$prog" --prefix PATH ":" "$out/bin:${searchPath}"
|
2011-07-13 11:13:32 +02:00
|
|
|
done
|
|
|
|
# Move emacs modules and documentation into the right place.
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/emacs $out/share/doc
|
2011-07-13 11:13:32 +02:00
|
|
|
ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp
|
|
|
|
ln -s ../maxima/${version}/doc $out/share/doc/maxima
|
2016-10-17 19:21:39 +02:00
|
|
|
''
|
|
|
|
+ (stdenv.lib.optionalString ecl-fasl ''
|
|
|
|
cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/"
|
|
|
|
'')
|
|
|
|
;
|
2010-11-05 15:35:37 +01:00
|
|
|
|
2014-12-22 10:53:00 +01:00
|
|
|
# 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:
|
|
|
|
# http://sourceforge.net/tracker/?func=detail&aid=3365831&group_id=4933&atid=104933.
|
2011-07-13 11:13:32 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2007-09-26 02:19:26 +02:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Computer algebra system";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://maxima.sourceforge.net;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2010-08-26 13:44:43 +02: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 13:49:54 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2016-05-16 22:30:20 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.peti ];
|
2017-03-30 15:37:16 +02:00
|
|
|
broken = ecl != null;
|
2007-09-26 02:19:26 +02:00
|
|
|
};
|
2016-10-17 19:21:39 +02:00
|
|
|
} // (stdenv.lib.optionalAttrs ecl-fasl {
|
|
|
|
preConfigure = ''
|
|
|
|
sed -e '/c::build-program "binary-ecl\/maxima"/i(c::build-fasl "binary-ecl\/maxima.fasl" :lisp-files obj :ld-flags (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*" (find-package "MAXIMA"))))) (if (and x (not (string= x ""))) (list x))))' -i src/maxima.system
|
|
|
|
'';
|
|
|
|
}))
|