diff mbox series

[bug#60013,3/3] gnu: Add clight

Message ID 8aaa5bfe2bdb7b409ae0ba210437d9b4c5063359.1670876889.git.florhizome@posteo.net
State New
Headers show
Series [bug#60013,1/3] gnu: Add libmodule | expand

Commit Message

florhizome Dec. 12, 2022, 8:31 p.m. UTC
From: florhizome <florhizome@posteo.net>

* gnu/packages/wm.scm (clight): New variable.
---
 gnu/packages/wm.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

Comments

\( Dec. 12, 2022, 9:57 p.m. UTC | #1
Heya,

* gnu/packages/wm.scm (clight): New variable.

--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm

@@ -194,6 +195,61 @@ (define-public bspwm

+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after
+              'patch-source-shebangs 'patch-target-dirs
+            (lambda _
+              (substitute*
+                  "./CMakeLists.txt"
+                (("DESTINATION \\$\\{SESSION_BUS_DIR\\}")
+                 (string-append "DESTINATION " #$output "/share/dbus-1/services"))
+                (("DESTINATION /etc/xdg/autostart")
+                 (string-append "DESTINATION " #$output "/etc/xdg/autostart"))
+                (("DESTINATION /usr/share/*")
+                 (string-append "DESTINATION " #$output "/share/*")))
+              #t)))))

Same here; couldn't these be -D flags, except for the /usr/share/*
replacement?  Also, #T at the end isn't necessary anymore :)

+    (synopsis "User daemon utility to fully manage screens")

  (synopsis "Daemon for managing screens")

+    (description "Clight is a tiny C utility that can turn your webcam
+into a light sensor; moreover it supports a redshift-like gamma
+control, a screen dimmer and dpms settings.
+It is the userspace interface for clightd.")

  (description
   "@command{clight} is the interface to @command{clightd}.  It implements
  gamma control akin to @command{redshift}, a screen dimmer, and dpms settings.
  It can also turn your webcam into a light sensor.")

    -- (
diff mbox series

Patch

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 919bcc9400..f7435e69f8 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -137,6 +137,7 @@  (define-module (gnu packages wm)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages polkit)
+  #:use-module (gnu packages popt)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages pulseaudio)
@@ -194,6 +195,61 @@  (define-public bspwm
     (license license:bsd-2)))
 
 
+(define-public clight
+  (package
+    (name "clight")
+    (version "4.9")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/FedeDP/clight")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "09hf80kb01xwzr8p87d5r8rw1dq9jqdibyc7k2xc4z5v5j7hlnlv"))))
+    (build-system cmake-build-system)
+    (native-inputs (list pkg-config))
+    (inputs (list clightd
+                  dbus
+                  ddcutil
+                  elogind
+                  gsl
+                  geoclue
+                  libconfig
+                  libmodule
+                  popt
+                  upower))
+    (arguments
+     (list
+      #:tests? #f  ;no rule to make target test
+      #:configure-flags
+      #~(list (string-append "-DBASH_COMPLETIONS_DIR="
+                             #$output "/share/bash-completion/completions")
+              (string-append "-DFISH_COMPLETIONS_DIR="
+                             #$output "/share/fish/completions"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after
+              'patch-source-shebangs 'patch-target-dirs
+            (lambda _
+              (substitute*
+                  "./CMakeLists.txt"
+                (("DESTINATION \\$\\{SESSION_BUS_DIR\\}")
+                 (string-append "DESTINATION " #$output "/share/dbus-1/services"))
+                (("DESTINATION /etc/xdg/autostart")
+                 (string-append "DESTINATION " #$output "/etc/xdg/autostart"))
+                (("DESTINATION /usr/share/*")
+                 (string-append "DESTINATION " #$output "/share/*")))
+              #t)))))
+    (home-page "https://github.com/FedeDP/Clight")
+    (synopsis "User daemon utility to fully manage screens")
+    (description "Clight is a tiny C utility that can turn your webcam
+into a light sensor; moreover it supports a redshift-like gamma
+control, a screen dimmer and dpms settings.
+It is the userspace interface for clightd.")
+    (license license:gpl3)))
+
 (define-public clightd
   (package
     (name "clightd")