summaryrefslogtreecommitdiff
path: root/gnu/packages/golang-vcs.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/golang-vcs.scm')
-rw-r--r--gnu/packages/golang-vcs.scm50
1 files changed, 49 insertions, 1 deletions
diff --git a/gnu/packages/golang-vcs.scm b/gnu/packages/golang-vcs.scm
index 28b3d8fa0c..23d43e635c 100644
--- a/gnu/packages/golang-vcs.scm
+++ b/gnu/packages/golang-vcs.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2025 David Thompson <davet@gnu.org>
;;; Copyright © 2025 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,6 +34,7 @@
#:use-module (gnu packages golang-web)
#:use-module (gnu packages golang-xyz)
#:use-module (gnu packages haskell-apps)
+ #:use-module (gnu packages prometheus)
#:use-module (gnu packages python-check)
#:use-module (gnu packages version-control))
@@ -231,6 +232,7 @@ using the Git pkt-line format used in various Git operations.")
(build-system go-build-system)
(arguments
(list
+ #:go go-1.23
#:import-path "github.com/jiangxin/goconfig"))
(native-inputs
(list git-minimal/pinned
@@ -454,6 +456,52 @@ interact with GitLab in a simple and uniform way.")
;;; Executables:
;;;
+(define-public git-sync
+ (package
+ (name "git-sync")
+ (version "4.4.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kubernetes/git-sync")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1faif57081yajmh0lfi2l8j9imkq1zv2nlccg84izi520rwjd6f6"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file-recursively "vendor")))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:install-source? #f
+ #:import-path "k8s.io/git-sync"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-main-path
+ ;; Build fails if that commit is kept.
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (substitute* "main.go"
+ (("// import .k8s.io/git-sync/cmd/git-sync.") ""))))))))
+ (native-inputs
+ (list go-github-com-go-logr-logr
+ go-github-com-golang-jwt-jwt-v4
+ go-github-com-prometheus-client-golang
+ go-github-com-spf13-pflag
+ go-go-uber-org-goleak
+ go-golang-org-x-sys))
+ (home-page "https://github.com/kubernetes/git-sync")
+ (synopsis "Keep repository in sync with the upstream")
+ (description
+ "git-sync is a simple command that pulls a git repository into a local
+directory. It is a perfect \"sidecar\" container in Kubernetes - it can
+periodically pull files down from a repository so that an application can
+consume them.")
+ (license license:asl2.0)))
+
;;;
;;; Avoid adding new packages to the end of this file. To reduce the chances
;;; of a merge conflict, place them above in alphabetic order.