mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
hdf5: refactor the expression
It's possible enableShared has little impact, as we pass --disable-static to all packages by default.
This commit is contained in:
parent
9c3c4d8b2d
commit
6a2a2f4ad5
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, cpp ? false
|
, cpp ? false
|
||||||
@ -8,6 +7,9 @@
|
|||||||
, mpi ? null
|
, mpi ? null
|
||||||
, enableShared ? true
|
, enableShared ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with { inherit (stdenv.lib) optional; };
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.8.15-patch1";
|
version = "1.8.15-patch1";
|
||||||
name = "hdf5-${version}";
|
name = "hdf5-${version}";
|
||||||
@ -22,20 +24,19 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = []
|
buildInputs = []
|
||||||
++ stdenv.lib.optional (gfortran != null) gfortran
|
++ optional (gfortran != null) gfortran
|
||||||
++ stdenv.lib.optional (zlib != null) zlib
|
++ optional (zlib != null) zlib
|
||||||
++ stdenv.lib.optional (szip != null) szip;
|
++ optional (szip != null) szip;
|
||||||
|
|
||||||
propagatedBuildInputs = []
|
propagatedBuildInputs = []
|
||||||
++ stdenv.lib.optional (mpi != null) mpi;
|
++ optional (mpi != null) mpi;
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags = []
|
||||||
${if cpp then "--enable-cxx" else ""}
|
++ optional cpp "--enable-cxx"
|
||||||
${if gfortran != null then "--enable-fortran" else ""}
|
++ optional (gfortran != null) "--enable-fortran"
|
||||||
${if szip != null then "--with-szlib=${szip}" else ""}
|
++ optional (szip != null) "--with-szlib=${szip}"
|
||||||
${if mpi != null then "--enable-parallel" else ""}
|
++ optional (mpi != null) "--enable-parallel"
|
||||||
${if enableShared then "--enable-shared" else ""}
|
++ optional enableShared "--enable-shared";
|
||||||
";
|
|
||||||
|
|
||||||
patches = [./bin-mv.patch];
|
patches = [./bin-mv.patch];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user