diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-03-25 10:59:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 10:59:58 +0100 |
commit | 682dc91691562463a8fb3a8a17001d787bac71a3 (patch) | |
tree | 16d94e96ef345ac44dfeb0a45047b214112f806c /pkgs/by-name/au/autosuspend/package.nix | |
parent | 287ca47ab59a428657d20237934cb4050fbef555 (diff) | |
parent | 19d0baefa9de0cb67ac2ad99f1f93e10453e478e (diff) | |
download | nixlib-682dc91691562463a8fb3a8a17001d787bac71a3.tar nixlib-682dc91691562463a8fb3a8a17001d787bac71a3.tar.gz nixlib-682dc91691562463a8fb3a8a17001d787bac71a3.tar.bz2 nixlib-682dc91691562463a8fb3a8a17001d787bac71a3.tar.lz nixlib-682dc91691562463a8fb3a8a17001d787bac71a3.tar.xz nixlib-682dc91691562463a8fb3a8a17001d787bac71a3.tar.zst nixlib-682dc91691562463a8fb3a8a17001d787bac71a3.zip |
Merge pull request #298735 from anthonyroussel/update/autosuspend_2
autosuspend: 6.0.0 -> 6.1.1
Diffstat (limited to 'pkgs/by-name/au/autosuspend/package.nix')
-rw-r--r-- | pkgs/by-name/au/autosuspend/package.nix | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/by-name/au/autosuspend/package.nix b/pkgs/by-name/au/autosuspend/package.nix new file mode 100644 index 000000000000..a39d3ec782c1 --- /dev/null +++ b/pkgs/by-name/au/autosuspend/package.nix @@ -0,0 +1,68 @@ +{ lib +, dbus +, fetchFromGitHub +, fetchPypi +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "autosuspend"; + version = "6.1.1"; + + disabled = python3.pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "languitar"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-LGU/yhwuc6BuctCibm0AaRheQkuSIgEVXzcWQHCJ/8Y="; + }; + + 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; + }; +} |