diff mbox series

[bug#38538] gnu: Add gnome-shell-extension-hide-app-icon

Message ID 15831159f236fe1a0e31d5882580c4d049a9522b.camel@student.tugraz.at
State Accepted
Headers show
Series [bug#38538] gnu: Add gnome-shell-extension-hide-app-icon | expand

Commit Message

Leo Prikler Dec. 19, 2019, 12:44 p.m. UTC
Am Donnerstag, den 19.12.2019, 12:00 +0100 schrieb Leo Prikler:
> Am Donnerstag, den 19.12.2019, 11:20 +0200 schrieb Efraim Flashner:
> > What does this need glib and glib:bin for? Is it just for building
> > the
> > schemas or does it actually need it at runtime?
> To be honest, I'm not quite sure.  I've copied this part from my
> dash-
> to-dock extension, wherein I copied it from the gnome-shell-
> extensions
> package.
> 
> As far as I'm aware both packages do build schemas, but I'm not sure
> how extensions handle them at runtime.  Perhaps this is already wrong
> in the package I originally copied the snippet from.  I'll try to see
> how far I can get with depropagation.
> 
> Regards,
> Leo
Upon closer inspection, it appears depropagation is indeed possible. 
See the attached patch.

Comments

Efraim Flashner Dec. 19, 2019, 1:38 p.m. UTC | #1
On Thu, Dec 19, 2019 at 01:44:47PM +0100, Leo Prikler wrote:
> Am Donnerstag, den 19.12.2019, 12:00 +0100 schrieb Leo Prikler:
> > Am Donnerstag, den 19.12.2019, 11:20 +0200 schrieb Efraim Flashner:
> > > What does this need glib and glib:bin for? Is it just for building
> > > the
> > > schemas or does it actually need it at runtime?
> > To be honest, I'm not quite sure.  I've copied this part from my
> > dash-
> > to-dock extension, wherein I copied it from the gnome-shell-
> > extensions
> > package.
> > 
> > As far as I'm aware both packages do build schemas, but I'm not sure
> > how extensions handle them at runtime.  Perhaps this is already wrong
> > in the package I originally copied the snippet from.  I'll try to see
> > how far I can get with depropagation.
> > 
> > Regards,
> > Leo
> Upon closer inspection, it appears depropagation is indeed possible. 
> See the attached patch.

It makes sense to me that glib:bin should be a native-input but I assume
glib, if it's needed at runtime, would probably need to be propagated
since the extension doesn't refer to it. Likely it's getting glib from
another package in the environment.

Also, the depropagation patch should really be a separate patch for each
package if we go that route.
Leo Prikler Dec. 19, 2019, 2:06 p.m. UTC | #2
Am Donnerstag, den 19.12.2019, 15:38 +0200 schrieb Efraim Flashner:
> On Thu, Dec 19, 2019 at 01:44:47PM +0100, Leo Prikler wrote:
> > Am Donnerstag, den 19.12.2019, 12:00 +0100 schrieb Leo Prikler:
> > > Am Donnerstag, den 19.12.2019, 11:20 +0200 schrieb Efraim
> > > Flashner:
> > > > What does this need glib and glib:bin for? Is it just for
> > > > building
> > > > the
> > > > schemas or does it actually need it at runtime?
> > > To be honest, I'm not quite sure.  I've copied this part from my
> > > dash-
> > > to-dock extension, wherein I copied it from the gnome-shell-
> > > extensions
> > > package.
> > > 
> > > As far as I'm aware both packages do build schemas, but I'm not
> > > sure
> > > how extensions handle them at runtime.  Perhaps this is already
> > > wrong
> > > in the package I originally copied the snippet from.  I'll try to
> > > see
> > > how far I can get with depropagation.
> > > 
> > > Regards,
> > > Leo
> > Upon closer inspection, it appears depropagation is indeed
> > possible. 
> > See the attached patch.
> 
> It makes sense to me that glib:bin should be a native-input but I
> assume
> glib, if it's needed at runtime, would probably need to be propagated
> since the extension doesn't refer to it. Likely it's getting glib
> from
> another package in the environment.
I'm not really sure, what the correct thing would be here.  I did have
very weird behaviour with hide-app-icon, where having glib as input vs.
not having it made the difference of having to reload the extension
after changing settings vs. not having to.  However, I'm really not
sure whether that was due to the extension or a weirdness in GNOME
Shell.

> Also, the depropagation patch should really be a separate patch for
> each
> package if we go that route.
Perhaps.  I just wanted to "prove" that you can at least depropagate
glib:bin and probably glib as well.
Efraim Flashner Dec. 20, 2019, 7:02 a.m. UTC | #3
On Thu, Dec 19, 2019 at 03:06:27PM +0100, Leo Prikler wrote:
> Am Donnerstag, den 19.12.2019, 15:38 +0200 schrieb Efraim Flashner:
> > On Thu, Dec 19, 2019 at 01:44:47PM +0100, Leo Prikler wrote:
> > > Am Donnerstag, den 19.12.2019, 12:00 +0100 schrieb Leo Prikler:
> > > > Am Donnerstag, den 19.12.2019, 11:20 +0200 schrieb Efraim
> > > > Flashner:
> > > > > What does this need glib and glib:bin for? Is it just for
> > > > > building
> > > > > the
> > > > > schemas or does it actually need it at runtime?
> > > > To be honest, I'm not quite sure.  I've copied this part from my
> > > > dash-
> > > > to-dock extension, wherein I copied it from the gnome-shell-
> > > > extensions
> > > > package.
> > > > 
> > > > As far as I'm aware both packages do build schemas, but I'm not
> > > > sure
> > > > how extensions handle them at runtime.  Perhaps this is already
> > > > wrong
> > > > in the package I originally copied the snippet from.  I'll try to
> > > > see
> > > > how far I can get with depropagation.
> > > > 
> > > > Regards,
> > > > Leo
> > > Upon closer inspection, it appears depropagation is indeed
> > > possible. 
> > > See the attached patch.
> > 
> > It makes sense to me that glib:bin should be a native-input but I
> > assume
> > glib, if it's needed at runtime, would probably need to be propagated
> > since the extension doesn't refer to it. Likely it's getting glib
> > from
> > another package in the environment.
> I'm not really sure, what the correct thing would be here.  I did have
> very weird behaviour with hide-app-icon, where having glib as input vs.
> not having it made the difference of having to reload the extension
> after changing settings vs. not having to.  However, I'm really not
> sure whether that was due to the extension or a weirdness in GNOME
> Shell.
> 

In any case, I've pushed the patch with glib:bin in native-inputs and
glib in propagated-inputs.

> > Also, the depropagation patch should really be a separate patch for
> > each
> > package if we go that route.
> Perhaps.  I just wanted to "prove" that you can at least depropagate
> glib:bin and probably glib as well.
>
diff mbox series

Patch

From 8b468ac52e55560e8581a4b93ddefba00dbfab62 Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Thu, 19 Dec 2019 13:31:58 +0100
Subject: [PATCH 2/2] gnu: Depropagate glib from GNOME Shell extensions

* gnu/packages/gnome.scm (gnome-shell-extensions): Drop propagated inputs,
move them to more appropriate place.
[propagated-inputs]: Removed field.
[native-inputs] <glib:bin>: New input.
[inputs] <glib>: New input.
* gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-dock): Likewise.
(gnome-shell-extension-hide-app-icon): Likewise.
---
 gnu/packages/gnome-xyz.scm | 16 ++++++++--------
 gnu/packages/gnome.scm     |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 148f1db646..9dff38fa39 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -140,11 +140,11 @@  the Obsidian icon theme.")
          (delete 'bootstrap)
          (delete 'configure))))
     (native-inputs
-     `(("intltool" ,intltool)
+     `(("glib:bin" ,glib "bin")
+       ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
-    (propagated-inputs
-     `(("glib" ,glib)
-       ("glib" ,glib "bin")))
+    (inputs
+     `(("glib" ,glib)))
     (synopsis "Transforms GNOME's dash into a dock")
     (description "This extension moves the dash out of the
 overview, transforming it into a dock for easier application launching and
@@ -182,12 +182,12 @@  faster window switching.")
                (mkdir-p (string-append (assoc-ref outputs "out")
                                        "/share/gnome-shell/extensions")))))))
       (native-inputs
-       `(("intltool" ,intltool)
+       `(("glib:bin" ,glib "bin")
+         ("intltool" ,intltool)
          ("unzip" ,unzip)
          ("zip" ,zip)))
-      (propagated-inputs
-       `(("glib" ,glib)
-         ("glib" ,glib "bin")))
+      (inputs
+       `(("glib" ,glib)))
       (synopsis "Hide app icon from GNOME's panel")
       (description "This extension allows to hide the icon and/or title of the
 currently focused application in the top panel of the GNOME shell.")
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 77d96987d6..117937a9ba 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7537,11 +7537,11 @@  GNOME Shell appearance and extension, etc.")
     (arguments
      '(#:configure-flags '("-Dextension_set=all")))
     (native-inputs
-     `(("intltool" ,intltool)
+     `(("glib" ,glib "bin")
+       ("intltool" ,intltool)
        ("pkg-config" ,pkg-config)))
-    (propagated-inputs
-     `(("glib" ,glib)
-       ("glib" ,glib "bin")))
+    (inputs
+     `(("glib" ,glib)))
     (synopsis "Extensions for GNOME Shell")
     (description "GNOME Shell extensions modify and extend GNOME Shell
 functionality and behavior.")
-- 
2.24.1