1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pkg-config,
6 libgphoto2,
7 pytestCheckHook,
8 setuptools,
9 toml,
10}:
11
12buildPythonPackage rec {
13 pname = "gphoto2";
14 version = "2.6.2";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "jim-easterbrook";
19 repo = "python-gphoto2";
20 tag = "v${version}";
21 hash = "sha256-Z480HR9AlwJQI1yi8+twzHV9PMcTKWqtvoNw6ohV+6M=";
22 };
23
24 build-system = [
25 setuptools
26 toml
27 ];
28
29 nativeBuildInputs = [
30 pkg-config
31 ];
32
33 buildInputs = [ libgphoto2 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "gphoto2" ];
40
41 meta = {
42 changelog = "https://github.com/jim-easterbrook/python-gphoto2/blob/${src.tag}/CHANGELOG.txt";
43 description = "Python interface to libgphoto2";
44 homepage = "https://github.com/jim-easterbrook/python-gphoto2";
45 license = lib.licenses.lgpl3Plus;
46 maintainers = [ ];
47 };
48}