about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/defang/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/defang/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/defang/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/defang/default.nix b/nixpkgs/pkgs/development/python-modules/defang/default.nix
new file mode 100644
index 000000000000..d51573c0dc4f
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/defang/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, buildPythonPackage
+, fetchFromBitbucket
+, pytestCheckHook
+, pythonOlder
+, setuptools
+}:
+
+buildPythonPackage rec {
+  pname = "defang";
+  version = "0.5.3";
+  pyproject = true;
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromBitbucket {
+    owner = "johannestaas";
+    repo = "defang";
+    rev = "refs/tags/${version}";
+    hash = "sha256-OJfayJeVf2H1/jg7/fu2NiHhRHNCaLGI29SY8BnJyxI=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "defang"
+  ];
+
+  meta = with lib; {
+    description = "Module to defang and refang malicious URLs";
+    homepage = "https://bitbucket.org/johannestaas/defang";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ fab ];
+  };
+}