* [PATCH 0/1] Borg: Install more docs
@ 2016-10-18 3:03 Leo Famulari
2016-10-18 3:03 ` [PATCH 1/1] gnu: borg: Install more documentation Leo Famulari
0 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2016-10-18 3:03 UTC (permalink / raw)
To: guix-devel
These text files explain in greater detail some things that are
explained in the Borg man page. You could think of them as extended
examples. The visual explanation of pruning was especially helpful to
me.
This method of selecting the files is crude. Originally I used
(find-files "docs/misc" "\\.txt$"), but that picked up some unwanted
files in 'docs/misc/asciinema'. Any suggestions for improvement?
Leo Famulari (1):
gnu: borg: Install more documentation.
gnu/packages/backup.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--
2.10.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] gnu: borg: Install more documentation.
2016-10-18 3:03 [PATCH 0/1] Borg: Install more docs Leo Famulari
@ 2016-10-18 3:03 ` Leo Famulari
2016-10-18 7:19 ` Ricardo Wurmus
2016-10-18 16:47 ` Alex Kost
0 siblings, 2 replies; 6+ messages in thread
From: Leo Famulari @ 2016-10-18 3:03 UTC (permalink / raw)
To: guix-devel
* gnu/packages/backup.scm (borg)[arguments]: Install more documentation
in 'install-doc' phase.
---
gnu/packages/backup.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index eb5e98d..b75e99b 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -439,8 +439,15 @@ detection, and lossless compression.")
(add-after 'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (man (string-append out "/share/man/man1")))
+ (man (string-append out "/share/man/man1"))
+ (misc (string-append out "/share/borg/misc")))
(and
+ (for-each (lambda (file)
+ (install-file file misc))
+ (find-files "docs/misc"
+ (string-append "create_chunker-params|"
+ "internals-picture|"
+ "prune-example")))
(zero? (system* "python3" "setup.py" "build_ext" "--inplace"))
(zero? (system* "make" "-C" "docs" "man"))
(begin
--
2.10.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] gnu: borg: Install more documentation.
2016-10-18 3:03 ` [PATCH 1/1] gnu: borg: Install more documentation Leo Famulari
@ 2016-10-18 7:19 ` Ricardo Wurmus
2016-10-19 20:01 ` Leo Famulari
2016-10-18 16:47 ` Alex Kost
1 sibling, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2016-10-18 7:19 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
Leo Famulari <leo@famulari.name> writes:
> * gnu/packages/backup.scm (borg)[arguments]: Install more documentation
> in 'install-doc' phase.
> ---
> gnu/packages/backup.scm | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> index eb5e98d..b75e99b 100644
> --- a/gnu/packages/backup.scm
> +++ b/gnu/packages/backup.scm
> @@ -439,8 +439,15 @@ detection, and lossless compression.")
> (add-after 'install 'install-doc
> (lambda* (#:key outputs #:allow-other-keys)
> (let* ((out (assoc-ref outputs "out"))
> - (man (string-append out "/share/man/man1")))
> + (man (string-append out "/share/man/man1"))
> + (misc (string-append out "/share/borg/misc")))
> (and
> + (for-each (lambda (file)
> + (install-file file misc))
I like “cut” from srfi-26 in simple cases like this:
(for-each (cut install-file <> misc)
(find-files …))
> + (find-files "docs/misc"
> + (string-append "create_chunker-params|"
> + "internals-picture|"
> + "prune-example")))
I don’t think “string-append” is needed here. You can just break the
string and escape the line break.
~~ Ricardo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] gnu: borg: Install more documentation.
2016-10-18 3:03 ` [PATCH 1/1] gnu: borg: Install more documentation Leo Famulari
2016-10-18 7:19 ` Ricardo Wurmus
@ 2016-10-18 16:47 ` Alex Kost
2016-10-19 20:01 ` Leo Famulari
1 sibling, 1 reply; 6+ messages in thread
From: Alex Kost @ 2016-10-18 16:47 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
Leo Famulari (2016-10-17 23:03 -0400) wrote:
> * gnu/packages/backup.scm (borg)[arguments]: Install more documentation
> in 'install-doc' phase.
> ---
> gnu/packages/backup.scm | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> index eb5e98d..b75e99b 100644
> --- a/gnu/packages/backup.scm
> +++ b/gnu/packages/backup.scm
> @@ -439,8 +439,15 @@ detection, and lossless compression.")
> (add-after 'install 'install-doc
> (lambda* (#:key outputs #:allow-other-keys)
> (let* ((out (assoc-ref outputs "out"))
> - (man (string-append out "/share/man/man1")))
> + (man (string-append out "/share/man/man1"))
> + (misc (string-append out "/share/borg/misc")))
> (and
> + (for-each (lambda (file)
Note that the return value of 'for-each' is not specified, so it should
not be used inside 'and'. I would just put it before (and (zero? …) …).
> + (install-file file misc))
> + (find-files "docs/misc"
> + (string-append "create_chunker-params|"
> + "internals-picture|"
> + "prune-example")))
> (zero? (system* "python3" "setup.py" "build_ext" "--inplace"))
> (zero? (system* "make" "-C" "docs" "man"))
> (begin
--
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] gnu: borg: Install more documentation.
2016-10-18 7:19 ` Ricardo Wurmus
@ 2016-10-19 20:01 ` Leo Famulari
0 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2016-10-19 20:01 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
On Tue, Oct 18, 2016 at 09:19:19AM +0200, Ricardo Wurmus wrote:
>
> Leo Famulari <leo@famulari.name> writes:
>
> > * gnu/packages/backup.scm (borg)[arguments]: Install more documentation
> > in 'install-doc' phase.
> > ---
> > gnu/packages/backup.scm | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> > index eb5e98d..b75e99b 100644
> > --- a/gnu/packages/backup.scm
> > +++ b/gnu/packages/backup.scm
> > @@ -439,8 +439,15 @@ detection, and lossless compression.")
> > (add-after 'install 'install-doc
> > (lambda* (#:key outputs #:allow-other-keys)
> > (let* ((out (assoc-ref outputs "out"))
> > - (man (string-append out "/share/man/man1")))
> > + (man (string-append out "/share/man/man1"))
> > + (misc (string-append out "/share/borg/misc")))
> > (and
> > + (for-each (lambda (file)
> > + (install-file file misc))
>
> I like “cut” from srfi-26 in simple cases like this:
>
> (for-each (cut install-file <> misc)
> (find-files …))
Thanks, that is easier to read.
> > + (find-files "docs/misc"
> > + (string-append "create_chunker-params|"
> > + "internals-picture|"
> > + "prune-example")))
>
> I don’t think “string-append” is needed here. You can just break the
> string and escape the line break.
I decided not to use a regex for this. It's only three files so I just
used a list.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] gnu: borg: Install more documentation.
2016-10-18 16:47 ` Alex Kost
@ 2016-10-19 20:01 ` Leo Famulari
0 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2016-10-19 20:01 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
On Tue, Oct 18, 2016 at 07:47:53PM +0300, Alex Kost wrote:
> Leo Famulari (2016-10-17 23:03 -0400) wrote:
>
> > * gnu/packages/backup.scm (borg)[arguments]: Install more documentation
> > in 'install-doc' phase.
> > ---
> > gnu/packages/backup.scm | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
> > index eb5e98d..b75e99b 100644
> > --- a/gnu/packages/backup.scm
> > +++ b/gnu/packages/backup.scm
> > @@ -439,8 +439,15 @@ detection, and lossless compression.")
> > (add-after 'install 'install-doc
> > (lambda* (#:key outputs #:allow-other-keys)
> > (let* ((out (assoc-ref outputs "out"))
> > - (man (string-append out "/share/man/man1")))
> > + (man (string-append out "/share/man/man1"))
> > + (misc (string-append out "/share/borg/misc")))
> > (and
> > + (for-each (lambda (file)
>
> Note that the return value of 'for-each' is not specified, so it should
> not be used inside 'and'. I would just put it before (and (zero? …) …).
Thanks, I've taken that into account.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-19 20:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 3:03 [PATCH 0/1] Borg: Install more docs Leo Famulari
2016-10-18 3:03 ` [PATCH 1/1] gnu: borg: Install more documentation Leo Famulari
2016-10-18 7:19 ` Ricardo Wurmus
2016-10-19 20:01 ` Leo Famulari
2016-10-18 16:47 ` Alex Kost
2016-10-19 20:01 ` Leo Famulari
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).