Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / stem / default.nix
blob8cd6ff3f3d6e86b1231929b8ad31c4c2dd95971d
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , setuptools
6 , cryptography
7 , mock
8 , python
9 }:
11 buildPythonPackage rec {
12   pname = "stem";
13   version = "1.8.2";
15   disabled = pythonOlder "3.6";
17   pyproject = true;
19   src = fetchFromGitHub {
20     owner = "torproject";
21     repo = "stem";
22     rev = "refs/tags/${version}";
23     hash = "sha256-9BXeE/sVa13jr8G060aWjc49zgDVBhjaR6nt4lSxc0g=";
24   };
26   nativeBuildInputs = [
27     setuptools
28   ];
30   nativeCheckInputs = [
31     cryptography
32     mock
33   ];
35   checkPhase = ''
36     runHook preCheck
38     ${python.interpreter} run_tests.py --unit
40     runHook postCheck
41   '';
43   meta = with lib; {
44     changelog = "https://github.com/torproject/stem/blob/${src.rev}/docs/change_log.rst";
45     description = "Controller library that allows applications to interact with Tor";
46     downloadPage = "https://github.com/torproject/stem";
47     homepage = "https://stem.torproject.org/";
48     license = licenses.lgpl3Only;
49     maintainers = with maintainers; [ dotlambda ];
50   };