mpvScripts.webtorrent-mpv-hook: Add updateScript

This commit is contained in:
nicoo 2023-12-09 20:18:42 +00:00
parent 40ef9f3b76
commit 255dbfdbe2

View File

@ -1,4 +1,4 @@
{ lib, buildNpmPackage, fetchFromGitHub, nodejs, python3 }:
{ lib, buildNpmPackage, fetchFromGitHub, gitUpdater, nodejs, python3 }:
buildNpmPackage rec {
pname = "webtorrent-mpv-hook";
@ -10,6 +10,9 @@ buildNpmPackage rec {
rev = "v${version}";
hash = "sha256-/dMtXcIyfAs++Zgz2CxRW0tkzn5QjS+WVGChlCyrU0U=";
};
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
postPatch = ''
substituteInPlace src/webtorrent.ts --replace "node_path: 'node'" "node_path: '${nodejs}/bin/node'"