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