unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26988: Add desktop-file-utils to all gtk applications
@ 2017-05-18 21:01 Danny Milosavljevic
  2017-05-18 21:07 ` bug#26988: [PATCH] gnu: Move desktop-file-utils to (gnu packages freedesktop) Danny Milosavljevic
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2017-05-18 21:01 UTC (permalink / raw)
  To: 26988

Hi,

these are two patches I propose we add in order to add desktop-file-utils to all gtk applications.  This means that the profile hook would pick up the desktop files (as soon as possible).

One patch moves desktop-file-utils from (gnu packages gnome) to (gnu packages freedesktop).  I suggest we apply this patch to all branches - since they don't change anything in the build.

The other patch adds desktop-file-utils as propagated-input to gtk+-2 (and by inheritance to gtk+ 3, too).  That would imply entail all gtk applications.  Therefore, it should only go to core-updates.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#26988: [PATCH] gnu: Move desktop-file-utils to (gnu packages freedesktop).
  2017-05-18 21:01 bug#26988: Add desktop-file-utils to all gtk applications Danny Milosavljevic
@ 2017-05-18 21:07 ` Danny Milosavljevic
  2017-05-18 21:19 ` bug#26988: [PATCH] gnu: gtk+-2: Add desktop-file-utils to propagated-inputs Danny Milosavljevic
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2017-05-18 21:07 UTC (permalink / raw)
  To: 26988

* gnu/packages/gnome.scm (desktop-file-utils): Move from here ...
* gnu/packages/freedesktop.scm (desktop-file-utils): to here.
---
 gnu/packages/freedesktop.scm | 32 ++++++++++++++++++++++++++++++++
 gnu/packages/gnome.scm       | 32 --------------------------------
 2 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 85a6c8b26..dfc88986f 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -927,3 +927,35 @@ library to access fingerprint readers, over the D-Bus interprocess
 communication bus.  This daemon layer above libfprint solves problems related
 to applications simultaneously competing for fingerprint readers.")
     (license license:gpl2+)))
+
+(define-public desktop-file-utils
+  (package
+    (name "desktop-file-utils")
+    (version "0.23")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.freedesktop.org/software/" name
+                                  "/releases/" name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)))
+    (home-page "http://www.freedesktop.org/wiki/Software/desktop-file-utils/")
+    (synopsis "Utilities for working with desktop entries")
+    (description
+     "This package contains a few command line utilities for working with
+desktop entries:
+
+desktop-file-validate: validates a desktop file and prints warnings/errors
+                       about desktop entry specification violations.
+
+desktop-file-install: installs a desktop file to the applications directory,
+                      optionally munging it a bit in transit.
+
+update-desktop-database: updates the database containing a cache of MIME types
+                         handled by desktop files.")
+    (license license:gpl2+)))
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 47dcc91dc..e7b1577f3 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -656,38 +656,6 @@ Specification, the icon naming utility maps the icon names used by the
 GNOME and KDE desktops to the icon names proposed in the specification.")
     (license license:lgpl2.1+)))
 
-(define-public desktop-file-utils
-  (package
-    (name "desktop-file-utils")
-    (version "0.23")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://www.freedesktop.org/software/" name
-                                  "/releases/" name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
-    (build-system gnu-build-system)
-    (native-inputs
-     `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("glib" ,glib)))
-    (home-page "http://www.freedesktop.org/wiki/Software/desktop-file-utils/")
-    (synopsis "Utilities for working with desktop entries")
-    (description
-     "This package contains a few command line utilities for working with
-desktop entries:
-
-desktop-file-validate: validates a desktop file and prints warnings/errors
-                       about desktop entry specification violations.
-
-desktop-file-install: installs a desktop file to the applications directory,
-                      optionally munging it a bit in transit.
-
-update-desktop-database: updates the database containing a cache of MIME types
-                         handled by desktop files.")
-    (license license:gpl2+)))
-
 (define-public gnome-icon-theme
   (package
     (name "gnome-icon-theme")

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#26988: [PATCH] gnu: gtk+-2: Add desktop-file-utils to propagated-inputs.
  2017-05-18 21:01 bug#26988: Add desktop-file-utils to all gtk applications Danny Milosavljevic
  2017-05-18 21:07 ` bug#26988: [PATCH] gnu: Move desktop-file-utils to (gnu packages freedesktop) Danny Milosavljevic
@ 2017-05-18 21:19 ` Danny Milosavljevic
  2017-05-19 23:05 ` bug#26988: Add desktop-file-utils to all gtk applications Marius Bakke
  2017-06-05 19:22 ` bug#26988: [PATCH v2 0/2] " Danny Milosavljevic
  3 siblings, 0 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2017-05-18 21:19 UTC (permalink / raw)
  To: 26988

* gnu/packages/gtk.scm (gtk+-2)[propagated-inputs]: Add desktop-file-utils.
---
 gnu/packages/gtk.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index dffa2baf3..cf40c59dc 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -604,6 +604,7 @@ is part of the GNOME accessibility project.")
    (outputs '("out" "doc"))
    (propagated-inputs
     `(("atk" ,atk)
+      ("desktop-file-utils" ,desktop-file-utils) ; Used by profile hook.
       ("gdk-pixbuf" ,gdk-pixbuf+svg)
       ("pango" ,pango)))
    (inputs

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#26988: Add desktop-file-utils to all gtk applications
  2017-05-18 21:01 bug#26988: Add desktop-file-utils to all gtk applications Danny Milosavljevic
  2017-05-18 21:07 ` bug#26988: [PATCH] gnu: Move desktop-file-utils to (gnu packages freedesktop) Danny Milosavljevic
  2017-05-18 21:19 ` bug#26988: [PATCH] gnu: gtk+-2: Add desktop-file-utils to propagated-inputs Danny Milosavljevic
@ 2017-05-19 23:05 ` Marius Bakke
  2017-05-20 13:04   ` Danny Milosavljevic
  2017-06-05 19:22 ` bug#26988: [PATCH v2 0/2] " Danny Milosavljevic
  3 siblings, 1 reply; 14+ messages in thread
From: Marius Bakke @ 2017-05-19 23:05 UTC (permalink / raw)
  To: Danny Milosavljevic, 26988

[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]

Danny Milosavljevic <dannym@scratchpost.org> writes:

> these are two patches I propose we add in order to add
> desktop-file-utils to all gtk applications.  This means that the
> profile hook would pick up the desktop files (as soon as possible).

So if I read (guix profiles) correctly, the hook only runs when
'desktop-file-utils' is referenced. Would checking for a gtk reference
as well not achieve the same effect? Or is that too expensive?

> One patch moves desktop-file-utils from (gnu packages gnome) to (gnu
> packages freedesktop).  I suggest we apply this patch to all branches
> - since they don't change anything in the build.

Adding it to 'master' would be sufficient, no? It will be merged to
'staging' and 'core-updates' in due time.

I don't see a good reason to move it though, but no strong opinion. Make
sure all dependent packages still finds it!

> The other patch adds desktop-file-utils as propagated-input to gtk+-2
> (and by inheritance to gtk+ 3, too).  That would imply entail all gtk
> applications.  Therefore, it should only go to core-updates.

Not just all gtk applications, but also anything depending on those. Can
you add a comment about why we propagate 'desktop-file-utils' from gtk?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#26988: Add desktop-file-utils to all gtk applications
  2017-05-19 23:05 ` bug#26988: Add desktop-file-utils to all gtk applications Marius Bakke
@ 2017-05-20 13:04   ` Danny Milosavljevic
  2017-05-20 23:00     ` Marius Bakke
  0 siblings, 1 reply; 14+ messages in thread
From: Danny Milosavljevic @ 2017-05-20 13:04 UTC (permalink / raw)
  To: Marius Bakke, 宋文武; +Cc: 26988

Hi Marius,
Hi 宋文武,

On Sat, 20 May 2017 01:05:22 +0200
Marius Bakke <mbakke@fastmail.com> wrote:

> Danny Milosavljevic <dannym@scratchpost.org> writes:
> 
> > these are two patches I propose we add in order to add
> > desktop-file-utils to all gtk applications.  This means that the
> > profile hook would pick up the desktop files (as soon as possible).  
> 
> So if I read (guix profiles) correctly, the hook only runs when
> 'desktop-file-utils' is referenced. Would checking for a gtk reference
> as well not achieve the same effect? Or is that too expensive?

That would probably work as well.

But the idea is KDE would eventually use the XDG desktop cache, too (maybe it already does - no idea).  Any other desktop environments that don't reinvent the wheel in that regard would use desktop-file-utils as well - and that's the package that actually contains the "update-desktop-database" executable for updating the XDG desktop cache.

Right now the "xdg-desktop-database" profile hook doesn't need its own magical packages but it just uses the existing desktop-file-utils reference for actually updating the desktop database.

At least I think that's the idea there.  宋文武 wrote the update-desktop-database part in the profile hook... 宋文武, what do you think?

> > One patch moves desktop-file-utils from (gnu packages gnome) to (gnu
> > packages freedesktop).  I suggest we apply this patch to all branches
> > - since they don't change anything in the build.  
> 
> Adding it to 'master' would be sufficient, no? It will be merged to
> 'staging' and 'core-updates' in due time.

> I don't see a good reason to move it though, but no strong opinion. 

desktop-file-utils is a freedesktop project.

If we don't move it and if KDE used desktop-file-utils (as it should), we'd have KDE depend on Gnome.

Also, it causes module reference cycles if we don't move it.  I don't like those - even though they seem to work in this instance.

I think moving it is preferrable to having it sit there, waiting to make the module cycles explode.

>Make sure all dependent packages still finds it!

Yes, I should add a reference to (gnu packages freedesktop) in (gnu packages xfce), (gnu packages game-development) and (gnu packages engineering) in the next version.

If we did move it in all branches, I mean also in wip-installer etc, I think it would prevent any merging problems - since git uses file hashes as commits - and people would not have to take care whether this branch has already moved it or not.

Moving wouldn't cause any rebuilds and fallout would be minimal - the risk would be very low.

> > The other patch adds desktop-file-utils as propagated-input to gtk+-2
> > (and by inheritance to gtk+ 3, too).  That would [entail rebuilding] all gtk
> > applications.  Therefore, it should only go to core-updates.  
> 
> Not just all gtk applications, but also anything depending on those. Can
> you add a comment about why we propagate 'desktop-file-utils' from gtk?

There's one:

+      ("desktop-file-utils" ,desktop-file-utils) ; Used by profile hook.

Do you mean we should add some more text?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#26988: Add desktop-file-utils to all gtk applications
  2017-05-20 13:04   ` Danny Milosavljevic
@ 2017-05-20 23:00     ` Marius Bakke
  2017-05-21  2:32       ` Marius Bakke
  0 siblings, 1 reply; 14+ messages in thread
From: Marius Bakke @ 2017-05-20 23:00 UTC (permalink / raw)
  To: Danny Milosavljevic, 宋文武; +Cc: 26988

[-- Attachment #1: Type: text/plain, Size: 3302 bytes --]

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi Marius,
> Hi 宋文武,
>
> On Sat, 20 May 2017 01:05:22 +0200
> Marius Bakke <mbakke@fastmail.com> wrote:
>
>> Danny Milosavljevic <dannym@scratchpost.org> writes:
>> 
>> > these are two patches I propose we add in order to add
>> > desktop-file-utils to all gtk applications.  This means that the
>> > profile hook would pick up the desktop files (as soon as possible).  
>> 
>> So if I read (guix profiles) correctly, the hook only runs when
>> 'desktop-file-utils' is referenced. Would checking for a gtk reference
>> as well not achieve the same effect? Or is that too expensive?
>
> That would probably work as well.
>
> But the idea is KDE would eventually use the XDG desktop cache, too (maybe it already does - no idea).  Any other desktop environments that don't reinvent the wheel in that regard would use desktop-file-utils as well - and that's the package that actually contains the "update-desktop-database" executable for updating the XDG desktop cache.
>
> Right now the "xdg-desktop-database" profile hook doesn't need its own magical packages but it just uses the existing desktop-file-utils reference for actually updating the desktop database.

IIUC, the idea is to run the hook every time a package with a ".desktop"
file has changed. Even if we propagate "desktop-file-utils" from say,
GTK+ and Qt, it won't catch some cases where we add the ".desktop" file
manually such as "rxvt-unicode".

I wonder if there is a more generic thing we could test for.. Maybe
libx11? Obviously lots of false positives, but the hook is not *that*
expensive. Thoughts?

>> > One patch moves desktop-file-utils from (gnu packages gnome) to (gnu
>> > packages freedesktop).  I suggest we apply this patch to all branches
>> > - since they don't change anything in the build.  
>> 
>> Adding it to 'master' would be sufficient, no? It will be merged to
>> 'staging' and 'core-updates' in due time.
>
>> I don't see a good reason to move it though, but no strong opinion. 
>
> desktop-file-utils is a freedesktop project.
>
> If we don't move it and if KDE used desktop-file-utils (as it should), we'd have KDE depend on Gnome.

Ah, ok. Makes sense.

> If we did move it in all branches, I mean also in wip-installer etc, I think it would prevent any merging problems - since git uses file hashes as commits - and people would not have to take care whether this branch has already moved it or not.

IME, git usually recognizes cherry-picks as the same change, but not
always. I think the problem is that "cherry-pick" is smart, it can adapt
to some fairly complicated context changes unlike e.g. "patch". So, even
if the cherry-pick succeeds, the file and context can be very different.

For example, I recently tested merging a branch with 600+ cherry-picks
back to 'master'. That went mostly-well, but there were some very
difficult conflicts in all files that had changed in the other branch
(and the duplicate branch history did not help).

In short, I think we should prefer merging to cherry-picks whenever
possible. Merging is equally smart, so if cherry-pick works "out of the
box" merge will too. And they definitely do not prevent merging
problems, quite the opposite!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#26988: Add desktop-file-utils to all gtk applications
  2017-05-20 23:00     ` Marius Bakke
@ 2017-05-21  2:32       ` Marius Bakke
  2017-07-03 15:32         ` 宋文武
  0 siblings, 1 reply; 14+ messages in thread
From: Marius Bakke @ 2017-05-21  2:32 UTC (permalink / raw)
  To: Danny Milosavljevic, 宋文武; +Cc: 26988

[-- Attachment #1: Type: text/plain, Size: 1984 bytes --]

Marius Bakke <mbakke@fastmail.com> writes:

> Danny Milosavljevic <dannym@scratchpost.org> writes:
>
>> Hi Marius,
>> Hi 宋文武,
>>
>> On Sat, 20 May 2017 01:05:22 +0200
>> Marius Bakke <mbakke@fastmail.com> wrote:
>>
>>> Danny Milosavljevic <dannym@scratchpost.org> writes:
>>> 
>>> > these are two patches I propose we add in order to add
>>> > desktop-file-utils to all gtk applications.  This means that the
>>> > profile hook would pick up the desktop files (as soon as possible).  
>>> 
>>> So if I read (guix profiles) correctly, the hook only runs when
>>> 'desktop-file-utils' is referenced. Would checking for a gtk reference
>>> as well not achieve the same effect? Or is that too expensive?
>>
>> That would probably work as well.
>>
>> But the idea is KDE would eventually use the XDG desktop cache, too (maybe it already does - no idea).  Any other desktop environments that don't reinvent the wheel in that regard would use desktop-file-utils as well - and that's the package that actually contains the "update-desktop-database" executable for updating the XDG desktop cache.
>>
>> Right now the "xdg-desktop-database" profile hook doesn't need its own magical packages but it just uses the existing desktop-file-utils reference for actually updating the desktop database.
>
> IIUC, the idea is to run the hook every time a package with a ".desktop"
> file has changed. Even if we propagate "desktop-file-utils" from say,
> GTK+ and Qt, it won't catch some cases where we add the ".desktop" file
> manually such as "rxvt-unicode".

A dirty workaround could be to add a reference to some dummy store item
in the 'patch-dot-desktop-files' phase. Maybe a hidden "mimeinfo-helper"
package and inject a reference to it directly in the '.desktop' files.

And then test for that in the profile hook. Sounds a bit hacky, but
should not cause any compatibility issues, and avoids the artificial
'desktop-file-utils' reference at 122MiB.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#26988: [PATCH v2 0/2] Add desktop-file-utils to all gtk applications.
  2017-05-18 21:01 bug#26988: Add desktop-file-utils to all gtk applications Danny Milosavljevic
                   ` (2 preceding siblings ...)
  2017-05-19 23:05 ` bug#26988: Add desktop-file-utils to all gtk applications Marius Bakke
@ 2017-06-05 19:22 ` Danny Milosavljevic
  2017-06-05 19:22   ` bug#26988: [PATCH v2 1/2] gnu: Move desktop-file-utils to (gnu packages freedesktop) Danny Milosavljevic
  2017-06-05 19:22   ` bug#26988: [PATCH v2 2/2] gnu: gtk+-2: Add desktop-file-utils to propagated-inputs Danny Milosavljevic
  3 siblings, 2 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2017-06-05 19:22 UTC (permalink / raw)
  To: 26988

Danny Milosavljevic (2):
  gnu: Move desktop-file-utils to (gnu packages freedesktop).
  gnu: gtk+-2: Add desktop-file-utils to propagated-inputs.

 gnu/packages/engineering.scm      |  1 +
 gnu/packages/freedesktop.scm      | 32 ++++++++++++++++++++++++++++++++
 gnu/packages/game-development.scm |  1 +
 gnu/packages/gnome.scm            | 32 --------------------------------
 gnu/packages/gtk.scm              |  1 +
 gnu/packages/xfce.scm             |  1 +
 6 files changed, 36 insertions(+), 32 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#26988: [PATCH v2 1/2] gnu: Move desktop-file-utils to (gnu packages freedesktop).
  2017-06-05 19:22 ` bug#26988: [PATCH v2 0/2] " Danny Milosavljevic
@ 2017-06-05 19:22   ` Danny Milosavljevic
  2017-06-15  8:27     ` [bug#26988] " Danny Milosavljevic
  2017-06-05 19:22   ` bug#26988: [PATCH v2 2/2] gnu: gtk+-2: Add desktop-file-utils to propagated-inputs Danny Milosavljevic
  1 sibling, 1 reply; 14+ messages in thread
From: Danny Milosavljevic @ 2017-06-05 19:22 UTC (permalink / raw)
  To: 26988

* gnu/packages/gnome.scm (desktop-file-utils): Move from here ...
* gnu/packages/freedesktop.scm (desktop-file-utils): ... to here.
* gnu/packages/engineering.scm: Import (gnu packages freedesktop).
* gnu/packages/game-development.scm: Import (gnu packages freedesktop).
* gnu/packages/xfce.scm: Import (gnu packages freedesktop).
---
 gnu/packages/engineering.scm      |  1 +
 gnu/packages/freedesktop.scm      | 32 ++++++++++++++++++++++++++++++++
 gnu/packages/game-development.scm |  1 +
 gnu/packages/gnome.scm            | 32 --------------------------------
 gnu/packages/xfce.scm             |  1 +
 5 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 7ad93653e..e835a5da9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -44,6 +44,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 85a6c8b26..dfc88986f 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -927,3 +927,35 @@ library to access fingerprint readers, over the D-Bus interprocess
 communication bus.  This daemon layer above libfprint solves problems related
 to applications simultaneously competing for fingerprint readers.")
     (license license:gpl2+)))
+
+(define-public desktop-file-utils
+  (package
+    (name "desktop-file-utils")
+    (version "0.23")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.freedesktop.org/software/" name
+                                  "/releases/" name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("glib" ,glib)))
+    (home-page "http://www.freedesktop.org/wiki/Software/desktop-file-utils/")
+    (synopsis "Utilities for working with desktop entries")
+    (description
+     "This package contains a few command line utilities for working with
+desktop entries:
+
+desktop-file-validate: validates a desktop file and prints warnings/errors
+                       about desktop entry specification violations.
+
+desktop-file-install: installs a desktop file to the applications directory,
+                      optionally munging it a bit in transit.
+
+update-desktop-database: updates the database containing a cache of MIME types
+                         handled by desktop files.")
+    (license license:gpl2+)))
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 6d9e4061d..56dedefd7 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -38,6 +38,7 @@
   #:use-module (gnu packages databases)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages fribidi)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnunet)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 84ae1cf2f..f5efb44f8 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -702,38 +702,6 @@ Specification, the icon naming utility maps the icon names used by the
 GNOME and KDE desktops to the icon names proposed in the specification.")
     (license license:lgpl2.1+)))
 
-(define-public desktop-file-utils
-  (package
-    (name "desktop-file-utils")
-    (version "0.23")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://www.freedesktop.org/software/" name
-                                  "/releases/" name "-" version ".tar.xz"))
-              (sha256
-               (base32
-                "119kj2w0rrxkhg4f9cf5waa55jz1hj8933vh47vcjipcplql02bc"))))
-    (build-system gnu-build-system)
-    (native-inputs
-     `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("glib" ,glib)))
-    (home-page "http://www.freedesktop.org/wiki/Software/desktop-file-utils/")
-    (synopsis "Utilities for working with desktop entries")
-    (description
-     "This package contains a few command line utilities for working with
-desktop entries:
-
-desktop-file-validate: validates a desktop file and prints warnings/errors
-                       about desktop entry specification violations.
-
-desktop-file-install: installs a desktop file to the applications directory,
-                      optionally munging it a bit in transit.
-
-update-desktop-database: updates the database containing a cache of MIME types
-                         handled by desktop files.")
-    (license license:gpl2+)))
-
 (define-public gnome-icon-theme
   (package
     (name "gnome-icon-theme")
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index c8786dd69..d7d1372dd 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages web)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages image)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages pdf)

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#26988: [PATCH v2 2/2] gnu: gtk+-2: Add desktop-file-utils to propagated-inputs.
  2017-06-05 19:22 ` bug#26988: [PATCH v2 0/2] " Danny Milosavljevic
  2017-06-05 19:22   ` bug#26988: [PATCH v2 1/2] gnu: Move desktop-file-utils to (gnu packages freedesktop) Danny Milosavljevic
@ 2017-06-05 19:22   ` Danny Milosavljevic
  1 sibling, 0 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2017-06-05 19:22 UTC (permalink / raw)
  To: 26988

* gnu/packages/gtk.scm (gtk+-2)[propagated-inputs]: Add desktop-file-utils.
---
 gnu/packages/gtk.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 1d9ee1524..67dc3c9a8 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -605,6 +605,7 @@ is part of the GNOME accessibility project.")
    (outputs '("out" "doc"))
    (propagated-inputs
     `(("atk" ,atk)
+      ("desktop-file-utils" ,desktop-file-utils) ; Used by profile hook.
       ("gdk-pixbuf" ,gdk-pixbuf+svg)
       ("pango" ,pango)))
    (inputs

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [bug#26988] [PATCH v2 1/2] gnu: Move desktop-file-utils to (gnu packages freedesktop).
  2017-06-05 19:22   ` bug#26988: [PATCH v2 1/2] gnu: Move desktop-file-utils to (gnu packages freedesktop) Danny Milosavljevic
@ 2017-06-15  8:27     ` Danny Milosavljevic
  0 siblings, 0 replies; 14+ messages in thread
From: Danny Milosavljevic @ 2017-06-15  8:27 UTC (permalink / raw)
  To: 26988

Pushed only this patch to master as 324b0040f4ac493ef11f82712db2c9abcc6b92ca.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#26988: Add desktop-file-utils to all gtk applications
  2017-05-21  2:32       ` Marius Bakke
@ 2017-07-03 15:32         ` 宋文武
  2017-07-03 17:08           ` [bug#26988] " Danny Milosavljevic
  0 siblings, 1 reply; 14+ messages in thread
From: 宋文武 @ 2017-07-03 15:32 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 26988-done

Marius Bakke <mbakke@fastmail.com> writes:

> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Danny Milosavljevic <dannym@scratchpost.org> writes:
>>
>>> Hi Marius,
>>> Hi 宋文武,

Hello Marius and Danny,


>>> Marius Bakke <mbakke@fastmail.com> wrote:
>>>
>>>> Danny Milosavljevic <dannym@scratchpost.org> writes:
>>>> 
>>>> > these are two patches I propose we add in order to add
>>>> > desktop-file-utils to all gtk applications.  This means that the
>>>> > profile hook would pick up the desktop files (as soon as possible).  
>>>> 
>>>> So if I read (guix profiles) correctly, the hook only runs when
>>>> 'desktop-file-utils' is referenced. Would checking for a gtk reference
>>>> as well not achieve the same effect? Or is that too expensive?

Yes, it will work better.  It's expensive slightly by adding the
latest version of desktop-file-utils into the profile closure, but
the 'xdg-mime-database' does that already.

>>> [...]
>>
>> IIUC, the idea is to run the hook every time a package with a ".desktop"
>> file has changed. Even if we propagate "desktop-file-utils" from say,
>> GTK+ and Qt, it won't catch some cases where we add the ".desktop" file
>> manually such as "rxvt-unicode".

Yes, but normally one would have other applications that using GTK+ or
GLib, which will make the hook run.

So I end up with modify the profile hook to test for GLib, it should
work in most cases.

Thanks for the patches!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#26988] Add desktop-file-utils to all gtk applications
  2017-07-03 15:32         ` 宋文武
@ 2017-07-03 17:08           ` Danny Milosavljevic
  2017-07-04 11:40             ` 宋文武
  0 siblings, 1 reply; 14+ messages in thread
From: Danny Milosavljevic @ 2017-07-03 17:08 UTC (permalink / raw)
  To: 宋文武; +Cc: 26988-done

Hi 宋文武,

On Mon, 03 Jul 2017 23:32:11 +0800
iyzsong@member.fsf.org (宋文武) wrote:

> >> GTK+ and Qt, it won't catch some cases where we add the ".desktop" file
> >> manually such as "rxvt-unicode".  

How about just adding desktop-file-utils as a native-input to rxvt-unicode (and other few special cases) with a comment saying that's because of the desktop file?

> So I end up with modify the profile hook to test for GLib, it should
> work in most cases.

Glib is a basic C library that hasn't much to do with GUI.  I think that if you check for glib you'll run the hook for system daemons, dbus etc.

Glib is basically the runtime library that makes C sane to use for any purpose.

Also, desktop-file-utils itself requires glib so make sure you don't enter an endless loop :)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [bug#26988] Add desktop-file-utils to all gtk applications
  2017-07-03 17:08           ` [bug#26988] " Danny Milosavljevic
@ 2017-07-04 11:40             ` 宋文武
  0 siblings, 0 replies; 14+ messages in thread
From: 宋文武 @ 2017-07-04 11:40 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 26988-done


A profile hook checks manifest entries for some condition, then usually
adding a item to the profile's united output.

In case of the current 'xdg-desktop-database', it checks if any entry
has a reference of glib, then adding the 'mimeinfo.cache' to the
profile.

So, ...

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi 宋文武,
>
> On Mon, 03 Jul 2017 23:32:11 +0800
> iyzsong@member.fsf.org (宋文武) wrote:
>
>> >> GTK+ and Qt, it won't catch some cases where we add the ".desktop" file
>> >> manually such as "rxvt-unicode".
>
> How about just adding desktop-file-utils as a native-input to rxvt-unicode (and other few special cases) with a comment saying that's because of the desktop file?

In the sitution where you have rxvt-unicode but not any glib based
applications in your profile, this will ensure the 'mimeinfo.cache' got
built.  But since there are no glib based things, I guess it won't be used.

>
>> So I end up with modify the profile hook to test for GLib, it should
>> work in most cases.
>
> Glib is a basic C library that hasn't much to do with GUI.  I think that if you check for glib you'll run the hook for system daemons, dbus etc.

Yeah, the hook only run once for all the packages in the profile.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-07-04 11:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 21:01 bug#26988: Add desktop-file-utils to all gtk applications Danny Milosavljevic
2017-05-18 21:07 ` bug#26988: [PATCH] gnu: Move desktop-file-utils to (gnu packages freedesktop) Danny Milosavljevic
2017-05-18 21:19 ` bug#26988: [PATCH] gnu: gtk+-2: Add desktop-file-utils to propagated-inputs Danny Milosavljevic
2017-05-19 23:05 ` bug#26988: Add desktop-file-utils to all gtk applications Marius Bakke
2017-05-20 13:04   ` Danny Milosavljevic
2017-05-20 23:00     ` Marius Bakke
2017-05-21  2:32       ` Marius Bakke
2017-07-03 15:32         ` 宋文武
2017-07-03 17:08           ` [bug#26988] " Danny Milosavljevic
2017-07-04 11:40             ` 宋文武
2017-06-05 19:22 ` bug#26988: [PATCH v2 0/2] " Danny Milosavljevic
2017-06-05 19:22   ` bug#26988: [PATCH v2 1/2] gnu: Move desktop-file-utils to (gnu packages freedesktop) Danny Milosavljevic
2017-06-15  8:27     ` [bug#26988] " Danny Milosavljevic
2017-06-05 19:22   ` bug#26988: [PATCH v2 2/2] gnu: gtk+-2: Add desktop-file-utils to propagated-inputs Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).