1{ stdenv, fetchurl, fetchpatch, gettext }:
2
3stdenv.mkDerivation rec {
4 name = "libexif-0.6.21";
5
6 src = fetchurl {
7 url = "mirror://sourceforge/libexif/${name}.tar.bz2";
8 sha256 = "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n";
9 };
10
11 patches = [
12 (fetchpatch {
13 name = "CVE-2017-7544.patch";
14 url = "https://github.com/libexif/libexif/commit/c39acd1692023b26290778a02a9232c873f9d71a.patch";
15 sha256 = "0xgx6ly2i4q05shb61mfx6njwf1yp347jkznm0ka4m85i41xm6sd";
16 })
17 (fetchpatch {
18 name = "CVE-2018-20030-1.patch";
19 url = "https://github.com/libexif/libexif/commit/5d28011c40ec86cf52cffad541093d37c263898a.patch";
20 sha256 = "1wv8s962wmbn2m2xypgirf12g6msrbplpsmd5bh86irfwhkcppj3";
21 })
22 (fetchpatch {
23 name = "CVE-2018-20030-2.patch";
24 url = "https://github.com/libexif/libexif/commit/6aa11df549114ebda520dde4cdaea2f9357b2c89.patch";
25 sha256 = "01aqvz63glwq6wg0wr7ykqqghb4abgq77ghvhizbzadg1k4h7drx";
26 excludes = [ "NEWS" ];
27 })
28 (fetchpatch {
29 name = "CVE-2019-9278.patch";
30 url = "https://github.com/libexif/libexif/commit/75aa73267fdb1e0ebfbc00369e7312bac43d0566.patch";
31 sha256 = "10ikg33mips5zq9as7l9xqnyzbg1wwr4sw17517nzf4hafjpasrj";
32 })
33 ];
34
35 buildInputs = [ gettext ];
36
37 meta = {
38 homepage = https://libexif.github.io/;
39 description = "A library to read and manipulate EXIF data in digital photographs";
40 license = stdenv.lib.licenses.lgpl21;
41 platforms = stdenv.lib.platforms.unix;
42 maintainers = [ stdenv.lib.maintainers.erictapen ];
43 };
44
45}