bscpkgs/bsc/intel-mpi/default.nix

65 lines
1.3 KiB
Nix
Raw Normal View History

2020-06-29 20:46:30 +02:00
{ stdenv
, rpmextract
, libfabric
2020-07-01 17:57:31 +02:00
, gcc
, zlib
, autoPatchelfHook
2020-06-29 20:46:30 +02:00
, enableDebug ? false
}:
stdenv.mkDerivation rec {
name = "intel-mpi-${version}";
version = "2019.7.217";
2020-07-23 18:47:20 +02:00
dir_nr = "16546";
2020-06-29 20:46:30 +02:00
lib_variant = (if enableDebug then "debug" else "release");
2020-07-23 18:47:20 +02:00
src = builtins.fetchTarball {
url = "http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/${dir_nr}/l_mpi_${version}.tgz";
sha256 = "19l995aavbn5lkiz9sxl6iwmjsrvjgjp14nn0qi1hjqs705db5li";
2020-06-29 20:46:30 +02:00
};
buildInputs = [
rpmextract
libfabric
2020-07-01 17:57:31 +02:00
autoPatchelfHook
gcc.cc.lib
zlib
];
postUnpack = ''
pushd $sourceRoot
rpmextract rpm/intel-mpi-*.rpm
popd
'';
2020-06-29 20:46:30 +02:00
patches = [
./mpicc.patch
./mpicxx.patch
];
postPatch = ''
pushd opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64/bin
for i in mpi* ; do
echo "Fixing paths in $i"
sed -i "s:I_MPI_SUBSTITUTE_INSTALLDIR:$out:g" "$i"
done
popd
'';
2020-06-29 20:46:30 +02:00
dontBuild = true;
installPhase = ''
cd opt/intel/compilers_and_libraries_2020.1.217/linux/mpi/intel64
mkdir -p $out
2020-06-29 20:46:30 +02:00
mv etc $out
mv bin $out
mv include $out
mkdir $out/lib
cp -a lib/lib* $out/lib
cp -a lib/${lib_variant}_mt/lib* $out/lib
ln -s . $out/intel64
2020-07-01 17:57:31 +02:00
rm $out/lib/libmpi.dbg
2020-06-29 20:46:30 +02:00
'';
}