1 { lib, stdenv, fetchurl, fetchpatch
15 stdenv.mkDerivation rec {
20 url = "https://github.com/libgd/libgd/releases/download/${pname}-${version}/libgd-${version}.tar.xz";
21 sha256 = "0n5czhxzinvjvmhkf5l9fwjdx5ip69k5k7pj6zwb6zs1k9dibngc";
24 hardeningDisable = [ "format" ];
26 # Fixes an issue where some other packages would fail to build
27 # their documentation with an error like:
28 # "Error: Problem doing text layout"
30 # Can be removed if Wayland can still be built successfully with
33 url = "https://github.com/libgd/libgd/commit/3dd0e308cbd2c24fde2fc9e9b707181252a2de95.patch";
34 excludes = [ "tests/gdimagestringft/.gitignore" ];
35 sha256 = "12iqlanl9czig9d7c3rvizrigw2iacimnmimfcny392dv9iazhl1";
39 # -pthread gets passed to clang, causing warnings
40 configureFlags = lib.optional stdenv.isDarwin "--enable-werror=no";
42 nativeBuildInputs = [ autoconf automake pkg-config ];
44 buildInputs = [ zlib fontconfig freetype ];
45 propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ];
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;