2016-05-09 14:56:41 +02:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, pkgconfig
|
|
|
|
, zlib
|
|
|
|
, libpng
|
2016-06-02 19:06:34 +02:00
|
|
|
, libjpeg ? null
|
|
|
|
, libwebp ? null
|
2016-05-09 14:56:41 +02:00
|
|
|
, libtiff ? null
|
|
|
|
, libXpm ? null
|
|
|
|
, fontconfig
|
|
|
|
, freetype
|
|
|
|
}:
|
2007-09-21 22:43:43 +02:00
|
|
|
|
2016-05-09 14:56:41 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gd-${version}";
|
2016-05-30 09:46:20 +02:00
|
|
|
version = "2.2.1";
|
2016-05-13 17:12:07 +02:00
|
|
|
|
2007-09-21 22:43:43 +02:00
|
|
|
src = fetchurl {
|
2016-05-09 14:56:41 +02:00
|
|
|
url = "https://github.com/libgd/libgd/releases/download/${name}/libgd-${version}.tar.xz";
|
2016-05-30 09:46:20 +02:00
|
|
|
sha256 = "0xmrqka1ggqgml84xbmkw1y0r0lg7qn657v5b1my8pry92p651vh";
|
2007-09-21 22:43:43 +02:00
|
|
|
};
|
|
|
|
|
2016-05-09 14:56:41 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-06-02 19:06:34 +02:00
|
|
|
buildInputs = [ zlib fontconfig freetype ];
|
|
|
|
propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ];
|
2007-09-21 22:43:43 +02:00
|
|
|
|
2016-05-22 14:03:16 +02:00
|
|
|
outputs = [ "dev" "out" "bin" ];
|
|
|
|
|
|
|
|
postFixup = ''moveToOutput "bin/gdlib-config" $dev'';
|
|
|
|
|
2016-06-02 19:50:28 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-05-09 14:56:41 +02: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 22:43:43 +02:00
|
|
|
};
|
|
|
|
}
|