diff options
author | Tristan Konolige <tristan.konolige@gmail.com> | 2018-12-18 17:53:18 -0700 |
---|---|---|
committer | Tristan Konolige <tristan.konolige@gmail.com> | 2018-12-18 17:59:39 -0700 |
commit | 88f22c34845ceb4dad42ed49ae0334a6bef1f6bf (patch) | |
tree | 3cf7ca6f823e611cab35640f66d85393a8e5017c /pkgs/development/libraries/mpich/default.nix | |
parent | 43dd779a8d019a0667e3eed1346f83ffe2004e05 (diff) | |
download | nixpkgs-88f22c34845ceb4dad42ed49ae0334a6bef1f6bf.tar nixpkgs-88f22c34845ceb4dad42ed49ae0334a6bef1f6bf.tar.gz nixpkgs-88f22c34845ceb4dad42ed49ae0334a6bef1f6bf.tar.bz2 nixpkgs-88f22c34845ceb4dad42ed49ae0334a6bef1f6bf.tar.lz nixpkgs-88f22c34845ceb4dad42ed49ae0334a6bef1f6bf.tar.xz nixpkgs-88f22c34845ceb4dad42ed49ae0334a6bef1f6bf.tar.zst nixpkgs-88f22c34845ceb4dad42ed49ae0334a6bef1f6bf.zip |
mpich: Add darwin support
Diffstat (limited to 'pkgs/development/libraries/mpich/default.nix')
-rw-r--r-- | pkgs/development/libraries/mpich/default.nix | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pkgs/development/libraries/mpich/default.nix b/pkgs/development/libraries/mpich/default.nix index bab52e0fbe0..ffe6b5edf96 100644 --- a/pkgs/development/libraries/mpich/default.nix +++ b/pkgs/development/libraries/mpich/default.nix @@ -23,17 +23,18 @@ stdenv.mkDerivation rec { doCheck = true; 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 for entry in $out/bin/mpichversion $out/bin/mpivars; do echo "fix rpath: $entry" patchelf --set-rpath "$out/lib" $entry 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; { description = "Implementation of the Message Passing Interface (MPI) standard"; @@ -49,6 +50,6 @@ stdenv.mkDerivation rec { fullName = "MPICH license (permissive)"; }; maintainers = [ maintainers.markuskowa ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } |