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-09 16:17:38 +01:00
|
|
|
version = "2.2.2";
|
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-09 16:17:38 +01:00
|
|
|
sha256 = "1311g5mva2xlzqv3rjqjc4jjkn5lzls4skvr395h633zw1n7b7s8";
|
2007-09-21 21:43:43 +01:00
|
|
|
};
|
|
|
|
|
2016-05-09 13:56:41 +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
|
|
|
};
|
|
|
|
}
|