nixpkgs/pkgs/applications/office/paperwork/paperwork-backend.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

97 lines
1.5 KiB
Nix

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