diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-11-11 15:14:28 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-11-11 15:17:40 +0100 |
commit | 6a2a2f4ad5c5e09e736931b4e831ac14725e923b (patch) | |
tree | e71a5e23bf1881958e02d35456957cf0e0b8a133 /pkgs/tools/misc/hdf5 | |
parent | 9c3c4d8b2dc5ba3aa998ba5b03d00b83324cd1ed (diff) |
hdf5: refactor the expression
It's possible enableShared has little impact, as we pass --disable-static to all packages by default.
Diffstat (limited to 'pkgs/tools/misc/hdf5')
-rw-r--r-- | pkgs/tools/misc/hdf5/default.nix | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index f8e316d937765..0655fddeb87a6 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -1,4 +1,3 @@ - { stdenv , fetchurl , cpp ? false @@ -8,6 +7,9 @@ , mpi ? null , enableShared ? true }: + +with { inherit (stdenv.lib) optional; }; + stdenv.mkDerivation rec { version = "1.8.15-patch1"; name = "hdf5-${version}"; @@ -22,23 +24,22 @@ stdenv.mkDerivation rec { }; buildInputs = [] - ++ stdenv.lib.optional (gfortran != null) gfortran - ++ 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; - - configureFlags = " - ${if cpp then "--enable-cxx" else ""} - ${if gfortran != null then "--enable-fortran" else ""} - ${if szip != null then "--with-szlib=${szip}" else ""} - ${if mpi != null then "--enable-parallel" else ""} - ${if enableShared then "--enable-shared" else ""} - "; - + ++ 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"; + patches = [./bin-mv.patch]; - + meta = { description = "Data model, library, and file format for storing and managing data"; longDescription = '' |