1{ lib, fetchPypi, buildPythonPackage, fetchpatch 2, libraw 3, pytest, mock }: 4 5buildPythonPackage rec { 6 pname = "rawkit"; 7 version = "0.6.0"; 8 9 src = fetchPypi { 10 inherit pname version; 11 sha256 = "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"; 12 }; 13 14 patches = [ 15 # Python 3.7 compatibility 16 (fetchpatch { 17 url = "https://github.com/photoshell/rawkit/commit/663e90afa835d398aedd782c87b8cd0bff64bc9f.patch"; 18 sha256 = "1cdw0x9bgk0b5jnpjnmd8jpbaryarr3cjqizq44366qh3l0jycxy"; 19 }) 20 ]; 21 22 buildInputs = [ libraw ]; 23 24 checkInputs = [ pytest mock ]; 25 26 checkPhase = '' 27 py.test tests 28 ''; 29 30 meta = with lib; { 31 description = "CTypes based LibRaw bindings for Python"; 32 homepage = "https://rawkit.readthedocs.org/"; 33 license = licenses.mit; 34 maintainers = with maintainers; [ jfrankenau ]; 35 }; 36}