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

43 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, zlib, libjpeg, xz }:
let
2018-01-28 21:31:32 +03:00
version = "4.0.9";
in
stdenv.mkDerivation rec {
name = "libtiff-${version}";
src = fetchurl {
url = "https://download.osgeo.org/libtiff/tiff-${version}.tar.gz";
2018-01-28 21:31:32 +03:00
sha256 = "1kfg4q01r4mqn7dj63ifhi6pmqzbf4xax6ni6kkk81ri5kndwyvf";
};
2018-01-28 21:31:32 +03:00
prePatch = let
debian = fetchurl {
# When the URL disappears, it typically means that Debian has new patches
# (probably security) and updating to new tarball will apply them as well.
url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.9-6.debian.tar.xz;
sha256 = "10yk5npchxscgsnd7ihd3bbbw2fxkl7ni0plm43c9q4nwp6ms52f";
};
in ''
tar xf ${debian}
patches="$patches $(sed 's|^|debian/patches/|' < debian/patches/series)"
'';
outputs = [ "bin" "dev" "out" "man" "doc" ];
2014-08-27 03:14:09 +04:00
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection)
enableParallelBuilding = true;
doCheck = true; # not cross;
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;
};
}