2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
fetchPypi,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2022-10-21 18:38:19 +00:00
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastbencode";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.3.1";
|
|
|
|
pyproject = true;
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-X+DLfRc2iRr2HSreQM6UiUHUbpCLFvU4P1XxJ4SNoZc=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ cython ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "fastbencode" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest fastbencode.tests.test_suite
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast implementation of bencode";
|
|
|
|
homepage = "https://github.com/breezy-team/fastbencode";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/breezy-team/fastbencode/releases/tag/v${version}";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|