forked from mirrors/nixpkgs
Merge pull request #68786 from JohnAZoidberg/paperless-testfix
paperless: Fix tests, including NixOS test
This commit is contained in:
commit
0b32f6f78c
|
@ -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 ];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub
|
||||
, pytest, pytest-django, django }:
|
||||
, pytest_4, pytest-django, django }:
|
||||
|
||||
buildPythonPackage {
|
||||
pname = "django-crispy-forms";
|
||||
|
@ -19,7 +19,7 @@ buildPythonPackage {
|
|||
export sourceRoot=source-
|
||||
'';
|
||||
|
||||
checkInputs = [ pytest pytest-django django ];
|
||||
checkInputs = [ pytest_4 pytest-django django ];
|
||||
|
||||
checkPhase = ''
|
||||
PYTHONPATH="$(pwd):$PYTHONPATH" \
|
||||
|
|
|
@ -1991,15 +1991,17 @@ in {
|
|||
|
||||
pyhepmc = callPackage ../development/python-modules/pyhepmc { };
|
||||
|
||||
pytest = if isPy3k then
|
||||
callPackage ../development/python-modules/pytest {
|
||||
# hypothesis tests require pytest that causes dependency cycle
|
||||
hypothesis = self.hypothesis.override { doCheck = false; };
|
||||
}
|
||||
else callPackage ../development/python-modules/pytest/2.nix {
|
||||
# hypothesis tests require pytest that causes dependency cycle
|
||||
hypothesis = self.hypothesis.override { doCheck = false; };
|
||||
};
|
||||
pytest = if isPy3k then self.pytest_5 else self.pytest_4;
|
||||
|
||||
pytest_5 = callPackage ../development/python-modules/pytest {
|
||||
# hypothesis tests require pytest that causes dependency cycle
|
||||
hypothesis = self.hypothesis.override { doCheck = false; };
|
||||
};
|
||||
|
||||
pytest_4 = callPackage ../development/python-modules/pytest/4.nix {
|
||||
# hypothesis tests require pytest that causes dependency cycle
|
||||
hypothesis = self.hypothesis.override { doCheck = false; };
|
||||
};
|
||||
|
||||
pytest-helpers-namespace = callPackage ../development/python-modules/pytest-helpers-namespace { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue