From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. Date: Mon, 2 May 2016 22:19:16 -0400 Message-ID: <20160503021916.GA24970@jasmine> References: <20160411233524.GA11228@jasmine> <87lh4hs7yx.fsf@drakenvlieg.flower> <20160416013547.GC12389@jasmine> <87vb3gp2uk.fsf@drakenvlieg.flower> <20160417184428.GA21041@jasmine> <87wpnnz22g.fsf@drakenvlieg.flower> <20160424185020.GA7737@jasmine> <87twim7tzd.fsf@drakenvlieg.flower> <20160502220401.GA18083@jasmine> <87eg9kt79n.fsf@drakenvlieg.flower> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9jxsPFA5p3P2qPhR" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axPwJ-0000DZ-F1 for guix-devel@gnu.org; Mon, 02 May 2016 22:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axPvx-0006MC-MW for guix-devel@gnu.org; Mon, 02 May 2016 22:19:50 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axPvv-0006KO-7v for guix-devel@gnu.org; Mon, 02 May 2016 22:19:33 -0400 Content-Disposition: inline In-Reply-To: <87eg9kt79n.fsf@drakenvlieg.flower> 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" To: Jan Nieuwenhuizen Cc: guix-devel@gnu.org, rennes@openmailbox.org, =?utf-8?B?5a6L5paH5q2m?= --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, May 03, 2016 at 12:38:44AM +0200, Jan Nieuwenhuizen wrote: > Leo Famulari writes: > > On Wed, Apr 27, 2016 at 09:05:26PM +0200, Jan Nieuwenhuizen wrote: > >> Yes. Moved python to inputs, added python wrapper. > > > > Cool! > > :-) Thanks > > > Based on that, I moved python2-gobject into (inputs). I also tried > > removing mutter entirely, since I believe mutter is provided by > > gnome-shell. > > Gee, I was sure I tried removing every individual package there... > > > It seems to work for me. Can you see if it works for you? > > Works for me. This is great. Thanks! Great! I've attached what I have in my tree. 宋文武, what do you think? Is it ready to get applied to a branch on Savannah? --9jxsPFA5p3P2qPhR Content-Type: text/x-diff; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-gnu-libnotify-Add-dependency-on-gobject-introspectio.patch" Content-Transfer-Encoding: 8bit >From 5d6e309cb76990bdf28993c147da499a7711bcc2 Mon Sep 17 00:00:00 2001 Message-Id: <5d6e309cb76990bdf28993c147da499a7711bcc2.1462241736.git.leo@famulari.name> From: Jan Nieuwenhuizen 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. Signed-off-by: Leo Famulari --- 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 0fd1d5b..5ecae92 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2016 Jochem Raat ;;; Copyright © 2016 Rene Saavedra ;;; Copyright © 2016 Kei Yamashita +;;; Copyright © 2016 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -683,7 +684,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.7.4 --9jxsPFA5p3P2qPhR Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0002-gnu-Add-gnome-tweak-tool.patch" >From c80a6fc7ec81ab6e5436685fa3da587e512bfb43 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <5d6e309cb76990bdf28993c147da499a7711bcc2.1462241736.git.leo@famulari.name> References: <5d6e309cb76990bdf28993c147da499a7711bcc2.1462241736.git.leo@famulari.name> 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 (dist_patch_DATA): Add it. * gnu/packages/gnome.scm (gnome-tweak-tool): New variable. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 43 ++++++++++++++++++ .../patches/gnome-tweak-tool-search-paths.patch | 52 ++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 gnu/packages/patches/gnome-tweak-tool-search-paths.patch diff --git a/gnu/local.mk b/gnu/local.mk index 4a36bb5..24b7028 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -506,6 +506,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 5ecae92..6c6c73e 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -4997,3 +4997,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.0") + (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 + "1nr5m7ziij7jrfkpm4rsk089vgcpwpm90x9lfl7m918zayawrfk0")))) + (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 +janneke@gnu.org + +--- 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.7.4 --9jxsPFA5p3P2qPhR--