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