python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / SDL_image / default.nix
blob30f71bd3e520eae49bd7807698fa4657b7b0a722
1 { lib, stdenv, fetchurl, fetchpatch, SDL, libpng, libjpeg, libtiff, giflib, libXpm, pkg-config }:
3 stdenv.mkDerivation rec {
4   pname = "SDL_image";
5   version = "1.2.12";
7   src = fetchurl {
8     url    = "https://www.libsdl.org/projects/SDL_image/release/${pname}-${version}.tar.gz";
9     sha256 = "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b";
10   };
12   patches = [
13     (fetchpatch {
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";
18     })
19   ];
21   configureFlags = [
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 ];
31   meta = with lib; {
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;
37   };