guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/05: gnu: youtube-dl-gui: Add .desktop file.


From: guix-commits
Subject: 05/05: gnu: youtube-dl-gui: Add .desktop file.
Date: Tue, 2 Jul 2019 17:13:35 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit db37dd91e442055b424c7ab721de59ffbe5f001f
Author: Tobias Geerinckx-Rice <address@hidden>
Date:   Tue Jul 2 23:12:41 2019 +0200

    gnu: youtube-dl-gui: Add .desktop file.
    
    * gnu/packages/video.scm (youtube-dl-gui)[arguments]:
    Add a ‘create-desktop-file’ phase.
---
 gnu/packages/video.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index bd94279..ef6d9cc 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1549,7 +1549,27 @@ YouTube.com and many more sites.")
                 (string-append "os.path.join('"
                                (assoc-ref %outputs "out")
                                "', 'share'")))
-             #t)))))
+             #t))
+         (add-after 'install 'create-desktop-file
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (applications (string-append out "/share/applications")))
+               (mkdir-p applications)
+               (call-with-output-file
+                   (string-append applications "/youtube-dl-gui.desktop")
+                 (lambda (file)
+                   (format
+                    file
+                    "[Desktop Entry]~@
+                     Name=Youtube-dl GUI~@
+                     Comment=Graphical interface to download video with 
youtube-dl~@
+                     Exec=youtube-dl-gui~@
+                     TryExec=youtube-dl-gui~@
+                     Terminal=false~@
+                     Icon=youtube-dl-gui~@
+                     Type=Application~@
+                     Categories=AudioVideo;Audio;Video;Network~%")))
+               #t))))))
     (inputs
      `(("python2-wxpython" ,python2-wxpython)
        ("youtube-dl" ,youtube-dl)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]