git.iko.soy/typeable/nixpkgs
on master help sign in
maxima: support building with ECL; optionally support building maxima.fas when building with ECL
commit28aa92de641679a1441ef2abdbab768ca6f58042 authorMichael Raskin <7c6f434c@mail.ru> dateMon 17 Oct 2016, 19:21 (10 years ago) parent5bdd22b
2 files changed+19−7
pkgs/applications/science/math/maxima/default.nix+17−6 pkgs/top-level/all-packages.nix+2−1
pkgs/applications/science/math/maxima/default.nix+17−6
@@ -1,4 +1,6 @@
1−{ stdenv, fetchurl, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null, tk ? null, gnuplot ? null }:
1+{ stdenv, fetchurl, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null,
2+tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
3+}:
24
35let
46 name = "maxima";
@@ -6,9 +8,9 @@ let
68
79 searchPath =
810 stdenv.lib.makeBinPath
9− (stdenv.lib.filter (x: x != null) [ sbcl rlwrap tk gnuplot ]);
11+ (stdenv.lib.filter (x: x != null) [ sbcl ecl rlwrap tk gnuplot ]);
1012in
11−stdenv.mkDerivation {
13+stdenv.mkDerivation ({
1214 name = "${name}-${version}";
1315
1416 src = fetchurl {
@@ -16,7 +18,8 @@ stdenv.mkDerivation {
1618 sha256 = "1p6646rvq43hk09msyp0dk50cqpkh07mf4x0bc2fqisqmcv6b1hf";
1719 };
1820
19− buildInputs = [sbcl texinfo perl python makeWrapper];
21+ buildInputs = stdenv.lib.filter (x: x != null)
22+ [sbcl ecl texinfo perl python makeWrapper];
2023
2124 postInstall = ''
2225 # Make sure that maxima can find its runtime dependencies.
@@ -27,7 +30,11 @@ stdenv.mkDerivation {
2730 mkdir -p $out/share/emacs $out/share/doc
2831 ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp
2932 ln -s ../maxima/${version}/doc $out/share/doc/maxima
30− '';
33+ ''
34+ + (stdenv.lib.optionalString ecl-fasl ''
35+ cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/"
36+ '')
37+ ;
3138
3239 # Failures in the regression test suite won't abort the build process. We run
3340 # the suite only so that potential errors show up in the build log. See also:
@@ -51,4 +58,8 @@ stdenv.mkDerivation {
5158 platforms = stdenv.lib.platforms.unix;
5259 maintainers = [ stdenv.lib.maintainers.peti ];
5360 };
54−}
61+} // (stdenv.lib.optionalAttrs ecl-fasl {
62+ preConfigure = ''
63+ 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
64+ '';
65+}))
pkgs/top-level/all-packages.nix+2−1
@@ -16696,7 +16696,8 @@ in
1669616696
1669716697 geogebra = callPackage ../applications/science/math/geogebra { };
1669816698
16699− maxima = callPackage ../applications/science/math/maxima { };
16699+ maxima = callPackage ../applications/science/math/maxima { ecl = null; };
16700+ maxima-ecl = callPackage ../applications/science/math/maxima { sbcl = null; };
1670016701
1670116702 wxmaxima = callPackage ../applications/science/math/wxmaxima { wxGTK = wxGTK30; };
1670216703