2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv
|
2018-11-27 11:11:03 +01:00
|
|
|
, fetchurl
|
2012-05-15 23:13:46 +02:00
|
|
|
|
2021-07-09 12:27:28 +02:00
|
|
|
, autoreconfHook
|
2021-01-19 07:50:56 +01:00
|
|
|
, pkg-config
|
2012-08-27 04:53:19 +02:00
|
|
|
|
2021-03-06 20:32:55 +01:00
|
|
|
, libdeflate
|
2018-11-07 08:14:20 +01:00
|
|
|
, libjpeg
|
|
|
|
, xz
|
2021-03-06 20:32:55 +01:00
|
|
|
, zlib
|
2018-11-07 08:14:20 +01:00
|
|
|
}:
|
2012-08-27 04:53:19 +02:00
|
|
|
|
2021-07-20 10:49:29 +02:00
|
|
|
#FIXME: fix aarch64-darwin build and get rid of ./aarch64-darwin.nix
|
|
|
|
|
2018-11-07 08:14:20 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "libtiff";
|
2021-07-08 22:46:22 +02:00
|
|
|
version = "4.3.0";
|
2018-11-27 11:11:03 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.osgeo.org/libtiff/tiff-${version}.tar.gz";
|
2021-07-08 22:46:22 +02:00
|
|
|
sha256 = "1j3snghqjbhwmnm5vz3dr1zm68dj15mgbx1wqld7vkl7n2nfaihf";
|
2018-11-07 08:14:20 +01:00
|
|
|
};
|
2017-01-18 15:50:58 +01:00
|
|
|
|
2021-01-03 20:26:08 +01:00
|
|
|
# FreeImage needs this patch
|
|
|
|
patches = [ ./headers.patch ];
|
2014-08-27 01:14:09 +02:00
|
|
|
|
2021-01-03 20:26:08 +01: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
|
|
|
|
'';
|
|
|
|
|
2021-07-09 12:27:28 +02:00
|
|
|
# If you want to change to a different build system, please make
|
|
|
|
# sure cross-compilation works first!
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2013-12-23 18:06:09 +01:00
|
|
|
|
2021-03-06 20:32:55 +01:00
|
|
|
propagatedBuildInputs = [ libjpeg xz zlib ]; #TODO: opengl support (bogus configure detection)
|
|
|
|
|
|
|
|
buildInputs = [ libdeflate ]; # TODO: move all propagatedBuildInputs to buildInputs.
|
2009-10-29 15:19:58 +01:00
|
|
|
|
2012-05-15 23:13:46 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-07-09 12:27:28 +02:00
|
|
|
doCheck = true;
|
2013-12-23 18:06:09 +01:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2009-10-29 15:19:58 +01:00
|
|
|
description = "Library and utilities for working with the TIFF image file format";
|
2021-07-08 22:46:22 +02:00
|
|
|
homepage = "https://libtiff.gitlab.io/libtiff";
|
|
|
|
changelog = "https://libtiff.gitlab.io/libtiff/v${version}.html";
|
|
|
|
maintainers = with maintainers; [ qyliss ];
|
2014-07-30 18:04:57 +02:00
|
|
|
license = licenses.libtiff;
|
2014-08-12 19:07:05 +02:00
|
|
|
platforms = platforms.unix;
|
2009-10-29 15:19:58 +01:00
|
|
|
};
|
2003-11-06 16:24:19 +01:00
|
|
|
}
|