1 { lib, stdenv, fetchurl, fetchpatch, SDL, libpng, libjpeg, libtiff, giflib, libXpm, pkg-config }:
3 stdenv.mkDerivation rec {
8 url = "https://www.libsdl.org/projects/SDL_image/release/${pname}-${version}.tar.gz";
9 sha256 = "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b";
14 name = "CVE-2017-2887";
15 url = "https://github.com/libsdl-org/SDL_image/commit/e7723676825cd2b2ffef3316ec1879d7726618f2.patch";
16 includes = [ "IMG_xcf.c" ];
17 sha256 = "174ka2r95i29nlshzgp6x5vc68v7pi8lhzf33and2b1ms49g4jb7";
22 # Disable its dynamic loading or dlopen will fail because of no proper rpath
23 "--disable-jpg-shared"
24 "--disable-png-shared"
25 "--disable-tif-shared"
26 ] ++ lib.optional stdenv.isDarwin "--disable-sdltest";
28 nativeBuildInputs = [ pkg-config ];
29 buildInputs = [ SDL libpng libjpeg libtiff giflib libXpm ];
32 description = "SDL image library";
33 homepage = "http://www.libsdl.org/projects/SDL_image/";
34 maintainers = with maintainers; [ lovek323 ];
35 platforms = platforms.unix;
36 license = licenses.zlib;