From ad9917895286e4b24413e2fe886a6bd01f406880 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 21:57:24 +0100 Subject: autosuspend: 6.0.0 -> 6.1.1 https://github.com/languitar/autosuspend/compare/v6.0.0...v6.1.1 --- pkgs/os-specific/linux/autosuspend/default.nix | 33 +++++++------------------- 1 file changed, 8 insertions(+), 25 deletions(-) (limited to 'pkgs') diff --git a/pkgs/os-specific/linux/autosuspend/default.nix b/pkgs/os-specific/linux/autosuspend/default.nix index 5abacf966b9e..a39d3ec782c1 100644 --- a/pkgs/os-specific/linux/autosuspend/default.nix +++ b/pkgs/os-specific/linux/autosuspend/default.nix @@ -1,31 +1,13 @@ { lib +, dbus , fetchFromGitHub , fetchPypi , python3 }: -let - python = python3.override { - packageOverrides = self: super: { - # autosuspend is incompatible with tzlocal v5 - # See https://github.com/regebro/tzlocal#api-change - tzlocal = super.tzlocal.overridePythonAttrs (prev: rec { - version = "4.3.1"; - src = fetchPypi { - inherit (prev) pname; - inherit version; - hash = "sha256-7jLvjCCAPBmpbtNmrd09SnKe9jCctcc1mgzC7ut/pGo="; - }; - propagatedBuildInputs = with self; [ - pytz-deprecation-shim - ]; - }); - }; - }; -in -python.pkgs.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "autosuspend"; - version = "6.0.0"; + version = "6.1.1"; disabled = python3.pythonOlder "3.8"; @@ -33,15 +15,15 @@ python.pkgs.buildPythonApplication rec { owner = "languitar"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-gS8NNks4GaIGl7cEqWSP53I4/tIV4LypkmZ5vNOjspY="; + hash = "sha256-LGU/yhwuc6BuctCibm0AaRheQkuSIgEVXzcWQHCJ/8Y="; }; postPatch = '' substituteInPlace setup.cfg \ - --replace '--cov-config=setup.cfg' "" + --replace-fail '--cov-config=setup.cfg' "" ''; - propagatedBuildInputs = with python.pkgs; [ + dependencies = with python3.pkgs; [ dbus-python icalendar jsonpath-ng @@ -56,7 +38,8 @@ python.pkgs.buildPythonApplication rec { tzlocal ]; - nativeCheckInputs = with python.pkgs; [ + nativeCheckInputs = with python3.pkgs; [ + dbus freezegun pytest-datadir pytest-httpserver -- cgit 1.4.1 From 19d0baefa9de0cb67ac2ad99f1f93e10453e478e Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Sun, 24 Mar 2024 22:00:28 +0100 Subject: autosuspend: move to pkgs/by-name --- pkgs/by-name/au/autosuspend/package.nix | 68 ++++++++++++++++++++++++++ pkgs/os-specific/linux/autosuspend/default.nix | 68 -------------------------- pkgs/top-level/all-packages.nix | 2 - 3 files changed, 68 insertions(+), 70 deletions(-) create mode 100644 pkgs/by-name/au/autosuspend/package.nix delete mode 100644 pkgs/os-specific/linux/autosuspend/default.nix (limited to 'pkgs') 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; + }; +} diff --git a/pkgs/os-specific/linux/autosuspend/default.nix b/pkgs/os-specific/linux/autosuspend/default.nix deleted file mode 100644 index a39d3ec782c1..000000000000 --- a/pkgs/os-specific/linux/autosuspend/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ 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; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 07f1d487b35f..361b585e5462 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3336,8 +3336,6 @@ with pkgs; autospotting = callPackage ../applications/misc/autospotting { }; - autosuspend = callPackage ../os-specific/linux/autosuspend { }; - avfs = callPackage ../tools/filesystems/avfs { }; aliyun-cli = callPackage ../tools/admin/aliyun-cli { }; -- cgit 1.4.1