depot/third_party/nixpkgs/pkgs/development/tools/appthreat-depscan/default.nix
Default email b41113241d Project import generated by Copybara.
GitOrigin-RevId: ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90
2022-09-22 14:36:57 +02:00

52 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "appthreat-depscan";
version = "2.1.9";
src = fetchFromGitHub {
owner = "AppThreat";
repo = "dep-scan";
rev = "refs/tags/v${version}";
hash = "sha256-3K8dIKeb9bqopu8B8f1fHLIzXHTfmn4ZtDztRBSm10k=";
};
propagatedBuildInputs = with python3.pkgs; [
appthreat-vulnerability-db
defusedxml
pyyaml
rich
];
checkInputs = with python3.pkgs; [
pytestCheckHook
];
postPatch = ''
substituteInPlace pytest.ini \
--replace " --cov-append --cov-report term --cov depscan" ""
'';
preCheck = ''
export HOME=$(mktemp -d);
'';
disabledTests = [
# Assertion Error
"test_query_metadata2"
];
pythonImportsCheck = [
"depscan"
];
meta = with lib; {
description = "Tool to audit dependencies based on known vulnerabilities and advisories";
homepage = "https://github.com/AppThreat/dep-scan";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}