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