2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
|
|
|
, cython
|
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastbencode";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "0.1";
|
2022-10-21 18:38:19 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-10-30 15:09:59 +00:00
|
|
|
hash = "sha256-wal451pQSLuoM9kNbnSKVZUMqLWfEukXwqLI58p+tvU=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
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";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with maintainers; [ marsam ];
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|