2021-04-17 00:35:05 +00:00
|
|
|
{ lib
|
|
|
|
, beautifultable
|
|
|
|
, buildPythonPackage
|
|
|
|
, click
|
|
|
|
, click-default-group
|
|
|
|
, fetchFromGitHub
|
|
|
|
, humanize
|
|
|
|
, keyring
|
|
|
|
, python
|
|
|
|
, python-dateutil
|
2022-03-05 16:20:37 +00:00
|
|
|
, pythonOlder
|
2021-04-17 00:35:05 +00:00
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mwdblib";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "4.1.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CERT-Polska";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-afqE6zL1uwsLNAuy5XY7OduP1e3W2ueteOOVaFJg3b0=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
beautifultable
|
|
|
|
click
|
|
|
|
click-default-group
|
|
|
|
humanize
|
|
|
|
keyring
|
|
|
|
python-dateutil
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m unittest discover
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"mwdblib"
|
|
|
|
];
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client library for the mwdb service";
|
|
|
|
homepage = "https://github.com/CERT-Polska/mwdblib";
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|