diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/applications/office/paperless-ngx/default.nix | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/applications/office/paperless-ngx/default.nix')
-rw-r--r-- | pkgs/applications/office/paperless-ngx/default.nix | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index 7d9346c153b..c5c291511eb 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , buildNpmPackage , nixosTests , gettext @@ -19,13 +20,13 @@ }: let - version = "1.17.2"; + version = "1.17.4"; src = fetchFromGitHub { owner = "paperless-ngx"; repo = "paperless-ngx"; rev = "refs/tags/v${version}"; - hash = "sha256-/0Ml3NRTghqNykB1RZfqDW9TtENnSRM7wqG7Vn4Kl04="; + hash = "sha256-Kl8AUfHfEiEy40qeDI8x2rxdXcj01mpitw7T/96ibQQ="; }; # Use specific package versions required by paperless-ngx @@ -51,7 +52,7 @@ let pname = "paperless-ngx-frontend"; inherit version src; - npmDepsHash = "sha256-6EvC9Ka8gl0eRgJtHooB3yQNVGYzuH/WRga4AtzQ0EY="; + npmDepsHash = "sha256-5Q9NtIO7k/6AiF9Er10HhmEBFyQOP9CiTkTZglUeChg="; nativeBuildInputs = [ python3 @@ -91,6 +92,16 @@ python.pkgs.buildPythonApplication rec { inherit version src; + patches = [ + # https://github.com/paperless-ngx/paperless-ngx/pull/4146 + (fetchpatch { + name = "fix-tests-for-python311.patch"; + url = "https://github.com/paperless-ngx/paperless-ngx/commit/73f6c0a056e3859061339e295f57213fd4239b2d.patch"; + hash = "sha256-sZcRug5T4cw5ppKpGYrrfz9RxtYxnkeNOlXcMgdWT0E="; + }) + ]; + + nativeBuildInputs = [ gettext ]; @@ -204,7 +215,7 @@ python.pkgs.buildPythonApplication rec { whoosh zipp zope_interface - zxing_cpp + zxing-cpp ] ++ redis.optional-dependencies.hiredis ++ twisted.optional-dependencies.tls @@ -213,13 +224,13 @@ python.pkgs.buildPythonApplication rec { postBuild = '' # Compile manually because `pythonRecompileBytecodeHook` only works # for files in `python.sitePackages` - ${python.pythonForBuild.interpreter} -OO -m compileall src + ${python.pythonOnBuildForHost.interpreter} -OO -m compileall src # Collect static files - ${python.pythonForBuild.interpreter} src/manage.py collectstatic --clear --no-input + ${python.pythonOnBuildForHost.interpreter} src/manage.py collectstatic --clear --no-input # Compile string translations using gettext - ${python.pythonForBuild.interpreter} src/manage.py compilemessages + ${python.pythonOnBuildForHost.interpreter} src/manage.py compilemessages ''; installPhase = '' @@ -242,7 +253,7 @@ python.pkgs.buildPythonApplication rec { nativeCheckInputs = with python.pkgs; [ daphne - factory_boy + factory-boy imagehash pdfminer-six pytest-django |