unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: David Wilson <david@daviwil.com>
To: Marius Bakke <mbakke@fastmail.com>
Cc: 39306@debbugs.gnu.org
Subject: [bug#39306] [PATCH] gnu: Add xsettingsd.
Date: Thu, 30 Jan 2020 06:20:08 -0800	[thread overview]
Message-ID: <87lfpp6n6v.fsf@daviwil.com> (raw)
In-Reply-To: <87zhe5nnss.fsf@devup.no>


[-- Attachment #1.1: Type: text/plain, Size: 1166 bytes --]


Hi Marius!

Marius Bakke <mbakke@fastmail.com> writes:

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

Agreed, that's a more appropriate place.

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

Thanks!  I didn't think to check with that name, I've got tests enabled
using that now.

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

Margin comment no longer needed, but I'll keep this in mind for future
commits.

I've attached an updated patch file with the suggested changes.  The
only thing I'm unsure about is disabling a particular warning-as-error
that showed up in the gtest.h header:

---- SNIP ----
/gnu/store/bxapb1f1l8frjpbjckk3zdxhmcig3xzk-googletest-1.10.0/include/gtest/gtest.h:1527:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (lhs == rhs) {
       ~~~~^~~~~~
cc1plus: all warnings being treated as errors
---- SNIP ----

Since this is a warning in gtest's own header file rather than the
package source, would it be OK to disable errors for it?

Thanks!

David


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Updated patch file --]
[-- Type: text/x-patch, Size: 4369 bytes --]

From b5ca2c0377d677c0e3b9e288a8229d54ccd89125 Mon Sep 17 00:00:00 2001
From: David Wilson <david@daviwil.com>
Date: Sun, 26 Jan 2020 05:55:47 -0800
Subject: [PATCH] gnu: Add xsettingsd.

* gnu/packages/xdisorg.scm (xsettingsd): New variable.
---
 gnu/packages/xdisorg.scm | 68 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index ecefab1dbb..501ef53d3e 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -30,6 +30,7 @@
 ;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2020 David Wilson <david@daviwil.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,6 +58,7 @@
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system scons)
   #:use-module (gnu packages)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages admin)
@@ -2005,3 +2007,69 @@ The cutbuffer and clipboard selection are always synchronized.")
 can optionally use some appearance settings from XSettings, tint2 and GTK.")
     (home-page "https://jgmenu.github.io/")
     (license license:gpl2)))
+
+(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)
+       ("googletest" ,googletest)
+       ("googletest-source" ,(package-source googletest))))
+    (arguments
+     `(#:scons ,scons-python2
+       #:scons-flags
+       (list "CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'patch-sconstruct
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "SConstruct"
+               ;; scons doesn't pick up environment variables automatically
+               ;; so it needs help to find path variables
+               (("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']
+                         },")
+               ;; Update path to gtest source files used in tests
+               (("/usr/src/gtest") (string-append
+                                    (assoc-ref inputs "googletest-source")
+                                    "/googletest"))
+               ;; Exclude one warning that causes a build error
+               (("-Werror") "-Werror -Wno-error=sign-compare"))
+             #t))
+         ;; The SConstruct script doesn't configure installation so
+         ;; binaries must be copied to the output path directly
+         (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)))
-- 
2.24.1


  reply	other threads:[~2020-01-30 14:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 13:04 [bug#39306] [PATCH] gnu: Add xsettingsd David Wilson
2020-01-30 12:14 ` Marius Bakke
2020-01-30 14:20   ` David Wilson [this message]
2020-01-30 14:46     ` Marius Bakke
2020-01-30 16:01       ` David Wilson
2020-01-30 16:14         ` Marius Bakke
2020-01-31 13:57           ` bug#39306: " David Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfpp6n6v.fsf@daviwil.com \
    --to=david@daviwil.com \
    --cc=39306@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).