guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: Add gnome-tweak-tool.


From: Leo Famulari
Subject: 02/02: gnu: Add gnome-tweak-tool.
Date: Sun, 15 May 2016 17:29:02 +0000 (UTC)

lfam pushed a commit to branch master
in repository guix.

commit 9365ee1c464b1a4bda5325b9c5a16f9c09029d2a
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Apr 3 12:52:37 2016 +0200

    gnu: Add gnome-tweak-tool.
    
    * gnu/packages/patches/gnome-tweak-tool-search-paths.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/gnome.scm (gnome-tweak-tool): New variable.
    
    Signed-off-by: Leo Famulari <address@hidden>
---
 gnu/local.mk                                       |    1 +
 gnu/packages/gnome.scm                             |   43 ++++++++++++++++
 .../patches/gnome-tweak-tool-search-paths.patch    |   52 ++++++++++++++++++++
 3 files changed, 96 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index acb9790..553e0f3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -509,6 +509,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/glibc-versioned-locpath.patch           \
   gnu/packages/patches/gmp-arm-asm-nothumb.patch               \
   gnu/packages/patches/gmp-faulty-test.patch                   \
+  gnu/packages/patches/gnome-tweak-tool-search-paths.patch     \
   gnu/packages/patches/gnucash-price-quotes-perl.patch         \
   gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   gnu/packages/patches/gobject-introspection-cc.patch          \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 6b78d0f..8963e3f 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5024,3 +5024,46 @@ specified duration and save it as a GIF encoded animated 
image file.")
      "Libzapojit is a GLib-based library for accessing online service APIs of
 Microsoft SkyDrive and Hotmail, using their REST protocols.")
     (license license:lgpl2.1+)))
+
+(define-public gnome-tweak-tool
+  (package
+    (name "gnome-tweak-tool")
+    (version "3.20.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/gnome-tweak-tool/"
+                                  (version-major+minor version) "/"
+                                  "gnome-tweak-tool-" version ".tar.xz"))
+              (patches (list
+                        (search-patch "gnome-tweak-tool-search-paths.patch")))
+              (sha256
+               (base32
+                "1fj6wjvnjygzm9br3sw9gya6d18yly1rm69yaiar9spfbkvv4wai"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--localstatedir=/tmp"
+                           "--sysconfdir=/tmp")
+       #:imported-modules ((guix build python-build-system)
+                           ,@%gnu-build-system-modules)
+       #:phases (modify-phases %standard-phases
+                  (add-after 'install 'wrap
+                    (@@ (guix build python-build-system) wrap)))))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("python" ,python-2)
+       ("python2-pygobject" ,python2-pygobject)))
+    (propagated-inputs
+     `(("libnotify" ,libnotify)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("gtk+" ,gtk+)))
+    (synopsis "Customize advanced GNOME 3 options")
+    (home-page "https://wiki.gnome.org/action/show/Apps/GnomeTweakTool";)
+    (description
+     "GNOME Tweak Tool allows adjusting advanced configuration settings in
+GNOME 3.  This includes things like the fonts used in user interface elements,
+alternative user interface themes, changes in window management behavior,
+GNOME Shell appearance and extension, etc.")
+    (license license:gpl3+)))
diff --git a/gnu/packages/patches/gnome-tweak-tool-search-paths.patch 
b/gnu/packages/patches/gnome-tweak-tool-search-paths.patch
new file mode 100644
index 0000000..027c61b
--- /dev/null
+++ b/gnu/packages/patches/gnome-tweak-tool-search-paths.patch
@@ -0,0 +1,52 @@
+Gnome-tweak-tool does not look at GSETTINGS_SCHEMA_PATH or XDG_DATA_DIRS, it
+assumes that schemas are installed in one global directory
+(GSETTINGS_SCHEMA_DIR/gsettingsschemadir).
+
+Guix/GuixSD uses a different directory for every gir package and has
+packages pick-up files using XDG_DATA_DIRS.
+
+Upstream ticket: https://bugzilla.gnome.org/show_bug.cgi?id=764537
address@hidden
+
+--- gnome-tweak-tool-3.18.1.orig/gtweak/gsettings.py   2015-04-08 
15:21:32.000000000 +0200
++++ gnome-tweak-tool-3.18.1/gtweak/gsettings.py        2016-04-03 
11:26:38.658482704 +0200
+@@ -16,7 +16,8 @@
+ # along with gnome-tweak-tool.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ import logging
+-import os.path
++import os
++import sys
+ import xml.dom.minidom
+ import gettext
+ 
+@@ -31,6 +32,13 @@
+ class GSettingsMissingError(Exception):
+     pass
+ 
++def file_from_path(path, file_name):
++    for dir in path:
++        f = os.path.join(dir, file_name)
++        if os.path.exists(f):
++            return f
++    return None
++
+ class _GSettingsSchema:
+     def __init__(self, schema_name, schema_dir=None, schema_filename=None, 
**options):
+         if not schema_dir:
+@@ -38,9 +46,14 @@
+         if not schema_filename:
+             schema_filename = schema_name + ".gschema.xml"
+ 
++        schema_prefix = os.path.join('glib-2.0', 'schemas')
+         schema_path = os.path.join(schema_dir, schema_filename)
+         if not os.path.exists(schema_path):
+-            logging.critical("Could not find schema %s" % schema_path)
++            schema_path = file_from_path(os.environ.get 
('GSETTINGS_SCHEMA_PATH', '').split(os.path.pathsep), schema_filename)
++        if not (schema_path and os.path.exists(schema_path)):
++            schema_path = file_from_path(os.environ.get ('XDG_DATA_DIRS', 
'').split(os.path.pathsep), os.path.join(schema_prefix, schema_filename))
++        if not (schema_path and os.path.exists(schema_path)):
++            logging.critical("Could not find schema %s" % schema_filename)
+             assert(False)
+ 
+         self._schema_name = schema_name



reply via email to

[Prev in Thread] Current Thread [Next in Thread]