diff mbox series

[bug#39306] gnu: Add xsettingsd.

Message ID 87r1zlvymv.fsf@daviwil.com
State Accepted
Headers show
Series [bug#39306] gnu: Add xsettingsd. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

David Wilson Jan. 27, 2020, 1:04 p.m. UTC
* gnu/packages/wm.scm (xsettingsd): New variable.
---
 gnu/packages/wm.scm | 63 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

--
2.24.1

Comments

Marius Bakke Jan. 30, 2020, 12:14 p.m. UTC | #1
David Wilson <david@daviwil.com> writes:

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

I wonder if xdisorg.scm is better suited for this package, as it seems
mostly unrelated to window management.  WDYT?

[...]

> +       #:tests? #f ;; Tests require Google's gtest framework

gtest is provided by the 'googletest' package.  Can you try adding it?

Also, for margin comments, we only use one ';', without capitalizing the
comment.

Other than that LGTM.
diff mbox series

Patch

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 52d7042806..4fb18e9f67 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -31,6 +31,7 @@ 
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2019 Noodles! <nnoodle@chiru.no>
 ;;; Copyright © 2019 Alexandru-Sergiu Marton <brown121407@member.fsf.org>
+;;; Copyright © 2020 David Wilson <david@daviwil.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,6 +60,7 @@ 
   #:use-module (guix build-system meson)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system scons)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
@@ -94,6 +96,7 @@ 
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages suckless)
   #:use-module (gnu packages texinfo)
@@ -1670,3 +1673,63 @@  bar entirely based on XCB.  Provides full UTF-8 support, basic
 formatting, RandR and Xinerama support and EWMH compliance without
 wasting your precious memory.")
       (license license:x11))))
+
+(define-public xsettingsd
+  (package
+    (name "xsettingsd")
+    (version "1.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/derat/xsettingsd.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "05m4jlw0mgwp24cvyklncpziq1prr2lg0cq9c055sh4n9d93d07v"))))
+    (build-system scons-build-system)
+    (inputs
+     `(("libx11" ,libx11)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:scons ,scons-python2
+       #:scons-flags
+       (list "CC=gcc"
+             (string-append "PREFIX=" %output))
+       #:tests? #f ;; Tests require Google's gtest framework
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'patch-sconstruct
+           (lambda _
+             ;; scons doesn't pick up environment variables automatically
+             ;; so it needs some help to find path variables.
+             (substitute* "SConstruct"
+               (("env = Environment\\(")
+                "env = Environment(
+                         ENV = {
+                           'PATH': os.environ['PATH'],
+                           'CPATH': os.environ['CPATH'],
+                           'LIBRARY_PATH': os.environ['LIBRARY_PATH'],
+                           'PKG_CONFIG_PATH': os.environ['PKG_CONFIG_PATH']
+                         },"))
+             #t))
+         ;; The install task uses gtest to install the binaries.
+         ;; Since we don't have gtest, install binaries manually.
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (install-file "xsettingsd" bin)
+               (install-file "dump_xsettings" bin)
+               #t))))))
+    (home-page "https://github.com/derat/xsettingsd")
+    (synopsis "Minimal Xorg settings daemon")
+    (description "xsettingsd is a lightweight daemon that provides settings to
+Xorg applications via the XSETTINGS specification.  It is used for defining
+font and theme settings when a complete desktop environment (GNOME, KDE) is
+not running.  With a simple .xsettingsd configuration file one can avoid
+configuring visual settings in different UI toolkits separately.")
+    (license license:bsd-3)))