depot/third_party/nixpkgs/pkgs/applications/misc/ff2mpv/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

35 lines
894 B
Nix

{ lib, stdenv, fetchFromGitHub, python3, mpv }:
stdenv.mkDerivation rec {
pname = "ff2mpv";
version = "5.1.0";
src = fetchFromGitHub {
owner = "woodruffw";
repo = pname;
rev = "v${version}";
hash = "sha256-Xx18EX/MxLrnwZGwMFZJxJURUpjU2P01CQue5XbZ3fw=";
};
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 = {
description = "Native Messaging Host for ff2mpv firefox addon";
homepage = "https://github.com/woodruffw/ff2mpv";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ Enzime ];
mainProgram = "ff2mpv.py";
};
}