1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools-scm,
6 getmac,
7 requests,
8 semver,
9 pytestCheckHook,
10 responses,
11}:
12
13buildPythonPackage rec {
14 pname = "vilfo-api-client";
15 version = "0.5.0";
16 format = "setuptools";
17
18 src = fetchFromGitHub {
19 owner = "ManneW";
20 repo = "vilfo-api-client-python";
21 tag = version;
22 hash = "sha256-ZlmriBd+M+54ux/UNYa355mkz808/NxSz7IzmWouA0c=";
23 };
24
25 postPatch = ''
26 substituteInPlace setup.cfg \
27 --replace "get-mac" "getmac"
28 '';
29
30 nativeBuildInputs = [ setuptools-scm ];
31
32 propagatedBuildInputs = [
33 getmac
34 requests
35 semver
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 responses
41 ];
42
43 pythonImportsCheck = [ "vilfo" ];
44
45 meta = with lib; {
46 description = "Simple wrapper client for the Vilfo router API";
47 homepage = "https://github.com/ManneW/vilfo-api-client-python";
48 license = licenses.mit;
49 maintainers = with maintainers; [ dotlambda ];
50 };
51}