1{ stdenv, fetchurl, python, perl, gfortran
2, slurm, openssh, hwloc
3} :
4
5stdenv.mkDerivation rec {
6 name = "mpich-${version}";
7 version = "3.2.1";
8
9 src = fetchurl {
10 url = "http://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz";
11 sha256 = "1w9h4g7d46d9l5jbcyfxpaqzpjrc5hyvr9d0ns7278psxpr3pdax";
12 };
13
14 configureFlags = [
15 "--enable-shared"
16 "--enable-sharedlib"
17 ];
18
19 buildInputs = [ perl gfortran slurm openssh hwloc ];
20
21 doCheck = true;
22
23 preFixup = ''
24 # /tmp/nix-build... ends up in the RPATH, fix it manually
25 for entry in $out/bin/mpichversion $out/bin/mpivars; do
26 echo "fix rpath: $entry"
27 patchelf --set-rpath "$out/lib" $entry
28 done
29 '';
30
31
32 meta = with stdenv.lib; {
33 description = "Implementation of the Message Passing Interface (MPI) standard";
34
35 longDescription = ''
36 MPICH2 is a free high-performance and portable implementation of
37 the Message Passing Interface (MPI) standard, both version 1 and
38 version 2.
39 '';
40 homepage = http://www.mcs.anl.gov/mpi/mpich2/;
41 license = {
42 url = http://git.mpich.org/mpich.git/blob/a385d6d0d55e83c3709ae851967ce613e892cd21:/COPYRIGHT;
43 fullName = "MPICH license (permissive)";
44 };
45 maintainers = [ maintainers.markuskowa ];
46 platforms = platforms.unix;
47 };
48}