diff options
author | Bruno Bzeznik <Bruno.Bzeznik@imag.fr> | 2021-10-05 17:27:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 17:27:35 +0200 |
commit | e9ab5bfe00c5c0dfa95351a32820acba889ea859 (patch) | |
tree | a8077dfb8c8c32fa69b75c0a8cbb4ba570f0fe1e /pkgs/os-specific/linux/autosuspend/default.nix | |
parent | 9761c54504c62c95abe98c6b8f3b18ee464b6c8e (diff) | |
download | nixpkgs-e9ab5bfe00c5c0dfa95351a32820acba889ea859.tar nixpkgs-e9ab5bfe00c5c0dfa95351a32820acba889ea859.tar.gz nixpkgs-e9ab5bfe00c5c0dfa95351a32820acba889ea859.tar.bz2 nixpkgs-e9ab5bfe00c5c0dfa95351a32820acba889ea859.tar.lz nixpkgs-e9ab5bfe00c5c0dfa95351a32820acba889ea859.tar.xz nixpkgs-e9ab5bfe00c5c0dfa95351a32820acba889ea859.tar.zst nixpkgs-e9ab5bfe00c5c0dfa95351a32820acba889ea859.zip |
autosuspend: init at 4.0.0 (#140532)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/os-specific/linux/autosuspend/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/autosuspend/default.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/autosuspend/default.nix b/pkgs/os-specific/linux/autosuspend/default.nix new file mode 100644 index 00000000000..e9931f0ab7e --- /dev/null +++ b/pkgs/os-specific/linux/autosuspend/default.nix @@ -0,0 +1,60 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "autosuspend"; + version = "4.0.0"; + + src = fetchFromGitHub { + owner = "languitar"; + repo = pname; + rev = "v${version}"; + sha256 = "03qca6avn7bwxcavif7q2nqfzivzp0py7qw3i4hsb28gjrq9nz36"; + }; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace '--cov-config=setup.cfg' "" + ''; + + propagatedBuildInputs = with python3.pkgs; [ + portalocker + psutil + dbus-python + ]; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + python-dbusmock + pytest-httpserver + dateutils + freezegun + pytest-mock + requests + requests-file + icalendar + tzlocal + jsonpath-ng + mpd2 + lxml + pytest-datadir + ]; + + # 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"; + license = licenses.gpl2Only; + maintainers = [ maintainers.bzizou ]; + platforms = platforms.linux; + }; +} |