2016-05-09 13:56:41 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, zlib
|
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, libtiff ? null
|
|
|
|
, libXpm ? null
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
}:
|
2007-09-21 21:43:43 +01:00
|
|
|
|
2016-05-09 13:56:41 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gd-${version}";
|
|
|
|
version = "2.1.1";
|
2016-05-13 16:12:07 +01:00
|
|
|
|
2007-09-21 21:43:43 +01:00
|
|
|
src = fetchurl {
|
2016-05-09 13:56:41 +01:00
|
|
|
url = "https://github.com/libgd/libgd/releases/download/${name}/libgd-${version}.tar.xz";
|
|
|
|
sha256 = "11djy9flzxczphigqgp7fbbblbq35gqwwhn9xfcckawlapa1xnls";
|
2007-09-21 21:43:43 +01:00
|
|
|
};
|
|
|
|
|
2016-05-13 16:12:07 +01:00
|
|
|
patches = [
|
|
|
|
./CVE-2016-3074.patch
|
|
|
|
];
|
|
|
|
|
2016-05-09 13:56:41 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ zlib fontconfig freetype libjpeg libpng libtiff libXpm ];
|
2007-09-21 21:43:43 +01:00
|
|
|
|
2016-05-09 13:56:41 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://libgd.github.io/;
|
|
|
|
description = "A dynamic image creation library";
|
|
|
|
license = licenses.free; # some custom license
|
|
|
|
platforms = platforms.unix;
|
2007-09-21 21:43:43 +01:00
|
|
|
};
|
|
|
|
}
|