Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / sslyze / default.nix
blob991f85c900ecc2206cde434219573466e1abc09a
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
4 , nassl
5 , cryptography
6 , typing-extensions
7 , faker
8 , pytestCheckHook
9 }:
11 buildPythonPackage rec {
12   pname = "sslyze";
13   version = "3.1.0";
15   src = fetchFromGitHub {
16     owner = "nabla-c0d3";
17     repo = pname;
18     rev = version;
19     sha256 = "02p0lgpkfq88dys0dqw0z8bpg9g8pds2lvs9awd9f2w5cb1pwr83";
20   };
22   patchPhase = ''
23     substituteInPlace setup.py \
24       --replace "cryptography>=2.6,<3.3" "cryptography>=2.6,<4.0"
25   '';
27   checkInputs = [ pytestCheckHook ];
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   pythonImportsCheck = [ "sslyze" ];
44   propagatedBuildInputs = [ nassl cryptography typing-extensions faker ];
46   meta = with lib; {
47     homepage = "https://github.com/nabla-c0d3/sslyze";
48     description = "Fast and powerful SSL/TLS scanning library";
49     platforms = platforms.linux ++ platforms.darwin;
50     license = licenses.agpl3;
51     maintainers = with maintainers; [ veehaitch ];
52   };