From 9ec1297d8a54786138065850687cfd4dc5cb020f Mon Sep 17 00:00:00 2001 From: Vincent Haupert Date: Thu, 21 May 2020 12:33:16 +0200 Subject: [PATCH] python3Package.sslyze: init at 3.0.7 --- .../python-modules/sslyze/default.nix | 52 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/sslyze/default.nix diff --git a/pkgs/development/python-modules/sslyze/default.nix b/pkgs/development/python-modules/sslyze/default.nix new file mode 100644 index 000000000000..78824515a45d --- /dev/null +++ b/pkgs/development/python-modules/sslyze/default.nix @@ -0,0 +1,52 @@ +{ lib +, fetchFromGitHub +, pytest +, buildPythonPackage +, nassl +, cryptography +, typing-extensions +, faker +}: + +buildPythonPackage rec { + pname = "sslyze"; + version = "3.0.7"; + + src = fetchFromGitHub { + owner = "nabla-c0d3"; + repo = pname; + rev = version; + sha256 = "1ahwldsh3xvagin09dy5q73bdw5k4siqy2qqgxwj4wdyd7pjb4p9"; + }; + + patchPhase = '' + substituteInPlace setup.py \ + --replace "cryptography>=2.6,<=2.9" "cryptography>=2.6,<=3" + ''; + + checkInputs = [ pytest ]; + + 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)" + ''; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0a0bb8018efe..40f296dc98fb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22253,6 +22253,8 @@ in git = gitMinimal; }; + sslyze = with python3Packages; toPythonApplication sslyze; + ssr = callPackage ../applications/audio/soundscape-renderer {}; ssrc = callPackage ../applications/audio/ssrc { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 161ad54f2751..be1fc772bac9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1555,6 +1555,8 @@ in { sslib = callPackage ../development/python-modules/sslib { }; + sslyze = callPackage ../development/python-modules/sslyze { }; + statistics = callPackage ../development/python-modules/statistics { }; stm32loader = callPackage ../development/python-modules/stm32loader { };