mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
paperless: fix cors header
`django-cors-headers` 3.x (which is used in nixpkgs) requires a scheme for allowed hosts. Upstream uses 2.4, however we create the python env with Nix, so the source needs to be patched accordingly.
This commit is contained in:
parent
cbab4663f3
commit
0d5806fefd
1 changed files with 6 additions and 0 deletions
|
@ -57,6 +57,12 @@ let
|
|||
cp -r --no-preserve=mode $src/src/* $src/LICENSE $srcDir
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
# django-cors-headers 3.x requires a scheme for allowed hosts
|
||||
substituteInPlace $out/share/paperless/paperless/settings.py \
|
||||
--replace "localhost:8080" "http://localhost:8080"
|
||||
'';
|
||||
|
||||
buildPhase = let
|
||||
# Paperless has explicit runtime checks that expect these binaries to be in PATH
|
||||
extraBin = lib.makeBinPath [ imagemagick7 ghostscript optipng tesseract unpaper ];
|
||||
|
|
Loading…
Reference in a new issue