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-06-06 07:47:20 +01:00
|
|
|
version = "1.42.0";
|
2018-02-03 13:11:53 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-06 07:47:20 +01:00
|
|
|
sha256 = "c3342085b2b96591b9d214d10fe39d85e1a2487c5b0883a90ff0bf6123086f07";
|
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
|
|
|
}
|