nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 autoreconfHook,
7 pkg-config,
8 libexif,
9 popt,
10 libintl,
11}:
12
13stdenv.mkDerivation (finalAttrs: {
14 pname = "exif";
15 version = "0.6.22";
16
17 src = fetchFromGitHub {
18 owner = "libexif";
19 repo = "exif";
20 rev = "exif-${builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version}-release";
21 sha256 = "1xlb1gdwxm3rmw7vlrynhvjp9dkwmvw23mxisdbdmma7ah2nda3i";
22 };
23
24 patches = [
25 (fetchpatch {
26 name = "CVE-2021-27815.part-1.patch";
27 url = "https://github.com/libexif/exif/commit/f6334d9d32437ef13dc902f0a88a2be0063d9d1c.patch";
28 sha256 = "0mfx7l8w3w1c2mn5h5d6s7gdfyd91wnml8v0f19v5sdn70hx5aa4";
29 })
30 (fetchpatch {
31 name = "CVE-2021-27815.part-2.patch";
32 url = "https://github.com/libexif/exif/commit/eb84b0e3c5f2a86013b6fcfb800d187896a648fa.patch";
33 sha256 = "11lyvy20maisiyhxgxvm85v5l5ba7p0bpd4m0g4ryli32mrwwy0l";
34 })
35 ];
36
37 nativeBuildInputs = [
38 autoreconfHook
39 pkg-config
40 ];
41 buildInputs = [
42 libexif
43 popt
44 libintl
45 ];
46
47 meta = {
48 homepage = "https://libexif.github.io";
49 description = "Utility to read and manipulate EXIF data in digital photographs";
50 platforms = lib.platforms.unix;
51 license = lib.licenses.lgpl21Plus;
52 mainProgram = "exif";
53 };
54})