From: Eric Bavier <ericbavier@openmailbox.org>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: unison: Add "doc" output.
Date: Fri, 18 Dec 2015 19:42:15 -0600 [thread overview]
Message-ID: <20151218194215.50af651c@openmailbox.org> (raw)
* gnu/packages/ocaml.scm (unison-doc): New function.
(unison)[source]: Use versioned URI.
[inputs, outputs]: New fields.
[arguments]: Add 'install-doc phase.
---
gnu/packages/ocaml.scm | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7f80fc8..241be85 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
+;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -490,6 +491,14 @@ libglade (and it an generate OCaml code
from .glade files), libpanel, librsvg and quartz.")
(license lgpl2.1)))
+(define (unison-doc ext version hash)
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.seas.upenn.edu/~bcpierce/unison/"
+ "download/releases/unison-" version "/unison-"
+ version "-manual." ext))
+ (sha256 (base32 hash))))
+
(define-public unison
(package
(name "unison")
@@ -498,12 +507,24 @@ libpanel, librsvg and quartz.")
(origin
(method url-fetch)
(uri (string-append "https://www.seas.upenn.edu/~bcpierce/unison/"
- "download/releases/stable/unison-" version
- ".tar.gz"))
+ "download/releases/unison-" version "/unison-"
+ version ".tar.gz"))
(sha256
(base32
"10sln52rnnsj213jy3166m0q97qpwnrwl6mm529xfy10x3xkq3gl"))))
(build-system gnu-build-system)
+ (outputs '("out"
+ "doc")) ; 1.5 MiB of documentation
+ (inputs
+ `(("doc-pdf"
+ ,(unison-doc "pdf" version
+ "0y5mywjn352nw4wqli94gnc5vn1f72g56jqqk1nqajz0ark998nb"))
+ ("doc-ps"
+ ,(unison-doc "ps" version
+ "11awy1xxhmckwnx42hllmngmx8q4ck18vpwpgfqqhj0x8vx0b3ha"))
+ ("doc-html"
+ ,(unison-doc "html" version
+ "06myrpv067j5ffm265fm0a83gm41j9bv3ps3yiyb1hqgfy1qy3ah"))))
(native-inputs `(("ocaml" ,ocaml)))
(arguments
@@ -522,6 +543,18 @@ libpanel, librsvg and quartz.")
(bin (string-append out "/bin")))
(mkdir-p bin)
(setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
+ #t)))
+ (add-after 'install 'install-doc
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((doc (string-append (assoc-ref outputs "doc")
+ "/share/doc/unison")))
+ (mkdir-p doc)
+ (for-each
+ (lambda (i)
+ (let* ((file (assoc-ref inputs i))
+ (dest (strip-store-file-name file)))
+ (copy-file file (string-append doc "/" dest))))
+ '("doc-pdf" "doc-ps" "doc-html"))
#t))))))
(home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
(synopsis "File synchronizer")
--
2.6.3
next reply other threads:[~2015-12-19 6:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-19 1:42 Eric Bavier [this message]
2015-12-20 20:57 ` [PATCH] gnu: unison: Add "doc" output Leo Famulari
2015-12-20 22:11 ` Ludovic Courtès
2015-12-21 4:01 ` Eric Bavier
2015-12-21 10:39 ` Ludovic Courtès
2016-01-08 7:13 ` Eric Bavier
2016-01-08 10:19 ` Ludovic Courtès
2016-01-17 6:28 ` Eric Bavier
2016-01-18 9:49 ` 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=20151218194215.50af651c@openmailbox.org \
--to=ericbavier@openmailbox.org \
--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.