<commit_before>{stdenv, fetchurl, lib, gfortran
, ncurses
, withXaw3d ? false
#, withPVMlib ? false
, tcl, tk, withTk ? false
, gtk2, withGtk ? false # working ?
#, withF2c ? false
, ocaml, withOCaml ? false
#, withJava ? false
#, atlasMath, withAtlas ? false
, xlibsWrapper, withX ? false
}:

stdenv.mkDerivation rec {
  version = "4.1.2";
  name = "scilab-${version}";
  src = fetchurl {
    url = "https://www.scilab.org/download/${version}/${name}-src.tar.gz";
    sha256 = "1adk6jqlj7i3gjklvlf1j3il1nb22axnp4rvwl314an62siih0sc";
  };

  buildInputs = [gfortran ncurses]
  ++ lib.optionals withGtk [gtk2]
  ++ lib.optionals withOCaml [ocaml]
  ++ lib.optional withX xlibsWrapper
  ;


/*
  --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
  + lib.optionalString withX "--with-x"
  ;

  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";
    broken = true;
  };
}<commit_msg>scilab: Make configureFlags a list<commit_after>{stdenv, fetchurl, lib, gfortran
, ncurses
, withXaw3d ? false
#, withPVMlib ? false
, tcl, tk, withTk ? false
, gtk2, withGtk ? false # working ?
#, withF2c ? false
, ocaml, withOCaml ? false
#, withJava ? false
#, atlasMath, withAtlas ? false
, xlibsWrapper, withX ? false
}:

stdenv.mkDerivation rec {
  version = "4.1.2";
  name = "scilab-${version}";
  src = fetchurl {
    url = "https://www.scilab.org/download/${version}/${name}-src.tar.gz";
    sha256 = "1adk6jqlj7i3gjklvlf1j3il1nb22axnp4rvwl314an62siih0sc";
  };

  buildInputs = [gfortran ncurses]
  ++ lib.optionals withGtk [gtk2]
  ++ lib.optionals withOCaml [ocaml]
  ++ lib.optional withX xlibsWrapper
  ;


/*
  --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"
    # 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"
  ;

  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";
    broken = true;
  };
}
{'fraction_non_alphanumeric': 0.14738219895287957, 'fraction_numerical': 0.01780104712041885, 'mean_word_length': 2.951396070320579, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5444554', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1428, 'n_words': 324}