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