My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/videocr/default.nix

46 lines
993 B

{ lib
, buildPythonPackage
, fetchPypi
, python-Levenshtein
, pytesseract
, opencv4
, fuzzywuzzy
}:
buildPythonPackage rec {
pname = "videocr";
version = "0.1.6";
src = fetchPypi {
inherit pname version;
sha256 = "1clifwczvhvbaw2spgxkkyqsbqh21vyfw3rh094pxfmq89ylyj63";
};
propagatedBuildInputs = [
python-Levenshtein
pytesseract
opencv4
fuzzywuzzy
];
postPatch = ''
substituteInPlace setup.py \
--replace "opencv-python" "opencv"
substituteInPlace videocr/constants.py \
--replace "master" "main"
substituteInPlace videocr/video.py \
--replace '--tessdata-dir "{}"' '--tessdata-dir="{}"'
'';
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "videocr" ];
meta = with lib; {
description = "Extract hardcoded subtitles from videos using machine learning";
homepage = "https://github.com/apm1467/videocr";
license = licenses.mit;
maintainers = with maintainers; [ ozkutuk ];
};
}