nixpkgs/pkgs/development/libraries/libtiff/default.nix

55 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv
2018-11-27 10:11:03 +00:00
, fetchurl
, pkg-config
, cmake
2021-03-06 19:32:55 +00:00
, libdeflate
, libjpeg
, xz
2021-03-06 19:32:55 +00:00
, zlib
}:
stdenv.mkDerivation rec {
pname = "libtiff";
2021-03-06 19:32:55 +00:00
version = "4.2.0";
2018-11-27 10:11:03 +00:00
src = fetchurl {
url = "https://download.osgeo.org/libtiff/tiff-${version}.tar.gz";
2021-03-06 19:32:55 +00:00
sha256 = "1jrkjv0xya9radddn8idxvs2gqzp3l2b1s8knlizmn7ad3jq817b";
};
cmakeFlags = if stdenv.isDarwin then [
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
] else null;
# FreeImage needs this patch
patches = [ ./headers.patch ];
2014-08-26 23:14:09 +00:00
outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
postFixup = ''
moveToOutput include/tif_dir.h $dev_private
moveToOutput include/tif_config.h $dev_private
moveToOutput include/tiffiop.h $dev_private
'';
nativeBuildInputs = [ cmake pkg-config ];
2021-03-06 19:32:55 +00:00
propagatedBuildInputs = [ libjpeg xz zlib ]; #TODO: opengl support (bogus configure detection)
buildInputs = [ libdeflate ]; # TODO: move all propagatedBuildInputs to buildInputs.
enableParallelBuilding = true;
doInstallCheck = true;
installCheckTarget = "test";
meta = with lib; {
description = "Library and utilities for working with the TIFF image file format";
homepage = "http://download.osgeo.org/libtiff";
license = licenses.libtiff;
platforms = platforms.unix;
};
}