diff --git a/pkgs/development/libraries/mpich2/default.nix b/pkgs/development/libraries/mpich2/default.nix index 7fb0e009f4ae..9e0920eb1c42 100644 --- a/pkgs/development/libraries/mpich2/default.nix +++ b/pkgs/development/libraries/mpich2/default.nix @@ -1,16 +1,34 @@ -{stdenv, fetchurl, python}: +{ stdenv, fetchurl, python, perl }: + +let version = "1.2.1"; in +stdenv.mkDerivation { + name = "mpich2-${version}"; -stdenv.mkDerivation rec { - name = "mpich2-1.0.6p1"; - src = fetchurl { - url = "http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/${name}.tar.gz"; - sha256 = "1k0za8951j5fn89ww6bsy9b4yi989zz7bnd8a6acfr8r0yb8z01q"; + url = "http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/${version}/mpich2-${version}.tar.gz"; + sha256 = "1h91hygal4h33yci7sw76hibf803r9c0mx7kfgmc06h27xa3cirr"; }; - buildInputs = [ python ]; + buildInputs = [ python perl ]; + + patchPhase = + '' for i in $(find -type f -not -name Makefile.\*) + do + if grep -q /usr/bin/env "$i" + then + interpreter="$(cat $i | grep /usr/bin/env | sed -'es|^.*/usr/bin/env \([^ ]\+\).*$|\1|g')" + echo "file \`$i' -> interpreter \`$interpreter'" + path="$(type -P $interpreter)" + echo "\`/usr/bin/env $interpreter' -> \`$path' in \`$i'..." + sed -i "$i" -e "s|/usr/bin/env $interpreter|$path|g" + fi + done + true + ''; meta = { + description = "MPICH2, an implementation of the Message Passing Interface (MPI) standard"; + longDescription = '' MPICH2 is a free high-performance and portable implementation of the Message Passing Interface (MPI) standard, both version 1 and @@ -18,5 +36,8 @@ stdenv.mkDerivation rec { ''; homepage = http://www.mcs.anl.gov/mpi/mpich2/; license = "free, see http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=license"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = stdenv.lib.platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5895f0e395cd..6f77d1d27eda 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4355,7 +4355,7 @@ let }; mpich2 = import ../development/libraries/mpich2 { - inherit fetchurl stdenv python; + inherit fetchurl stdenv python perl; }; muparser = import ../development/libraries/muparser {