From f4442721ebd9a40d69b109944e821737edb8b027 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Wed, 16 Feb 2022 08:22:32 +0100 Subject: gnu: Add acpilight. * gnu/packages/linux.scm (acpilight): New variable. Signed-off-by: Maxim Cournoyer Modified-by: Maxim Cournoyer --- gnu/packages/linux.scm | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index f49f019e49..e309264c7a 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -35,7 +35,7 @@ ;;; Copyright © 2019 Tim Gesthuizen ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer ;;; Copyright © 2019 Stefan Stefanović -;;; Copyright © 2019, 2020, 2021 Brice Waegeneire +;;; Copyright © 2019-2022 Brice Waegeneire ;;; Copyright © 2019 Kei Kebreau ;;; Copyright © 2020, 2021 Oleg Pykhalov ;;; Copyright © 2020 Pierre Neidhardt @@ -6948,6 +6948,46 @@ monitoring tools for Linux. These include @code{mpstat}, @code{iostat}, @code{sadf} and @code{sa}.") (license license:gpl2+))) +(define-public acpilight + (package + (name "acpilight") + (version "1.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/wavexx/acpilight.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1r0r3nx6x6vkpal6vci0zaa1n9dfacypldf6k8fxg7919vzxdn1w")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ; no tests + #:make-flags + #~(list (string-append "prefix=" #$output) + (string-append "sysconfdir=" #$output "/etc")) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'patch + (lambda* (#:key inputs #:allow-other-keys) + ;; Prevent reloading udev at build time + (substitute* "Makefile" + (("udevadm") "true")) + (substitute* "90-backlight.rules" + (("/bin") + (string-append #$(this-package-input "coreutils") + "/bin")))))))) + (inputs (list coreutils python)) + (home-page "https://gitlab.com/wavexx/acpilight") + (synopsis "Backward-compatibile xbacklight replacement") + (description "acpilight is a backward-compatibile replacement for +xbacklight that uses the ACPI interface to set the display brightness. On +modern laptops acpilight can control both display and keyboard backlight +uniformly on either X11, the console or Wayland.") + (license license:gpl3+))) + (define-public light (package (name "light") -- cgit 1.4.1