Merge pull request #52509 from tkonolige/mpich_on_macos
mpich2: Add darwin support
This commit is contained in:
commit
1490094fff
@ -23,17 +23,18 @@ stdenv.mkDerivation rec {
|
|||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
|
# Ensure the default compilers are the ones mpich was built with
|
||||||
|
sed -i 's:CC="gcc":CC=${stdenv.cc}/bin/gcc:' $out/bin/mpicc
|
||||||
|
sed -i 's:CXX="g++":CXX=${stdenv.cc}/bin/g++:' $out/bin/mpicxx
|
||||||
|
sed -i 's:FC="gfortran":FC=${gfortran}/bin/gfortran:' $out/bin/mpifort
|
||||||
|
''
|
||||||
|
+ stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||||
# /tmp/nix-build... ends up in the RPATH, fix it manually
|
# /tmp/nix-build... ends up in the RPATH, fix it manually
|
||||||
for entry in $out/bin/mpichversion $out/bin/mpivars; do
|
for entry in $out/bin/mpichversion $out/bin/mpivars; do
|
||||||
echo "fix rpath: $entry"
|
echo "fix rpath: $entry"
|
||||||
patchelf --set-rpath "$out/lib" $entry
|
patchelf --set-rpath "$out/lib" $entry
|
||||||
done
|
done
|
||||||
|
'';
|
||||||
# Ensure the default compilers are the ones mpich was built with
|
|
||||||
sed -i 's:CC="gcc":CC=${stdenv.cc}/bin/gcc:' $out/bin/mpicc
|
|
||||||
sed -i 's:CXX="g++":CXX=${stdenv.cc}/bin/g++:' $out/bin/mpicxx
|
|
||||||
sed -i 's:FC="gfortran":FC=${gfortran}/bin/gfortran:' $out/bin/mpifort
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Implementation of the Message Passing Interface (MPI) standard";
|
description = "Implementation of the Message Passing Interface (MPI) standard";
|
||||||
@ -49,6 +50,6 @@ stdenv.mkDerivation rec {
|
|||||||
fullName = "MPICH license (permissive)";
|
fullName = "MPICH license (permissive)";
|
||||||
};
|
};
|
||||||
maintainers = [ maintainers.markuskowa ];
|
maintainers = [ maintainers.markuskowa ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user