paperless-ngx: 1.7.1 -> 1.8.0

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
Florian Brandes 2022-08-08 23:27:06 +02:00
parent ea860254b7
commit c41ed54f93

View File

@ -11,6 +11,7 @@
, tesseract4
, unpaper
, liberation_ttf
, fetchFromGitHub
}:
let
@ -19,6 +20,20 @@ let
packageOverrides = self: super: {
django = super.django_4;
# use paperless-ngx version of django-q
# see https://github.com/paperless-ngx/paperless-ngx/pull/1014
django-q = super.django-q.overridePythonAttrs (oldAttrs: rec {
src = fetchFromGitHub {
owner = "paperless-ngx";
repo = "django-q";
sha256 = "sha256-aoDuPig8Nf8fLzn7GjBn69aF2zH2l8gxascAu9lIG3U=";
rev = "71abc78fdaec029cf71e9849a3b0fa084a1678f7";
};
# due to paperless-ngx modification of the pyproject.toml file
# the patch is not needed any more
patches = [];
});
# django-extensions 3.1.5 is required, but its tests are incompatible with Django 4
django-extensions = super.django-extensions.overridePythonAttrs (_: {
doCheck = false;
@ -38,12 +53,12 @@ let
in
py.pkgs.pythonPackages.buildPythonApplication rec {
pname = "paperless-ngx";
version = "1.7.1";
version = "1.8.0";
# Fetch the release tarball instead of a git ref because it contains the prebuilt fontend
src = fetchurl {
url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/v${version}/${pname}-v${version}.tar.xz";
hash = "sha256-8vx4hvbIqaChjPyS8Q0ar2bz/pLzEdxoF7P2gBEeFzc=";
hash = "sha256-BLfhh04RvBJFRQiPXkMl8XlWqZOWKmjjl+6lZ326stU=";
};
format = "other";
@ -144,6 +159,13 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
zope_interface
];
# paperless-ngx includes the bundled django-q version. This will
# conflict with the tests and is not needed since we overrode the
# django-q version with the paperless-ngx version
postPatch = ''
rm -rf src/django-q
'';
# Compile manually because `pythonRecompileBytecodeHook` only works for
# files in `python.sitePackages`
postBuild = ''