Skip to content

Commit

Permalink
neuron: enable GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
shlevy committed Jun 28, 2017
1 parent 46a4462 commit 24c59a4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
31 changes: 31 additions & 0 deletions pkgs/applications/science/biology/iv/default.nix
@@ -0,0 +1,31 @@
{ stdenv, fetchurl, neuron-version
, libX11, libXext, patchelf
}:

stdenv.mkDerivation rec
{ name = "iv-19";
src = fetchurl
{ url = "http://www.neuron.yale.edu/ftp/neuron/versions/v${neuron-version}/${name}.tar.gz";
sha256 = "1q22vjngvn3m61mjxynkik7pxvsgc9a0ym46qpa84hmz1v86mdrw";
};
nativeBuildInputs = [ patchelf ];
buildInputs = [ libXext ];
propagatedBuildInputs = [ libX11 ];
hardeningDisable = [ "format" ];
postInstall = ''
for dir in $out/*; do # */
if [ -d $dir/lib ]; then
mv $dir/* $out # */
rmdir $dir
break
fi
done
patchelf --add-needed ${libX11}/lib/libX11.so $out/lib/libIVhines.so
'';
meta = with stdenv.lib;
{ description = "InterViews graphical library for Neuron";
license = licenses.bsd3;
homepage = http://www.neuron.yale.edu/neuron;
platforms = platforms.all;
};
}
5 changes: 3 additions & 2 deletions pkgs/applications/science/biology/neuron/default.nix
Expand Up @@ -9,14 +9,15 @@
, which
, python ? null
, mpi ? null
, iv
}:

stdenv.mkDerivation rec {
name = "neuron-${version}";
version = "7.4";

nativeBuildInputs = [ which pkgconfig automake autoconf libtool ];
buildInputs = [ ncurses readline python mpi ];
buildInputs = [ ncurses readline python mpi iv ];

src = fetchurl {
url = "http://www.neuron.yale.edu/ftp/neuron/versions/v${version}/nrn-${version}.tar.gz";
Expand Down Expand Up @@ -45,7 +46,7 @@ stdenv.mkDerivation rec {
'';

configureFlags = with stdenv.lib;
[ "--without-x" "--with-readline=${readline}" ]
[ "--with-readline=${readline}" "--with-iv=${iv}" ]
++ optionals (python != null) [ "--with-nrnpython=${python.interpreter}" ]
++ (if mpi != null then ["--with-mpi" "--with-paranrn"]
else ["--without-mpi"]);
Expand Down
6 changes: 6 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -17659,6 +17659,10 @@ with pkgs;

igv = callPackage ../applications/science/biology/igv { };

iv = callPackage ../applications/science/biology/iv {
neuron-version = neuron.version;
};

neuron = callPackage ../applications/science/biology/neuron {
python = null;
};
Expand All @@ -17667,6 +17671,8 @@ with pkgs;
mpi = pkgs.openmpi;
});

neuron-full = neuron-mpi.override { inherit python; };

mrbayes = callPackage ../applications/science/biology/mrbayes { };

minc_tools = callPackage ../applications/science/biology/minc-tools { };
Expand Down

0 comments on commit 24c59a4

Please sign in to comment.