2018-02-03 13:11:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, python
|
2019-05-30 22:23:56 +01:00
|
|
|
|
|
|
|
# For tests/setup.py
|
2019-05-30 22:24:38 +01:00
|
|
|
, pytest
|
2019-05-30 22:23:56 +01:00
|
|
|
, pytestrunner
|
2019-05-30 22:24:38 +01:00
|
|
|
, requests-mock
|
2018-02-03 13:11:53 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "packet-python";
|
2020-08-16 18:31:08 +01:00
|
|
|
version = "1.43.0";
|
2018-02-03 13:11:53 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 18:31:08 +01:00
|
|
|
sha256 = "48fcc5ca6e7f3d84ef91016585d1894bb9deb3dae6591ffab90fdf05006c3e48";
|
2018-02-03 13:11:53 +00:00
|
|
|
};
|
2019-05-30 22:23:56 +01:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
2018-02-03 13:11:53 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2019-05-30 22:24:38 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytestrunner
|
|
|
|
requests-mock
|
|
|
|
];
|
2018-02-03 13:11:53 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-05-30 22:24:38 +01:00
|
|
|
${python.interpreter} setup.py test
|
2018-02-03 13:11:53 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
2019-05-30 22:23:56 +01:00
|
|
|
}
|