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
|
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
|
buildPhase = let
|
||||||
# Paperless has explicit runtime checks that expect these binaries to be in PATH
|
# Paperless has explicit runtime checks that expect these binaries to be in PATH
|
||||||
extraBin = lib.makeBinPath [ imagemagick7 ghostscript optipng tesseract unpaper ];
|
extraBin = lib.makeBinPath [ imagemagick7 ghostscript optipng tesseract unpaper ];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, buildPythonPackage, fetchFromGitHub
|
{ lib, buildPythonPackage, fetchFromGitHub
|
||||||
, pytest, pytest-django, django }:
|
, pytest_4, pytest-django, django }:
|
||||||
|
|
||||||
buildPythonPackage {
|
buildPythonPackage {
|
||||||
pname = "django-crispy-forms";
|
pname = "django-crispy-forms";
|
||||||
|
@ -19,7 +19,7 @@ buildPythonPackage {
|
||||||
export sourceRoot=source-
|
export sourceRoot=source-
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-django django ];
|
checkInputs = [ pytest_4 pytest-django django ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
PYTHONPATH="$(pwd):$PYTHONPATH" \
|
PYTHONPATH="$(pwd):$PYTHONPATH" \
|
||||||
|
|
|
@ -1991,12 +1991,14 @@ in {
|
||||||
|
|
||||||
pyhepmc = callPackage ../development/python-modules/pyhepmc { };
|
pyhepmc = callPackage ../development/python-modules/pyhepmc { };
|
||||||
|
|
||||||
pytest = if isPy3k then
|
pytest = if isPy3k then self.pytest_5 else self.pytest_4;
|
||||||
callPackage ../development/python-modules/pytest {
|
|
||||||
|
pytest_5 = callPackage ../development/python-modules/pytest {
|
||||||
# hypothesis tests require pytest that causes dependency cycle
|
# hypothesis tests require pytest that causes dependency cycle
|
||||||
hypothesis = self.hypothesis.override { doCheck = false; };
|
hypothesis = self.hypothesis.override { doCheck = false; };
|
||||||
}
|
};
|
||||||
else callPackage ../development/python-modules/pytest/2.nix {
|
|
||||||
|
pytest_4 = callPackage ../development/python-modules/pytest/4.nix {
|
||||||
# hypothesis tests require pytest that causes dependency cycle
|
# hypothesis tests require pytest that causes dependency cycle
|
||||||
hypothesis = self.hypothesis.override { doCheck = false; };
|
hypothesis = self.hypothesis.override { doCheck = false; };
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue