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