nixpkgs/pkgs/development/tools/appthreat-depscan/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1 KiB
Nix
Raw Normal View History

2022-01-22 12:19:00 +01:00
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "appthreat-depscan";
2022-04-13 02:38:16 +02:00
version = "2.1.3";
2022-01-22 12:19:00 +01:00
src = fetchFromGitHub {
owner = "AppThreat";
repo = "dep-scan";
2022-04-13 02:38:16 +02:00
rev = "refs/tags/v${version}";
hash = "sha256-6ifpPNBcqaNGVQjZQ3G48QuwTRRn4zL3awa06yOeveU=";
2022-01-22 12:19:00 +01:00
};
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 ];
};
}