unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 2/2] gnu: Add gnome-tweak-tool.
@ 2016-04-03 11:07 Jan Nieuwenhuizen
  2016-04-03 16:41 ` Jan Nieuwenhuizen
  2016-04-11 23:35 ` Leo Famulari
  0 siblings, 2 replies; 17+ messages in thread
From: Jan Nieuwenhuizen @ 2016-04-03 11:07 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

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


[-- Attachment #2: 0001-gnu-libnotify-Add-dependency-on-gobject-introspectio.patch --]
[-- Type: text/x-diff, Size: 1283 bytes --]

From 47bab3dc9216437e948e5c3918063059e7207d05 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
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 <rennes@openmailbox.org>
 ;;; Copyright © 2016 Jochem Raat <jchmrt@riseup.net>
 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-gnome-tweak-tool.patch --]
[-- Type: text/x-diff, Size: 5331 bytes --]

From c2426b83876dc27308b6678456012efb0c02a2a0 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
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


[-- Attachment #4: Type: text/plain, Size: 154 bytes --]


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread
[parent not found: <mailman.877.1460442807.7476.guix-devel@gnu.org>]

end of thread, other threads:[~2016-05-15 17:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-03 11:07 [PATCH 2/2] gnu: Add gnome-tweak-tool Jan Nieuwenhuizen
2016-04-03 16:41 ` Jan Nieuwenhuizen
2016-04-11 23:35 ` Leo Famulari
2016-04-13 18:02   ` Jan Nieuwenhuizen
2016-04-16  1:35     ` Leo Famulari
2016-04-17 17:22       ` Jan Nieuwenhuizen
2016-04-17 18:33         ` rennes
2016-04-17 18:44         ` Leo Famulari
2016-04-24 11:19           ` Jan Nieuwenhuizen
2016-04-24 18:50             ` Leo Famulari
2016-04-27 19:05               ` Jan Nieuwenhuizen
2016-05-01 21:36                 ` rennes
2016-05-02 22:04                 ` Leo Famulari
2016-05-02 22:38                   ` Jan Nieuwenhuizen
2016-05-03  2:19                     ` Leo Famulari
2016-05-15 17:31                       ` Leo Famulari
     [not found] <mailman.877.1460442807.7476.guix-devel@gnu.org>
2016-04-12 13:16 ` rennes

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).