From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org, rennes@openmailbox.org, 宋文武 <iyzsong@gmail.com>
Subject: Re: [PATCH 2/2] gnu: Add gnome-tweak-tool.
Date: Wed, 27 Apr 2016 21:05:26 +0200 [thread overview]
Message-ID: <87twim7tzd.fsf@drakenvlieg.flower> (raw)
In-Reply-To: <20160424185020.GA7737@jasmine> (Leo Famulari's message of "Sun, 24 Apr 2016 14:50:20 -0400")
[-- Attachment #1: Type: text/plain, Size: 2291 bytes --]
Leo Famulari writes:
Hi!
Find attached a new version of gnome-tweak-tool.
>> Sorry, I still don't understand. Can you explain why you want to remove
>> python2 from the propagated inputs?
>
> Propagated-inputs are silently installed into the user's profile
> alongside the package that propagates them. In this case, installing
> gnome-tweak-tool would also install python2 into the user's profile.
>
> Propagation becomes attractive when the software provided by a package
> does not have a good mechanism for finding its dependencies. For
> example, some software may *only* be able to find a dependency by
> looking on PATH. Gnome-tweak-tool, as far as we know, has this
> limitation for python2.
>
> The problem with propagating inputs is that only one version of a given
> package may be installed into a user's profile. This is in contrast to
> "regular" inputs, which are not installed into a user's profile. Indeed,
> every package that you install into your profile could refer to a
> different version of, say, libfoo, by linking directly to the various
> libfoos' directories in the store.
>
> So, letting gnome-tweak-tool propagate python2 would prevent a Python
> programmer from choosing which version of python2 they want in their
> profile; they'd be forced to choose between gnome-tweak-tool or their
> desired python2.
>
> Does that make sense?
That makes sense. Thanks for your explanation! Is this documented
somewhere? I think it should be.
> An alternative to propagated-inputs is to use a wrapper. Actually, all
> of our packages using the python-build-system are wrapped automatically
> [0]. The wrapper makes the dependent packages available in the run-time
> environment without polluting the user's profile, while introducing a
> reference to the dependencies into the store directory, which makes sure
> that the garbage collector works correctly.
>
> Does that make sense?
Yes. Moved python to inputs, added python wrapper.
> Hopefully, I've got that all right — I'll be happy if somebody clarifies
> or corrects me!
>
> [0] If gnome-tweak-tool did not break convention by using the Autotools
> to build Python software, this discussion would not be happening ;)
Hah! ;-)
Greetings,
Jan
[-- Attachment #2: 0001-gnu-libnotify-Add-dependency-on-gobject-introspectio.patch --]
[-- Type: text/x-diff, Size: 1278 bytes --]
From b803f66a828aa490079bffb3ee1be4fbbb847eb4 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 0fd1d5b..5ecae92 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2016 Jochem Raat <jchmrt@riseup.net>
;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
;;; Copyright © 2016 Kei Yamashita <kei@openmailbox.org>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;;
;;; 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.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: 6014 bytes --]
From e1f882247503d2f9547da6ef0eedee561341cfb8 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 (dist_patch_DATA): Add it.
* gnu/packages/gnome.scm (gnome-tweak-tool): New variable.
---
gnu/local.mk | 1 +
gnu/packages/gnome.scm | 44 ++++++++++++++++++
.../patches/gnome-tweak-tool-search-paths.patch | 52 ++++++++++++++++++++++
3 files changed, 97 insertions(+)
create mode 100644 gnu/packages/patches/gnome-tweak-tool-search-paths.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 3cdf5e4..0ee30ca 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -504,6 +504,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..b47eb12 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4997,3 +4997,47 @@ 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)))
+ (propagated-inputs
+ `(("gobject-introspection" ,gobject-introspection)
+ ("gnome-shell" ,gnome-shell)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("gtk+" ,gtk+)
+ ("libnotify" ,libnotify)
+ ("mutter" ,mutter)
+ ("python2-pygobject" ,python2-pygobject)))
+ (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 <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.7.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
next prev parent reply other threads:[~2016-04-27 19:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twim7tzd.fsf@drakenvlieg.flower \
--to=janneke@gnu.org \
--cc=guix-devel@gnu.org \
--cc=iyzsong@gmail.com \
--cc=leo@famulari.name \
--cc=rennes@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.