From 0764d5992c0caf539fc3abe711a6f8c5a50d8c4e Mon Sep 17 00:00:00 2001
From: Johannes Frankenau <johannes@frankenau.net>
Date: Sun, 13 May 2018 22:03:17 +0200
Subject: [PATCH] youtube-dl: install zsh completion

---
 pkgs/tools/misc/youtube-dl/default.nix | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix
index d2e490373da0..29ece1b8b0fb 100644
--- a/pkgs/tools/misc/youtube-dl/default.nix
+++ b/pkgs/tools/misc/youtube-dl/default.nix
@@ -38,11 +38,16 @@ buildPythonApplication rec {
         ++ optional phantomjsSupport phantomjs2;
     in [ ''--prefix PATH : "${makeBinPath packagesToBinPath}"'' ];
 
+  postInstall = ''
+    mkdir -p $out/share/zsh/site-functions
+    cp youtube-dl.zsh $out/share/zsh/site-functions/_youtube-dl
+  '';
+
   # Requires network
   doCheck = false;
 
   meta = {
-    homepage = http://rg3.github.io/youtube-dl/;
+    homepage = https://rg3.github.io/youtube-dl/;
     repositories.git = https://github.com/rg3/youtube-dl.git;
     description = "Command-line tool to download videos from YouTube.com and other sites";
     longDescription = ''