1{
2 lib,
3 fetchPypi,
4 fetchpatch,
5 buildPythonPackage,
6 pkg-config,
7 libgphoto2,
8 setuptools,
9 toml,
10}:
11
12buildPythonPackage rec {
13 pname = "gphoto2";
14 version = "2.5.0";
15 pyproject = true;
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-l9B6PEIGf8rkUlYApOytW2s9OhgcxMHVlDgfQR5ZnoA=";
20 };
21
22 # only convert first 2 values from setuptools_version to ints to avoid
23 # parse errors if last value is a string.
24 patches = fetchpatch {
25 url = "https://github.com/jim-easterbrook/python-gphoto2/commit/d388971b63fea831eb986d2212d4828c6c553235.patch";
26 hash = "sha256-EXtXlhBx2jCKtMl7HmN87liqiHVAFSeXr11y830AlpY=";
27 };
28
29 nativeBuildInputs = [
30 pkg-config
31 setuptools
32 toml
33 ];
34
35 buildInputs = [ libgphoto2 ];
36
37 doCheck = false; # No tests available
38
39 pythonImportsCheck = [ "gphoto2" ];
40
41 meta = with lib; {
42 description = "Python interface to libgphoto2";
43 homepage = "https://github.com/jim-easterbrook/python-gphoto2";
44 license = licenses.gpl3;
45 maintainers = with maintainers; [ ];
46 };
47}