2016-05-09 15:56:41 +03:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, zlib
|
|
|
|
, libpng
|
2016-06-02 20:06:34 +03:00
|
|
|
, libjpeg ? null
|
|
|
|
, libwebp ? null
|
2016-05-09 15:56:41 +03:00
|
|
|
, libtiff ? null
|
|
|
|
, libXpm ? null
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
}:
|
2007-09-22 00:43:43 +04:00
|
|
|
|
2016-05-09 15:56:41 +03:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gd-${version}";
|
2017-01-26 02:33:28 +03:00
|
|
|
version = "2.2.4";
|
2015-12-23 04:59:47 +03:00
|
|
|
|
2007-09-22 00:43:43 +04:00
|
|
|
src = fetchurl {
|
2016-05-09 15:56:41 +03:00
|
|
|
url = "https://github.com/libgd/libgd/releases/download/${name}/libgd-${version}.tar.xz";
|
2017-01-26 02:33:28 +03:00
|
|
|
sha256 = "1rp4v7n1dq38b92kl7gkvpvqqkw7nvdfnz6d5kip5klkxfki6zqk";
|
2007-09-22 00:43:43 +04:00
|
|
|
};
|
2015-12-23 04:59:47 +03:00
|
|
|
|
2016-02-26 20:38:15 +03:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 04:59:47 +03:00
|
|
|
|
2016-07-18 22:00:23 +03:00
|
|
|
# -pthread gets passed to clang, causing warnings
|
|
|
|
configureFlags = stdenv.lib.optional stdenv.isDarwin "--enable-werror=no";
|
|
|
|
|
2016-07-23 15:18:24 +03:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-07-21 03:56:43 +03:00
|
|
|
|
2016-06-02 20:06:34 +03:00
|
|
|
buildInputs = [ zlib fontconfig freetype ];
|
|
|
|
propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ];
|
2007-09-22 00:43:43 +04:00
|
|
|
|
2016-08-29 03:30:01 +03:00
|
|
|
outputs = [ "bin" "dev" "out" ];
|
2016-05-22 15:03:16 +03:00
|
|
|
|
|
|
|
postFixup = ''moveToOutput "bin/gdlib-config" $dev'';
|
2007-09-22 00:43:43 +04:00
|
|
|
|
2016-06-02 20:50:28 +03:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-05-09 15:56:41 +03: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-22 00:43:43 +04:00
|
|
|
};
|
|
|
|
}
|