Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / reolink / default.nix
blob06143c2922f443691f8e71abb8bdd2e6ccec9cf0
1 { lib
2 , aiohttp
3 , aiounittest
4 , buildPythonPackage
5 , fetchFromGitHub
6 , ffmpeg-python
7 , pytestCheckHook
8 , pythonOlder
9 , requests
12 buildPythonPackage rec {
13   pname = "reolink";
14   version = "0053";
15   format = "setuptools";
17   disabled = pythonOlder "3.8";
19   src = fetchFromGitHub {
20     owner = "fwestenberg";
21     repo = pname;
22     rev = "refs/tags/v${version}";
23     hash = "sha256-DZcTfmzO9rBhhRN2RkgoPwUPE+LPPeZgc8kmhYU9V2I=";
24   };
26   propagatedBuildInputs = [
27     aiohttp
28     ffmpeg-python
29     requests
30   ];
32   nativeCheckInputs = [
33     aiounittest
34     pytestCheckHook
35   ];
37   postPatch = ''
38     # Packages in nixpkgs is different than the module name
39     substituteInPlace setup.py \
40       --replace "ffmpeg" "ffmpeg-python"
41   '';
43   # https://github.com/fwestenberg/reolink/issues/83
44   doCheck = false;
46   pytestFlagsArray = [
47     "test.py"
48   ];
50   disabledTests = [
51     # Tests require network access
52     "test1_settings"
53     "test2_states"
54     "test3_images"
55     "test4_properties"
56     "test_succes"
57   ];
59   pythonImportsCheck = [
60     "reolink"
61   ];
63   meta = with lib; {
64     description = "Module to interact with the Reolink IP camera API";
65     homepage = "https://github.com/fwestenberg/reolink";
66     changelog = "https://github.com/fwestenberg/reolink/releases/tag/v${version}";
67     license = with licenses; [ mit ];
68     maintainers = with maintainers; [ fab ];
69   };