nixpkgs/pkgs/applications/office/paperwork/paperwork-backend.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
1.3 KiB
Nix
Raw Normal View History

2020-10-31 12:00:00 +00:00
{ buildPythonPackage
, lib
, fetchFromGitLab
, isPy3k
, isPyPy
, pyenchant
2021-01-06 12:00:00 +00:00
, scikit-learn
2020-10-31 12:00:00 +00:00
, pypillowfight
, pycountry
, whoosh
, termcolor
, python-Levenshtein
, pygobject3
, pyocr
, natsort
, libinsane
, distro
, openpaperwork-core
, openpaperwork-gtk
, psutil
, pkgs
}:
buildPythonPackage rec {
pname = "paperwork-backend";
inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;
sourceRoot = "source/paperwork-backend";
# Python 2.x is not supported.
disabled = !isPy3k && !isPyPy;
patchPhase = ''
echo 'version = "${version}"' > src/paperwork_backend/_version.py
chmod a+w -R ..
patchShebangs ../tools
'';
propagatedBuildInputs = [
pyenchant
2021-01-06 12:00:00 +00:00
scikit-learn
2020-10-31 12:00:00 +00:00
pypillowfight
pycountry
whoosh
termcolor
python-Levenshtein
libinsane
pygobject3
pyocr
natsort
pkgs.poppler_gi
pkgs.gtk3
distro
openpaperwork-core
];
preCheck = ''
export HOME=$(mktemp -d)
'';
2021-01-06 12:00:00 +00:00
nativeBuildInputs = [ pkgs.gettext pkgs.which pkgs.shared-mime-info ];
2020-10-31 12:00:00 +00:00
preBuild = ''
make l10n_compile
'';
2021-01-06 12:00:00 +00:00
checkInputs = [ openpaperwork-gtk psutil pkgs.libreoffice ];
2020-10-31 12:00:00 +00:00
meta = {
description = "Backend part of Paperwork (Python API, no UI)";
homepage = "https://openpaper.work/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ aszlig symphorien ];
};
}