1{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, pillow }:
2
3buildPythonPackage rec {
4 pname = "piexif";
5 version = "1.1.3";
6
7 # patch does not apply to PyPI sdist due to different line endings
8 src = fetchFromGitHub {
9 owner = "hMatoba";
10 repo = "Piexif";
11 rev = version;
12 sha256 = "1akmaxq1cjr8wghwaaql1bd3sajl8psshl58lprgfsigrvnklp8b";
13 };
14
15 patches = [
16 # Fix tests with Pillow >= 7.2.0: https://github.com/hMatoba/Piexif/pull/109
17 (fetchpatch {
18 url = "https://github.com/hMatoba/Piexif/commit/5209b53e9689ce28dcd045f384633378d619718f.patch";
19 sha256 = "0ak571jf76r1vszp2g3cd5c16fz2zkbi43scayy933m5qdrhd8g1";
20 })
21 ];
22
23 # Pillow needed for unit tests
24 nativeCheckInputs = [ pillow ];
25
26 meta = with lib; {
27 description = "Simplify Exif manipulations with Python";
28 homepage = "https://github.com/hMatoba/Piexif";
29 license = licenses.mit;
30 maintainers = with maintainers; [ jluttine ];
31 };
32}