2018-02-03 13:11:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, python
|
2018-02-03 13:30:17 +00:00
|
|
|
, fetchpatch
|
2018-02-03 13:11:53 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "packet-python";
|
2018-02-03 13:30:17 +00:00
|
|
|
version = "1.37.1";
|
2018-02-03 13:11:53 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-02-03 13:30:17 +00:00
|
|
|
sha256 = "316941d2473c0f42ac17ac89e9aa63a023bb96f35cf8eafe9e091ea424892778";
|
2018-02-03 13:11:53 +00:00
|
|
|
};
|
|
|
|
propagatedBuildInputs = [ requests ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest discover -s test
|
|
|
|
'';
|
|
|
|
|
2018-02-03 13:30:17 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/packethost/packet-python/commit/361ad0c60d0bfce2a992eefd17e917f9dcf36400.patch;
|
|
|
|
sha256 = "1cmzyq0302y4cqmim6arnvn8n620qysq458g2w5aq4zj1vz1q9g1";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-02-03 13:11:53 +00:00
|
|
|
# Not all test files are included in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|