@@ -1,24 +1,30 @@
1−{ lib, stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python3, makeWrapper, autoreconfHook
2−, rlwrap ? null, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
1+{ lib
2+, stdenv
3+, fetchurl
4+, fetchpatch
5+, texinfo
6+, perl
7+, python3
8+, makeWrapper
9+, autoreconfHook
10+, rlwrap ? null
11+, tk ? null
12+, gnuplot ? null
13+, lisp-compiler
314}:
415
516let
6− name = "maxima";
7− version = "5.45.0";
8−
9− lisp-compiler = if ecl-fasl then ecl else sbcl;
10−
11− searchPath =
12− lib.makeBinPath
13− (lib.filter (x: x != null) [ lisp-compiler rlwrap tk gnuplot ]);
17+ # Allow to remove some executables from the $PATH of the wrapped binary
18+ searchPath = lib.makeBinPath
19+ (lib.filter (x: x != null) [ lisp-compiler rlwrap tk gnuplot ]);
1420in
15−stdenv.mkDerivation ({
16− inherit version;
17− name = "${name}-${version}";
21+stdenv.mkDerivation rec {
22+ pname = "maxima";
23+ version = "5.45.1";
1824
1925 src = fetchurl {
20− url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz";
21− sha256 = "sha256-x2MfMmRIBc67e6/vOrUzHEus0sJ+OE/YgyO1A5pg0Ng=";
26+ url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
27+ sha256 = "sha256-/pAWJ2lwvvIUoaJENIVYZEUU1/36pPyLnQ6Hr8u059w=";
2228 };
2329
2430 nativeBuildInputs = [
@@ -49,7 +55,7 @@ stdenv.mkDerivation ({
4955 ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp
5056 ln -s ../maxima/${version}/doc $out/share/doc/maxima
5157 ''
52− + (lib.optionalString ecl-fasl ''
58+ + (lib.optionalString (lisp-compiler.pname == "ecl") ''
5359 cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/"
5460 '')
5561 ;
@@ -67,12 +73,13 @@ stdenv.mkDerivation ({
6773 sha256 = "06961hn66rhjijfvyym21h39wk98sfxhp051da6gz0n9byhwc6zg";
6874 })
6975
70− # undo https://sourceforge.net/p/maxima/code/ci/f5e9b0f7eb122c4e48ea9df144dd57221e5ea0ca, see see https://trac.sagemath.org/ticket/13364#comment:93
76+ # undo https://sourceforge.net/p/maxima/code/ci/f5e9b0f7eb122c4e48ea9df144dd57221e5ea0ca
77+ # see https://trac.sagemath.org/ticket/13364#comment:93
7178 (fetchpatch {
7279 url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/undoing_true_false_printing_patch.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
7380 sha256 = "0fvi3rcjv6743sqsbgdzazy9jb6r1p1yq63zyj9fx42wd1hgf7yx";
7481 })
75− ] ++ lib.optionals ecl-fasl [
82+ ] ++ lib.optionals (lisp-compiler.pname == "ecl") [
7683 # build fasl, needed for ECL support
7784 (fetchpatch {
7885 url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/maxima.system.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
@@ -97,13 +104,13 @@ stdenv.mkDerivation ({
97104 enableParallelBuilding = true;
98105
99106 passthru = {
100− ecl = ecl;
107+ inherit lisp-compiler;
101108 };
102109
103− meta = {
110+ meta = with lib; {
104111 description = "Computer algebra system";
105112 homepage = "http://maxima.sourceforge.net";
106− license = lib.licenses.gpl2;
113+ license = licenses.gpl2Plus;
107114
108115 longDescription = ''
109116 Maxima is a fairly complete computer algebra system written in
@@ -111,7 +118,7 @@ stdenv.mkDerivation ({
111118 DOE-MACSYMA and licensed under the GPL. Its abilities include
112119 symbolic integration, 3D plotting, and an ODE solver.
113120 '';
114−
115− platforms = lib.platforms.unix;
121+ maintainers = with maintainers; [ doronbehar ];
122+ platforms = platforms.unix;
116123 };
117−})
124+}