mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 12:59:04 +02:00
mpvScripts.webtorrent-mpv-hook: init at 1.3.3
This commit is contained in:
parent
0f213d0fee
commit
3d73774412
36
pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix
Normal file
36
pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ lib , buildNpmPackage , fetchFromGitHub, nodejs }:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "webtorrent-mpv-hook";
|
||||
version = "1.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mrxdst";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-AFKX31kriacXygZy0Mw+QwO+SwFEu13687mJ/WeAoKY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/webtorrent.ts --replace "node_path: 'node'" "node_path: '${nodejs}/bin/node'"
|
||||
# This executable is just for telling non-Nix users how to install
|
||||
substituteInPlace package.json --replace '"bin": "build/bin.js",' ""
|
||||
rm -rf src/bin.ts
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-GpNUJ5ZCgMjSYLqsIE/RwkTSFT3uAhxrHPe7XvGDRHE=";
|
||||
makeCacheWritable = true;
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/mpv/scripts/
|
||||
ln -s $out/lib/node_modules/webtorrent-mpv-hook/build/webtorrent.js $out/share/mpv/scripts/
|
||||
'';
|
||||
passthru.scriptName = "webtorrent.js";
|
||||
|
||||
meta = {
|
||||
description = "Adds a hook that allows mpv to stream torrents";
|
||||
homepage = "https://github.com/mrxdst/webtorrent-mpv-hook";
|
||||
maintainers = [ lib.maintainers.chuangzhu ];
|
||||
license = lib.licenses.isc;
|
||||
};
|
||||
}
|
|
@ -30999,6 +30999,7 @@ with pkgs;
|
|||
sponsorblock = callPackage ../applications/video/mpv/scripts/sponsorblock.nix {};
|
||||
thumbnail = callPackage ../applications/video/mpv/scripts/thumbnail.nix { };
|
||||
vr-reversal = callPackage ../applications/video/mpv/scripts/vr-reversal.nix {};
|
||||
webtorrent-mpv-hook = callPackage ../applications/video/mpv/scripts/webtorrent-mpv-hook.nix { };
|
||||
youtube-quality = callPackage ../applications/video/mpv/scripts/youtube-quality.nix { };
|
||||
cutter = callPackage ../applications/video/mpv/scripts/cutter.nix { };
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue