mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
maxima: support building with ECL; optionally support building maxima.fas when building with ECL
This commit is contained in:
parent
5bdd22bf4e
commit
28aa92de64
@ -1,4 +1,6 @@
|
||||
{ stdenv, fetchurl, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null, tk ? null, gnuplot ? null }:
|
||||
{ stdenv, fetchurl, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null,
|
||||
tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false
|
||||
}:
|
||||
|
||||
let
|
||||
name = "maxima";
|
||||
@ -6,9 +8,9 @@ let
|
||||
|
||||
searchPath =
|
||||
stdenv.lib.makeBinPath
|
||||
(stdenv.lib.filter (x: x != null) [ sbcl rlwrap tk gnuplot ]);
|
||||
(stdenv.lib.filter (x: x != null) [ sbcl ecl rlwrap tk gnuplot ]);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
@ -16,7 +18,8 @@ stdenv.mkDerivation {
|
||||
sha256 = "1p6646rvq43hk09msyp0dk50cqpkh07mf4x0bc2fqisqmcv6b1hf";
|
||||
};
|
||||
|
||||
buildInputs = [sbcl texinfo perl python makeWrapper];
|
||||
buildInputs = stdenv.lib.filter (x: x != null)
|
||||
[sbcl ecl texinfo perl python makeWrapper];
|
||||
|
||||
postInstall = ''
|
||||
# Make sure that maxima can find its runtime dependencies.
|
||||
@ -27,7 +30,11 @@ stdenv.mkDerivation {
|
||||
mkdir -p $out/share/emacs $out/share/doc
|
||||
ln -s ../maxima/${version}/emacs $out/share/emacs/site-lisp
|
||||
ln -s ../maxima/${version}/doc $out/share/doc/maxima
|
||||
'';
|
||||
''
|
||||
+ (stdenv.lib.optionalString ecl-fasl ''
|
||||
cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/"
|
||||
'')
|
||||
;
|
||||
|
||||
# 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:
|
||||
@ -51,4 +58,8 @@ stdenv.mkDerivation {
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ stdenv.lib.maintainers.peti ];
|
||||
};
|
||||
}
|
||||
} // (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
|
||||
'';
|
||||
}))
|
||||
|
@ -16696,7 +16696,8 @@ in
|
||||
|
||||
geogebra = callPackage ../applications/science/math/geogebra { };
|
||||
|
||||
maxima = callPackage ../applications/science/math/maxima { };
|
||||
maxima = callPackage ../applications/science/math/maxima { ecl = null; };
|
||||
maxima-ecl = callPackage ../applications/science/math/maxima { sbcl = null; };
|
||||
|
||||
wxmaxima = callPackage ../applications/science/math/wxmaxima { wxGTK = wxGTK30; };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user