2021-01-15 13:21:58 +00:00
|
|
|
{ lib, stdenv, fetchurl, neuron-version
|
2017-06-28 16:59:54 +01:00
|
|
|
, libX11, libXext, patchelf
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec
|
|
|
|
{ name = "iv-19";
|
|
|
|
src = fetchurl
|
2018-06-28 19:43:35 +01:00
|
|
|
{ url = "https://www.neuron.yale.edu/ftp/neuron/versions/v${neuron-version}/${name}.tar.gz";
|
2017-09-02 21:58:14 +01:00
|
|
|
sha256 = "07a3g8zzay4h0bls7fh89dd0phn7s34c2g15pij6dsnwpmjg06yx";
|
2017-06-28 16:59:54 +01:00
|
|
|
};
|
|
|
|
nativeBuildInputs = [ patchelf ];
|
|
|
|
buildInputs = [ libXext ];
|
|
|
|
propagatedBuildInputs = [ libX11 ];
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
postInstall = ''
|
|
|
|
for dir in $out/*; do # */
|
|
|
|
if [ -d $dir/lib ]; then
|
2021-01-15 13:21:58 +00:00
|
|
|
mv $dir/* $out # */
|
2017-06-28 16:59:54 +01:00
|
|
|
rmdir $dir
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2021-01-15 13:21:58 +00:00
|
|
|
'' + lib.optionalString stdenv.isLinux ''
|
2017-06-28 16:59:54 +01:00
|
|
|
patchelf --add-needed ${libX11}/lib/libX11.so $out/lib/libIVhines.so
|
|
|
|
'';
|
2021-01-15 13:21:58 +00:00
|
|
|
meta = with lib;
|
2017-06-28 16:59:54 +01:00
|
|
|
{ description = "InterViews graphical library for Neuron";
|
|
|
|
license = licenses.bsd3;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.neuron.yale.edu/neuron";
|
2017-06-28 16:59:54 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|