biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / stem / default.nix
blobfd7cf8c9d6bf85b1520524e997bac2153e9b2b96
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   fetchpatch,
7   setuptools,
8   cryptography,
9   mock,
10   python,
13 buildPythonPackage rec {
14   pname = "stem";
15   version = "1.8.3-unstable-2024-02-13";
17   disabled = pythonOlder "3.6";
19   pyproject = true;
21   src = fetchFromGitHub {
22     owner = "torproject";
23     repo = "stem";
24     rev = "9a9c7d43a7fdcde6d4a9cf95b831fb5e5923a160";
25     hash = "sha256-Oc73Jx31SLzuhT9Iym5HHszKfflKZ+3aky5flXudvmI=";
26   };
28   patches = [
29     # fixes deprecated test assertion, assertRaisesRegexp in python 3
30     (fetchpatch {
31       url = "https://github.com/trishtzy/stem/commit/d5012a1039f05c69ebe832723ce96ecbe8f79fe1.patch";
32       hash = "sha256-ozOTx4/c86sW/9Ss5eZ6ZxX63ByJT5x7JF6wBBd+VFY=";
33     })
34   ];
36   nativeBuildInputs = [ setuptools ];
38   nativeCheckInputs = [
39     cryptography
40     mock
41   ];
43   checkPhase = ''
44     runHook preCheck
46     ${python.interpreter} run_tests.py --unit
48     runHook postCheck
49   '';
51   meta = with lib; {
52     changelog = "https://github.com/torproject/stem/blob/${src.rev}/docs/change_log.rst";
53     description = "Controller library that allows applications to interact with Tor";
54     mainProgram = "tor-prompt";
55     downloadPage = "https://github.com/torproject/stem";
56     homepage = "https://stem.torproject.org/";
57     license = licenses.lgpl3Only;
58     maintainers = with maintainers; [ dotlambda ];
59   };