2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cffi
|
2021-12-19 01:06:50 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
2021-12-19 01:06:50 +00:00
|
|
|
, ssdeep
|
2022-11-21 17:40:18 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ssdeep";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "3.4.1";
|
2021-12-19 01:06:50 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DinoTools";
|
|
|
|
repo = "python-ssdeep";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-I5ci5BS+B3OE0xdLSahu3HCh99jjhnRHJFz830SvFpg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
buildInputs = [
|
|
|
|
ssdeep
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cffi
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner"' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ssdeep"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python wrapper for the ssdeep library";
|
2021-12-19 01:06:50 +00:00
|
|
|
homepage = "https://github.com/DinoTools/python-ssdeep";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/DinoTools/python-ssdeep/blob/${version}/CHANGELOG.rst";
|
2021-12-19 01:06:50 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|