summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiacomo Leidi <goodoldpaul@autistici.org>2024-04-07 22:57:17 +0200
committerGuix Patches Tester <>2024-04-17 14:24:29 +0200
commitca37d4e07025c1353b89226d9524fba63abc6a01 (patch)
tree119b54c89270a8cda1118c42fea13fdb711a5fe9
parentb47ae1ecc43baaf726701ab2d2f810ecfaa75428 (diff)
downloadguix-patches-ca37d4e07025c1353b89226d9524fba63abc6a01.tar
guix-patches-ca37d4e07025c1353b89226d9524fba63abc6a01.tar.gz
gnu: Add docker-credential-secretservice.
* gnu/packages/docker.scm (docker-credential-helpers): New variable. * gnu/packages/gnome.scm (docker-credential-secretservice): New variable. Change-Id: I6c46d429fa2842969b0fcde58ded72e5b04ee321
-rw-r--r--gnu/packages/docker.scm70
-rw-r--r--gnu/packages/gnome.scm6
2 files changed, 74 insertions, 2 deletions
diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm
index b18de182fe..5007899608 100644
--- a/gnu/packages/docker.scm
+++ b/gnu/packages/docker.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2020 Jesse Dowell <jessedowell@gmail.com>
;;; Copyright © 2021, 2022 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2022 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2024 Giacomo Leidi <goodoldpaul@autistici.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -51,7 +52,8 @@
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages version-control)
- #:use-module (gnu packages virtualization))
+ #:use-module (gnu packages virtualization)
+ #:export (docker-credential-helpers))
;; Note - when changing Docker versions it is important to update the versions
;; of several associated packages (docker-libnetwork and go-sctp).
@@ -670,6 +672,72 @@ provisioning etc.")
(home-page "https://www.docker.com/")
(license license:asl2.0)))
+;; Actual users of this procedure are
+;; docker-credentials-secretservice and docker-credential-pass, they live in
+;; different modules to avoid circular imports.
+(define* (docker-credential-helpers plugin-name #:key (inputs '()))
+ (package
+ (name (string-append "docker-credential-" plugin-name))
+ (version "0.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/docker/docker-credential-helpers")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1kric2yrgypdqncqfrmrh7l7904km5zisygi3fg6zlfkyh6rsm23"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:install-source? #f
+ #:go go-1.19
+ #:unpack-path "github.com/docker/docker-credential-helpers"
+ #:import-path
+ (string-append "github.com/docker/docker-credential-helpers/"
+ plugin-name "/cmd")
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key unpack-path import-path build-flags #:allow-other-keys)
+ (apply invoke "go" "build"
+ "-v"
+ "-x"
+ (string-append "-ldflags=-s -w "
+ "-X github.com/docker/docker-credential-helpers"
+ "/credentials.Version=" #$version " "
+ "-X github.com/docker/docker-credential-helpers"
+ "/credentials.Package=" unpack-path " "
+ "-X github.com/docker/docker-credential-helpers"
+ "/credentials.Name=" #$name)
+ "-o" (string-append "bin/" #$name)
+ `(,@build-flags ,import-path))))
+ (replace 'install
+ (lambda _
+ (let* ((bin
+ (string-append #$output "/bin"))
+ (lib
+ (string-append #$output "/libexec/docker/cli-plugins"))
+ (entrypoint
+ (string-append lib "/" #$name)))
+ (mkdir-p bin)
+ (mkdir-p lib)
+ (copy-file (string-append "bin/" #$name) entrypoint)
+ (symlink entrypoint
+ (string-append bin "/" #$name))))))))
+ (native-inputs
+ (list pkg-config))
+ (inputs inputs)
+ (home-page "https://github.com/docker/docker-credential-helpers")
+ (synopsis "Store Docker login credentials in platform keystores")
+ (description
+ (string-append "docker-credential-helpers is a suite of programs to use native stores to keep
+Docker credentials safe.
+
+This package provides the @code{" name "} plugin."))
+ (license license:expat)))
+
(define-public cqfd
(package
(name "cqfd")
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 787cf66f09..12f221d1c5 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -36,7 +36,7 @@
;;; Copyright © 2019 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
-;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2019, 2024 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2019 Jonathan Frederickson <jonathan@terracrypt.net>
;;; Copyright © 2019, 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -5266,6 +5266,10 @@ and the GLib main loop, to integrate well with GNOME applications.")
and other secrets. It communicates with the \"Secret Service\" using DBus.")
(license license:lgpl2.1+)))
+(define-public docker-credential-secretservice
+ (docker-credential-helpers "secretservice"
+ #:inputs (list libsecret)))
+
(define-public five-or-more
(package
(name "five-or-more")