From 7b02acac3e004f560819e442d0bec23d6816ee9f Mon Sep 17 00:00:00 2001 From: dawidsowa Date: Wed, 31 Mar 2021 19:31:50 +0200 Subject: [PATCH] play-with-mpv: init at 2020-05-18 (#93473) Co-authored-by: Sandro --- pkgs/tools/video/play-with-mpv/default.nix | 35 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/tools/video/play-with-mpv/default.nix diff --git a/pkgs/tools/video/play-with-mpv/default.nix b/pkgs/tools/video/play-with-mpv/default.nix new file mode 100644 index 000000000000..d9ab0493160e --- /dev/null +++ b/pkgs/tools/video/play-with-mpv/default.nix @@ -0,0 +1,35 @@ +{ lib, python3Packages, fetchFromGitHub, fetchurl, youtube-dl, git }: + +let + install_freedesktop = fetchurl { + url = "https://github.com/thann/install_freedesktop/tarball/2673e8da4a67bee0ffc52a0ea381a541b4becdd4"; + sha256 = "0j8d5jdcyqbl5p6sc1ags86v3hr2sghmqqi99d1mvc064g90ckrv"; + }; +in +python3Packages.buildPythonApplication rec { + pname = "play-with-mpv"; + version = "unstable-2020-05-18"; + + src = fetchFromGitHub { + owner = "thann"; + repo = "play-with-mpv"; + rev = "656448e03fe9de9e8bd21959f2a3b47c4acb8c3e"; + sha256 = "1qma8b3lnkdhxdjsnrq7n9zgy53q62j4naaqqs07kjxbn72zb4p4"; + }; + + nativeBuildInputs = [ git ]; + propagatedBuildInputs = [ youtube-dl ]; + + postPatch = '' + substituteInPlace setup.py --replace \ + '"https://github.com/thann/install_freedesktop/tarball/master#egg=install_freedesktop-0.2.0"' \ + '"file://${install_freedesktop}#egg=install_freedesktop-0.2.0"' + ''; + + meta = with lib; { + description = "Chrome extension and python server that allows you to play videos in webpages with MPV instead"; + homepage = "https://github.com/Thann/play-with-mpv"; + license = licenses.mit; + maintainers = with maintainers; [ dawidsowa ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb412a356ecd..610e31059f1e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1496,6 +1496,8 @@ in pebble = callPackage ../tools/admin/pebble { }; + play-with-mpv = callPackage ../tools/video/play-with-mpv { }; + reattach-to-user-namespace = callPackage ../os-specific/darwin/reattach-to-user-namespace {}; skhd = callPackage ../os-specific/darwin/skhd {