27 buildPythonPackage rec {
31 disabled = pythonOlder "3.7";
35 src = fetchFromGitHub {
38 rev = "refs/tags/${version}";
39 hash = "sha256-ekJ0o+KWS8Fih1M/scboGEjETX0/2Uh6h/zne4h+3wI=";
43 substituteInPlace safety/safety.py \
44 --replace-fail "telemetry: bool = True" "telemetry: bool = False"
45 substituteInPlace safety/util.py \
46 --replace-fail "telemetry: bool = True" "telemetry: bool = False"
47 substituteInPlace safety/cli.py \
48 --replace-fail "disable-optional-telemetry', default=False" \
49 "disable-optional-telemetry', default=True"
50 substituteInPlace safety/scan/finder/handlers.py \
51 --replace-fail "telemetry=True" "telemetry=False"
54 build-system = [ setuptools ];
85 # Disable tests depending on online services
87 "test_announcements_if_is_not_tty"
90 "test_get_packages_licenses_without_api_key"
91 "test_validate_with_basic_policy_file"
94 # ImportError: cannot import name 'get_command_for' from partially initialized module 'safety.cli_util' (most likely due to a circular import)
95 disabledTestPaths = [ "tests/alerts/test_utils.py" ];
98 export HOME=$(mktemp -d)
102 description = "Checks installed dependencies for known vulnerabilities";
103 mainProgram = "safety";
104 homepage = "https://github.com/pyupio/safety";
105 changelog = "https://github.com/pyupio/safety/blob/${version}/CHANGELOG.md";
106 license = licenses.mit;
107 maintainers = with maintainers; [