69 lines
1.3 KiB
Nix
69 lines
1.3 KiB
Nix
|
{ lib
|
||
|
, dbus
|
||
|
, fetchFromGitHub
|
||
|
, python3
|
||
|
}:
|
||
|
|
||
|
python3.pkgs.buildPythonApplication rec {
|
||
|
pname = "autosuspend";
|
||
|
version = "7.0.2";
|
||
|
pyproject = true;
|
||
|
|
||
|
disabled = python3.pythonOlder "3.10";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "languitar";
|
||
|
repo = pname;
|
||
|
rev = "refs/tags/v${version}";
|
||
|
hash = "sha256-QmZX5I1D1iYUQ6Ll0tkbpjzqaOIBaGAltKHwUqLB6uk=";
|
||
|
};
|
||
|
|
||
|
build-system = with python3.pkgs; [
|
||
|
setuptools
|
||
|
];
|
||
|
|
||
|
dependencies = with python3.pkgs; [
|
||
|
dbus-python
|
||
|
icalendar
|
||
|
jsonpath-ng
|
||
|
lxml
|
||
|
mpd2
|
||
|
portalocker
|
||
|
psutil
|
||
|
python-dateutil
|
||
|
pytz
|
||
|
requests
|
||
|
requests-file
|
||
|
tzlocal
|
||
|
];
|
||
|
|
||
|
nativeCheckInputs = with python3.pkgs; [
|
||
|
dbus
|
||
|
freezegun
|
||
|
pytest-cov-stub
|
||
|
pytest-datadir
|
||
|
pytest-httpserver
|
||
|
pytest-mock
|
||
|
pytestCheckHook
|
||
|
python-dbusmock
|
||
|
];
|
||
|
|
||
|
# Disable tests that need root
|
||
|
disabledTests = [
|
||
|
"test_smoke"
|
||
|
"test_multiple_sessions"
|
||
|
];
|
||
|
|
||
|
doCheck = true;
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "Daemon to automatically suspend and wake up a system";
|
||
|
homepage = "https://autosuspend.readthedocs.io";
|
||
|
changelog = "https://github.com/languitar/autosuspend/releases/tag/v${version}";
|
||
|
license = licenses.gpl2Only;
|
||
|
maintainers = with maintainers; [ bzizou anthonyroussel ];
|
||
|
mainProgram = "autosuspend";
|
||
|
platforms = platforms.linux;
|
||
|
};
|
||
|
}
|