xeus-cling: fix improper linking with LLVM (#351130)
[NixPkgs.git] / pkgs / applications / office / paperwork / paperwork-backend.nix
blob4460e50ab6246c46945cfc80e911dfa250aee929
1 { buildPythonPackage
2 , lib
3 , fetchFromGitLab
4 , pyenchant
5 , scikit-learn
6 , pypillowfight
7 , pycountry
8 , whoosh
9 , termcolor
10 , pygobject3
11 , pyocr
12 , natsort
13 , libinsane
14 , distro
15 , openpaperwork-core
16 , openpaperwork-gtk
17 , psutil
18 , gtk3
19 , poppler_gi
20 , gettext
21 , which
22 , shared-mime-info
23 , libreoffice
24 , unittestCheckHook
25 , setuptools-scm
28 buildPythonPackage rec {
29   pname = "paperwork-backend";
30   inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;
31   format = "pyproject";
33   sourceRoot = "${src.name}/paperwork-backend";
35   patches = [
36     # disables a flaky test https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/1035#note_1493700
37     ./flaky_test.patch
38   ];
40   patchFlags = [ "-p2" ];
42   postPatch = ''
43     chmod a+w -R ..
44     patchShebangs ../tools
45   '';
47   propagatedBuildInputs = [
48     distro
49     gtk3
50     libinsane
51     natsort
52     openpaperwork-core
53     pyenchant
54     pycountry
55     pygobject3
56     pyocr
57     pypillowfight
58     poppler_gi
59     scikit-learn
60     termcolor
61     whoosh
62   ];
64   nativeBuildInputs = [
65     gettext
66     shared-mime-info
67     which
68     setuptools-scm
69   ];
71   preBuild = ''
72     make l10n_compile
73   '';
75   nativeCheckInputs = [
76     libreoffice
77     openpaperwork-gtk
78     psutil
79     unittestCheckHook
80   ];
82   preCheck = ''
83     export HOME=$TMPDIR
84   '';
86   meta = with lib; {
87     description = "Backend part of Paperwork (Python API, no UI)";
88     homepage = "https://openpaper.work";
89     license = licenses.gpl3Plus;
90     maintainers = with maintainers; [ aszlig symphorien ];
91   };