lol

Merge pull request #212989 from chuangzhu/webtorrent-mpv-hook

mpvScripts.webtorrent-mpv-hook: init at 1.3.3

authored by

Doron Behar and committed by
GitHub
ff73f0aa 960bc19b

+37
+36
pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix
···
··· 1 + { lib , buildNpmPackage , fetchFromGitHub, nodejs }: 2 + 3 + buildNpmPackage rec { 4 + pname = "webtorrent-mpv-hook"; 5 + version = "1.3.3"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "mrxdst"; 9 + repo = pname; 10 + rev = "v${version}"; 11 + hash = "sha256-AFKX31kriacXygZy0Mw+QwO+SwFEu13687mJ/WeAoKY="; 12 + }; 13 + 14 + postPatch = '' 15 + substituteInPlace src/webtorrent.ts --replace "node_path: 'node'" "node_path: '${nodejs}/bin/node'" 16 + # This executable is just for telling non-Nix users how to install 17 + substituteInPlace package.json --replace '"bin": "build/bin.js",' "" 18 + rm -rf src/bin.ts 19 + ''; 20 + 21 + npmDepsHash = "sha256-GpNUJ5ZCgMjSYLqsIE/RwkTSFT3uAhxrHPe7XvGDRHE="; 22 + makeCacheWritable = true; 23 + 24 + postInstall = '' 25 + mkdir -p $out/share/mpv/scripts/ 26 + ln -s $out/lib/node_modules/webtorrent-mpv-hook/build/webtorrent.js $out/share/mpv/scripts/ 27 + ''; 28 + passthru.scriptName = "webtorrent.js"; 29 + 30 + meta = { 31 + description = "Adds a hook that allows mpv to stream torrents"; 32 + homepage = "https://github.com/mrxdst/webtorrent-mpv-hook"; 33 + maintainers = [ lib.maintainers.chuangzhu ]; 34 + license = lib.licenses.isc; 35 + }; 36 + }
+1
pkgs/top-level/all-packages.nix
··· 31281 sponsorblock = callPackage ../applications/video/mpv/scripts/sponsorblock.nix {}; 31282 thumbnail = callPackage ../applications/video/mpv/scripts/thumbnail.nix { }; 31283 vr-reversal = callPackage ../applications/video/mpv/scripts/vr-reversal.nix {}; 31284 youtube-quality = callPackage ../applications/video/mpv/scripts/youtube-quality.nix { }; 31285 cutter = callPackage ../applications/video/mpv/scripts/cutter.nix { }; 31286 };
··· 31281 sponsorblock = callPackage ../applications/video/mpv/scripts/sponsorblock.nix {}; 31282 thumbnail = callPackage ../applications/video/mpv/scripts/thumbnail.nix { }; 31283 vr-reversal = callPackage ../applications/video/mpv/scripts/vr-reversal.nix {}; 31284 + webtorrent-mpv-hook = callPackage ../applications/video/mpv/scripts/webtorrent-mpv-hook.nix { }; 31285 youtube-quality = callPackage ../applications/video/mpv/scripts/youtube-quality.nix { }; 31286 cutter = callPackage ../applications/video/mpv/scripts/cutter.nix { }; 31287 };