Merge pull request #187707 from onny/paperwork-backend

python310Packages.paperwork-backend: Fix tests

authored by

Guillaume Girol and committed by
GitHub
c6d38ef4 3c68c1f4

+37 -29
+37 -29
pkgs/applications/office/paperwork/paperwork-backend.nix
··· 1 1 { buildPythonPackage 2 2 , lib 3 3 , fetchFromGitLab 4 - 5 - , isPy3k 6 - , isPyPy 7 - 8 4 , pyenchant 9 5 , scikit-learn 10 6 , pypillowfight ··· 20 16 , openpaperwork-core 21 17 , openpaperwork-gtk 22 18 , psutil 23 - 24 - , pkgs 19 + , gtk3 20 + , poppler_gi 21 + , gettext 22 + , which 23 + , shared-mime-info 24 + , libreoffice 25 + , unittestCheckHook 25 26 }: 26 27 27 28 buildPythonPackage rec { ··· 30 31 31 32 sourceRoot = "source/paperwork-backend"; 32 33 33 - # Python 2.x is not supported. 34 - disabled = !isPy3k && !isPyPy; 35 - 36 34 patchPhase = '' 37 35 echo 'version = "${version}"' > src/paperwork_backend/_version.py 38 36 chmod a+w -R .. ··· 40 38 ''; 41 39 42 40 propagatedBuildInputs = [ 41 + distro 42 + gtk3 43 + libinsane 44 + natsort 45 + openpaperwork-core 43 46 pyenchant 44 - scikit-learn 45 - pypillowfight 46 47 pycountry 47 - whoosh 48 - termcolor 49 - python-Levenshtein 50 - libinsane 51 48 pygobject3 52 49 pyocr 53 - natsort 54 - pkgs.poppler_gi 55 - pkgs.gtk3 56 - distro 57 - openpaperwork-core 50 + pypillowfight 51 + python-Levenshtein 52 + poppler_gi 53 + scikit-learn 54 + termcolor 55 + whoosh 58 56 ]; 59 57 60 - preCheck = '' 61 - export HOME=$(mktemp -d) 62 - ''; 58 + nativeBuildInputs = [ 59 + gettext 60 + shared-mime-info 61 + which 62 + ]; 63 63 64 - nativeBuildInputs = [ pkgs.gettext pkgs.which pkgs.shared-mime-info ]; 65 64 preBuild = '' 66 65 make l10n_compile 67 66 ''; 68 67 69 - checkInputs = [ openpaperwork-gtk psutil pkgs.libreoffice ]; 68 + checkInputs = [ 69 + libreoffice 70 + openpaperwork-gtk 71 + psutil 72 + unittestCheckHook 73 + ]; 70 74 71 - meta = { 75 + preCheck = '' 76 + export HOME=$TMPDIR 77 + ''; 78 + 79 + meta = with lib; { 72 80 description = "Backend part of Paperwork (Python API, no UI)"; 73 - homepage = "https://openpaper.work/"; 74 - license = lib.licenses.gpl3Plus; 75 - maintainers = with lib.maintainers; [ aszlig symphorien ]; 81 + homepage = "https://openpaper.work"; 82 + license = licenses.gpl3Plus; 83 + maintainers = with maintainers; [ aszlig symphorien ]; 76 84 }; 77 85 }