2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, mpv }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ff2mpv";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "5.1.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "woodruffw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-Xx18EX/MxLrnwZGwMFZJxJURUpjU2P01CQue5XbZ3fw=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ python3 mpv ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
substituteInPlace ff2mpv.json \
|
|
|
|
--replace '/home/william/scripts/ff2mpv' "$out/bin/ff2mpv.py"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib/mozilla/native-messaging-hosts
|
|
|
|
cp ff2mpv.py $out/bin
|
|
|
|
cp ff2mpv.json $out/lib/mozilla/native-messaging-hosts
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Native Messaging Host for ff2mpv firefox addon";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/woodruffw/ff2mpv";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ Enzime ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "ff2mpv.py";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|