depot/third_party/nixpkgs/pkgs/development/python-modules/fastbencode/default.nix

40 lines
729 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, python
, pythonOlder
, cython
}:
buildPythonPackage rec {
pname = "fastbencode";
version = "0.0.15";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-A1XfgjNV9k4iA3HYf0HlA1CvpwzFh52OaN7f6YLgU+I=";
};
nativeBuildInputs = [
cython
];
pythonImportsCheck = [
"fastbencode"
];
checkPhase = ''
${python.interpreter} -m unittest fastbencode.tests.test_suite
'';
meta = with lib; {
description = "Fast implementation of bencode";
homepage = "https://github.com/breezy-team/fastbencode";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ marsam ];
};
}