Archived
1
0
Fork 0

gnu: docker: Honor TESTS? and please guix lint.

* gnu/packages/docker.scm (docker)[phases]{patch-paths}: Split long lines.
{check}: Honor TESTS?.
[synopsis]: Do not start synopsis with package name.
This commit is contained in:
Maxim Cournoyer 2022-06-23 23:26:08 -04:00
parent 168a4955a3
commit 487070c425
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -348,7 +348,8 @@ built-in registry server of Docker.")
(string-append "DefaultCommand = \"" (string-append "DefaultCommand = \""
(search-input-file inputs "/sbin/runc") (search-input-file inputs "/sbin/runc")
"\"\n"))) "\"\n")))
(substitute* "vendor/github.com/containerd/containerd/runtime/v1/linux/runtime.go" (substitute* "vendor/github.com/containerd/containerd/\
runtime/v1/linux/runtime.go"
(("defaultRuntime[ \t]*=.*") (("defaultRuntime[ \t]*=.*")
(string-append "defaultRuntime = \"" (string-append "defaultRuntime = \""
(search-input-file inputs "/sbin/runc") (search-input-file inputs "/sbin/runc")
@ -385,7 +386,8 @@ built-in registry server of Docker.")
(string-append "expectedInitPath: \"" (string-append "expectedInitPath: \""
(search-input-file inputs "/bin/tini-static") (search-input-file inputs "/bin/tini-static")
"\""))) "\"")))
(substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" (substitute* "vendor/github.com/moby/buildkit/executor/\
runcexecutor/executor.go"
(("var defaultCommandCandidates = .*") (("var defaultCommandCandidates = .*")
(string-append "var defaultCommandCandidates = []string{\"" (string-append "var defaultCommandCandidates = []string{\""
(search-input-file inputs "/sbin/runc") "\"}"))) (search-input-file inputs "/sbin/runc") "\"}")))
@ -534,19 +536,20 @@ built-in registry server of Docker.")
;; dockerd instead. ;; dockerd instead.
(invoke "hack/make.sh" "dynbinary"))) (invoke "hack/make.sh" "dynbinary")))
(replace 'check (replace 'check
(lambda _ (lambda* (#:key tests? #:allow-other-keys)
;; The build process generated a file because the environment (when tests?
;; variable "AUTO_GOPATH" was set. Use it. ;; The build process generated a file because the environment
(setenv "GOPATH" (string-append (getcwd) "/.gopath")) ;; variable "AUTO_GOPATH" was set. Use it.
;; ".gopath/src/github.com/docker/docker" is a link to the current (setenv "GOPATH" (string-append (getcwd) "/.gopath"))
;; directory and chdir would canonicalize to that. ;; ".gopath/src/github.com/docker/docker" is a link to the current
;; But go needs to have the uncanonicalized directory name, so ;; directory and chdir would canonicalize to that.
;; store that. ;; But go needs to have the uncanonicalized directory name, so
(setenv "PWD" (string-append (getcwd) ;; store that.
"/.gopath/src/github.com/docker/docker")) (setenv "PWD" (string-append
(with-directory-excursion ".gopath/src/github.com/docker/docker" (getcwd) "/.gopath/src/github.com/docker/docker"))
(invoke "hack/test/unit")) (with-directory-excursion ".gopath/src/github.com/docker/docker"
(setenv "PWD" #f))) (invoke "hack/test/unit"))
(setenv "PWD" #f))))
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
@ -580,7 +583,7 @@ built-in registry server of Docker.")
(native-inputs (native-inputs
(list eudev ; TODO: Should be propagated by lvm2 (.pc -> .pc) (list eudev ; TODO: Should be propagated by lvm2 (.pc -> .pc)
go gotestsum pkg-config)) go gotestsum pkg-config))
(synopsis "Docker container component library, and daemon") (synopsis "Container component library and daemon")
(description "This package provides a framework to assemble specialized (description "This package provides a framework to assemble specialized
container systems. It includes components for orchestration, image container systems. It includes components for orchestration, image
management, secret management, configuration management, networking, management, secret management, configuration management, networking,