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