2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
setuptools,
|
|
|
|
cryptography,
|
|
|
|
mock,
|
|
|
|
python,
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "stem";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.8.3-unstable-2024-02-13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "torproject";
|
|
|
|
repo = "stem";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "9a9c7d43a7fdcde6d4a9cf95b831fb5e5923a160";
|
|
|
|
hash = "sha256-Oc73Jx31SLzuhT9Iym5HHszKfflKZ+3aky5flXudvmI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
patches = [
|
|
|
|
# fixes deprecated test assertion, assertRaisesRegexp in python 3
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/trishtzy/stem/commit/d5012a1039f05c69ebe832723ce96ecbe8f79fe1.patch";
|
|
|
|
hash = "sha256-ozOTx4/c86sW/9Ss5eZ6ZxX63ByJT5x7JF6wBBd+VFY=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
cryptography
|
|
|
|
mock
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
${python.interpreter} run_tests.py --unit
|
|
|
|
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/torproject/stem/blob/${src.rev}/docs/change_log.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Controller library that allows applications to interact with Tor";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "tor-prompt";
|
2023-11-16 04:20:00 +00:00
|
|
|
downloadPage = "https://github.com/torproject/stem";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://stem.torproject.org/";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = licenses.lgpl3Only;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|