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