27 buildPythonPackage rec {
31 disabled = pythonOlder "3.7";
35 src = fetchFromGitHub {
38 rev = "refs/tags/${version}";
39 hash = "sha256-H8YF9rax6dM6KCLGiRk7bIHhYVw0RNkH/B9VTZRHe9c=";
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 ];
86 # Disable tests depending on online services
88 "test_announcements_if_is_not_tty"
91 "test_get_packages_licenses_without_api_key"
92 "test_validate_with_basic_policy_file"
95 # ImportError: cannot import name 'get_command_for' from partially initialized module 'safety.cli_util' (most likely due to a circular import)
96 disabledTestPaths = [ "tests/alerts/test_utils.py" ];
99 export HOME=$(mktemp -d)
103 description = "Checks installed dependencies for known vulnerabilities";
104 mainProgram = "safety";
105 homepage = "https://github.com/pyupio/safety";
106 changelog = "https://github.com/pyupio/safety/blob/${version}/CHANGELOG.md";
107 license = licenses.mit;
108 maintainers = with maintainers; [