3
0
Fork 0
forked from mirrors/nixpkgs

Merge #10477: hdf5: improve options

This commit is contained in:
Vladimír Čunát 2015-11-11 15:18:46 +01:00
commit e8ee8496e5
2 changed files with 30 additions and 15 deletions

View file

@ -1,17 +1,21 @@
{ stdenv
, fetchurl
, cpp ? false
, gfortran ? null
, zlib ? null
, szip ? null
, mpi ? null
, enableShared ? true
}:
with { inherit (stdenv.lib) optional; };
stdenv.mkDerivation rec {
version = "1.8.14";
version = "1.8.15-patch1";
name = "hdf5-${version}";
src = fetchurl {
url = "http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-${version}/src/hdf5-${version}.tar.gz";
sha256 = "0f86gv32pjrrphvamgims1dd7f3bp46hjarbcdy8k4gmyzpgxghx";
sha256 = "19k39da6zzxyr0fnffn4iqlls9v1fsih877rznq8ypqy8mzf5dci";
};
passthru = {
@ -20,20 +24,22 @@ stdenv.mkDerivation rec {
};
buildInputs = []
++ stdenv.lib.optional (zlib != null) zlib
++ stdenv.lib.optional (szip != null) szip;
++ optional (gfortran != null) gfortran
++ optional (zlib != null) zlib
++ optional (szip != null) szip;
propagatedBuildInputs = []
++ stdenv.lib.optional (mpi != null) mpi;
++ optional (mpi != null) mpi;
configureFlags = []
++ optional cpp "--enable-cxx"
++ optional (gfortran != null) "--enable-fortran"
++ optional (szip != null) "--with-szlib=${szip}"
++ optional (mpi != null) "--enable-parallel"
++ optional enableShared "--enable-shared";
configureFlags = "
${if szip != null then "--with-szlib=${szip}" else ""}
${if mpi != null then "--enable-parallel" else ""}
${if enableShared then "--enable-shared" else ""}
";
patches = [./bin-mv.patch];
meta = {
description = "Data model, library, and file format for storing and managing data";
longDescription = ''

View file

@ -1808,14 +1808,23 @@ let
hddtemp = callPackage ../tools/misc/hddtemp { };
hdf5 = callPackage ../tools/misc/hdf5 {
gfortran = null;
szip = null;
mpi = null;
};
hdf5-mpi = hdf5.override {
hdf5-mpi = appendToName "mpi" (hdf5.override {
szip = null;
mpi = pkgs.openmpi;
};
});
hdf5-cpp = appendToName "cpp" (hdf5.override {
cpp = true;
});
hdf5-fortran = appendToName "fortran" (hdf5.override {
inherit gfortran;
});
heimdall = callPackage ../tools/misc/heimdall { };