13 stdenv.mkDerivation rec {
18 url = "https://download.osgeo.org/libtiff/tiff-${version}.tar.gz";
19 sha256 = "1jrkjv0xya9radddn8idxvs2gqzp3l2b1s8knlizmn7ad3jq817b";
22 cmakeFlags = if stdenv.isDarwin then [
23 "-DCMAKE_SKIP_BUILD_RPATH=OFF"
26 # FreeImage needs this patch
27 patches = [ ./headers.patch ];
29 outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
32 moveToOutput include/tif_dir.h $dev_private
33 moveToOutput include/tif_config.h $dev_private
34 moveToOutput include/tiffiop.h $dev_private
37 nativeBuildInputs = [ cmake pkg-config ];
39 propagatedBuildInputs = [ libjpeg xz zlib ]; #TODO: opengl support (bogus configure detection)
41 buildInputs = [ libdeflate ]; # TODO: move all propagatedBuildInputs to buildInputs.
43 enableParallelBuilding = true;
45 doInstallCheck = true;
46 installCheckTarget = "test";
49 description = "Library and utilities for working with the TIFF image file format";
50 homepage = "http://download.osgeo.org/libtiff";
51 license = licenses.libtiff;
52 platforms = platforms.unix;