2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
|
|
|
, setuptools
|
|
|
|
, click
|
|
|
|
, requests
|
|
|
|
, packaging
|
|
|
|
, dparse
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "safety";
|
2021-03-12 07:09:13 +00:00
|
|
|
version = "1.10.3";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
format = "setuptools";
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-12 07:09:13 +00:00
|
|
|
sha256 = "sha256-MOOU0CogrEm39lKS0Z04+pJ6j5WCzf060a27xmxkGtU=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
click
|
|
|
|
requests
|
|
|
|
packaging
|
|
|
|
dparse
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
# Disable tests depending on online services
|
|
|
|
disabledTests = [
|
|
|
|
"test_check_live"
|
|
|
|
"test_check_live_cached"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Checks installed dependencies for known vulnerabilities";
|
2020-05-15 21:57:56 +00:00
|
|
|
homepage = "https://github.com/pyupio/safety";
|
|
|
|
license = licenses.mit;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ thomasdesr dotlambda ];
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
}
|