nixpkgs/pkgs/development/libraries/libtiff/default.nix
Las 96d50327bc libtiff: export private headers for freeimage
They are exported under the dev_private output so
that they aren't available automatically to dependening libraries.

This also switches to cmake to simplify the patch.
2021-01-10 20:46:49 +00:00

48 lines
1.0 KiB
Nix

{ stdenv
, fetchurl
, pkgconfig
, cmake
, zlib
, libjpeg
, xz
}:
stdenv.mkDerivation rec {
version = "4.1.0";
pname = "libtiff";
src = fetchurl {
url = "https://download.osgeo.org/libtiff/tiff-${version}.tar.gz";
sha256 = "0d46bdvxdiv59lxnb0xz9ywm8arsr6xsapi5s6y6vnys2wjz6aax";
};
# FreeImage needs this patch
patches = [ ./headers.patch ];
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 pkgconfig ];
propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection)
enableParallelBuilding = true;
doInstallCheck = true;
installCheckTarget = "test";
meta = with stdenv.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;
};
}