diff options
Diffstat (limited to 'pkgs/applications/science/biology/neuron/default.nix')
-rw-r--r-- | pkgs/applications/science/biology/neuron/default.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/applications/science/biology/neuron/default.nix b/pkgs/applications/science/biology/neuron/default.nix index 154965b1521..7bfef3a82fe 100644 --- a/pkgs/applications/science/biology/neuron/default.nix +++ b/pkgs/applications/science/biology/neuron/default.nix @@ -8,7 +8,8 @@ , readline , which , python ? null -, mpi ? null +, useMpi ? false +, mpi , iv }: @@ -17,7 +18,8 @@ stdenv.mkDerivation rec { version = "7.5"; nativeBuildInputs = [ which pkg-config automake autoconf libtool ]; - buildInputs = [ ncurses readline python mpi iv ]; + buildInputs = [ ncurses readline python iv ] + ++ lib.optional useMpi mpi; src = fetchurl { url = "https://www.neuron.yale.edu/ftp/neuron/versions/v${version}/nrn-${version}.tar.gz"; @@ -54,7 +56,7 @@ stdenv.mkDerivation rec { configureFlags = with lib; [ "--with-readline=${readline}" "--with-iv=${iv}" ] ++ optionals (python != null) [ "--with-nrnpython=${python.interpreter}" ] - ++ (if mpi != null then ["--with-mpi" "--with-paranrn"] + ++ (if useMpi then ["--with-mpi" "--with-paranrn"] else ["--without-mpi"]); @@ -84,4 +86,3 @@ stdenv.mkDerivation rec { platforms = platforms.x86_64 ++ platforms.i686; }; } - |