2009-04-09 16:24:33 +01:00
|
|
|
{stdenv, fetchurl, lib, gfortran
|
2008-09-05 18:12:04 +01:00
|
|
|
, ncurses
|
2018-07-21 01:44:44 +01:00
|
|
|
, withXaw3d ? false
|
2008-09-05 18:12:04 +01:00
|
|
|
#, withPVMlib ? false
|
2019-02-03 15:30:45 +00:00
|
|
|
, tcl, tk, withTk ? true
|
2016-09-11 22:24:51 +01:00
|
|
|
, gtk2, withGtk ? false # working ?
|
2008-09-05 18:12:04 +01:00
|
|
|
#, withF2c ? false
|
2019-02-03 15:30:45 +00:00
|
|
|
, ocaml, withOCaml ? true
|
2008-09-05 18:12:04 +01:00
|
|
|
#, withJava ? false
|
|
|
|
#, atlasMath, withAtlas ? false
|
2019-02-03 15:30:45 +00:00
|
|
|
, xlibsWrapper, withX ? true
|
2008-09-05 18:12:04 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "4.1.2";
|
|
|
|
name = "scilab-${version}";
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://www.scilab.org/download/${version}/${name}-src.tar.gz";
|
2016-09-10 18:50:10 +01:00
|
|
|
sha256 = "1adk6jqlj7i3gjklvlf1j3il1nb22axnp4rvwl314an62siih0sc";
|
2008-09-05 18:12:04 +01:00
|
|
|
};
|
|
|
|
|
2009-04-09 16:24:33 +01:00
|
|
|
buildInputs = [gfortran ncurses]
|
2016-09-11 22:24:51 +01:00
|
|
|
++ lib.optionals withGtk [gtk2]
|
2008-09-05 18:12:04 +01:00
|
|
|
++ lib.optionals withOCaml [ocaml]
|
2015-09-15 10:13:22 +01:00
|
|
|
++ lib.optional withX xlibsWrapper
|
2008-09-05 18:12:04 +01:00
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
--with-atlas-library=DIR Atlas library files are in DIR and we use Atlas
|
|
|
|
*/
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [
|
|
|
|
# use gcc C compiler and gnu Fortran compiler (g77 or gfortran)
|
|
|
|
"--with-gcc" "--with-g77"
|
|
|
|
# do not compile with PVM library
|
|
|
|
"--without-pvm"
|
|
|
|
# compile with GTK
|
|
|
|
(stdenv.lib.enableFeature withGtk "gtk")
|
|
|
|
(stdenv.lib.enableFeature withGtk "gtk2")
|
|
|
|
# compile with ocaml
|
|
|
|
(stdenv.lib.withFeature withOCaml "ocaml")
|
|
|
|
# do not compile Java interface
|
|
|
|
"--without-java"
|
|
|
|
# use the X Window System
|
|
|
|
(stdenv.lib.withFeature withX "x")
|
|
|
|
# compile with TCL/TK
|
|
|
|
] ++ lib.optionals withTk [
|
|
|
|
"--with-tk"
|
|
|
|
"--with-tcl-library=${tcl}/lib"
|
|
|
|
"--with-tcl-include=${tcl}/include"
|
|
|
|
"--with-tk-library=${tk}/lib"
|
|
|
|
"--with-tk-include=${tk}/include"
|
|
|
|
] # use Xaw3d widgets given with Scilab
|
|
|
|
++ lib.optional (!withXaw3d) "--with-local-xaw"
|
2008-09-05 18:12:04 +01: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";
|
2016-09-19 18:04:54 +01:00
|
|
|
broken = true;
|
2008-09-05 18:12:04 +01:00
|
|
|
};
|
|
|
|
}
|