From 3f1ff3edafcb0a060f44caa19025a5fc1a7a3782 Mon Sep 17 00:00:00 2001 From: Chuang Zhu Date: Sun, 14 May 2023 00:53:28 +0800 Subject: [PATCH] mpvScripts.webtorrent-mpv-hook: fix build on aarch64-linux --- pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix index 811b49e8714b..a1713e24375f 100644 --- a/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix +++ b/pkgs/applications/video/mpv/scripts/webtorrent-mpv-hook.nix @@ -1,4 +1,4 @@ -{ lib , buildNpmPackage , fetchFromGitHub, nodejs }: +{ lib, buildNpmPackage, fetchFromGitHub, nodejs, python3 }: buildNpmPackage rec { pname = "webtorrent-mpv-hook"; @@ -21,6 +21,10 @@ buildNpmPackage rec { npmDepsHash = "sha256-GpNUJ5ZCgMjSYLqsIE/RwkTSFT3uAhxrHPe7XvGDRHE="; makeCacheWritable = true; + nativeBuildInputs = [ + python3 # Fixes node-gyp on aarch64-linux + ]; + postInstall = '' mkdir -p $out/share/mpv/scripts/ ln -s $out/lib/node_modules/webtorrent-mpv-hook/build/webtorrent.js $out/share/mpv/scripts/