2018-09-14 13:32:02 +01:00
|
|
|
{ buildPythonPackage, lib, fetchFromGitLab
|
2017-11-09 18:28:47 +00:00
|
|
|
|
|
|
|
, isPy3k, isPyPy
|
|
|
|
|
|
|
|
, pyenchant, simplebayes, pillow, pycountry, whoosh, termcolor
|
2020-03-07 12:20:42 +00:00
|
|
|
, python-Levenshtein, pygobject3, pyocr, natsort, libinsane
|
|
|
|
, distro
|
2017-11-09 18:28:47 +00:00
|
|
|
|
|
|
|
, pkgs
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-11-09 11:26:09 +00:00
|
|
|
pname = "paperwork-backend";
|
2020-03-07 12:20:42 +00:00
|
|
|
version = "1.3.1";
|
2017-11-09 18:28:47 +00:00
|
|
|
|
2018-09-14 13:32:02 +01:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
repo = "paperwork";
|
|
|
|
group = "World";
|
|
|
|
owner = "OpenPaperwork";
|
2017-11-09 18:28:47 +00:00
|
|
|
rev = version;
|
2020-03-07 12:20:42 +00:00
|
|
|
sha256 = "1219yz8z4r1yn6miq8zc2z1m1lnhf3dmkhwfw23n05bg842nvg65";
|
2017-11-09 18:28:47 +00:00
|
|
|
};
|
|
|
|
|
2018-09-14 13:32:02 +01:00
|
|
|
sourceRoot = "source/paperwork-backend";
|
|
|
|
|
2017-11-09 18:28:47 +00:00
|
|
|
# Python 2.x is not supported.
|
|
|
|
disabled = !isPy3k && !isPyPy;
|
|
|
|
|
2018-09-14 13:32:02 +01:00
|
|
|
patchPhase = ''
|
|
|
|
echo 'version = "${version}"' > paperwork_backend/_version.py
|
|
|
|
'';
|
|
|
|
|
2017-11-09 18:28:47 +00:00
|
|
|
preCheck = "\"$out/bin/paperwork-shell\" chkdeps paperwork_backend";
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyenchant simplebayes pillow pycountry whoosh termcolor
|
2020-03-07 12:20:42 +00:00
|
|
|
python-Levenshtein libinsane pygobject3 pyocr natsort
|
|
|
|
pkgs.poppler_gi pkgs.gtk3 distro
|
2017-11-09 18:28:47 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Backend part of Paperwork (Python API, no UI)";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://openpaper.work/";
|
2017-11-09 18:28:47 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2020-03-07 12:20:42 +00:00
|
|
|
maintainers = with lib.maintainers; [ aszlig symphorien ];
|
2017-11-09 18:28:47 +00:00
|
|
|
};
|
|
|
|
}
|