summaryrefslogtreecommitdiffstats
path: root/pkgs/development/interpreters/octave
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-02-26 10:09:07 +0200
committerDoron Behar <doron.behar@gmail.com>2020-02-26 10:09:09 +0200
commit3fa64cd5de6a724ea984d73b3db7212d73dbded7 (patch)
tree2b66915dbd218c2886469bbeefd7626795f9741e /pkgs/development/interpreters/octave
parentf93a4389b9ad41b7af85f5f1e7e98caf8018855f (diff)
octave: make optional features declarative in default.nix
Instead of in all-packages.nix .
Diffstat (limited to 'pkgs/development/interpreters/octave')
-rw-r--r--pkgs/development/interpreters/octave/default.nix14
1 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/octave/default.nix b/pkgs/development/interpreters/octave/default.nix
index 2e926e16dc6e..b32d15b2a1f9 100644
--- a/pkgs/development/interpreters/octave/default.nix
+++ b/pkgs/development/interpreters/octave/default.nix
@@ -1,7 +1,6 @@
{ stdenv
, fetchurl
, gfortran
-, readline
, ncurses
, perl
, flex
@@ -31,18 +30,23 @@
, glpk ? null
, suitesparse ? null
, gnuplot ? null
+# - Include support for GNU readline:
+, enableReadline ? true
+, readline ? null
+# - Build Java interface:
+, enableJava ? true
, jdk ? null
, python ? null
, overridePlatforms ? null
, sundials_2 ? null
-# Qt / GUI is disabled by default
+# - Build Octave Qt GUI:
, enableQt ? false
, qtbase ? null
, qtsvg ? null
, qtscript ? null
, qscintilla ? null
, qttools ? null
-# JIT is disabled by default
+# - JIT compiler for loops:
, enableJIT ? false
, llvm ? null
}:
@@ -98,7 +102,7 @@ stdenv.mkDerivation rec {
++ (stdenv.lib.optional (hdf5 != null) hdf5)
++ (stdenv.lib.optional (glpk != null) glpk)
++ (stdenv.lib.optional (suitesparse != null) suitesparse)
- ++ (stdenv.lib.optional (jdk != null) jdk)
+ ++ (stdenv.lib.optional (enableJava) jdk)
++ (stdenv.lib.optional (sundials_2 != null) sundials_2)
++ (stdenv.lib.optional (gnuplot != null) gnuplot)
++ (stdenv.lib.optional (python != null) python)
@@ -128,10 +132,10 @@ stdenv.mkDerivation rec {
F77_INTEGER_8_FLAG = if openblas.blas64 then "-fdefault-integer-8" else "";
configureFlags = [
- "--enable-readline"
"--with-blas=openblas"
"--with-lapack=openblas"
]
+ ++ stdenv.lib.optionals enableReadline [ "--enable-readline" ]
++ stdenv.lib.optionals openblas.blas64 [ "--enable-64" ]
++ stdenv.lib.optionals stdenv.isDarwin [ "--with-x=no" ]
++ stdenv.lib.optionals enableQt [ "--with-qt=5" ]