about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ssdeep/default.nix
blob: 44a7f37190dc77dbe2cfa3117c26896337502a18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, buildPythonPackage
, cffi
, fetchFromGitHub
, pytestCheckHook
, six
, ssdeep
, pythonOlder
}:

buildPythonPackage rec {
  pname = "ssdeep";
  version = "3.4.1";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "DinoTools";
    repo = "python-ssdeep";
    rev = "refs/tags/${version}";
    hash = "sha256-I5ci5BS+B3OE0xdLSahu3HCh99jjhnRHJFz830SvFpg=";
  };

  buildInputs = [
    ssdeep
  ];

  propagatedBuildInputs = [
    cffi
    six
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace '"pytest-runner"' ""
  '';

  pythonImportsCheck = [
    "ssdeep"
  ];

  meta = with lib; {
    description = "Python wrapper for the ssdeep library";
    homepage = "https://github.com/DinoTools/python-ssdeep";
    changelog = "https://github.com/DinoTools/python-ssdeep/blob/${version}/CHANGELOG.rst";
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ fab ];
  };
}