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