diff mbox series

[bug#53953,v3] gnu: Add acpilight.

Message ID 20220216072232.23819-1-brice@waegenei.re
State Accepted
Headers show
Series [bug#53953,v3] gnu: Add acpilight. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Brice Waegeneire Feb. 16, 2022, 7:22 a.m. UTC
* gnu/packages/linux.scm (acpilight): New variable.
---
Hello Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

> Brice Waegeneire schreef op za 12-02-2022 om 18:21 [+0100]:
>> As for the odd make-flags, this is because of the uncanonical Makefile¹ of
>> acpilight, It don't build with an empty DESTDIR.
>> 
>> ¹ https://gitlab.com/wavexx/acpilight/-/blob/master/Makefile
>
> Looks like the problem is caused by 'sysconfdir' not being based
> on 'prefix', but that can be resolved by
>
> #~(list (string-append "prefix=" #$output)
> 	(string-append "sysconfdir=" (string-append #$output "/etc")))
>
> which is not 100% canonical, but it does seems closer to me?

I remember trying someting like that unsuccesfully before sending the previous
patch version but I probablly missend something because it actually work!

> Also, apparently there's a 'python-minimal' package, so you could use
> that instead of 'python' to reduce the closure?  Might be counter-
> productive though, since most packages seem to use plain 'python'
> instead ...

Done.

Cheers,
- Brice

 gnu/packages/linux.scm | 44 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)


base-commit: 52269e27c628d34af896e95347870b1755cb3e5f

Comments

Ludovic Courtès March 6, 2022, 9:17 p.m. UTC | #1
Hi Brice,

Brice Waegeneire <brice@waegenei.re> skribis:

> * gnu/packages/linux.scm (acpilight): New variable.

LGTM, please push!

Thanks,
Ludo’.
Ludovic Courtès April 5, 2022, 4:06 p.m. UTC | #2
Ping! :-)

Ludovic Courtès <ludo@gnu.org> skribis:

> Hi Brice,
>
> Brice Waegeneire <brice@waegenei.re> skribis:
>
>> * gnu/packages/linux.scm (acpilight): New variable.
>
> LGTM, please push!
>
> Thanks,
> Ludo’.
Maxim Cournoyer Sept. 28, 2022, 7:57 p.m. UTC | #3
Hello,

Ludovic Courtès <ludo@gnu.org> writes:

> Ping! :-)
>
> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> Hi Brice,
>>
>> Brice Waegeneire <brice@waegenei.re> skribis:
>>
>>> * gnu/packages/linux.scm (acpilight): New variable.
>>
>> LGTM, please push!

Pushed myself, closing!

Maxim
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 4edb5bf858..fd68901391 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -35,7 +35,7 @@ 
 ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Stefan Stefanović <stefanx2ovic@gmail.com>
-;;; Copyright © 2019, 2020, 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2019-2022 Brice Waegeneire <brice@waegenei.re>
 ;;; Copyright © 2019 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
@@ -8806,3 +8806,45 @@  (define-public libgpiod
     (license (list license:lgpl2.1+   ;; libgpiod
                    license:gpl2+      ;; gpio-tools
                    license:lgpl3+)))) ;; C++ bindings
+
+(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 (assoc-ref inputs "coreutils-minimal")
+                                     "/bin"))))))))
+    (inputs
+     (list coreutils-minimal
+           python-minimal))
+    (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+)))