diff options
author | Doron Behar <doron.behar@gmail.com> | 2021-12-01 11:34:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 11:34:38 +0200 |
commit | 43ed12450ef5f6d6388ad5164a9f874a5e3b2f62 (patch) | |
tree | fc4b5fa06975407c8be1f6b63cfdfe653b48015c /pkgs/applications/science | |
parent | 81014996e1ffd3c27a923bf3a877651af985fe79 (diff) | |
parent | 57ab62314b18dcdeb4c3e0365cf1821dd1f3340b (diff) |
Merge pull request #147828 from doronbehar/pkg/maxima
Diffstat (limited to 'pkgs/applications/science')
8 files changed, 76 insertions, 56 deletions
diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix index 3f295b416fb04..8bad09f178802 100644 --- a/pkgs/applications/science/math/maxima/default.nix +++ b/pkgs/applications/science/math/maxima/default.nix @@ -1,24 +1,30 @@ -{ lib, stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python3, makeWrapper, autoreconfHook -, rlwrap ? null, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false +{ lib +, stdenv +, fetchurl +, fetchpatch +, texinfo +, perl +, python3 +, makeWrapper +, autoreconfHook +, rlwrap ? null +, tk ? null +, gnuplot ? null +, lisp-compiler }: let - name = "maxima"; - version = "5.45.0"; - - lisp-compiler = if ecl-fasl then ecl else sbcl; - - searchPath = - lib.makeBinPath - (lib.filter (x: x != null) [ lisp-compiler rlwrap tk gnuplot ]); + # Allow to remove some executables from the $PATH of the wrapped binary + searchPath = lib.makeBinPath + (lib.filter (x: x != null) [ lisp-compiler rlwrap tk gnuplot ]); in -stdenv.mkDerivation ({ - inherit version; - name = "${name}-${version}"; +stdenv.mkDerivation rec { + pname = "maxima"; + version = "5.45.1"; src = fetchurl { - url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz"; - sha256 = "sha256-x2MfMmRIBc67e6/vOrUzHEus0sJ+OE/YgyO1A5pg0Ng="; + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; + sha256 = "sha256-/pAWJ2lwvvIUoaJENIVYZEUU1/36pPyLnQ6Hr8u059w="; }; nativeBuildInputs = [ @@ -49,7 +55,7 @@ stdenv.mkDerivation ({ ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp ln -s ../maxima/${version}/doc $out/share/doc/maxima '' - + (lib.optionalString ecl-fasl '' + + (lib.optionalString (lisp-compiler.pname == "ecl") '' cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/" '') ; @@ -67,12 +73,13 @@ stdenv.mkDerivation ({ sha256 = "06961hn66rhjijfvyym21h39wk98sfxhp051da6gz0n9byhwc6zg"; }) - # undo https://sourceforge.net/p/maxima/code/ci/f5e9b0f7eb122c4e48ea9df144dd57221e5ea0ca, see see https://trac.sagemath.org/ticket/13364#comment:93 + # undo https://sourceforge.net/p/maxima/code/ci/f5e9b0f7eb122c4e48ea9df144dd57221e5ea0ca + # 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"; }) - ] ++ lib.optionals ecl-fasl [ + ] ++ lib.optionals (lisp-compiler.pname == "ecl") [ # build fasl, needed for ECL support (fetchpatch { url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/maxima.system.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; @@ -97,13 +104,13 @@ stdenv.mkDerivation ({ enableParallelBuilding = true; passthru = { - ecl = ecl; + inherit lisp-compiler; }; - meta = { + meta = with lib; { description = "Computer algebra system"; homepage = "http://maxima.sourceforge.net"; - license = lib.licenses.gpl2; + license = licenses.gpl2Plus; longDescription = '' Maxima is a fairly complete computer algebra system written in @@ -111,7 +118,7 @@ stdenv.mkDerivation ({ DOE-MACSYMA and licensed under the GPL. Its abilities include symbolic integration, 3D plotting, and an ODE solver. ''; - - platforms = lib.platforms.unix; + maintainers = with maintainers; [ doronbehar ]; + platforms = platforms.unix; }; -}) +} diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix index b7821db1f9a71..e9dae55fbae3d 100644 --- a/pkgs/applications/science/math/sage/default.nix +++ b/pkgs/applications/science/math/sage/default.nix @@ -15,7 +15,7 @@ let sagelib = self.callPackage ./sagelib.nix { inherit flint arb; inherit sage-src env-locations pynac singular; - ecl = maxima-ecl.ecl; + inherit (maxima) lisp-compiler; linbox = pkgs.linbox.override { withSage = true; }; pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config }; @@ -48,9 +48,8 @@ let # the files its looking fore are located. Also see `sage-env`. env-locations = callPackage ./env-locations.nix { inherit pari_data; - inherit singular maxima-ecl; + inherit singular maxima; inherit three; - ecl = maxima-ecl.ecl; cysignals = python3.pkgs.cysignals; mathjax = nodePackages.mathjax; }; @@ -61,22 +60,21 @@ let sagelib = python3.pkgs.sagelib; sage_docbuild = python3.pkgs.sage_docbuild; inherit env-locations; - inherit python3 singular palp flint pynac pythonEnv maxima-ecl; - ecl = maxima-ecl.ecl; + inherit python3 singular palp flint pynac pythonEnv maxima; pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config }; # The documentation for sage, building it takes a lot of ram. sagedoc = callPackage ./sagedoc.nix { inherit sage-with-env; - inherit python3 maxima-ecl; + inherit python3 maxima; }; # sagelib with added wrappers and a dependency on sage-tests to make sure thet tests were run. sage-with-env = callPackage ./sage-with-env.nix { inherit python3 pythonEnv; inherit sage-env; - inherit pynac singular maxima-ecl; + inherit pynac singular maxima; inherit three; pkg-config = pkgs.pkg-config; # not to confuse with pythonPackages.pkg-config }; @@ -118,8 +116,8 @@ let singular = pkgs.singular.override { inherit flint; }; - maxima-ecl = pkgs.maxima-ecl.override { - ecl = pkgs.ecl.override { + maxima = pkgs.maxima.override { + lisp-compiler = pkgs.ecl.override { # "echo syntax error | ecl > /dev/full 2>&1" segfaults in # ECL. We apply a patch to fix it (write_error.patch), but it # only works if threads are disabled. sage 9.2 tests this diff --git a/pkgs/applications/science/math/sage/env-locations.nix b/pkgs/applications/science/math/sage/env-locations.nix index b1ad0aad9c761..45a4799d1a031 100644 --- a/pkgs/applications/science/math/sage/env-locations.nix +++ b/pkgs/applications/science/math/sage/env-locations.nix @@ -2,13 +2,12 @@ , pari_data , pari , singular -, maxima-ecl +, maxima , conway_polynomials , graphs , elliptic_curves , polytopes_db , gap -, ecl , combinatorial_designs , jmol , mathjax @@ -30,14 +29,14 @@ writeTextFile rec { export SINGULAR_SO='${singular}/lib/libSingular.so' export GAP_SO='${gap}/lib/libgap.so' export SINGULAR_EXECUTABLE='${singular}/bin/Singular' - export MAXIMA_FAS='${maxima-ecl}/lib/maxima/${maxima-ecl.version}/binary-ecl/maxima.fas' - export MAXIMA_PREFIX="${maxima-ecl}" + export MAXIMA_FAS='${maxima}/lib/maxima/${maxima.version}/binary-ecl/maxima.fas' + export MAXIMA_PREFIX="${maxima}" export CONWAY_POLYNOMIALS_DATA_DIR='${conway_polynomials}/share/conway_polynomials' export GRAPHS_DATA_DIR='${graphs}/share/graphs' export ELLCURVE_DATA_DIR='${elliptic_curves}/share/ellcurves' export POLYTOPE_DATA_DIR='${polytopes_db}/share/reflexive_polytopes' export GAP_ROOT_DIR='${gap}/share/gap/build-dir' - export ECLDIR='${ecl}/lib/ecl-${ecl.version}/' + export ECLDIR='${maxima.lisp-compiler}/lib/${maxima.lisp-compiler.pname}-${maxima.lisp-compiler.version}/' export COMBINATORIAL_DESIGN_DATA_DIR="${combinatorial_designs}/share/combinatorial_designs" export CREMONA_MINI_DATA_DIR="${elliptic_curves}/share/cremona" export JMOL_DIR="${jmol}/share/jmol" # point to the directory that contains JmolData.jar diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix index fd67076c97de4..ae0b9f7453b5e 100644 --- a/pkgs/applications/science/math/sage/sage-env.nix +++ b/pkgs/applications/science/math/sage/sage-env.nix @@ -15,8 +15,7 @@ , pkg-config , pari , gap -, ecl -, maxima-ecl +, maxima , singular , fflas-ffpack , givaro @@ -77,8 +76,8 @@ let pkg-config pari gap - ecl - maxima-ecl + maxima.lisp-compiler + maxima singular giac palp diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix index f204d97961b65..b74ec4007e626 100644 --- a/pkgs/applications/science/math/sage/sage-with-env.nix +++ b/pkgs/applications/science/math/sage/sage-with-env.nix @@ -9,7 +9,7 @@ , singular , gap , giac -, maxima-ecl +, maxima , pari , gmp , gfan @@ -42,7 +42,7 @@ let pari gmp gfan - maxima-ecl + maxima eclib flintqs ntl diff --git a/pkgs/applications/science/math/sage/sagedoc.nix b/pkgs/applications/science/math/sage/sagedoc.nix index 76bbc90773b44..6016b3baeb485 100644 --- a/pkgs/applications/science/math/sage/sagedoc.nix +++ b/pkgs/applications/science/math/sage/sagedoc.nix @@ -1,7 +1,7 @@ { stdenv , sage-with-env , python3 -, maxima-ecl +, maxima , tachyon , jmol , cddlib @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { buildInputs = [ sage-with-env.env.lib python3 - maxima-ecl + maxima tachyon jmol cddlib diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix index b9c98ed64d010..a884ad8899d4d 100644 --- a/pkgs/applications/science/math/sage/sagelib.nix +++ b/pkgs/applications/science/math/sage/sagelib.nix @@ -10,7 +10,7 @@ , cypari2 , cysignals , cython -, ecl +, lisp-compiler , eclib , ecm , flint @@ -74,7 +74,7 @@ buildPythonPackage rec { jupyter_core pkg-config pip # needed to query installed packages - ecl + lisp-compiler ]; buildInputs = [ @@ -92,7 +92,7 @@ buildPythonPackage rec { arb brial cliquer - ecl + lisp-compiler eclib ecm fflas-ffpack diff --git a/pkgs/applications/science/math/wxmaxima/default.nix b/pkgs/applications/science/math/wxmaxima/default.nix index 57e4a6f1d3363..76d2c782b4d4a 100644 --- a/pkgs/applications/science/math/wxmaxima/default.nix +++ b/pkgs/applications/science/math/wxmaxima/default.nix @@ -1,21 +1,37 @@ -{ lib, stdenv, fetchFromGitHub -, wrapGAppsHook, cmake, gettext -, maxima, wxGTK, gnome }: +{ lib +, stdenv +, fetchFromGitHub +, wrapGAppsHook +, cmake +, gettext +, maxima +, wxGTK +, gnome +}: stdenv.mkDerivation rec { pname = "wxmaxima"; - version = "21.05.2"; + version = "21.11.0"; src = fetchFromGitHub { owner = "wxMaxima-developers"; repo = "wxmaxima"; rev = "Version-${version}"; - sha256 = "sha256-HPqdxGrPxe5FZNOimTpAP+c9VpDBkXu3Z1c1Aaf3+UA="; + sha256 = "sha256-LwuqldMGsmFR8xrNg5vsrogmdi5ysqEQGWITM460IZk="; }; - buildInputs = [ wxGTK maxima gnome.adwaita-icon-theme ]; + buildInputs = [ + wxGTK + maxima + # So it won't embed svg files into headers. + gnome.adwaita-icon-theme + ]; - nativeBuildInputs = [ wrapGAppsHook cmake gettext ]; + nativeBuildInputs = [ + wrapGAppsHook + cmake + gettext + ]; preConfigure = '' gappsWrapperArgs+=(--prefix PATH ":" ${maxima}/bin) @@ -25,6 +41,7 @@ stdenv.mkDerivation rec { description = "Cross platform GUI for the computer algebra system Maxima"; license = licenses.gpl2; homepage = "https://wxmaxima-developers.github.io/wxmaxima/"; + maintainers = with maintainers; [ doronbehar ]; platforms = platforms.linux; }; } |