Files
nixpkgs/pkgs/development/libraries/gd/default.nix
T
Robert Scott fc4cae6760 gd: 2.3.0 -> 2.3.3
remove now-included patch

this partially resolves CVE-2021-40812

(cherry picked from commit d6f49708212822b6a3c0fe598f3a20abf8676990)
2021-09-19 18:06:44 +00:00

49 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch
, autoconf
, automake
, pkg-config
, zlib
, libpng
, libjpeg ? null
, libwebp ? null
, libtiff ? null
, libXpm ? null
, fontconfig
, freetype
}:
stdenv.mkDerivation rec {
pname = "gd";
version = "2.3.3";
src = fetchurl {
url = "https://github.com/libgd/libgd/releases/download/${pname}-${version}/libgd-${version}.tar.xz";
sha256 = "0qas3q9xz3wgw06dm2fj0i189rain6n60z1vyq50d5h7wbn25s1z";
};
hardeningDisable = [ "format" ];
# -pthread gets passed to clang, causing warnings
configureFlags = lib.optional stdenv.isDarwin "--enable-werror=no";
nativeBuildInputs = [ autoconf automake pkg-config ];
buildInputs = [ zlib fontconfig freetype ];
propagatedBuildInputs = [ libpng libjpeg libwebp libtiff libXpm ];
outputs = [ "bin" "dev" "out" ];
postFixup = ''moveToOutput "bin/gdlib-config" $dev'';
enableParallelBuilding = true;
doCheck = false; # fails 2 tests
meta = with lib; {
homepage = "https://libgd.github.io/";
description = "A dynamic image creation library";
license = licenses.free; # some custom license
platforms = platforms.unix;
};
}