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