1{
2 lib,
3 asn1crypto,
4 attrs,
5 beautifulsoup4,
6 buildPythonPackage,
7 fetchFromGitLab,
8 pathlib2,
9 pyfakefs,
10 python-dateutil,
11 pythonOlder,
12 setuptools,
13 six,
14 unittestCheckHook,
15 urllib3,
16}:
17
18buildPythonPackage rec {
19 pname = "cryptodatahub";
20 version = "0.12.4";
21 pyproject = true;
22
23 disabled = pythonOlder "3.7";
24
25 src = fetchFromGitLab {
26 owner = "coroner";
27 repo = "cryptodatahub";
28 rev = "refs/tags/v${version}";
29 hash = "sha256-+IGzXYSaeZjN5AxBu7jXgrnGtrtaSveFiVeNQRBZMNg=";
30 };
31
32 postPatch = ''
33 substituteInPlace requirements.txt \
34 --replace-fail "attrs>=20.3.0,<22.0.1" "attrs>=20.3.0"
35 '';
36
37 build-system = [ setuptools ];
38
39 dependencies = [
40 asn1crypto
41 attrs
42 pathlib2
43 python-dateutil
44 six
45 urllib3
46 ];
47
48 nativeCheckInputs = [
49 beautifulsoup4
50 pyfakefs
51 unittestCheckHook
52 ];
53
54 pythonImportsCheck = [ "cryptodatahub" ];
55
56 preCheck = ''
57 # failing tests
58 rm test/updaters/test_common.py
59 # Tests require network access
60 rm test/common/test_utils.py
61 '';
62
63 meta = with lib; {
64 description = "Repository of cryptography-related data";
65 homepage = "https://gitlab.com/coroner/cryptodatahub";
66 changelog = "https://gitlab.com/coroner/cryptodatahub/-/blob/${version}/CHANGELOG.rst";
67 license = licenses.mpl20;
68 maintainers = with maintainers; [ ];
69 };
70}