1{
2 lib,
3 buildPythonPackage,
4 cffi,
5 fetchFromGitHub,
6 pytestCheckHook,
7 six,
8 ssdeep,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "ssdeep";
14 version = "3.4.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "DinoTools";
21 repo = "python-ssdeep";
22 tag = version;
23 hash = "sha256-I5ci5BS+B3OE0xdLSahu3HCh99jjhnRHJFz830SvFpg=";
24 };
25
26 buildInputs = [ ssdeep ];
27
28 propagatedBuildInputs = [
29 cffi
30 six
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 postPatch = ''
36 substituteInPlace setup.py \
37 --replace '"pytest-runner"' ""
38 '';
39
40 pythonImportsCheck = [ "ssdeep" ];
41
42 meta = with lib; {
43 description = "Python wrapper for the ssdeep library";
44 homepage = "https://github.com/DinoTools/python-ssdeep";
45 changelog = "https://github.com/DinoTools/python-ssdeep/blob/${version}/CHANGELOG.rst";
46 license = licenses.lgpl3Plus;
47 maintainers = with maintainers; [ fab ];
48 };
49}