2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, python
|
|
|
|
|
|
|
|
# For tests/setup.py
|
|
|
|
, pytest
|
|
|
|
, pytestrunner
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "packet-python";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.44.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "4af12f2fbcc9713878ab4ed571e9fda028bc68add34cde0e7226af4d833a4d38";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
|
|
|
propagatedBuildInputs = [ requests ];
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytestrunner
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} setup.py test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A Python client for the Packet API.";
|
|
|
|
homepage = "https://github.com/packethost/packet-python";
|
|
|
|
license = lib.licenses.lgpl3;
|
|
|
|
maintainers = with lib.maintainers; [ dipinhora ];
|
|
|
|
};
|
|
|
|
}
|