~andir/nixpkgs-dev

mpvScripts.webtorrent-hook: init at unstable-2020-04-18 v2 PROPOSED

yoctocell: 1
 mpvScripts.webtorrent-hook: init at unstable-2020-04-18

 2 files changed, 33 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~andir/nixpkgs-dev/patches/16010/mbox | git am -3
Learn more about email & git

[PATCH v2] mpvScripts.webtorrent-hook: init at unstable-2020-04-18 Export this patch

Fix issues pointed out in v1.

---
 .../video/mpv/scripts/webtorrent-hook.nix     | 32 +++++++++++++++++++
 pkgs/top-level/all-packages.nix               |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 pkgs/applications/video/mpv/scripts/webtorrent-hook.nix

diff --git a/pkgs/applications/video/mpv/scripts/webtorrent-hook.nix b/pkgs/applications/video/mpv/scripts/webtorrent-hook.nix
new file mode 100644
index 00000000000..f1a26f38297
--- /dev/null
+++ b/pkgs/applications/video/mpv/scripts/webtorrent-hook.nix
@@ -0,0 +1,32 @@
{ stdenv, fetchFromGitHub, nodePackages }:

stdenv.mkDerivation rec {
  name = "webtorrent-hook";
  version = "unstable-2020-04-18";

  src = fetchFromGitHub {
    owner = "noctuid";
    repo = "mpv-webtorrent-hook";
    rev = "755c6348e10279cb6049264c319e86afc1f830f3";
    sha256 = "2igEC1Z2yAObx9boJexFF+b25V2tylyVyNfF7xLd3YI=";
  };

  dontBuild = true;

  buildInputs = [ nodePackages.webtorrent-cli ];

  installPhase = ''
    mkdir -p $out/share/mpv/scripts
    cp webtorrent-hook.lua $out/share/mpv/scripts/
  '';

  passthru.scriptName = "webtorrent-hook.lua";

  meta = with stdenv.lib; {
    description = "Stream torrents in mpv using webtorrent-cli";
    homepage = "https://github.com/noctuid/mpv-webtorrent-hook";
    license = licenses.gpl3;
    platforms = platforms.linux;
    maintainers = with maintainers; [ yoctocell ];
  };
}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index eb8ba06ac00..cb2c6a61195 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -22869,6 +22869,7 @@ in
    mpris = callPackage ../applications/video/mpv/scripts/mpris.nix {};
    simple-mpv-webui = callPackage ../applications/video/mpv/scripts/simple-mpv-webui.nix {};
    sponsorblock = callPackage ../applications/video/mpv/scripts/sponsorblock.nix {};
    webtorrent-hook = callPackage ../applications/video/mpv/scripts/webtorrent-hook.nix {};
  };

  mrpeach = callPackage ../applications/audio/pd-plugins/mrpeach { };
-- 
2.29.2