git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #147828 from doronbehar/pkg/maxima
commit43ed12450ef5f6d6388ad5164a9f874a5e3b2f62 authorDoron Behar <doron.behar@gmail.com> dateWed 1 Dec 2021, 11:34 (5 years ago) parent810149957ab623
10 files changed+80−61
pkgs/applications/science/math/maxima/default.nix+31−24 pkgs/applications/science/math/sage/default.nix+7−9 pkgs/applications/science/math/sage/env-locations.nix+4−5 pkgs/applications/science/math/sage/sage-env.nix+3−4 pkgs/applications/science/math/sage/sage-with-env.nix+2−2 pkgs/applications/science/math/sage/sagedoc.nix+2−2 pkgs/applications/science/math/sage/sagelib.nix+3−3 pkgs/applications/science/math/wxmaxima/default.nix+24−7 pkgs/development/compilers/ecl/default.nix+2−1 pkgs/top-level/all-packages.nix+2−4
pkgs/applications/science/math/maxima/default.nix+31−24
@@ -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+}
pkgs/applications/science/math/sage/default.nix+7−9
@@ -15,7 +15,7 @@ let
1515 sagelib = self.callPackage ./sagelib.nix {
1616 inherit flint arb;
1717 inherit sage-src env-locations pynac singular;
18− ecl = maxima-ecl.ecl;
18+ inherit (maxima) lisp-compiler;
1919 linbox = pkgs.linbox.override { withSage = true; };
2020 pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config
2121 };
@@ -48,9 +48,8 @@ let
4848 # the files its looking fore are located. Also see `sage-env`.
4949 env-locations = callPackage ./env-locations.nix {
5050 inherit pari_data;
51− inherit singular maxima-ecl;
51+ inherit singular maxima;
5252 inherit three;
53− ecl = maxima-ecl.ecl;
5453 cysignals = python3.pkgs.cysignals;
5554 mathjax = nodePackages.mathjax;
5655 };
@@ -61,22 +60,21 @@ let
6160 sagelib = python3.pkgs.sagelib;
6261 sage_docbuild = python3.pkgs.sage_docbuild;
6362 inherit env-locations;
64− inherit python3 singular palp flint pynac pythonEnv maxima-ecl;
65− ecl = maxima-ecl.ecl;
63+ inherit python3 singular palp flint pynac pythonEnv maxima;
6664 pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config
6765 };
6866
6967 # The documentation for sage, building it takes a lot of ram.
7068 sagedoc = callPackage ./sagedoc.nix {
7169 inherit sage-with-env;
72− inherit python3 maxima-ecl;
70+ inherit python3 maxima;
7371 };
7472
7573 # sagelib with added wrappers and a dependency on sage-tests to make sure thet tests were run.
7674 sage-with-env = callPackage ./sage-with-env.nix {
7775 inherit python3 pythonEnv;
7876 inherit sage-env;
79− inherit pynac singular maxima-ecl;
77+ inherit pynac singular maxima;
8078 inherit three;
8179 pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config
8280 };
@@ -118,8 +116,8 @@ let
118116
119117 singular = pkgs.singular.override { inherit flint; };
120118
121− maxima-ecl = pkgs.maxima-ecl.override {
122− ecl = pkgs.ecl.override {
119+ maxima = pkgs.maxima.override {
120+ lisp-compiler = pkgs.ecl.override {
123121 # "echo syntax error | ecl > /dev/full 2>&1" segfaults in
124122 # ECL. We apply a patch to fix it (write_error.patch), but it
125123 # only works if threads are disabled. sage 9.2 tests this
pkgs/applications/science/math/sage/env-locations.nix+4−5
@@ -2,13 +2,12 @@
22, pari_data
33, pari
44, singular
5−, maxima-ecl
5+, maxima
66, conway_polynomials
77, graphs
88, elliptic_curves
99, polytopes_db
1010, gap
11−, ecl
1211, combinatorial_designs
1312, jmol
1413, mathjax
@@ -30,14 +29,14 @@ writeTextFile rec {
3029 export SINGULAR_SO='${singular}/lib/libSingular.so'
3130 export GAP_SO='${gap}/lib/libgap.so'
3231 export SINGULAR_EXECUTABLE='${singular}/bin/Singular'
33− export MAXIMA_FAS='${maxima-ecl}/lib/maxima/${maxima-ecl.version}/binary-ecl/maxima.fas'
34− export MAXIMA_PREFIX="${maxima-ecl}"
32+ export MAXIMA_FAS='${maxima}/lib/maxima/${maxima.version}/binary-ecl/maxima.fas'
33+ export MAXIMA_PREFIX="${maxima}"
3534 export CONWAY_POLYNOMIALS_DATA_DIR='${conway_polynomials}/share/conway_polynomials'
3635 export GRAPHS_DATA_DIR='${graphs}/share/graphs'
3736 export ELLCURVE_DATA_DIR='${elliptic_curves}/share/ellcurves'
3837 export POLYTOPE_DATA_DIR='${polytopes_db}/share/reflexive_polytopes'
3938 export GAP_ROOT_DIR='${gap}/share/gap/build-dir'
40− export ECLDIR='${ecl}/lib/ecl-${ecl.version}/'
39+ export ECLDIR='${maxima.lisp-compiler}/lib/${maxima.lisp-compiler.pname}-${maxima.lisp-compiler.version}/'
4140 export COMBINATORIAL_DESIGN_DATA_DIR="${combinatorial_designs}/share/combinatorial_designs"
4241 export CREMONA_MINI_DATA_DIR="${elliptic_curves}/share/cremona"
4342 export JMOL_DIR="${jmol}/share/jmol" # point to the directory that contains JmolData.jar
pkgs/applications/science/math/sage/sage-env.nix+3−4
@@ -15,8 +15,7 @@
1515, pkg-config
1616, pari
1717, gap
18−, ecl
19−, maxima-ecl
18+, maxima
2019, singular
2120, fflas-ffpack
2221, givaro
@@ -77,8 +76,8 @@ let
7776 pkg-config
7877 pari
7978 gap
80− ecl
81− maxima-ecl
79+ maxima.lisp-compiler
80+ maxima
8281 singular
8382 giac
8483 palp
pkgs/applications/science/math/sage/sage-with-env.nix+2−2
@@ -9,7 +9,7 @@
99, singular
1010, gap
1111, giac
12−, maxima-ecl
12+, maxima
1313, pari
1414, gmp
1515, gfan
@@ -42,7 +42,7 @@ let
4242 pari
4343 gmp
4444 gfan
45− maxima-ecl
45+ maxima
4646 eclib
4747 flintqs
4848 ntl
pkgs/applications/science/math/sage/sagedoc.nix+2−2
@@ -1,7 +1,7 @@
11{ stdenv
22, sage-with-env
33, python3
4−, maxima-ecl
4+, maxima
55, tachyon
66, jmol
77, cddlib
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
1818 buildInputs = [
1919 sage-with-env.env.lib
2020 python3
21− maxima-ecl
21+ maxima
2222 tachyon
2323 jmol
2424 cddlib
pkgs/applications/science/math/sage/sagelib.nix+3−3
@@ -10,7 +10,7 @@
1010, cypari2
1111, cysignals
1212, cython
13−, ecl
13+, lisp-compiler
1414, eclib
1515, ecm
1616, flint
@@ -74,7 +74,7 @@ buildPythonPackage rec {
7474 jupyter_core
7575 pkg-config
7676 pip # needed to query installed packages
77− ecl
77+ lisp-compiler
7878 ];
7979
8080 buildInputs = [
@@ -92,7 +92,7 @@ buildPythonPackage rec {
9292 arb
9393 brial
9494 cliquer
95− ecl
95+ lisp-compiler
9696 eclib
9797 ecm
9898 fflas-ffpack
pkgs/applications/science/math/wxmaxima/default.nix+24−7
@@ -1,21 +1,37 @@
1−{ lib, stdenv, fetchFromGitHub
2−, wrapGAppsHook, cmake, gettext
3−, maxima, wxGTK, gnome }:
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, wrapGAppsHook
5+, cmake
6+, gettext
7+, maxima
8+, wxGTK
9+, gnome
10+}:
411
512stdenv.mkDerivation rec {
613 pname = "wxmaxima";
7− version = "21.05.2";
14+ version = "21.11.0";
815
916 src = fetchFromGitHub {
1017 owner = "wxMaxima-developers";
1118 repo = "wxmaxima";
1219 rev = "Version-${version}";
13− sha256 = "sha256-HPqdxGrPxe5FZNOimTpAP+c9VpDBkXu3Z1c1Aaf3+UA=";
20+ sha256 = "sha256-LwuqldMGsmFR8xrNg5vsrogmdi5ysqEQGWITM460IZk=";
1421 };
1522
16− buildInputs = [ wxGTK maxima gnome.adwaita-icon-theme ];
23+ buildInputs = [
24+ wxGTK
25+ maxima
26+ # So it won't embed svg files into headers.
27+ gnome.adwaita-icon-theme
28+ ];
1729
18− nativeBuildInputs = [ wrapGAppsHook cmake gettext ];
30+ nativeBuildInputs = [
31+ wrapGAppsHook
32+ cmake
33+ gettext
34+ ];
1935
2036 preConfigure = ''
2137 gappsWrapperArgs+=(--prefix PATH ":" ${maxima}/bin)
@@ -25,6 +41,7 @@ stdenv.mkDerivation rec {
2541 description = "Cross platform GUI for the computer algebra system Maxima";
2642 license = licenses.gpl2;
2743 homepage = "https://wxmaxima-developers.github.io/wxmaxima/";
44+ maintainers = with maintainers; [ doronbehar ];
2845 platforms = platforms.linux;
2946 };
3047}
pkgs/development/compilers/ecl/default.nix+2−1
@@ -28,7 +28,8 @@ let
2828 ];
2929in
3030stdenv.mkDerivation {
31− inherit (s) name version;
31+ inherit (s) version;
32+ pname = s.baseName;
3233 inherit nativeBuildInputs propagatedBuildInputs;
3334
3435 src = fetchurl {
pkgs/top-level/all-packages.nix+2−4
@@ -31932,12 +31932,10 @@ with pkgs;
3193231932 };
3193331933
3193431934 maxima = callPackage ../applications/science/math/maxima {
31935− ecl = null;
31935+ lisp-compiler = sbcl;
3193631936 };
3193731937 maxima-ecl = maxima.override {
31938− inherit ecl;
31939− ecl-fasl = true;
31940− sbcl = null;
31938+ lisp-compiler = ecl;
3194131939 };
3194231940
3194331941 mxnet = callPackage ../applications/science/math/mxnet {