1{
2 lib,
3 buildPythonPackage,
4 fetchFromBitbucket,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "defang";
12 version = "0.5.3";
13 pyproject = true;
14
15 disabled = pythonOlder "3.8";
16
17 src = fetchFromBitbucket {
18 owner = "johannestaas";
19 repo = "defang";
20 rev = "refs/tags/${version}";
21 hash = "sha256-OJfayJeVf2H1/jg7/fu2NiHhRHNCaLGI29SY8BnJyxI=";
22 };
23
24 nativeBuildInputs = [ setuptools ];
25
26 nativeCheckInputs = [ pytestCheckHook ];
27
28 pythonImportsCheck = [ "defang" ];
29
30 meta = with lib; {
31 description = "Module to defang and refang malicious URLs";
32 homepage = "https://bitbucket.org/johannestaas/defang";
33 license = licenses.gpl2Only;
34 maintainers = with maintainers; [ fab ];
35 };
36}