From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: [PATCH 2/2] gnu: Add gnome-tweak-tool. Date: Sun, 03 Apr 2016 13:07:34 +0200 Message-ID: <87vb3z3q89.fsf@drakenvlieg.flower> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amfso-0006yr-A4 for guix-devel@gnu.org; Sun, 03 Apr 2016 07:07:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amfsk-0008TS-VV for guix-devel@gnu.org; Sun, 03 Apr 2016 07:07:54 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-libnotify-Add-dependency-on-gobject-introspectio.patch Content-Transfer-Encoding: quoted-printable >From 47bab3dc9216437e948e5c3918063059e7207d05 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 3 Apr 2016 12:56:11 +0200 Subject: [PATCH 1/2] gnu: libnotify: Add dependency on gobject-introspectio= n. * 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 =C2=A9 2016 Rene Saavedra ;;; Copyright =C2=A9 2016 Jochem Raat ;;; Copyright =C2=A9 2016 Rene Saavedra +;;; Copyright =C2=A9 2016 Jan Nieuwenhuizen ;;; ;;; 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") --=20 2.6.3 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-gnu-Add-gnome-tweak-tool.patch >From c2426b83876dc27308b6678456012efb0c02a2a0 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen 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 . + + 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.nl= =20=20 --=-=-=--