python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / imlib / default.nix
blobdc26eaf1001a9ca226c75b2e57944b2d47180029
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchpatch
5 , giflib
6 , libX11
7 , libXext
8 , libjpeg
9 , libpng
10 , libtiff
11 , xorgproto
14 stdenv.mkDerivation rec {
15   pname = "imlib";
16   version = "1.9.15";
18   src = fetchurl {
19     url = "https://ftp.acc.umu.se/pub/GNOME/sources/imlib/1.9/${pname}-${version}.tar.gz";
20     hash = "sha256-o4mQb38hgK7w4czb5lEoIH3VkuyAbIQWYP2S+7bv8j0=";
21   };
23   patches = [
24     (fetchpatch {
25       name = "CVE-2007-3568.patch";
26       url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch";
27       sha256 = "0lxfibi094gki39sq1w4p0hcx25xlk0875agbhjkjngzx862wvbg";
28     })
30     # The following two patches fix the build with recent giflib.
31     (fetchpatch {
32       url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/imlib/files/imlib-1.9.15-giflib51-1.patch?id=c6d0ed89ad5653421f21cbf3b3d40fd9a1361828";
33       sha256 = "0jynlhxcyjiwnz1m8j48xwz4z5csgyg03jfjc8xgpvvcyid4m65l";
34     })
35     (fetchpatch {
36       url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/imlib/files/imlib-1.9.15-giflib51-2.patch?id=c6d0ed89ad5653421f21cbf3b3d40fd9a1361828";
37       sha256 = "164x7rd992930rqllmr89p5ahfmbz37ipi8x0igd8gkvc8a4fd5x";
38     })
39   ];
41   configureFlags = [
42     "--disable-shm"
43     "--x-includes=${libX11.dev}/include"
44     "--x-libraries=${libX11.out}/lib"
45   ];
47   buildInputs = [
48     libjpeg
49     libXext
50     libX11
51     xorgproto
52     libtiff
53     giflib
54     libpng
55   ];
57   meta = with lib; {
58     description = "An image loading and rendering library for X11";
59     platforms = platforms.unix;
60     license = with licenses; [ gpl2Only lgpl2Only ];
61   };