summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/ssdeep/default.nix
blob: 8c56f06ceeed4b7dfe470d049a756e205fb1dbc6 (plain)
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
{
  lib,
  buildPythonPackage,
  cffi,
  fetchFromGitHub,
  pytestCheckHook,
  six,
  ssdeep,
}:

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

  src = fetchFromGitHub {
    owner = "DinoTools";
    repo = "python-ssdeep";
    tag = version;
    hash = "sha256-I5ci5BS+B3OE0xdLSahu3HCh99jjhnRHJFz830SvFpg=";
  };

  buildInputs = [ ssdeep ];

  propagatedBuildInputs = [
    cffi
    six
  ];

  nativeCheckInputs = [ pytestCheckHook ];

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

  pythonImportsCheck = [ "ssdeep" ];

  meta = {
    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 = lib.licenses.lgpl3Plus;
    maintainers = with lib.maintainers; [ fab ];
  };
}