* [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
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 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 1 sibling, 0 replies; 17+ messages in thread From: Jan Nieuwenhuizen @ 2016-04-03 16:41 UTC (permalink / raw) To: guix-devel [-- Attachment #1: Type: text/plain, Size: 799 bytes --] Jan Nieuwenhuizen writes: > 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. Workspace grid does work, as does changing clock settings see screenshot. Choosing alternative keyboard layouts (dvorak) does still not seem available. Possibly I'm just missing some package. Downloading of extensions from withing gnome-tweak-tool does not work yet, possibly gnome-tweak-tool is missing some dependency. You'll have to download extensions yourself. Also, I found that schemas need to be compiled and that does not work automatically, I had to run glib-compile-schemas .local/share/gnome-shell/extensions/workspace-grid@mathematical.coffee.gmail.com/schemas Greetings, Jan [-- Attachment #2: Screenshot from 2016-04-03 18-27-16.png --] [-- Type: image/png, Size: 207443 bytes --] [-- Attachment #3: 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 [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 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 1 sibling, 1 reply; 17+ messages in thread From: Leo Famulari @ 2016-04-11 23:35 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel On Sun, Apr 03, 2016 at 01:07:34PM +0200, Jan Nieuwenhuizen wrote: > 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]. I still don't understand how all the parts of GNOME fit together, so I can't give a full review of these patches. But, with these patches, I can successfully prevent my laptop from sleeping when the lid is closed. Thank you! > * gnu/packages/gnome.scm (libnotify)[native-inputs]: Add > gobject-introspection. Looks okay, but as I said before, I'm no expert on this stuff. > * gnu/packages/patches/gnome-tweak-tool-search-paths.patch: New file. Can you add some comments explaining this patch (and a link to the source, if applicable)? > * gnu-system.am: Add it. Please specify which section of gnu-system.am the file is being added to. In this case, it's dist_patch_DATA. See the commit log for the exact format. > * gnu/packages/gnome.scm (gnome-tweak-tool): New variable. > + (replace 'install > + (lambda _ > + (zero? (system* "make" > + "sysconfdir=/tmp" > + "localstatedir=/tmp" > + "install"))))))) How about setting these variables in #:make-flags instead of replacing the install phase? Would that work? > + (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))) Oof, do we really have to propagate python-2 (and the others)? > + (synopsis "Gnome Tweak Tool") Can you paraphrase this? I don't think the synopsis should be the same as the package name. How about something like this: "GNOME advanced settings control panel"? ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-04-11 23:35 ` Leo Famulari @ 2016-04-13 18:02 ` Jan Nieuwenhuizen 2016-04-16 1:35 ` Leo Famulari 0 siblings, 1 reply; 17+ messages in thread From: Jan Nieuwenhuizen @ 2016-04-13 18:02 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel, rennes [-- Attachment #1: Type: text/plain, Size: 2243 bytes --] Leo Famulari writes: > I still don't understand how all the parts of GNOME fit together, so I > can't give a full review of these patches. > > But, with these patches, I can successfully prevent my laptop from > sleeping when the lid is closed. Thank you! :-) >> * gnu/packages/gnome.scm (libnotify)[native-inputs]: Add >> gobject-introspection. > > Looks okay, but as I said before, I'm no expert on this stuff. Ok. Yes, gnome-tweak-tool needs this. >> * gnu/packages/patches/gnome-tweak-tool-search-paths.patch: New file. > > Can you add some comments explaining this patch (and a link to the source, if > applicable)? Ok, done. >> * gnu-system.am: Add it. > > Please specify which section of gnu-system.am the file is being added > to. In this case, it's dist_patch_DATA. See the commit log for the exact > format. Ok. >> * gnu/packages/gnome.scm (gnome-tweak-tool): New variable. >> + (replace 'install >> + (lambda _ >> + (zero? (system* "make" >> + "sysconfdir=/tmp" >> + "localstatedir=/tmp" >> + "install"))))))) > > How about setting these variables in #:make-flags instead of replacing > the install phase? Would that work? Yes, that works. Done. >> + (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))) > > Oof, do we really have to propagate python-2 (and the others)? Yes... I experimented with moving any of these to plain inputs, gnome-tweak-tool crashes on missing gir features. >> + (synopsis "Gnome Tweak Tool") > > Can you paraphrase this? I don't think the synopsis should be the same > as the package name. How about something like this: "GNOME advanced > settings control panel"? I modified synopsis and description using https://git.gnome.org/browse/gnome-tweak-tool/tree/gnome-tweak-tool.doap like rennes suggested. Also, I updated to 3.20.0. 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.1.4 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #3: 0002-gnu-Add-gnome-tweak-tool.patch --] [-- Type: text/x-diff, Size: 5730 bytes --] From c23fc3fdf354da07f41fb0ba9abeaf464729ec2f 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-system.am | 1 + gnu/packages/gnome.scm | 39 ++++++++++++++++ .../patches/gnome-tweak-tool-search-paths.patch | 52 ++++++++++++++++++++++ 3 files changed, 92 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..acca111 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -4959,3 +4959,42 @@ 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"))) + (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 "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.1.4 [-- 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
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-04-13 18:02 ` Jan Nieuwenhuizen @ 2016-04-16 1:35 ` Leo Famulari 2016-04-17 17:22 ` Jan Nieuwenhuizen 0 siblings, 1 reply; 17+ messages in thread From: Leo Famulari @ 2016-04-16 1:35 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel, rennes, 宋文武 On Wed, Apr 13, 2016 at 08:02:14PM +0200, Jan Nieuwenhuizen wrote: Thanks for making the ther requested changes. > Leo Famulari writes: > >> + (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))) > > > > Oof, do we really have to propagate python-2 (and the others)? > > Yes... I experimented with moving any of these to plain inputs, > gnome-tweak-tool crashes on missing gir features. I tried building with glib-or-gtk-build-system instead of gnu-build-system. It still didn't work if python-2 was a mere input, but I wonder if glib-or-gtk-build-system should be used, regardless? I wonder if 宋文武 has any thoughts about this issue? Perhaps it's not a problem to propagate python-2 at the system level (which is where I think GNOME tools would normally be)? Maybe we should use a wrapper instead of propagating python-2? ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 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 0 siblings, 2 replies; 17+ messages in thread From: Jan Nieuwenhuizen @ 2016-04-17 17:22 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel, rennes, 宋文武 Leo Famulari writes: > I tried building with glib-or-gtk-build-system instead of > gnu-build-system. It still didn't work if python-2 was a mere input, but > I wonder if glib-or-gtk-build-system should be used, regardless? The glib-or-gtk-build-system lists in two additions to the gnu-build-system. I don't see gnome-tweak-tool needing any of those, do you? Gnome-tweak-tool is written in python2: it won't run without it. How could loosening the python2 dependency be helpful? Greetings, Jan -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-04-17 17:22 ` Jan Nieuwenhuizen @ 2016-04-17 18:33 ` rennes 2016-04-17 18:44 ` Leo Famulari 1 sibling, 0 replies; 17+ messages in thread From: rennes @ 2016-04-17 18:33 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel, 宋文武 On 2016-04-17 12:22, Jan Nieuwenhuizen wrote: > Leo Famulari writes: > >> I tried building with glib-or-gtk-build-system instead of >> gnu-build-system. It still didn't work if python-2 was a mere input, >> but >> I wonder if glib-or-gtk-build-system should be used, regardless? > > The glib-or-gtk-build-system lists in two additions to the > gnu-build-system. I don't see gnome-tweak-tool needing any of those, > do you? > > Gnome-tweak-tool is written in python2: it won't run without it. How > could loosening the python2 dependency be helpful? > > Greetings, > Jan Hi, I have compiled the patch, i use Python 2.7.10. but when starting the application displays the following message: CRITICAL: Could not find schema /gnu/store/8rlj4pb4kshh0xvg1n03sw736i0i4if6-gnome-tweak-tool-3.18.1/share/glib-2.0/schemas/org.gnome.shell.gschema.xml WARNING : Shell not installed or running CRITICAL: Could not find schema /gnu/store/8rlj4pb4kshh0xvg1n03sw736i0i4if6-gnome-tweak-tool-3.18.1/share/glib-2.0/schemas/org.gnome.desktop.background.gschema.xml . . I keep trying. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 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 1 sibling, 1 reply; 17+ messages in thread From: Leo Famulari @ 2016-04-17 18:44 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel, rennes, 宋文武 On Sun, Apr 17, 2016 at 07:22:27PM +0200, Jan Nieuwenhuizen wrote: > Leo Famulari writes: > > > I tried building with glib-or-gtk-build-system instead of > > gnu-build-system. It still didn't work if python-2 was a mere input, but > > I wonder if glib-or-gtk-build-system should be used, regardless? > > The glib-or-gtk-build-system lists in two additions to the > gnu-build-system. I don't see gnome-tweak-tool needing any of those, > do you? > > Gnome-tweak-tool is written in python2: it won't run without it. How > could loosening the python2 dependency be helpful? Ah, I didn't realize it was a Python program with an Autotools build system. I think we need to wrap gnome-tweak-tool's executable, which the python-build-system normally does automatically. AIUI, that's why all of the python-build-system packages don't require Python itself to be propagated. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-04-17 18:44 ` Leo Famulari @ 2016-04-24 11:19 ` Jan Nieuwenhuizen 2016-04-24 18:50 ` Leo Famulari 0 siblings, 1 reply; 17+ messages in thread From: Jan Nieuwenhuizen @ 2016-04-24 11:19 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel, rennes, 宋文武 Leo Famulari writes: >> Gnome-tweak-tool is written in python2: it won't run without it. How >> could loosening the python2 dependency be helpful? > > Ah, I didn't realize it was a Python program with an Autotools build > system. > > I think we need to wrap gnome-tweak-tool's executable, which the > python-build-system normally does automatically. AIUI, that's why all of > the python-build-system packages don't require Python itself to be > propagated. Sorry, I still don't understand. Can you explain why you want to remove python2 from the propagated inputs? And also...say we wrap gnome-tweak-tool. If we remove python2 from the propagated inputs, AIUI it python2 will not be installed and it even could just be that python2 is not downloaded at all under /gnu. How is wrapping gnome-tweak-tool going to help if we fail to make sure that python2 is present? Sorry for my ignorance. Greetings, Jan -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-04-24 11:19 ` Jan Nieuwenhuizen @ 2016-04-24 18:50 ` Leo Famulari 2016-04-27 19:05 ` Jan Nieuwenhuizen 0 siblings, 1 reply; 17+ messages in thread From: Leo Famulari @ 2016-04-24 18:50 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel, rennes, 宋文武 On Sun, Apr 24, 2016 at 01:19:35PM +0200, Jan Nieuwenhuizen wrote: > Leo Famulari writes: > > I think we need to wrap gnome-tweak-tool's executable, which the > > python-build-system normally does automatically. AIUI, that's why all of > > the python-build-system packages don't require Python itself to be > > propagated. > > 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? > And also...say we wrap gnome-tweak-tool. If we remove python2 from the > propagated inputs, AIUI it python2 will not be installed and it even > could just be that python2 is not downloaded at all under /gnu. > > How is wrapping gnome-tweak-tool going to help if we fail to make sure > that python2 is present? Sorry for my ignorance. 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? 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 ;) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 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 0 siblings, 2 replies; 17+ messages in thread From: Jan Nieuwenhuizen @ 2016-04-27 19:05 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel, rennes, 宋文武 [-- 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 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-04-27 19:05 ` Jan Nieuwenhuizen @ 2016-05-01 21:36 ` rennes 2016-05-02 22:04 ` Leo Famulari 1 sibling, 0 replies; 17+ messages in thread From: rennes @ 2016-05-01 21:36 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel, 宋文武 On 2016-04-27 14:05, Jan Nieuwenhuizen wrote: > 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 Hi, Now this patch works well for me. Thank you ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 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 1 sibling, 1 reply; 17+ messages in thread From: Leo Famulari @ 2016-05-02 22:04 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel, rennes, 宋文武 On Wed, Apr 27, 2016 at 09:05:26PM +0200, Jan Nieuwenhuizen wrote: > Yes. Moved python to inputs, added python wrapper. Cool! Based on that, I moved python2-gobject into (inputs). I also tried removing mutter entirely, since I believe mutter is provided by gnome-shell. It seems to work for me. Can you see if it works for you? (native-inputs `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) (inputs `(("python" ,python-2) ("python2-pygobject" ,python2-pygobject))) (propagated-inputs `(("libnotify" ,libnotify) ("gobject-introspection" ,gobject-introspection) ("gnome-shell" ,gnome-shell) ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) ("gtk+" ,gtk+))) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-05-02 22:04 ` Leo Famulari @ 2016-05-02 22:38 ` Jan Nieuwenhuizen 2016-05-03 2:19 ` Leo Famulari 0 siblings, 1 reply; 17+ messages in thread From: Jan Nieuwenhuizen @ 2016-05-02 22:38 UTC (permalink / raw) To: Leo Famulari; +Cc: guix-devel, rennes, 宋文武 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! Greetings, Jan -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-05-02 22:38 ` Jan Nieuwenhuizen @ 2016-05-03 2:19 ` Leo Famulari 2016-05-15 17:31 ` Leo Famulari 0 siblings, 1 reply; 17+ messages in thread From: Leo Famulari @ 2016-05-03 2:19 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel, rennes, 宋文武 [-- Attachment #1: Type: text/plain, Size: 718 bytes --] 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? [-- Attachment #2: 0001-gnu-libnotify-Add-dependency-on-gobject-introspectio.patch --] [-- Type: text/x-diff, Size: 1375 bytes --] From 5d6e309cb76990bdf28993c147da499a7711bcc2 Mon Sep 17 00:00:00 2001 Message-Id: <5d6e309cb76990bdf28993c147da499a7711bcc2.1462241736.git.leo@famulari.name> 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. Signed-off-by: Leo Famulari <leo@famulari.name> --- 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.4 [-- Attachment #3: 0002-gnu-Add-gnome-tweak-tool.patch --] [-- Type: text/x-diff, Size: 6270 bytes --] From c80a6fc7ec81ab6e5436685fa3da587e512bfb43 Mon Sep 17 00:00:00 2001 Message-Id: <c80a6fc7ec81ab6e5436685fa3da587e512bfb43.1462241736.git.leo@famulari.name> In-Reply-To: <5d6e309cb76990bdf28993c147da499a7711bcc2.1462241736.git.leo@famulari.name> References: <5d6e309cb76990bdf28993c147da499a7711bcc2.1462241736.git.leo@famulari.name> 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. Signed-off-by: Leo Famulari <leo@famulari.name> --- 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 <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.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. 2016-05-03 2:19 ` Leo Famulari @ 2016-05-15 17:31 ` Leo Famulari 0 siblings, 0 replies; 17+ messages in thread From: Leo Famulari @ 2016-05-15 17:31 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel, rennes, 宋文武 On Mon, May 02, 2016 at 10:19:16PM -0400, Leo Famulari wrote: > 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. I updated it to 3.20.1, adjusted the commit message to use gnu/local.mk instead of gnu-system.am, and applied as 9365ee1c464. Thanks Jan! ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <mailman.877.1460442807.7476.guix-devel@gnu.org>]
* Re: [PATCH 2/2] gnu: Add gnome-tweak-tool. [not found] <mailman.877.1460442807.7476.guix-devel@gnu.org> @ 2016-04-12 13:16 ` rennes 0 siblings, 0 replies; 17+ messages in thread From: rennes @ 2016-04-12 13:16 UTC (permalink / raw) To: janneke; +Cc: guix-devel Hi > On Sun, Apr 03, 2016 at 01:07:34PM +0200, Jan Nieuwenhuizen wrote: >> 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]. > > I still don't understand how all the parts of GNOME fit together, so I > can't give a full review of these patches. > > But, with these patches, I can successfully prevent my laptop from > sleeping when the lid is closed. Thank you! > >> * gnu/packages/gnome.scm (libnotify)[native-inputs]: Add >> gobject-introspection. > > Looks okay, but as I said before, I'm no expert on this stuff. > >> * gnu/packages/patches/gnome-tweak-tool-search-paths.patch: New file. > > Can you add some comments explaining this patch (and a link to the > source, if > applicable)? > >> * gnu-system.am: Add it. > > Please specify which section of gnu-system.am the file is being added > to. In this case, it's dist_patch_DATA. See the commit log for the > exact > format. > >> * gnu/packages/gnome.scm (gnome-tweak-tool): New variable. >> + (replace 'install >> + (lambda _ >> + (zero? (system* "make" >> + "sysconfdir=/tmp" >> + "localstatedir=/tmp" >> + "install"))))))) > > How about setting these variables in #:make-flags instead of replacing > the install phase? Would that work? > >> + (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))) > > Oof, do we really have to propagate python-2 (and the others)? > >> + (synopsis "Gnome Tweak Tool") > > Can you paraphrase this? I don't think the synopsis should be the same > as the package name. How about something like this: "GNOME advanced > settings control panel"? > you can take the synopsis and description of the file gnome-tweak-tool.doap (https://git.gnome.org/browse/gnome-tweak-tool/tree/gnome-tweak-tool.doap). Thanks ^ permalink raw reply [flat|nested] 17+ messages in thread
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 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.