3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/sslyze/default.nix

54 lines
1.4 KiB
Nix
Raw Normal View History

2020-05-21 11:33:16 +01:00
{ lib
, fetchFromGitHub
, buildPythonPackage
, nassl
, cryptography
, typing-extensions
, faker
2020-12-04 19:28:18 +00:00
, pytestCheckHook
2020-05-21 11:33:16 +01:00
}:
buildPythonPackage rec {
pname = "sslyze";
2020-12-04 19:28:18 +00:00
version = "3.1.0";
2020-05-21 11:33:16 +01:00
src = fetchFromGitHub {
owner = "nabla-c0d3";
repo = pname;
rev = version;
2020-12-04 19:28:18 +00:00
sha256 = "02p0lgpkfq88dys0dqw0z8bpg9g8pds2lvs9awd9f2w5cb1pwr83";
2020-05-21 11:33:16 +01:00
};
patchPhase = ''
substituteInPlace setup.py \
2020-12-04 19:28:18 +00:00
--replace "cryptography>=2.6,<3.3" "cryptography>=2.6,<4.0"
2020-05-21 11:33:16 +01:00
'';
2020-12-04 19:28:18 +00:00
checkInputs = [ pytestCheckHook ];
2020-05-21 11:33:16 +01:00
checkPhase = ''
# Most of the tests are online; hence, applicable tests are listed
# explicitly here
pytest \
tests/test_main.py \
tests/test_scanner.py \
tests/cli_tests/test_console_output.py \
tests/cli_tests/test_json_output.py \
tests/cli_tests/test_server_string_parser.py \
tests/plugins_tests/test_scan_commands.py \
tests/plugins_tests/certificate_info/test_certificate_utils.py \
-k "not (TestScanner and test_client_certificate_missing)"
'';
pythonImportsCheck = [ "sslyze" ];
2020-05-21 11:33:16 +01:00
propagatedBuildInputs = [ nassl cryptography typing-extensions faker ];
meta = with lib; {
homepage = "https://github.com/nabla-c0d3/sslyze";
description = "Fast and powerful SSL/TLS scanning library";
platforms = platforms.linux ++ platforms.darwin;
license = licenses.agpl3;
maintainers = with maintainers; [ veehaitch ];
};
}