2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools-scm
|
|
|
|
, getmac
|
|
|
|
, requests
|
2021-12-06 16:07:01 +00:00
|
|
|
, semver
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, responses
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vilfo-api-client";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.4.1";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ManneW";
|
|
|
|
repo = "vilfo-api-client-python";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-j06Bbv0hWSmrlCv8RfgvfGTyOF+vSX+zZnX3AvG5Hys=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "get-mac" "getmac"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
getmac
|
|
|
|
requests
|
2021-12-06 16:07:01 +00:00
|
|
|
semver
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "vilfo" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple wrapper client for the Vilfo router API";
|
|
|
|
homepage = "https://github.com/ManneW/vilfo-api-client-python";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|