1{
2 lib,
3 beautifultable,
4 buildPythonPackage,
5 click,
6 click-default-group,
7 fetchFromGitHub,
8 humanize,
9 keyring,
10 unittestCheckHook,
11 python-dateutil,
12 pythonOlder,
13 requests,
14}:
15
16buildPythonPackage rec {
17 pname = "mwdblib";
18 version = "4.5.0";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "CERT-Polska";
25 repo = pname;
26 rev = "refs/tags/v${version}";
27 hash = "sha256-+hh7SJFITpLumIuzNgBbXtFh+26tUG66UFv6DLDk5ag=";
28 };
29
30 propagatedBuildInputs = [
31 beautifultable
32 click
33 click-default-group
34 humanize
35 keyring
36 python-dateutil
37 requests
38 ];
39
40 nativeCheckInputs = [ unittestCheckHook ];
41
42 pythonImportsCheck = [ "mwdblib" ];
43
44 meta = with lib; {
45 description = "Python client library for the mwdb service";
46 mainProgram = "mwdb";
47 homepage = "https://github.com/CERT-Polska/mwdblib";
48 changelog = "https://github.com/CERT-Polska/mwdblib/releases/tag/v${version}";
49 license = with licenses; [ bsd3 ];
50 maintainers = with maintainers; [ fab ];
51 };
52}