nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, python, perl, gfortran }:
2
3let version = "1.4"; in
4stdenv.mkDerivation {
5 name = "mpich2-${version}";
6
7 src = fetchurl {
8 url = "http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/${version}/mpich2-${version}.tar.gz";
9 sha256 = "0bvvk4n9g4rmrncrgs9jnkcfh142i65wli5qp1akn9kwab1q80z6";
10 };
11
12 configureFlags = "--enable-shared --enable-sharedlib";
13
14 buildInputs = [ python perl gfortran ];
15 propagatedBuildInputs = stdenv.lib.optional (stdenv ? glibc) stdenv.glibc;
16
17 patchPhase =
18 '' for i in $(find -type f -not -name Makefile.\*)
19 do
20 if grep -q /usr/bin/env "$i"
21 then
22 interpreter="$(cat $i | grep /usr/bin/env | sed -'es|^.*/usr/bin/env \([^ ]\+\).*$|\1|g')"
23 echo "file \`$i' -> interpreter \`$interpreter'"
24 path="$(type -P $interpreter)"
25 echo "\`/usr/bin/env $interpreter' -> \`$path' in \`$i'..."
26 sed -i "$i" -e "s|/usr/bin/env $interpreter|$path|g"
27 fi
28 done
29 true
30 '';
31
32 meta = {
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 = "free, see http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=license";
42
43 maintainers = [ ];
44 platforms = stdenv.lib.platforms.unix;
45 };
46}