Use autoPatchelfHook for Intel MPI

This commit is contained in:
Rodrigo Arias Mallo 2020-07-01 17:57:31 +02:00
parent 9d65f2ae2c
commit 9ca29d5cf8

View File

@ -3,6 +3,9 @@
, rpmextract
, libfabric
, patchelf
, gcc
, zlib
, autoPatchelfHook
, enableDebug ? false
}:
@ -34,6 +37,9 @@ stdenv.mkDerivation rec {
rpmextract
libfabric
patchelf
autoPatchelfHook
gcc.cc.lib
zlib
];
postUnpack = ''
@ -64,15 +70,6 @@ stdenv.mkDerivation rec {
mkdir $out/lib
cp -a lib/lib* $out/lib
cp -a lib/${lib_variant}_mt/lib* $out/lib
'';
preFixup = ''
find $out/bin -type f -executable -exec \
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
'{}' \;
find $out/lib -name '*.so' -exec \
patchelf --set-rpath "$out/lib:${stdenv.cc}/lib:${stdenv.glibc}/lib:${libfabric}/lib" '{}' \;
rm $out/lib/libmpi.dbg
'';
}