1 { lib, stdenv, fetchurl
17 stdenv.mkDerivation rec {
22 url = "https://github.com/libgd/libgd/releases/download/${pname}-${version}/libgd-${version}.tar.xz";
23 sha256 = "0qas3q9xz3wgw06dm2fj0i189rain6n60z1vyq50d5h7wbn25s1z";
27 (fetchpatch { # included in > 2.3.3
28 name = "restore-GD_FLIP.patch";
29 url = "https://github.com/libgd/libgd/commit/f4bc1f5c26925548662946ed7cfa473c190a104a.diff";
30 sha256 = "XRXR3NOkbEub3Nybaco2duQk0n8vxif5mTl2AUacn9w=";
34 hardeningDisable = [ "format" ];
40 # -pthread gets passed to clang, causing warnings
41 ++ lib.optional stdenv.isDarwin "--enable-werror=no";
43 nativeBuildInputs = [ autoconf automake pkg-config ];
45 buildInputs = [ zlib fontconfig freetype libpng libjpeg libwebp libtiff libXpm libavif ];
47 outputs = [ "bin" "dev" "out" ];
49 postFixup = ''moveToOutput "bin/gdlib-config" $dev'';
51 enableParallelBuilding = true;
53 doCheck = false; # fails 2 tests
56 homepage = "https://libgd.github.io/";
57 description = "A dynamic image creation library";
58 license = licenses.free; # some custom license
59 platforms = platforms.unix;