2021-02-12 22:15:48 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, SDL, libpng, libjpeg, libtiff, giflib, libXpm }:
|
2009-03-03 14:27:40 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "SDL_image";
|
2016-08-22 05:24:00 +02:00
|
|
|
version = "1.2.12";
|
2008-02-06 22:17:42 +01:00
|
|
|
|
2012-12-06 12:02:17 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://www.libsdl.org/projects/SDL_image/release/${pname}-${version}.tar.gz";
|
2012-12-06 12:02:17 +01:00
|
|
|
sha256 = "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b";
|
2008-02-06 22:17:42 +01:00
|
|
|
};
|
2007-08-09 19:33:18 +02:00
|
|
|
|
2017-10-24 13:25:16 +02:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2017-2887";
|
2021-06-18 02:18:15 +02:00
|
|
|
url = "https://github.com/libsdl-org/SDL_image/commit/e7723676825cd2b2ffef3316ec1879d7726618f2.patch";
|
|
|
|
includes = [ "IMG_xcf.c" ];
|
|
|
|
sha256 = "174ka2r95i29nlshzgp6x5vc68v7pi8lhzf33and2b1ms49g4jb7";
|
2017-10-24 13:25:16 +02:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-11-08 17:51:50 +01:00
|
|
|
configureFlags = [
|
|
|
|
# Disable its dynamic loading or dlopen will fail because of no proper rpath
|
|
|
|
"--disable-jpg-shared"
|
|
|
|
"--disable-png-shared"
|
|
|
|
"--disable-tif-shared"
|
2021-01-21 18:00:13 +01:00
|
|
|
] ++ lib.optional stdenv.isDarwin "--disable-sdltest";
|
2017-11-11 02:22:15 +01:00
|
|
|
|
2021-02-12 22:15:48 +01:00
|
|
|
buildInputs = [ SDL libpng libjpeg libtiff giflib libXpm ];
|
2007-08-09 19:33:18 +02:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2009-03-03 14:27:40 +01:00
|
|
|
description = "SDL image library";
|
2016-08-22 05:24:00 +02:00
|
|
|
homepage = "http://www.libsdl.org/projects/SDL_image/";
|
2013-09-06 03:47:49 +02:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
2015-03-05 21:56:41 +01:00
|
|
|
platforms = platforms.unix;
|
2018-08-19 10:13:06 +02:00
|
|
|
license = licenses.zlib;
|
2007-08-09 19:33:18 +02:00
|
|
|
};
|
2009-03-03 14:27:40 +01:00
|
|
|
}
|