Subject: [bug#31818] [PATCH] gnu: Add restic.

From: Leo Famulari <[email-masked]>
Date: Wed, 13 Jun 2018 21:26:08 -0400

On Wed, Jun 13, 2018 at 10:18:19PM +0300, Oleg Pykhalov wrote:
> * gnu/packages/backup.scm (restic): New variable.

Cool, thanks for this!

> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "https://github.com/restic/restic/releases/download/"
> +                    "v" version "/restic-" version ".tar.gz"))

This tarball includes bundled copies of restic's dependency graph in the
vendor directory.

Adding the package to Guix with the bundled libraries is not how we
usually do things but, if they are all free software, it could be okay.

For Syncthing I unbundled everything — see (gnu packages syncthing).

Go presents a challenge for downstream packagers due to the humongous
dependency graphs of unversioned libraries. Our tooling could handle
this better than it currently does [0], but I don't think we should let
this hold us back now that we are getting patches for Go software :)

Does anyone have opinions about the bundled ("vendored") code in this
package?

> +         (replace 'build
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (with-directory-excursion (string-append
> +                                        "src/github.com/restic/restic/restic-"
> +                                        ,version)
> +               (invoke "go" "run" "build.go"))))

It would be nice if this could be made verbose — currently the build
phase is totally silent.

[0]
<https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00030.html>