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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

93 lines
2.0 KiB
Nix
Raw Normal View History

{ lib
, stdenv
2022-12-30 21:12:44 +00:00
, fetchFromGitLab
, nix-update-script
, autoreconfHook
, pkg-config
2022-12-30 21:12:44 +00:00
, sphinx
2021-03-06 19:32:55 +00:00
, libdeflate
, libjpeg
, xz
2021-03-06 19:32:55 +00:00
, zlib
# for passthru.tests
, libgeotiff
, python3Packages
, imagemagick
, graphicsmagick
, gdal
, openimageio
, freeimage
}:
stdenv.mkDerivation rec {
pname = "libtiff";
version = "4.6.0";
2018-11-27 10:11:03 +00:00
# if you update this, please consider adding patches and/or
# setting `knownVulnerabilities` in libtiff `4.5.nix`
2022-12-30 21:12:44 +00:00
src = fetchFromGitLab {
owner = "libtiff";
repo = "libtiff";
rev = "v${version}";
hash = "sha256-qCg5qjsPPynCHIg0JsPJldwVdcYkI68zYmyNAKUCoyw=";
};
2021-09-23 10:05:54 +00:00
patches = [
2021-10-22 17:35:04 +00:00
# FreeImage needs this patch
2021-09-23 10:05:54 +00:00
./headers.patch
2021-10-22 17:35:04 +00:00
# libc++abi 11 has an `#include <version>`, this picks up files name
# `version` in the project's include paths
2021-09-23 10:05:54 +00:00
./rename-version.patch
];
postPatch = ''
mv VERSION VERSION.txt
'';
2014-08-26 23:14:09 +00:00
outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ];
postFixup = ''
moveToOutput include/tif_config.h $dev_private
2022-12-30 21:12:44 +00:00
moveToOutput include/tif_dir.h $dev_private
moveToOutput include/tif_hash_set.h $dev_private
moveToOutput include/tiffiop.h $dev_private
'';
# If you want to change to a different build system, please make
# sure cross-compilation works first!
2022-12-30 21:12:44 +00:00
nativeBuildInputs = [ autoreconfHook pkg-config sphinx ];
# TODO: opengl support (bogus configure detection)
propagatedBuildInputs = [
libdeflate
libjpeg
xz
zlib
];
2021-03-06 19:32:55 +00:00
enableParallelBuilding = true;
doCheck = true;
2022-12-30 21:12:44 +00:00
passthru = {
tests = {
inherit libgeotiff imagemagick graphicsmagick gdal openimageio freeimage;
2022-12-30 21:12:44 +00:00
inherit (python3Packages) pillow imread;
};
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Library and utilities for working with the TIFF image file format";
homepage = "https://libtiff.gitlab.io/libtiff";
changelog = "https://libtiff.gitlab.io/libtiff/v${version}.html";
maintainers = with maintainers; [ qyliss ];
license = licenses.libtiff;
platforms = platforms.unix;
};
}