nixpkgs/pkgs/by-name/au/autosuspend/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, dbus
, fetchFromGitHub
2023-11-29 03:17:53 +01:00
, fetchPypi
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "autosuspend";
2024-04-29 19:35:19 +02:00
version = "7.0.0";
disabled = python3.pythonOlder "3.10";
src = fetchFromGitHub {
owner = "languitar";
repo = pname;
2022-07-25 02:51:02 +02:00
rev = "refs/tags/v${version}";
2024-04-29 19:35:19 +02:00
hash = "sha256-AJ0ZWRxqhBJEics6XnIVWyf7pJI8MphQU4LRqSYYNSQ=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail '--cov-config=setup.cfg' ""
'';
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-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 = "A 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;
};
}