1{ lib 2, buildPythonPackage 3, fetchPypi 4, python-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 python-Levenshtein 21 pytesseract 22 opencv4 23 fuzzywuzzy 24 ]; 25 26 postPatch = '' 27 substituteInPlace setup.py \ 28 --replace "opencv-python" "opencv" 29 substituteInPlace videocr/constants.py \ 30 --replace "master" "main" 31 substituteInPlace videocr/video.py \ 32 --replace '--tessdata-dir "{}"' '--tessdata-dir="{}"' 33 ''; 34 35 # Project has no tests 36 doCheck = false; 37 38 pythonImportsCheck = [ "videocr" ]; 39 40 meta = with lib; { 41 description = "Extract hardcoded subtitles from videos using machine learning"; 42 homepage = "https://github.com/apm1467/videocr"; 43 license = licenses.mit; 44 maintainers = with maintainers; [ ozkutuk ]; 45 }; 46}