@@ -0,0 +1,52 @@
1+{ lib
2+, fetchFromGitHub
3+, pytest
4+, buildPythonPackage
5+, nassl
6+, cryptography
7+, typing-extensions
8+, faker
9+}:
10+
11+buildPythonPackage rec {
12+ pname = "sslyze";
13+ version = "3.0.7";
14+
15+ src = fetchFromGitHub {
16+ owner = "nabla-c0d3";
17+ repo = pname;
18+ rev = version;
19+ sha256 = "1ahwldsh3xvagin09dy5q73bdw5k4siqy2qqgxwj4wdyd7pjb4p9";
20+ };
21+
22+ patchPhase = ''
23+ substituteInPlace setup.py \
24+ --replace "cryptography>=2.6,<=2.9" "cryptography>=2.6,<=3"
25+ '';
26+
27+ checkInputs = [ pytest ];
28+
29+ checkPhase = ''
30+ # Most of the tests are online; hence, applicable tests are listed
31+ # explicitly here
32+ pytest \
33+ tests/test_main.py \
34+ tests/test_scanner.py \
35+ tests/cli_tests/test_console_output.py \
36+ tests/cli_tests/test_json_output.py \
37+ tests/cli_tests/test_server_string_parser.py \
38+ tests/plugins_tests/test_scan_commands.py \
39+ tests/plugins_tests/certificate_info/test_certificate_utils.py \
40+ -k "not (TestScanner and test_client_certificate_missing)"
41+ '';
42+
43+ propagatedBuildInputs = [ nassl cryptography typing-extensions faker ];
44+
45+ meta = with lib; {
46+ homepage = "https://github.com/nabla-c0d3/sslyze";
47+ description = "Fast and powerful SSL/TLS scanning library";
48+ platforms = platforms.linux ++ platforms.darwin;
49+ license = licenses.agpl3;
50+ maintainers = with maintainers; [ veehaitch ];
51+ };
52+}