2020-10-31 12:00:00 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, lib
|
|
|
|
, fetchFromGitLab
|
|
|
|
, pyenchant
|
2021-01-06 12:00:00 +00:00
|
|
|
, scikit-learn
|
2020-10-31 12:00:00 +00:00
|
|
|
, pypillowfight
|
|
|
|
, pycountry
|
|
|
|
, whoosh
|
|
|
|
, termcolor
|
|
|
|
, pygobject3
|
|
|
|
, pyocr
|
|
|
|
, natsort
|
|
|
|
, libinsane
|
|
|
|
, distro
|
|
|
|
, openpaperwork-core
|
|
|
|
, openpaperwork-gtk
|
|
|
|
, psutil
|
2022-08-21 09:25:35 +00:00
|
|
|
, gtk3
|
|
|
|
, poppler_gi
|
|
|
|
, gettext
|
|
|
|
, which
|
|
|
|
, shared-mime-info
|
|
|
|
, libreoffice
|
|
|
|
, unittestCheckHook
|
2023-03-04 12:00:00 +00:00
|
|
|
, setuptools-scm
|
2020-10-31 12:00:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "paperwork-backend";
|
|
|
|
inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;
|
2023-03-04 12:00:00 +00:00
|
|
|
format = "pyproject";
|
2020-10-31 12:00:00 +00:00
|
|
|
|
2023-07-25 13:27:31 +00:00
|
|
|
sourceRoot = "${src.name}/paperwork-backend";
|
2020-10-31 12:00:00 +00:00
|
|
|
|
2022-08-28 12:00:00 +00:00
|
|
|
patches = [
|
|
|
|
# disables a flaky test https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/1035#note_1493700
|
|
|
|
./flaky_test.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
patchFlags = [ "-p2" ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-10-31 12:00:00 +00:00
|
|
|
chmod a+w -R ..
|
|
|
|
patchShebangs ../tools
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-08-21 09:25:35 +00:00
|
|
|
distro
|
|
|
|
gtk3
|
|
|
|
libinsane
|
|
|
|
natsort
|
|
|
|
openpaperwork-core
|
2020-10-31 12:00:00 +00:00
|
|
|
pyenchant
|
|
|
|
pycountry
|
|
|
|
pygobject3
|
|
|
|
pyocr
|
2022-08-21 09:25:35 +00:00
|
|
|
pypillowfight
|
|
|
|
poppler_gi
|
|
|
|
scikit-learn
|
|
|
|
termcolor
|
|
|
|
whoosh
|
2020-10-31 12:00:00 +00:00
|
|
|
];
|
|
|
|
|
2022-08-21 09:25:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
shared-mime-info
|
|
|
|
which
|
2023-03-04 12:00:00 +00:00
|
|
|
setuptools-scm
|
2022-08-21 09:25:35 +00:00
|
|
|
];
|
2020-10-31 12:00:00 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
make l10n_compile
|
|
|
|
'';
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-21 09:25:35 +00:00
|
|
|
libreoffice
|
|
|
|
openpaperwork-gtk
|
|
|
|
psutil
|
|
|
|
unittestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
2020-10-31 12:00:00 +00:00
|
|
|
|
2022-08-21 09:25:35 +00:00
|
|
|
meta = with lib; {
|
2020-10-31 12:00:00 +00:00
|
|
|
description = "Backend part of Paperwork (Python API, no UI)";
|
2022-08-21 09:25:35 +00:00
|
|
|
homepage = "https://openpaper.work";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ aszlig symphorien ];
|
2020-10-31 12:00:00 +00:00
|
|
|
};
|
|
|
|
}
|