{ lib, python3, fetchFromGitHub, ffmpeg, }: python3.pkgs.buildPythonApplication (finalAttrs: { pname = "ffsubsync"; version = "0.5.1"; pyproject = true; src = fetchFromGitHub { owner = "smacke"; repo = "ffsubsync"; tag = finalAttrs.version; hash = "sha256-n9bYQgbBHGRJl79EiK7pTMDCcbI4ALudZUNc2SU0Wgg="; }; build-system = with python3.pkgs; [ setuptools ]; dependencies = with python3.pkgs; [ auditok charset-normalizer faust-cchardet ffmpeg-python numpy pysubs2 chardet rich setuptools six srt tqdm typing-extensions webrtcvad ]; # webrtcvad provides the same import as upstream's wheel-only dependency. pythonRemoveDeps = [ "webrtcvad-wheels" ]; nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ]; pythonImportsCheck = [ "ffsubsync" ]; makeWrapperArgs = [ "--prefix" "PATH" ":" "${ffmpeg}/bin" ]; meta = { homepage = "https://github.com/smacke/ffsubsync"; description = "Automagically synchronize subtitles with video"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ davinci42 ]; mainProgram = "ffsubsync"; }; })