1{ lib 2, buildPythonPackage 3, fetchPypi 4, levenshtein 5, pytesseract 6, opencv4 7, fuzzywuzzy 8}: 9 10buildPythonPackage rec { 11 pname = "videocr"; 12 version = "0.1.6"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "1clifwczvhvbaw2spgxkkyqsbqh21vyfw3rh094pxfmq89ylyj63"; 17 }; 18 19 propagatedBuildInputs = [ 20 levenshtein 21 pytesseract 22 opencv4 23 fuzzywuzzy 24 ]; 25 26 postPatch = '' 27 substituteInPlace setup.py \ 28 --replace "python-Levenshtein" "Levenshtein" \ 29 --replace "opencv-python" "opencv" 30 substituteInPlace videocr/constants.py \ 31 --replace "master" "main" 32 substituteInPlace videocr/video.py \ 33 --replace '--tessdata-dir "{}"' '--tessdata-dir="{}"' 34 ''; 35 36 # Project has no tests 37 doCheck = false; 38 39 pythonImportsCheck = [ "videocr" ]; 40 41 meta = with lib; { 42 description = "Extract hardcoded subtitles from videos using machine learning"; 43 homepage = "https://github.com/apm1467/videocr"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ ozkutuk ]; 46 }; 47}