2016-05-09 13:56:41 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, zlib
|
|
|
|
, libpng
|
2016-06-02 18:06:34 +01:00
|
|
|
, libjpeg ? null
|
|
|
|
, libwebp ? null
|
2016-05-09 13:56:41 +01:00
|
|
|
, 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}";
|
2016-07-22 19:23:27 +01:00
|
|
|
version = "2.2.3";
|
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";
|
2016-07-22 19:23:27 +01:00
|
|
|
sha256 = "0g3xz8jpz1pl2zzmssglrpa9nxiaa7rmcmvgpbrjz8k9cyynqsvl";
|
2007-09-21 21:43:43 +01:00
|
|
|
};
|
|
|
|
|
2016-07-18 20:00:23 +01:00
|
|
|
# -pthread gets passed to clang, causing warnings
|
|
|
|
configureFlags = stdenv.lib.optional stdenv.isDarwin "--enable-werror=no";
|
|
|
|
|
2016-07-23 13:18:24 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-06-02 18:06:34 +01:00
|
|
|
buildInputs = [ zlib fontconfig freetype ];
|
|
|
|
propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ];
|
2007-09-21 21:43:43 +01:00
|
|
|
|
2016-05-22 13:03:16 +01:00
|
|
|
outputs = [ "dev" "out" "bin" ];
|
|
|
|
|
|
|
|
postFixup = ''moveToOutput "bin/gdlib-config" $dev'';
|
|
|
|
|
2016-06-02 18:50:28 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|