all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: guix-devel@gnu.org
Subject: How to package gnucash-docs
Date: Wed, 06 Sep 2017 03:42:19 -0700	[thread overview]
Message-ID: <87lglsds6s.fsf@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1128 bytes --]

Hi,

I've noticed that the "help document" for GnuCash doesn't show up in
Yelp on GNOME.  Apparently, this is because most (if not all) of the
GnuCash documentation is packaged separately in gnucash-docs, which
hasn't been added to Guix yet.  I've added it successfully (see attached
patch), but I'm looking for guidance on how to make the following
improvements.

First, "make check" fails because xmllint tries to look up a DTD on the
Internet when validating the XML for dozens of documents.  This isn't a
huge problem because I can simply skip the tests.  I've manually
verified that at least some of the documentation shows up correctly (in
multiple languages, even!) in Yelp on GNOME, which is better than no
documentation at all.  However, it'd be nice if I could make the tests
pass.  Is there any trick for making xmllint work in a sandboxed build?

Second, I'm not sure if gnucash-docs should exist as a separate package
in Guix.  I feel like it would be nicer if I could just add this as a
"doc" output of the gnucash package.  How can I accomplish that?

Thank you for your help!

-- 
Chris

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-gnucash-docs.patch --]
[-- Type: text/x-patch, Size: 3116 bytes --]

From 89eca236514f7c86bdf0f6d93d4348bb0cab43bc Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Wed, 6 Sep 2017 03:15:05 -0700
Subject: [PATCH] gnu: Add gnucash-docs.

* gnu/packages/gnucash.scm (gnucash-docs): Add it.
---
 gnu/packages/gnucash.scm | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index ac2dce576..2d71e89dd 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -23,8 +23,11 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages docbook)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages glib)
@@ -52,7 +55,7 @@
        (base32
         "0g2risryfgplxh6cxpsl7fn255vipgsx38b4l081h665nqwmz5nv"))
       (patches (search-patches "gnucash-price-quotes-perl.patch"))))
-    (build-system gnu-build-system)
+    (build-system glib-or-gtk-build-system)
     (inputs
      `(("guile" ,guile-2.0)
        ("icu4c" ,icu4c)
@@ -114,6 +117,40 @@ import and transaction matching.  It also automates several tasks, such as
 financial calculations or scheduled transactions.")
     (license license:gpl3+)))
 
+(define-public gnucash-docs
+  (package
+    (name "gnucash-docs")
+    (version (package-version gnucash))
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://sourceforge/gnucash/gnucash-docs/"
+                          version "/gnucash-docs-" version ".tar.gz"))
+      (sha256
+       (base32
+        "0dfb4m4084apav9kjsc4mfbj99xsyxm59qhpm1nxvhybn5h6qr3r"))))
+    (build-system gnu-build-system)
+    ;; These are native-inputs because they seem to only be required for
+    ;; building the documentation.
+    (native-inputs
+     `(("libxml2" ,libxml2)
+       ("libxslt" ,libxslt)
+       ("docbook-xsl" ,docbook-xsl)
+       ("scrollkeeper" ,scrollkeeper)))
+    ;; Disable tests since xmllint tries to access the Internet, which fails.
+    ;; We can enable tests if we figure out how to make it work offline.
+    (arguments '(#:tests? #f))
+    (home-page "http://www.gnucash.org/")
+    (synopsis "Documentation for GnuCash")
+    (description
+     "User guide and other documentation for GnuCash in various languages.
+This package exists because the GnuCash project maintains its documentation in
+an entirely separate package from the actual GnuCash program.  To read the
+documentation, install this package and then access the program's help as
+usual, either from within GnuCash or by directly using your desktop
+environment's help reader (e.g. Yelp in the case of GNOME.)")
+    (license (list license:fdl1.1+ license:gpl3+))))
+
 (define-public gwenhywfar
   (package
     (name "gwenhywfar")
-- 
2.14.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

             reply	other threads:[~2017-09-06 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06 10:42 Chris Marusich [this message]
2017-09-07  8:33 ` How to package gnucash-docs Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lglsds6s.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.