From 88f22c34845ceb4dad42ed49ae0334a6bef1f6bf Mon Sep 17 00:00:00 2001 From: Tristan Konolige Date: Tue, 18 Dec 2018 17:53:18 -0700 Subject: mpich: Add darwin support --- pkgs/development/libraries/mpich/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'pkgs/development/libraries/mpich/default.nix') 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; }; } -- cgit 1.4.1