summaryrefslogtreecommitdiff
path: root/gnu/packages/video.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2019-07-02 23:12:41 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2019-07-02 23:13:21 +0200
commitdb37dd91e442055b424c7ab721de59ffbe5f001f (patch)
tree7cb3fc20fba415054435610520821e8ca2d2cbe5 /gnu/packages/video.scm
parent54278e225e99707c3bd6f9eb37b8906851251b49 (diff)
downloadpatches-db37dd91e442055b424c7ab721de59ffbe5f001f.tar
patches-db37dd91e442055b424c7ab721de59ffbe5f001f.tar.gz
gnu: youtube-dl-gui: Add .desktop file.
* gnu/packages/video.scm (youtube-dl-gui)[arguments]: Add a ‘create-desktop-file’ phase.
Diffstat (limited to 'gnu/packages/video.scm')
-rw-r--r--gnu/packages/video.scm22
1 files changed, 21 insertions, 1 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index bd94279b7f..ef6d9cce82 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)))