Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / office / paperwork / openpaperwork-gtk.nix
blobcd0290f08746c8ee8b92b9a22dab1a30a6565791
1 { buildPythonPackage
2 , lib
3 , fetchFromGitLab
5 , isPy3k
6 , isPyPy
8 , openpaperwork-core
9 , pillow
10 , pygobject3
11 , distro
12 , setuptools-scm
14 , pkgs
17 buildPythonPackage rec {
18   pname = "openpaperwork-gtk";
19   inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;
20   format = "pyproject";
22   sourceRoot = "${src.name}/openpaperwork-gtk";
24   # Python 2.x is not supported.
25   disabled = !isPy3k && !isPyPy;
27   patchPhase = ''
28     chmod a+w -R ..
29     patchShebangs ../tools
30   '';
32   env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
34   nativeBuildInputs = [
35     pkgs.gettext
36     pkgs.which
37     setuptools-scm
38   ];
40   preBuild = ''
41     make l10n_compile
42   '';
44   propagatedBuildInputs = [
45     pillow
46     pygobject3
47     pkgs.poppler_gi
48     pkgs.gtk3
49     pkgs.libhandy
50     distro
51     pkgs.pango
52     openpaperwork-core
53   ];
55   meta = {
56     description = "Reusable GTK components of Paperwork";
57     homepage = "https://openpaper.work/";
58     license = lib.licenses.gpl3Plus;
59     maintainers = with lib.maintainers; [ aszlig symphorien ];
60     platforms = lib.platforms.linux;
61   };