@@ -0,0 +1,35 @@
1+{ lib, python3Packages, fetchFromGitHub, fetchurl, youtube-dl, git }:
2+
3+let
4+ install_freedesktop = fetchurl {
5+ url = "https://github.com/thann/install_freedesktop/tarball/2673e8da4a67bee0ffc52a0ea381a541b4becdd4";
6+ sha256 = "0j8d5jdcyqbl5p6sc1ags86v3hr2sghmqqi99d1mvc064g90ckrv";
7+ };
8+in
9+python3Packages.buildPythonApplication rec {
10+ pname = "play-with-mpv";
11+ version = "unstable-2020-05-18";
12+
13+ src = fetchFromGitHub {
14+ owner = "thann";
15+ repo = "play-with-mpv";
16+ rev = "656448e03fe9de9e8bd21959f2a3b47c4acb8c3e";
17+ sha256 = "1qma8b3lnkdhxdjsnrq7n9zgy53q62j4naaqqs07kjxbn72zb4p4";
18+ };
19+
20+ nativeBuildInputs = [ git ];
21+ propagatedBuildInputs = [ youtube-dl ];
22+
23+ postPatch = ''
24+ substituteInPlace setup.py --replace \
25+ '"https://github.com/thann/install_freedesktop/tarball/master#egg=install_freedesktop-0.2.0"' \
26+ '"file://${install_freedesktop}#egg=install_freedesktop-0.2.0"'
27+ '';
28+
29+ meta = with lib; {
30+ description = "Chrome extension and python server that allows you to play videos in webpages with MPV instead";
31+ homepage = "https://github.com/Thann/play-with-mpv";
32+ license = licenses.mit;
33+ maintainers = with maintainers; [ dawidsowa ];
34+ };
35+}