Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / office / paperwork / paperwork-shell.nix
blob7a1d82a5eb31e88041799f34809b2ed29911b8b3
1 { buildPythonPackage
2 , lib
3 , fetchFromGitLab
5 , isPy3k
6 , isPyPy
8 , openpaperwork-core
9 , openpaperwork-gtk
10 , paperwork-backend
11 , fabulous
12 , rich
13 , getkey
14 , psutil
15 , shared-mime-info
16 , setuptools-scm
18 , pkgs
21 buildPythonPackage rec {
22   pname = "paperwork-shell";
23   inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;
24   format = "pyproject";
26   sourceRoot = "${src.name}/paperwork-shell";
28   # Python 2.x is not supported.
29   disabled = !isPy3k && !isPyPy;
31   patchPhase = ''
32     chmod a+w -R ..
33     patchShebangs ../tools
34   '';
35   env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
37   propagatedBuildInputs = [
38     openpaperwork-core
39     paperwork-backend
40     fabulous
41     getkey
42     psutil
43     rich
44   ];
46   nativeCheckInputs = [
47     shared-mime-info
48     openpaperwork-gtk
49   ];
51   nativeBuildInputs = [
52     pkgs.gettext
53     pkgs.which
54     setuptools-scm
55   ];
57   preBuild = ''
58     make l10n_compile
59   '';
61   preCheck = ''
62     export HOME=$(mktemp -d)
63     "$out/bin/paperwork-cli" chkdeps
64   '';
66   meta = {
67     description = "CLI for Paperwork";
68     homepage = "https://openpaper.work/";
69     license = lib.licenses.gpl3Plus;
70     maintainers = with lib.maintainers; [ aszlig symphorien ];
71   };