biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / video / play-with-mpv / default.nix
blob16e645eb44550fa2e9d869afe7642dbd7f5086c3
1 { lib
2 , python3Packages
3 , fetchFromGitHub
4 , fetchurl
5 , youtube-dl
6 }:
8 let
9   install-freedesktop = python3Packages.buildPythonPackage rec {
10     pname = "install-freedesktop";
11     version = "0.1.2-1-g2673e8d";
12     format = "setuptools";
14     src = fetchurl {
15       name = "Thann-install_freedesktop-${version}.tar.gz";
16       url = "https://github.com/thann/install_freedesktop/tarball/2673e8da4a67bee0ffc52a0ea381a541b4becdd4";
17       hash = "sha256-O08G0iMGsF1DSyliXOHTIsOxDdJPBabNLXRhz5osDUk=";
18     };
20     # package has no tests
21     doCheck = false;
22   };
24 python3Packages.buildPythonApplication rec {
25   pname = "play-with-mpv";
26   version = "unstable-2021-04-02";
27   format = "setuptools";
29   src = fetchFromGitHub {
30     owner = "thann";
31     repo = "play-with-mpv";
32     rev = "07a9c1dd57d9e16538991b13fd3e2ed54d6e3a2d";
33     hash = "sha256-ZtUFzgYGNa9+g2xDONW8B5bbsbXmyY3IeT1GQH0AVIw=";
34   };
36   postPatch = ''
37     substituteInPlace setup.py --replace \
38       '"https://github.com/thann/install_freedesktop/tarball/master#egg=install_freedesktop-0.2.0"' \
39       '"file://${install-freedesktop}#egg=install_freedesktop-0.2.0"' \
40       --replace 'version = get_version()' 'version = "0.1.0.post9"'
41   '';
43   nativeBuildInputs = with python3Packages; [
44     install-freedesktop
45     wheel
46   ];
48   propagatedBuildInputs = [
49     youtube-dl
50   ];
52   # package has no tests
53   doCheck = false;
55   meta = with lib; {
56     description = "Chrome extension and python server that allows you to play videos in webpages with MPV instead";
57     homepage = "https://github.com/Thann/play-with-mpv";
58     license = licenses.mit;
59     maintainers = with maintainers; [ dawidsowa ];
60     mainProgram = "play-with-mpv";
61   };