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