about summary refs log tree commit diff
path: root/pkgs/development/tools/appthreat-depscan
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-01-22 12:19:00 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2022-01-25 16:23:08 +0100
commit5ee1f6334e7ca24cd89c7e18a4f2abe4e7eb7e16 (patch)
tree813dd14707cfc156f6b40107610776f019a32e75 /pkgs/development/tools/appthreat-depscan
parent3583e6c24af000511a6883d9866423b91236686e (diff)
downloadnixlib-5ee1f6334e7ca24cd89c7e18a4f2abe4e7eb7e16.tar
nixlib-5ee1f6334e7ca24cd89c7e18a4f2abe4e7eb7e16.tar.gz
nixlib-5ee1f6334e7ca24cd89c7e18a4f2abe4e7eb7e16.tar.bz2
nixlib-5ee1f6334e7ca24cd89c7e18a4f2abe4e7eb7e16.tar.lz
nixlib-5ee1f6334e7ca24cd89c7e18a4f2abe4e7eb7e16.tar.xz
nixlib-5ee1f6334e7ca24cd89c7e18a4f2abe4e7eb7e16.tar.zst
nixlib-5ee1f6334e7ca24cd89c7e18a4f2abe4e7eb7e16.zip
appthreat-depscan: init at 2.1.0
Diffstat (limited to 'pkgs/development/tools/appthreat-depscan')
-rw-r--r--pkgs/development/tools/appthreat-depscan/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/tools/appthreat-depscan/default.nix b/pkgs/development/tools/appthreat-depscan/default.nix
new file mode 100644
index 000000000000..2177c20a972b
--- /dev/null
+++ b/pkgs/development/tools/appthreat-depscan/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, fetchFromGitHub
+, python3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "appthreat-depscan";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner = "AppThreat";
+    repo = "dep-scan";
+    rev = "v${version}";
+    hash = "sha256-HCOS8/jn7BOzDwSpenVGo6QpI/1ey6L1zBucTyqsSY4=";
+  };
+
+  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 ];
+  };
+}