lol

hdf5: consistently use *Support arguments

authored by

Doron Behar and committed by
Shamrock Lee
72a43411 499eb1b5

+39 -28
+6 -5
pkgs/tools/misc/hdf5/1.10.nix
··· 1 - { lib, stdenv 1 + { lib 2 + , stdenv 2 3 , fetchurl 3 4 , removeReferencesTo 4 - , zlib ? null 5 + , zlibSupport ? true 6 + , zlib 5 7 , enableShared ? !stdenv.hostPlatform.isStatic 6 8 , javaSupport ? false 7 9 , jdk ··· 24 26 25 27 nativeBuildInputs = [ removeReferencesTo ]; 26 28 27 - propagatedBuildInputs = optional (zlib != null) zlib; 29 + propagatedBuildInputs = optional zlibSupport zlib; 28 30 29 - configureFlags = [] 30 - ++ optional enableShared "--enable-shared" 31 + configureFlags = optional enableShared "--enable-shared" 31 32 ++ optional javaSupport "--enable-java"; 32 33 33 34 patches = [
+29 -18
pkgs/tools/misc/hdf5/default.nix
··· 1 - { lib, stdenv 1 + { lib 2 + , stdenv 2 3 , fetchurl 3 4 , removeReferencesTo 4 - , cpp ? false 5 - , gfortran ? null 6 - , zlib ? null 7 - , szip ? null 5 + , cppSupport ? false 6 + , fortranSupport ? false 7 + , fortran 8 + , zlibSupport ? true 9 + , zlib 10 + , szipSupport ? false 11 + , szip 8 12 , mpiSupport ? false 9 13 , mpi 10 14 , enableShared ? !stdenv.hostPlatform.isStatic ··· 15 19 16 20 # cpp and mpi options are mutually exclusive 17 21 # (--enable-unsupported could be used to force the build) 18 - assert !cpp || !mpiSupport; 22 + assert !cppSupport || !mpiSupport; 19 23 20 24 let inherit (lib) optional optionals; in 21 25 ··· 28 32 }; 29 33 30 34 passthru = { 31 - inherit mpiSupport; 32 - inherit mpi; 35 + inherit 36 + cppSupport 37 + fortranSupport 38 + fortran 39 + zlibSupport 40 + zlib 41 + szipSupport 42 + szip 43 + mpiSupport 44 + mpi 45 + ; 33 46 }; 34 47 35 48 outputs = [ "out" "dev" ]; 36 49 37 50 nativeBuildInputs = [ removeReferencesTo ] 38 - ++ optional (gfortran != null) gfortran; 51 + ++ optional fortranSupport fortran; 39 52 40 - buildInputs = [] 41 - ++ optional (szip != null) szip 53 + buildInputs = optional fortranSupport fortran 54 + ++ optional szipSupport szip 42 55 ++ optional javaSupport jdk; 43 56 44 - propagatedBuildInputs = [] 45 - ++ optional (zlib != null) zlib 57 + propagatedBuildInputs = optional zlibSupport zlib 46 58 ++ optional mpiSupport mpi; 47 59 48 - configureFlags = [] 49 - ++ optional cpp "--enable-cxx" 50 - ++ optional (gfortran != null) "--enable-fortran" 51 - ++ optional (szip != null) "--with-szlib=${szip}" 52 - ++ optionals mpiSupport ["--enable-parallel" "CC=${mpi}/bin/mpicc"] 60 + configureFlags = optional cppSupport "--enable-cxx" 61 + ++ optional fortranSupport "--enable-fortran" 62 + ++ optional szipSupport "--with-szlib=${szip}" 63 + ++ optionals mpiSupport [ "--enable-parallel" "CC=${mpi}/bin/mpicc" ] 53 64 ++ optional enableShared "--enable-shared" 54 65 ++ optional javaSupport "--enable-java" 55 66 ++ optional usev110Api "--with-default-api-version=v110";
+4 -5
pkgs/top-level/all-packages.nix
··· 5972 5972 hdf4 = callPackage ../tools/misc/hdf4 { }; 5973 5973 5974 5974 hdf5 = callPackage ../tools/misc/hdf5 { 5975 - gfortran = null; 5976 - szip = null; 5975 + fortranSupport = false; 5976 + fortran = gfortran; 5977 5977 }; 5978 5978 5979 5979 hdf5_1_10 = callPackage ../tools/misc/hdf5/1.10.nix { }; 5980 5980 5981 5981 hdf5-mpi = appendToName "mpi" (hdf5.override { 5982 - szip = null; 5983 5982 mpiSupport = true; 5984 5983 }); 5985 5984 5986 5985 hdf5-cpp = appendToName "cpp" (hdf5.override { 5987 - cpp = true; 5986 + cppSupport = true; 5988 5987 }); 5989 5988 5990 5989 hdf5-fortran = appendToName "fortran" (hdf5.override { 5991 - inherit gfortran; 5990 + fortranSupport = true; 5992 5991 }); 5993 5992 5994 5993 hdf5-threadsafe = appendToName "threadsafe" (hdf5.overrideAttrs (oldAttrs: {