2009-04-09 17:24:33 +02:00
|
|
|
{stdenv, fetchurl, lib, gfortran
|
2008-09-05 19:12:04 +02:00
|
|
|
, ncurses
|
|
|
|
, Xaw3d, withXaw3d ? false
|
|
|
|
#, withPVMlib ? false
|
|
|
|
, tcl, tk, withTk ? false
|
2016-09-11 23:24:51 +02:00
|
|
|
, gtk2, withGtk ? false # working ?
|
2008-09-05 19:12:04 +02:00
|
|
|
#, withF2c ? false
|
|
|
|
, ocaml, withOCaml ? false
|
|
|
|
#, withJava ? false
|
|
|
|
#, atlasMath, withAtlas ? false
|
2015-09-15 11:13:22 +02:00
|
|
|
, xlibsWrapper, withX ? false
|
2008-09-05 19:12:04 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "4.1.2";
|
|
|
|
name = "scilab-${version}";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.scilab.org/download/${version}/${name}-src.tar.gz";
|
2016-09-10 19:50:10 +02:00
|
|
|
sha256 = "1adk6jqlj7i3gjklvlf1j3il1nb22axnp4rvwl314an62siih0sc";
|
2008-09-05 19:12:04 +02:00
|
|
|
};
|
|
|
|
|
2009-04-09 17:24:33 +02:00
|
|
|
buildInputs = [gfortran ncurses]
|
2016-09-11 23:24:51 +02:00
|
|
|
++ lib.optionals withGtk [gtk2]
|
2008-09-05 19:12:04 +02:00
|
|
|
++ lib.optionals withOCaml [ocaml]
|
2015-09-15 11:13:22 +02:00
|
|
|
++ lib.optional withX xlibsWrapper
|
2008-09-05 19:12:04 +02:00
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
--with-atlas-library=DIR Atlas library files are in DIR and we use Atlas
|
|
|
|
*/
|
|
|
|
configureFlags = ""
|
|
|
|
# use gcc C compiler and gnu Fortran compiler (g77 or gfortran)
|
|
|
|
+ " --with-gcc --with-g77"
|
|
|
|
# use Xaw3d widgets given with Scilab
|
|
|
|
+ (lib.optionalString (!withXaw3d) " --with-local-xaw")
|
|
|
|
# do not compile with PVM library
|
|
|
|
+ " --without-pvm"
|
|
|
|
# compile with GTK
|
|
|
|
+ (if withGtk then "
|
|
|
|
--with-gtk --with-gtk2
|
|
|
|
" else "
|
|
|
|
--without-gtk --without-gtk2
|
|
|
|
")
|
|
|
|
# compile with TCL/TK
|
|
|
|
+ (lib.optionalString withTk "
|
|
|
|
--with-tk
|
|
|
|
--with-tcl-library=${tcl}/lib
|
|
|
|
--with-tcl-include=${tcl}/include
|
|
|
|
--with-tk-library=${tk}/lib
|
|
|
|
--with-tk-include=${tk}/include
|
|
|
|
")
|
|
|
|
# do not use Gtk widgets
|
|
|
|
+ " --without-gtk --without-gtk2"
|
|
|
|
# compile with ocaml
|
|
|
|
+ (if withOCaml then " --with-ocaml" else " --without-ocaml")
|
|
|
|
# do not compile Java interface
|
|
|
|
+ " --without-java"
|
|
|
|
# use the X Window System
|
2015-09-15 11:13:22 +02:00
|
|
|
+ lib.optionalString withX "--with-x"
|
2008-09-05 19:12:04 +02:00
|
|
|
;
|
|
|
|
|
|
|
|
makeFlags = "all";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.scilab.org/;
|
|
|
|
description = "Scientific software package for numerical computations (Matlab lookalike)";
|
|
|
|
# see http://www.scilab.org/legal
|
|
|
|
license = "SciLab";
|
|
|
|
};
|
|
|
|
}
|