@@ -0,0 +1,36 @@
1+{ stdenv, fetchFromGitHub, emacs, lib }:
2+
3+stdenv.mkDerivation {
4+ pname = "youtube-dl";
5+ version = "2018-10-12";
6+
7+ src = fetchFromGitHub {
8+ owner = "skeeto";
9+ repo = "youtube-dl-emacs";
10+ rev = "af877b5bc4f01c04fccfa7d47a2c328926f20ef4";
11+ sha256 = "sha256-Etl95rcoRACDPjcTPQqYK2L+w8OZbOrTrRT0JadMdH4=";
12+ };
13+
14+ buildInputs = [ emacs ];
15+
16+ buildPhase = ''
17+ runHook preBuild
18+ emacs -L . --batch -f batch-byte-compile *.el
19+ runHook postBuild
20+ '';
21+
22+ installPhase = ''
23+ runHook preInstall
24+ install -d $out/share/emacs/site-lisp
25+ install *.el *.elc $out/share/emacs/site-lisp
26+ runHook postInstall
27+ '';
28+
29+ meta = {
30+ description = "Emacs frontend to the youtube-dl utility";
31+ homepage = "https://github.com/skeeto/youtube-dl-emacs";
32+ license = lib.licenses.unlicense;
33+ maintainers = with lib.maintainers; [ leungbk ];
34+ platforms = emacs.meta.platforms;
35+ };
36+}