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