evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / aw-client / default.nix
blobbec43cbf2dbefd97bf92811aed90c9e28d008d15
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   poetry-core,
7   aw-core,
8   requests,
9   persist-queue,
10   click,
11   tabulate,
12   typing-extensions,
13   pytestCheckHook,
14   gitUpdater,
17 buildPythonPackage rec {
18   pname = "aw-client";
19   version = "0.5.14";
21   format = "pyproject";
23   # pypi distribution doesn't include tests, so build from source instead
24   src = fetchFromGitHub {
25     owner = "ActivityWatch";
26     repo = "aw-client";
27     rev = "v${version}";
28     sha256 = "sha256-HTyhQz/RaNdCtJIV6YHEd6Yhu9VRJ8E9XdN7NcoO8ao=";
29   };
31   disabled = pythonOlder "3.8";
33   nativeBuildInputs = [ poetry-core ];
35   propagatedBuildInputs = [
36     aw-core
37     requests
38     persist-queue
39     click
40     tabulate
41     typing-extensions
42   ];
44   nativeCheckInputs = [ pytestCheckHook ];
46   # Only run this test, the others are integration tests that require
47   # an instance of aw-server running in order to function.
48   pytestFlagsArray = [ "tests/test_requestqueue.py" ];
50   preCheck = ''
51     # Fake home folder for tests that write to $HOME
52     export HOME="$TMPDIR"
53   '';
55   pythonImportsCheck = [ "aw_client" ];
57   passthru.updateScript = gitUpdater { rev-prefix = "v"; };
59   meta = with lib; {
60     description = "Client library for ActivityWatch";
61     mainProgram = "aw-client";
62     homepage = "https://github.com/ActivityWatch/aw-client";
63     maintainers = with maintainers; [ huantian ];
64     license = licenses.mpl20;
65   };