1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00

Merge pull request #27152 from phile314-fh/szip-optional

PostGIS/GDAL/hdf4: Make unfree szip dependency optional.
This commit is contained in:
Michael Raskin 2017-07-05 18:08:32 +02:00 committed by GitHub
commit 958a757f1d
2 changed files with 8 additions and 5 deletions

View file

@ -2,8 +2,8 @@
, fetchurl
, cmake
, libjpeg
, szip
, zlib
, szip ? null
}:
stdenv.mkDerivation rec {
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
zlib
];
preConfigure = "export SZIP_INSTALL=${szip}";
preConfigure = stdenv.lib.optionalString (szip != null) "export SZIP_INSTALL=${szip}";
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
@ -31,11 +31,12 @@ stdenv.mkDerivation rec {
"-DHDF4_BUILD_WITH_INSTALL_NAME=OFF"
"-DHDF4_ENABLE_JPEG_LIB_SUPPORT=ON"
"-DHDF4_ENABLE_NETCDF=OFF"
"-DHDF4_ENABLE_SZIP_ENCODING=ON"
"-DHDF4_ENABLE_SZIP_SUPPORT=ON"
"-DHDF4_ENABLE_Z_LIB_SUPPORT=ON"
"-DHDF4_BUILD_FORTRAN=OFF"
"-DJPEG_DIR=${libjpeg}"
] ++ stdenv.lib.optionals (szip != null) [
"-DHDF4_ENABLE_SZIP_ENCODING=ON"
"-DHDF4_ENABLE_SZIP_SUPPORT=ON"
];
doCheck = true;

View file

@ -2362,7 +2362,9 @@ with pkgs;
hddtemp = callPackage ../tools/misc/hddtemp { };
hdf4 = callPackage ../tools/misc/hdf4 { };
hdf4 = callPackage ../tools/misc/hdf4 {
szip = null;
};
hdf5 = callPackage ../tools/misc/hdf5 {
gfortran = null;