Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, poetry-core 6, jsonschema 7, peewee 8, appdirs 9, iso8601 10, rfc3339-validator 11, takethetime 12, strict-rfc3339 13, tomlkit 14, deprecation 15, timeslot 16, pytestCheckHook 17}: 18 19buildPythonPackage rec { 20 pname = "aw-core"; 21 version = "0.5.12"; 22 23 format = "pyproject"; 24 25 # pypi distribution doesn't include tests, so build from source instead 26 src = fetchFromGitHub { 27 owner = "ActivityWatch"; 28 repo = "aw-core"; 29 rev = "v${version}"; 30 sha256 = "sha256-DbugVMaQHlHpfbFEsM6kfpDL2VzRs0TDn9klWjAwz64="; 31 }; 32 33 disabled = pythonOlder "3.8"; 34 35 nativeBuildInputs = [ 36 poetry-core 37 ]; 38 39 propagatedBuildInputs = [ 40 jsonschema 41 peewee 42 appdirs 43 iso8601 44 rfc3339-validator 45 takethetime 46 strict-rfc3339 47 tomlkit 48 deprecation 49 timeslot 50 ]; 51 52 nativeCheckInputs = [ 53 pytestCheckHook 54 ]; 55 56 preCheck = '' 57 # Fake home folder for tests that write to $HOME 58 export HOME="$TMPDIR" 59 ''; 60 61 pythonImportsCheck = [ "aw_core" ]; 62 63 meta = with lib; { 64 description = "Core library for ActivityWatch"; 65 homepage = "https://github.com/ActivityWatch/aw-core"; 66 maintainers = with maintainers; [ huantian ]; 67 license = licenses.mpl20; 68 }; 69}