git.iko.soy/typeable/nixpkgs
on master help sign in
paperwork: 2.0.2 -> 2.0.3 and compile user manual
commitdc3054b4ae7763758392c3fa4c21142905c7b4cd authorSymphorien Gibol <symphorien+git@xlumurb.eu> dateThu 4 Mar 2021, 21:12 (6 years ago) parent21cc0bc
2 files changed+49−9
pkgs/applications/office/paperwork/paperwork-gtk.nix+37−7 pkgs/applications/office/paperwork/src.nix+12−2
pkgs/applications/office/paperwork/paperwork-gtk.nix+37−7
@@ -13,10 +13,24 @@
1313, gettext
1414, gobject-introspection
1515, gdk-pixbuf
16+, texlive
17+, imagemagick
18+, perlPackages
1619}:
1720
21+let
22+ documentation_deps = [
23+ (texlive.combine {
24+ inherit (texlive) scheme-small wrapfig was;
25+ })
26+ xvfb-run
27+ imagemagick
28+ perlPackages.Po4a
29+ ];
30+in
31+
1832python3Packages.buildPythonApplication rec {
19− inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;
33+ inherit (import ./src.nix { inherit fetchFromGitLab; }) version src sample_documents;
2034 pname = "paperwork";
2135
2236 sourceRoot = "source/paperwork-gtk";
@@ -52,9 +66,16 @@ python3Packages.buildPythonApplication rec {
5266 for i in $site/data/paperwork_*.png; do
5367 ln -s $i $site/icon/out;
5468 done
69+
70+ export XDG_DATA_DIRS=$XDG_DATA_DIRS:${gnome.adwaita-icon-theme}/share
71+ # build the user manual
72+ PATH=$out/bin:$PATH PAPERWORK_TEST_DOCUMENTS=${sample_documents} make data
73+ for i in src/paperwork_gtk/model/help/out/*.pdf; do
74+ install -Dt $site/model/help/out $i
75+ done
5576 '';
5677
57− checkInputs = [ xvfb-run dbus.daemon ];
78+ checkInputs = [ dbus.daemon ];
5879
5980 nativeBuildInputs = [
6081 wrapGAppsHook
@@ -62,7 +83,7 @@ python3Packages.buildPythonApplication rec {
6283 (lib.getBin gettext)
6384 which
6485 gdk-pixbuf # for the setup hook
65− ];
86+ ] ++ documentation_deps;
6687
6788 buildInputs = [
6889 gnome.adwaita-icon-theme
@@ -78,13 +99,20 @@ python3Packages.buildPythonApplication rec {
7899 makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
79100 '';
80101
81− # A few parts of chkdeps need to have a display and a dbus session, so we not
82− # only need to run a virtual X server + dbus but also have a large enough
83− # resolution, because the Cairo test tries to draw a 200x200 window.
84− preCheck = ''
102+ checkPhase = ''
103+ runHook preCheck
104+
105+ # A few parts of chkdeps need to have a display and a dbus session, so we not
106+ # only need to run a virtual X server + dbus but also have a large enough
107+ # resolution, because the Cairo test tries to draw a 200x200 window.
85108 xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
86109 --config-file=${dbus.daemon}/share/dbus-1/session.conf \
87110 $out/bin/paperwork-gtk chkdeps
111+
112+ # content of make test, without the dep on make install
113+ python -m unittest discover --verbose -s tests
114+
115+ runHook postCheck
88116 '';
89117
90118 propagatedBuildInputs = with python3Packages; [
@@ -98,6 +126,8 @@ python3Packages.buildPythonApplication rec {
98126 setuptools
99127 ];
100128
129+ disallowedRequisites = documentation_deps;
130+
101131 meta = {
102132 description = "A personal document manager for scanned documents";
103133 homepage = "https://openpaper.work/";
pkgs/applications/office/paperwork/src.nix+12−2
@@ -1,12 +1,22 @@
11{fetchFromGitLab}:
22rec {
3− version = "2.0.2";
3+ version = "2.0.3";
44 src = fetchFromGitLab {
55 domain = "gitlab.gnome.org";
66 repo = "paperwork";
77 group = "World";
88 owner = "OpenPaperwork";
99 rev = version;
10− sha256 = "1di7nnl8ywyiwfpl5m1kvip1m0hvijbmqmkdpviwqw7ajizrr1ly";
10+ sha256 = "02c2ysca75j59v87n1axqfncvs167kmdr40m0f05asdh2akwrbi9";
1111 };
12+ sample_documents = fetchFromGitLab {
13+ domain = "gitlab.gnome.org";
14+ repo = "paperwork-test-documents";
15+ group = "World";
16+ owner = "OpenPaperwork";
17+ # https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/blob/master/paperwork-gtk/src/paperwork_gtk/model/help/screenshot.sh see TEST_DOCS_TAG
18+ rev = "1.0";
19+ sha256 = "155nhw2jmlgfi6c3wm241vrr3yma6lw85k9lxn844z96kyi7wbpr";
20+ };
21+
1222}