From 0b3e1f8f7c2abb34ec9d81b6394db7a530911743 Mon Sep 17 00:00:00 2001 From: "Bruno Bzeznik Bruno.Bzeznik@imag.fr" Date: Thu, 26 May 2016 15:27:04 +0200 Subject: [PATCH] netcdf: added parallel i/o support --- pkgs/development/libraries/netcdf/default.nix | 28 +++++++++++++------ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/netcdf/default.nix b/pkgs/development/libraries/netcdf/default.nix index 9659ae5273de..a65b41c02614 100644 --- a/pkgs/development/libraries/netcdf/default.nix +++ b/pkgs/development/libraries/netcdf/default.nix @@ -1,22 +1,32 @@ -{ stdenv, fetchurl, - zlib, hdf5, m4, - curl # for DAP +{ stdenv +, fetchurl +, zlib +, hdf5 +, m4 +, curl # for DAP }: - -stdenv.mkDerivation rec { + +let + mpiSupport = hdf5.mpiSupport; + mpi = hdf5.mpi; +in stdenv.mkDerivation rec { name = "netcdf-4.3.3.1"; src = fetchurl { url = "http://www.unidata.ucar.edu/downloads/netcdf/ftp/${name}.tar.gz"; sha256 = "06ds8zm4qvjlqvv4qb637cqr0xgvbhnghrddisad5vj81s5kvpmx"; }; - buildInputs = [ - zlib hdf5 m4 curl - ]; + buildInputs = [ hdf5 zlib m4 curl mpi]; + + passthru = { + mpiSupport = mpiSupport; + inherit mpi; + }; configureFlags = [ "--enable-netcdf-4" "--enable-dap" "--enable-shared" - ]; + ] + ++ (stdenv.lib.optionals mpiSupport [ "--enable-parallel-tests" ]); } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 978148c4e558..17a1c1d855dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2548,6 +2548,10 @@ in netatalk = callPackage ../tools/filesystems/netatalk { }; netcdf = callPackage ../development/libraries/netcdf { }; + + netcdf-mpi = appendToName "mpi" (netcdf.override { + hdf5 = hdf5-mpi; + }); netcdfcxx4 = callPackage ../development/libraries/netcdf-cxx4 { };