nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 70 lines 1.4 kB view raw
1{ 2 lib, 3 dbus, 4 fetchFromGitHub, 5 python3, 6}: 7 8python3.pkgs.buildPythonApplication rec { 9 pname = "autosuspend"; 10 version = "8.0.0"; 11 pyproject = true; 12 13 disabled = python3.pythonOlder "3.10"; 14 15 src = fetchFromGitHub { 16 owner = "languitar"; 17 repo = "autosuspend"; 18 tag = "v${version}"; 19 hash = "sha256-ikFZTSYWjl0QGvVAlcMVANCTwcxWN5fkrcK4iQ/QFok="; 20 }; 21 22 build-system = with python3.pkgs; [ 23 setuptools 24 ]; 25 26 dependencies = with python3.pkgs; [ 27 dbus-python 28 icalendar 29 jsonpath-ng 30 lxml 31 mpd2 32 portalocker 33 psutil 34 python-dateutil 35 requests 36 requests-file 37 tzdata 38 tzlocal 39 ]; 40 41 nativeCheckInputs = with python3.pkgs; [ 42 dbus 43 freezegun 44 pytest-cov-stub 45 pytest-datadir 46 pytest-httpserver 47 pytest-mock 48 pytestCheckHook 49 python-dbusmock 50 ]; 51 52 # Disable tests that need root 53 disabledTests = [ 54 "test_smoke" 55 "test_multiple_sessions" 56 ]; 57 58 meta = { 59 description = "Daemon to automatically suspend and wake up a system"; 60 homepage = "https://autosuspend.readthedocs.io"; 61 changelog = "https://github.com/languitar/autosuspend/releases/tag/${src.tag}"; 62 license = lib.licenses.gpl2Only; 63 maintainers = with lib.maintainers; [ 64 bzizou 65 anthonyroussel 66 ]; 67 mainProgram = "autosuspend"; 68 platforms = lib.platforms.linux; 69 }; 70}