guix-devel
[Top][All Lists]
Advanced

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

[PATCH 2/2] gnu: Add gnome-tweak-tool.


From: Jan Nieuwenhuizen
Subject: [PATCH 2/2] gnu: Add gnome-tweak-tool.
Date: Sun, 03 Apr 2016 13:07:34 +0200

Hi,

Finally gnome-tweak-tool works!  That should make the Gnome desktop a
workable alternative [workspace grid] until we get a nicely hackable
guile-wm up and running.

It needs libnotify to be compiled with gobject-introspection,
attached as [PATCH 1/2].

Greetings,
Jan

>From 47bab3dc9216437e948e5c3918063059e7207d05 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <address@hidden>
Date: Sun, 3 Apr 2016 12:56:11 +0200
Subject: [PATCH 1/2] gnu: libnotify: Add dependency on gobject-introspection.

* gnu/packages/gnome.scm (libnotify)[native-inputs]: Add
  gobject-introspection.
---
 gnu/packages/gnome.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 11ed486..32ff5a8 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Rene Saavedra <address@hidden>
 ;;; Copyright © 2016 Jochem Raat <address@hidden>
 ;;; Copyright © 2016 Rene Saavedra <address@hidden>
+;;; Copyright © 2016 Jan Nieuwenhuizen <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -681,7 +682,8 @@ database is translated at Transifex.")
        ("libpng" ,libpng)))
     (native-inputs
       `(("pkg-config" ,pkg-config)
-        ("glib" ,glib "bin")))
+        ("glib" ,glib "bin")
+        ("gobject-introspection" ,gobject-introspection)))
     (home-page "https://developer-next.gnome.org/libnotify/";)
     (synopsis
      "GNOME desktop notification library")
-- 
2.6.3

>From c2426b83876dc27308b6678456012efb0c02a2a0 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <address@hidden>
Date: Sun, 3 Apr 2016 12:52:37 +0200
Subject: [PATCH 2/2] gnu: Add gnome-tweak-tool.

* gnu/packages/patches/gnome-tweak-tool-search-paths.patch: New file.
* gnu-system.am: Add it.
* gnu/packages/gnome.scm (gnome-tweak-tool): New variable.
---
 gnu-system.am                                      |  1 +
 gnu/packages/gnome.scm                             | 42 ++++++++++++++++++++++
 .../patches/gnome-tweak-tool-search-paths.patch    | 42 ++++++++++++++++++++++
 3 files changed, 85 insertions(+)
 create mode 100644 gnu/packages/patches/gnome-tweak-tool-search-paths.patch

diff --git a/gnu-system.am b/gnu-system.am
index d883cdc..be286ac 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -500,6 +500,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/gnupg-simple-query-ignore-status-messages.patch \
   gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 32ff5a8..12e03f0 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4959,3 +4959,45 @@ 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.18.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
+                "0c4lw9fhflvpa5l5jsr70aqxcmvhdgh43ab35ly42j3n4c1i2b2w"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda _
+             (zero? (system* "make"
+                             "sysconfdir=/tmp"
+                             "localstatedir=/tmp"
+                             "install")))))))
+    (propagated-inputs
+     `(("gobject-introspection" ,gobject-introspection)
+       ("gnome-shell" ,gnome-shell)
+       ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+       ("gtk+" ,gtk+)
+       ("libnotify" ,libnotify)
+       ("mutter" ,mutter)
+       ("python2" ,python-2)
+       ("python2-pygobject" ,python2-pygobject)))
+    (native-inputs
+     `(("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)))
+    (synopsis "Gnome Tweak Tool")
+    (home-page "https://wiki.gnome.org/action/show/Apps/GnomeTweakTool";)
+    (description
+     "GNOME Tweak Tool allows the adjustment of several advanced GNOME
+options that can't be configured in gnome-control-center.")
+    (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..06d5298
--- /dev/null
+++ b/gnu/packages/patches/gnome-tweak-tool-search-paths.patch
@@ -0,0 +1,42 @@
+--- 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
-- 
2.6.3

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

reply via email to

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