* [bug#63003] [PATCH 0/3] gnu: Add restic-rest-server.
@ 2023-04-21 19:53 Timo Wilken
2023-04-21 19:55 ` [bug#63003] [PATCH 1/3] gnu: Move golang dependencies to (gnu packages golang) Timo Wilken
0 siblings, 1 reply; 7+ messages in thread
From: Timo Wilken @ 2023-04-21 19:53 UTC (permalink / raw)
To: 63003; +Cc: Timo Wilken
The restic REST server is a Go program that serves a restic backup repository
over HTTP.
Almost all dependencies were already packaged in Guix, though some in (gnu
packages syncthing). I moved these to (gnu packages golang) with the rest of
the Go dependencies, as that seemed appropriate.
Timo Wilken (3):
gnu: Move golang dependencies to (gnu packages golang).
gnu: Add go-github-com-coreos-go-systemd-activation.
gnu: Add restic-rest-server.
gnu/packages/backup.scm | 48 ++++++++++++++++
gnu/packages/golang.scm | 115 ++++++++++++++++++++++++++++++++++++-
gnu/packages/syncthing.scm | 90 -----------------------------
3 files changed, 162 insertions(+), 91 deletions(-)
base-commit: 13ebf5e36cc676627a19072d3712c399b7aae61f
--
2.39.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#63003] [PATCH 1/3] gnu: Move golang dependencies to (gnu packages golang).
2023-04-21 19:53 [bug#63003] [PATCH 0/3] gnu: Add restic-rest-server Timo Wilken
@ 2023-04-21 19:55 ` Timo Wilken
2023-04-21 19:55 ` [bug#63003] [PATCH 2/3] gnu: Add go-github-com-coreos-go-systemd-activation Timo Wilken
2023-04-21 19:55 ` [bug#63003] [PATCH 3/3] gnu: Add restic-rest-server Timo Wilken
0 siblings, 2 replies; 7+ messages in thread
From: Timo Wilken @ 2023-04-21 19:55 UTC (permalink / raw)
To: 63003; +Cc: Timo Wilken
These packages are needed by syncthing and the new restic-rest-server package,
so put them in (gnu packages golang) instead.
* gnu/packages/syncthing.scm (go-github-com-prometheus-common,
go-github-com-prometheus-procfs, go-github-com-prometheus-client-golang):
Delete variables.
* gnu/packages/golang.scm (go-github-com-prometheus-common,
go-github-com-prometheus-procfs, go-github-com-prometheus-client-golang):
Move deleted variables here.
---
gnu/packages/golang.scm | 90 ++++++++++++++++++++++++++++++++++++++
gnu/packages/syncthing.scm | 90 --------------------------------------
2 files changed, 90 insertions(+), 90 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 24dae34e20..cca5aacdb6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9497,6 +9497,96 @@ (define-public go-github-com-godbus-dbus
bindings for the D-Bus message bus system.")
(license license:bsd-2)))
+(define-public go-github-com-prometheus-common
+ (package
+ (name "go-github-com-prometheus-common")
+ (version "0.4.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/prometheus/common")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0sf4sjdckblz1hqdfvripk3zyp8xq89w7q75kbsyg4c078af896s"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/prometheus/common"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ ;; Source-only package
+ (delete 'build))))
+ (propagated-inputs
+ (list go-github-com-golang-protobuf-proto
+ go-github-com-matttproud-golang-protobuf-extensions-pbutil
+ go-github-com-prometheus-client-model))
+ (synopsis "Prometheus metrics")
+ (description "This package provides tools for reading and writing
+Prometheus metrics.")
+ (home-page "https://github.com/prometheus/common")
+ (license license:asl2.0)))
+
+(define-public go-github-com-prometheus-procfs
+ (package
+ (name "go-github-com-prometheus-procfs")
+ (version "0.0.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/prometheus/procfs")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1z5jq5rjala0a0di4nwk1rai0z9f73qwqj6mgcbpjbg2qknlb544"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/prometheus/procfs"
+ ;; The tests require Go modules, which are not yet supported in Guix's
+ ;; Go build system.
+ #:tests? #f))
+ (synopsis "Go library for reading @file{/proc}")
+ (description "The @code{procfs} Go package provides functions to retrieve
+system, kernel, and process metrics from the @file{/proc} pseudo file system.")
+ (home-page "https://github.com/prometheus/procfs")
+ (license license:asl2.0)))
+
+(define-public go-github-com-prometheus-client-golang
+ (package
+ (name "go-github-com-prometheus-client-golang")
+ (version "1.2.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/prometheus/client_golang")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zs49psk23n9z8wrl02d5vib5wclpym8kaxcy6n5pk696i419065"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:tests? #f
+ #:import-path "github.com/prometheus/client_golang"
+ #:phases
+ (modify-phases %standard-phases
+ ;; Source-only package
+ (delete 'build))))
+ (propagated-inputs
+ (list go-github-com-beorn7-perks-quantile
+ go-github-com-golang-protobuf-proto
+ go-github-com-prometheus-client-model
+ go-github-com-prometheus-common
+ go-github-com-prometheus-procfs
+ go-github-com-cespare-xxhash))
+ (synopsis "HTTP server and client tools for Prometheus")
+ (description "This package @code{promhttp} provides HTTP client and
+server tools for Prometheus metrics.")
+ (home-page "https://github.com/prometheus/client_golang")
+ (license license:asl2.0)))
+
(define-public go-github-com-zalando-go-keyring
(package
(name "go-github-com-zalando-go-keyring")
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index c4204f32fe..dd54100ce6 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -877,96 +877,6 @@ (define-public go-github-com-matttproud-golang-protobuf-extensions-pbutil
(home-page "https://github.com/matttproud/golang_protobuf_extensions")
(license asl2.0))))
-(define-public go-github-com-prometheus-common
- (package
- (name "go-github-com-prometheus-common")
- (version "0.4.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/prometheus/common")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0sf4sjdckblz1hqdfvripk3zyp8xq89w7q75kbsyg4c078af896s"))))
- (build-system go-build-system)
- (arguments
- '(#:import-path "github.com/prometheus/common"
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- ;; Source-only package
- (delete 'build))))
- (propagated-inputs
- (list go-github-com-golang-protobuf-proto
- go-github-com-matttproud-golang-protobuf-extensions-pbutil
- go-github-com-prometheus-client-model))
- (synopsis "Prometheus metrics")
- (description "This package provides tools for reading and writing
-Prometheus metrics.")
- (home-page "https://github.com/prometheus/common")
- (license asl2.0)))
-
-(define-public go-github-com-prometheus-procfs
- (package
- (name "go-github-com-prometheus-procfs")
- (version "0.0.4")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/prometheus/procfs")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1z5jq5rjala0a0di4nwk1rai0z9f73qwqj6mgcbpjbg2qknlb544"))))
- (build-system go-build-system)
- (arguments
- '(#:import-path "github.com/prometheus/procfs"
- ;; The tests require Go modules, which are not yet supported in Guix's
- ;; Go build system.
- #:tests? #f))
- (synopsis "Go library for reading @file{/proc}")
- (description "The @code{procfs} Go package provides functions to retrieve
-system, kernel, and process metrics from the @file{/proc} pseudo file system.")
- (home-page "https://github.com/prometheus/procfs")
- (license asl2.0)))
-
-(define-public go-github-com-prometheus-client-golang
- (package
- (name "go-github-com-prometheus-client-golang")
- (version "1.2.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/prometheus/client_golang")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0zs49psk23n9z8wrl02d5vib5wclpym8kaxcy6n5pk696i419065"))))
- (build-system go-build-system)
- (arguments
- '(#:tests? #f
- #:import-path "github.com/prometheus/client_golang"
- #:phases
- (modify-phases %standard-phases
- ;; Source-only package
- (delete 'build))))
- (propagated-inputs
- (list go-github-com-beorn7-perks-quantile
- go-github-com-golang-protobuf-proto
- go-github-com-prometheus-client-model
- go-github-com-prometheus-common
- go-github-com-prometheus-procfs
- go-github-com-cespare-xxhash))
- (synopsis "HTTP server and client tools for Prometheus")
- (description "This package @code{promhttp} provides HTTP client and
-server tools for Prometheus metrics.")
- (home-page "https://github.com/prometheus/client_golang")
- (license asl2.0)))
-
(define-public go-github-com-go-asn1-ber-asn1-ber
(package
(name "go-github-com-go-asn1-ber-asn1-ber")
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#63003] [PATCH 2/3] gnu: Add go-github-com-coreos-go-systemd-activation.
2023-04-21 19:55 ` [bug#63003] [PATCH 1/3] gnu: Move golang dependencies to (gnu packages golang) Timo Wilken
@ 2023-04-21 19:55 ` Timo Wilken
2023-04-21 19:59 ` Timo Wilken
2023-04-21 19:55 ` [bug#63003] [PATCH 3/3] gnu: Add restic-rest-server Timo Wilken
1 sibling, 1 reply; 7+ messages in thread
From: Timo Wilken @ 2023-04-21 19:55 UTC (permalink / raw)
To: 63003; +Cc: Timo Wilken
Required by restic-rest-server; see following commit.
* gnu/packages/golang.scm (go-github-com-coreos-go-systemd-activation): New variable.
---
gnu/packages/golang.scm | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cca5aacdb6..78864291ae 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -8964,6 +8964,29 @@ (define-public go-github-com-coreos-go-semver
It lets you parse and compare two semantic version strings.")
(license license:asl2.0)))
+(define-public go-github-com-coreos-go-systemd-activation
+ (package
+ (name "go-github-com-coreos-go-systemd-activation")
+ (version "0.0.0-20191104093116-d3cd4ed1dbcf")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/coreos/go-systemd")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "193mgqn7n4gbb8jb5kyn6ml4lbvh4xs55qpjnisaz7j945ik3kd8"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/coreos/go-systemd/activation"
+ #:unpack-path "github.com/coreos/go-systemd"))
+ (home-page "https://github.com/coreos/go-systemd")
+ (synopsis "Go bindings to systemd socket activation")
+ (description "Go bindings to systemd socket activation; for writing and
+using socket activation from Go.")
+ (license license:asl2.0)))
+
(define-public go-github-com-emirpasic-gods
(package
(name "go-github-com-emirpasic-gods")
@@ -8980,7 +9003,7 @@ (define-public go-github-com-emirpasic-gods
(build-system go-build-system)
(arguments
`(#:import-path "github.com/emirpasic/gods"
- ; Source-only package
+ ; Source-only package
#:tests? #f
#:phases
(modify-phases %standard-phases
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#63003] [PATCH 2/3] gnu: Add go-github-com-coreos-go-systemd-activation.
2023-04-21 19:55 ` [bug#63003] [PATCH 2/3] gnu: Add go-github-com-coreos-go-systemd-activation Timo Wilken
@ 2023-04-21 19:59 ` Timo Wilken
0 siblings, 0 replies; 7+ messages in thread
From: Timo Wilken @ 2023-04-21 19:59 UTC (permalink / raw)
To: 63003; +Cc: guix
On Fri Apr 21, 2023 at 9:55 PM CEST, Timo Wilken wrote:
> Required by restic-rest-server; see following commit.
>
> * gnu/packages/golang.scm (go-github-com-coreos-go-systemd-activation): New variable.
>
> @@ -8980,7 +9003,7 @@ (define-public go-github-com-emirpasic-gods
> (build-system go-build-system)
> (arguments
> `(#:import-path "github.com/emirpasic/gods"
> - ; Source-only package
> + ; Source-only package
> #:tests? #f
> #:phases
> (modify-phases %standard-phases
Oops, sorry about this accidental reformatting! Should I resend this
patch series or can that be removed when applying the commit?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#63003] [PATCH 3/3] gnu: Add restic-rest-server.
2023-04-21 19:55 ` [bug#63003] [PATCH 1/3] gnu: Move golang dependencies to (gnu packages golang) Timo Wilken
2023-04-21 19:55 ` [bug#63003] [PATCH 2/3] gnu: Add go-github-com-coreos-go-systemd-activation Timo Wilken
@ 2023-04-21 19:55 ` Timo Wilken
2023-04-23 14:47 ` bug#63003: " Leo Famulari
1 sibling, 1 reply; 7+ messages in thread
From: Timo Wilken @ 2023-04-21 19:55 UTC (permalink / raw)
To: 63003; +Cc: Timo Wilken
* gnu/packages/backup.scm (restic-rest-server): New variable.
---
gnu/packages/backup.scm | 48 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 134647d33d..94e8e3acc4 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Feng Shu <tumashu@163.com>
+;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1029,6 +1030,53 @@ (define-public restic
@end itemize")
(license license:bsd-2)))
+(define-public restic-rest-server
+ (package
+ (name "restic-rest-server")
+ (version "0.11.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/restic/rest-server")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1nvmxc9x0mlks6yfn66fmwn50k5q83ip4g9vvb0kndzd7hwcyacy"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/restic/rest-server/cmd/rest-server"
+ #:unpack-path "github.com/restic/rest-server"
+ #:install-source? #f ;all we need is the binary
+ #:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys . args)
+ (when tests?
+ ;; Unit tests seems to break with Guix' non-standard TMPDIR.
+ (setenv "TMPDIR" "/tmp")
+ (apply (assoc-ref %standard-phases
+ 'check) args))))
+ (add-after 'install 'rename-binary
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion (assoc-ref outputs "out")
+ ;; "rest-server" is a bit too generic.
+ (rename-file "bin/rest-server"
+ "bin/restic-rest-server")))))))
+ (propagated-inputs (list go-golang-org-x-crypto
+ go-github-com-spf13-cobra
+ go-github-com-prometheus-client-golang
+ go-github-com-miolini-datacounter
+ go-github-com-minio-sha256-simd
+ go-github-com-gorilla-handlers
+ go-github-com-coreos-go-systemd-activation))
+ (home-page "https://github.com/restic/rest-server")
+ (synopsis "Restic REST server")
+ (description
+ "The Restic REST server is a high performance HTTP server that implements
+restic's REST backend API. It provides a secure and efficient way to backup
+data remotely, using the restic backup client and a @code{rest:} URL.")
+ (license license:bsd-2)))
+
(define-public zbackup
(package
(name "zbackup")
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-23 20:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-21 19:53 [bug#63003] [PATCH 0/3] gnu: Add restic-rest-server Timo Wilken
2023-04-21 19:55 ` [bug#63003] [PATCH 1/3] gnu: Move golang dependencies to (gnu packages golang) Timo Wilken
2023-04-21 19:55 ` [bug#63003] [PATCH 2/3] gnu: Add go-github-com-coreos-go-systemd-activation Timo Wilken
2023-04-21 19:59 ` Timo Wilken
2023-04-21 19:55 ` [bug#63003] [PATCH 3/3] gnu: Add restic-rest-server Timo Wilken
2023-04-23 14:47 ` bug#63003: " Leo Famulari
2023-04-23 14:50 ` [bug#63003] " Timo Wilken
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).