aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/pymfy/default.nix
blob: 32483eea7b9a116dd8a1958d2efd7b6c11a128d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, buildPythonPackage
, fetchFromGitHub
, httpretty
, poetry-core
, pytestCheckHook
, pythonOlder
, requests
, requests_oauthlib
}:

buildPythonPackage rec {
  pname = "pymfy";
  version = "0.9.4";
  format = "pyproject";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "tetienne";
    repo = "somfy-open-api";
    rev = "v${version}";
    sha256 = "1ml536dvva2xd52jfgrd557h2sr5w6567sxnyq0blhkgpyz4m2av";
  };

  nativeBuildInputs = [ poetry-core ];

  propagatedBuildInputs = [
    requests
    requests_oauthlib
  ];

  checkInputs = [
    httpretty
    pytestCheckHook
  ];

  pythonImportsCheck = [ "pymfy" ];

  meta = with lib; {
    description = "Python client for the Somfy Open API";
    homepage = "https://github.com/tetienne/somfy-open-api";
    license = with licenses; [ gpl3Only ];
    maintainers = with maintainers; [ fab ];
  };
}