From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mKIACy95SWNG1wAAbAwnHQ (envelope-from ) for ; Fri, 14 Oct 2022 16:58:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ECvnCi95SWOHCAEAauVa8A (envelope-from ) for ; Fri, 14 Oct 2022 16:58:55 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D015D112C3 for ; Fri, 14 Oct 2022 16:58:54 +0200 (CEST) Received: from localhost ([::1]:50918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojM9F-0007eS-US for larch@yhetil.org; Fri, 14 Oct 2022 10:58:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojM5Z-00044w-7L for guix-patches@gnu.org; Fri, 14 Oct 2022 10:55:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39224) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojM5Y-0004KC-Ol for guix-patches@gnu.org; Fri, 14 Oct 2022 10:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojM5Y-00063e-5f for guix-patches@gnu.org; Fri, 14 Oct 2022 10:55:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58501] [PATCH 2/3] gnu: freedesktop: Add power-profiles-daemon Resent-From: florhizome@posteo.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 14 Oct 2022 14:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58501 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58501@debbugs.gnu.org Cc: florhizome Received: via spool by 58501-submit@debbugs.gnu.org id=B58501.166575925923172 (code B ref 58501); Fri, 14 Oct 2022 14:55:04 +0000 Received: (at 58501) by debbugs.gnu.org; 14 Oct 2022 14:54:19 +0000 Received: from localhost ([127.0.0.1]:38293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojM4o-00061b-J1 for submit@debbugs.gnu.org; Fri, 14 Oct 2022 10:54:19 -0400 Received: from mout02.posteo.de ([185.67.36.66]:47831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojJP7-0000kS-Ih for 58501@debbugs.gnu.org; Fri, 14 Oct 2022 08:03:06 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A397C240101 for <58501@debbugs.gnu.org>; Fri, 14 Oct 2022 14:02:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665748979; bh=siNxuiaSJRN0tehRs4uCFatSXUDU/C4qDpepzo8DP6E=; h=From:To:Cc:Subject:Date:From; b=oI1tVTWGhb9bHGFULmhK+7nKbwU2YyQyxa4lEhhxHRbhMxPiUKEhUAv9XgTSsCcnZ SSy3LPzNNzKMhYi+asJft9vEeF5koOLfk5VIFEr763Y0dqKQ4ZoN3idX8gAcj96NZr +CMOwRmnkc7hCGMMFeW7K5cDXqfNzYolBIlsit2bIw+nNfH1WinU7RYdvO7I0pq5Bz FuKhtRGn75566r4VAH3UbStrIpcYeBQohqHDm0QZ9UNC++naNsDFVDYVV0Y+QQqGFW l4ZEgrsRG0b45ldyw9c59gSt/3qcBl5np4Nlt4wg+sgbUk0VAELUhj7I8o603YrFVH 6nIBB8mhGxtqQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MplQB06x3z9rxN; Fri, 14 Oct 2022 14:02:58 +0200 (CEST) From: florhizome@posteo.net Date: Fri, 14 Oct 2022 12:02:45 +0000 Message-Id: <30c42f8604b607345c233c0b60e5330243ecfdbe.1665748966.git.florhizome@posteo.net> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 14 Oct 2022 10:54:16 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665759534; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tDKI5Twhx4ZBrcrnaa/FMMt2wUCK/VY74czAbizW530=; b=nikcbj1NalqHi0fNNsA/QYCtf06P/TU2uHbdv7AGT2d6A3cjc9KRM5XQjOA+ADqO5ih5v0 MRqXNvVX8SqKGCUBGKRtptYM8e0QRaQYdY+qeItwz/G6EiOu7m+uzQGJrGvfHkC1csu6um KMNokTlMJDEgLxQOAmbDKc6lFq8WkYfWLzDhFub3a/PxrGl7QCQ9THr1EyzGHuJljpqj5X iHvNCVFOYqzBbLBvUbI3LyOCx2RAw+WVkbRLJDTn2209N8AeXOpOIiSghw1sjqju90YV8G 6Pz7MOlClz3Mm2fgUXXz7QiXnZB462wcMd3drNOO95yMmQtgrc/vJb+fn3hJ7g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665759534; a=rsa-sha256; cv=none; b=m2Dd3MjjNIEJXeirP2RxH8/SvoYU+f19zH+2exJOk5zdYPXtE4OzpeCASw7lSUFy04uG7F c8jK1pgeKGNjWO0PuwJpkVluzFt5K8/zzrMKki7uJLdOEKaNKNdM7MKeVc1cuCpiWsNtUv aGN9bhTc2vERcWrG59yIXCIvKeL1P7iM0jSlV94Gv+/jTCbKXyTcJD/XCE3+8QHtByrrZ3 D6WzP3Yt8RTDcnTK7CkeCT7Z1hYCpMfo3U+p/tEVn6jHmB0NrQvV2kTyLpZ2Jyi/rd89TE YU737yi6LzPEu6WoWGoZntBNXkNjvjuiH+9RcfyVUZLN2lFyOaBZxtUdbfS5Gw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=oI1tVTWG; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 8.21 X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=oI1tVTWG; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D015D112C3 X-Spam-Score: 8.21 X-Migadu-Spam: Yes X-Migadu-Scanner: scn0.migadu.com X-TUID: e3RvDU3hql3C From: florhizome --- gnu/packages/freedesktop.scm | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index d72b18caf5..b6aaf1f1ba 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -990,6 +990,61 @@ (define-public packagekit manager for the current system.") (license license:gpl2+))) + +(define-public power-profiles-daemon + (package + (name "power-profiles-daemon") + (version "0.12") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.freedesktop.org/hadess/power-profiles-daemon") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1wqcajbj358zpyj6y4h1v34y2yncq76wqxd0jm431habcly0bqyr")))) + (build-system meson-build-system) + (arguments + `(#:configure-flags (list "-Dsystemdsystemunitdir=false") + #:glib-or-gtk? #t + #:phases + (modify-phases %standard-phases + (add-before 'install 'fake-pkexec + (lambda _ (setenv "PKEXEC_UID" "-1"))) + (add-before 'configure 'correct-polkit-dir + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* + "meson.build" + (("polkit_gobject_dep\\.get_pkgconfig_variable\\('policydir'\\)") + (string-append "'" out "/share/polkit-1/actions'")))))) + (add-after 'install 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (string-append (assoc-ref outputs "out"))) + (prog (string-append out "/bin/powerprofilesctl"))) + (wrap-program prog + `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))) + `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))))))) + (native-inputs + (list `(,glib "bin") vala python gobject-introspection pkg-config)) + (inputs + (list upower glib polkit dbus libgudev + dbus-glib python python-pygobject)) + (synopsis "Makes power profiles handling available over D-Bus.") + (home-page "https://gitlab.freedesktop.org/hadess/power-profiles-daemon") + (description "power-profiles-daemon offers to modify system behaviour based + upon user-selected power profiles. There are 3 different power profiles, a +\"balanced\" default mode, a \"power-saver\" mode, as well as a \"performance\" + mode. The first 2 of those are available on every system. The \"performance\" + mode is only available on select systems and is implemented by different \"drivers\" + based on the system or systems it targets. +In addition to those 2 or 3 modes (depending on the system), \"actions\" can be hooked +up to change the behaviour of a particular device. For example, this can be used +to disable the fast-charging for some USB devices when in power-saver mode.") + (license license:gpl3))) + (define-public python-libevdev (package (name "python-libevdev") -- 2.38.0