diff options
author | Leona Maroni <dev@leona.is> | 2024-04-14 14:59:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-14 14:59:33 +0200 |
commit | 025d3a2f65e742f967c54bbdc47632be24ef2239 (patch) | |
tree | 1fdc8080efad8fc40526cccdb807c0796aef3fb1 /pkgs/applications/office | |
parent | b23078031f33401d339f4d241ab0361f6545be0b (diff) | |
parent | b579dac4ed3d3d059d2a701df1728bf31a05ee70 (diff) |
Merge pull request #303388 from SuperSandro2000/paperless-only-enabled-languages
nixos/paperless: override enabled tesseract languages with the in paperless configured ones
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r-- | pkgs/applications/office/paperless-ngx/default.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index 68dd3ec0f6dac..554aeb588ef7b 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -37,8 +37,11 @@ let # https://github.com/NixOS/nixpkgs/issues/298719 # https://github.com/paperless-ngx/paperless-ngx/issues/5494 python = python3.override { - packageOverrides = self: super: { - uvicorn = super.uvicorn.overridePythonAttrs (oldAttrs: { + packageOverrides = final: prev: { + # tesseract5 may be overwritten in the paperless module and we need to propagate that to make the closure reduction effective + ocrmypdf = prev.ocrmypdf.override { tesseract = tesseract5; }; + + uvicorn = prev.uvicorn.overridePythonAttrs (_: { version = "0.25.0"; src = fetchFromGitHub { owner = "encode"; @@ -245,7 +248,7 @@ python.pkgs.buildPythonApplication rec { doCheck = !stdenv.isDarwin; passthru = { - inherit python path frontend; + inherit python path frontend tesseract5; nltkData = with nltk-data; [ punkt snowball_data stopwords ]; tests = { inherit (nixosTests) paperless; }; }; |