From bb12aa668af7bfca9046055dbf80c7eaf37b6585 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 15 Oct 2021 18:44:17 +0200 Subject: [PATCH] vapoursynthPlugins.ocr: init at unstable-2021-09-26 --- default.nix | 1 + plugins/ocr/default.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 plugins/ocr/default.nix diff --git a/default.nix b/default.nix index 6867237..8afaf5f 100644 --- a/default.nix +++ b/default.nix @@ -40,6 +40,7 @@ in mvtools = prev.vapoursynth-mvtools; nnedi3 = prev.callPackage ./plugins/nnedi3 { }; nnedi3cl = prev.callPackage ./plugins/nnedi3cl { }; + ocr = prev.callPackage ./plugins/ocr { }; placebo = prev.callPackage ./plugins/placebo { }; readmpls = prev.callPackage ./plugins/readmpls { }; remap = prev.callPackage ./plugins/remap { }; diff --git a/plugins/ocr/default.nix b/plugins/ocr/default.nix new file mode 100644 index 0000000..dd28259 --- /dev/null +++ b/plugins/ocr/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, tesseract, vapoursynth }: + +stdenv.mkDerivation rec { + pname = "vs-ocr"; + version = "unstable-2021-09-26"; + + src = fetchFromGitHub { + owner = "vapoursynth"; + repo = pname; + rev = "b5dd7749a2f0694840d287f0bf4d42ce5323a8cf"; + sha256 = "sha256-N2+S4YRMzjpFdRnCXGgvxU1rUKIjmHe7ylzBrB4CPL8="; + }; + + nativeBuildInputs = [ meson ninja pkg-config ]; + buildInputs = [ tesseract vapoursynth ]; + + postPatch = '' + substituteInPlace meson.build \ + --replace "vapoursynth_dep.get_pkgconfig_variable('libdir')" "get_option('libdir')" + ''; + + meta = with lib; { + description = "OCR plugin for VapourSynth"; + homepage = "https://github.com/vapoursynth/vs-ocr"; + license = licenses.mit; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}