1{ stdenv, buildPythonPackage, fetchPypi, pillow }:
2
3buildPythonPackage rec {
4 name = "${pname}-${version}";
5 pname = "piexif";
6 version = "1.0.12";
7
8 # pillow needed for unit tests
9 buildInputs = [ pillow ];
10
11 postPatch = ''
12 # incompatibility with pillow => 4.2.0
13 # has been resolved in https://github.com/hMatoba/Piexif/commit/c3a8272f5e6418f223b25f6486d8ddda201bbdf1
14 # remove this in the next version
15 sed -i -e 's/RGBA/RGB/' tests/s_test.py
16 '';
17
18 src = fetchPypi {
19 inherit pname version;
20 extension = "zip";
21 sha256 = "15dvdr7b5xxsbsq5k6kq8h0xnzrkqzc08dzlih48a21x27i02bii";
22 };
23
24 meta = with stdenv.lib; {
25 description = "Simplify Exif manipulations with Python";
26 homepage = https://github.com/hMatoba/Piexif;
27 license = licenses.mit;
28 maintainers = with maintainers; [ jluttine ];
29 };
30}