[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/09: gnu: containerd: Switch to gexp arguments.
From: |
guix-commits |
Subject: |
04/09: gnu: containerd: Switch to gexp arguments. |
Date: |
Fri, 24 Jun 2022 01:00:48 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit c37d970f4dcb1af3b54f47631bd878698416ce5c
Author: Pierre Langlois <pierre.langlois@gmx.com>
AuthorDate: Tue May 10 00:35:16 2022 +0100
gnu: containerd: Switch to gexp arguments.
* gnu/packages/docker.scm (containerd)[arguments]: Rewrite as gexps.
Pass all flags via make-flags variable. Switch to using
search-input-file.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
gnu/packages/docker.scm | 95 +++++++++++++++++++++++++------------------------
1 file changed, 49 insertions(+), 46 deletions(-)
diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm
index aae4fc01d0..90ba4494ce 100644
--- a/gnu/packages/docker.scm
+++ b/gnu/packages/docker.scm
@@ -29,6 +29,7 @@
#:use-module (gnu packages)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
@@ -186,53 +187,55 @@ Python without keeping their credentials in a Docker
configuration file.")
(base32 "1vsl747i3wyy68j4lp4nprwxadbyga8qxlrk892afcd2990zp5mr"))))
(build-system go-build-system)
(arguments
- (let ((make-flags (list (string-append "VERSION=" version)
- "REVISION=0")))
- `(#:import-path "github.com/containerd/containerd"
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-paths
- (lambda* (#:key inputs import-path outputs #:allow-other-keys)
- (with-directory-excursion (string-append "src/" import-path)
- (substitute* "runtime/v1/linux/runtime.go"
- (("defaultRuntime[ \t]*=.*")
- (string-append "defaultRuntime = \""
- (assoc-ref inputs "runc")
- "/sbin/runc\"\n"))
- (("defaultShim[ \t]*=.*")
- (string-append "defaultShim = \""
- (assoc-ref outputs "out")
- "/bin/containerd-shim\"\n")))
- (substitute* "pkg/cri/config/config_unix.go"
- (("DefaultRuntimeName: \"runc\"")
- (string-append "DefaultRuntimeName: \""
- (assoc-ref inputs "runc")
- "/sbin/runc\"")))
- (substitute* "vendor/github.com/containerd/go-runc/runc.go"
- (("DefaultCommand[ \t]*=.*")
- (string-append "DefaultCommand = \""
- (assoc-ref inputs "runc")
- "/sbin/runc\"\n")))
- (substitute*
"vendor/github.com/containerd/continuity/testutil\
+ (let ((make-flags #~(list (string-append "VERSION=" #$version)
+ (string-append "DESTDIR=" #$output)
+ "PREFIX="
+ "REVISION=0")))
+ (list
+ #:import-path "github.com/containerd/containerd"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda* (#:key inputs import-path outputs #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (substitute* "runtime/v1/linux/runtime.go"
+ (("defaultRuntime[ \t]*=.*")
+ (string-append "defaultRuntime = \""
+ (search-input-file inputs "/sbin/runc")
+ "\"\n"))
+ (("defaultShim[ \t]*=.*")
+ (string-append "defaultShim = \""
+ (assoc-ref outputs "out")
+ "/bin/containerd-shim\"\n")))
+ (substitute* "pkg/cri/config/config_unix.go"
+ (("DefaultRuntimeName: \"runc\"")
+ (string-append "DefaultRuntimeName: \""
+ (search-input-file inputs "/sbin/runc")
+ "\"")))
+ (substitute* "vendor/github.com/containerd/go-runc/runc.go"
+ (("DefaultCommand[ \t]*=.*")
+ (string-append "DefaultCommand = \""
+ (search-input-file inputs "/sbin/runc")
+ "\"\n")))
+ (substitute*
"vendor/github.com/containerd/continuity/testutil\
/loopback/loopback_linux.go"
- (("exec\\.Command\\(\"losetup\"")
- (string-append "exec.Command(\""
- (assoc-ref inputs "util-linux")
- "/sbin/losetup\"")))
- (substitute* "archive/compression/compression.go"
- (("exec\\.LookPath\\(\"unpigz\"\\)")
- (string-append "\"" (assoc-ref inputs "pigz")
- "/bin/unpigz\", error(nil)"))))))
- (replace 'build
- (lambda* (#:key import-path #:allow-other-keys)
- (with-directory-excursion (string-append "src/" import-path)
- (apply invoke "make" ',make-flags))))
- (replace 'install
- (lambda* (#:key import-path outputs #:allow-other-keys)
- (with-directory-excursion (string-append "src/" import-path)
- (let* ((out (assoc-ref outputs "out")))
- (apply invoke "make" (string-append "DESTDIR=" out)
- "PREFIX=" "install" ',make-flags)))))))))
+ (("exec\\.Command\\(\"losetup\"")
+ (string-append "exec.Command(\""
+ (search-input-file inputs "/sbin/losetup")
+ "\"")))
+ (substitute* "archive/compression/compression.go"
+ (("exec\\.LookPath\\(\"unpigz\"\\)")
+ (string-append "\""
+ (search-input-file inputs "/bin/unpigz")
+ "\", error(nil)"))))))
+ (replace 'build
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (apply invoke "make" #$make-flags))))
+ (replace 'install
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (apply invoke "make" "install" #$make-flags))))))))
(inputs
(list btrfs-progs libseccomp pigz runc util-linux))
(native-inputs
- branch master updated (39b118776b -> 14518fcc54), guix-commits, 2022/06/24
- 01/09: gnu: runc: Update to 1.1.1., guix-commits, 2022/06/24
- 02/09: gnu: containerd: Fix patch-paths build phase., guix-commits, 2022/06/24
- 08/09: gnu: docker: Honor TESTS? and please guix lint., guix-commits, 2022/06/24
- 03/09: gnu: containerd: Update to 1.6.6., guix-commits, 2022/06/24
- 09/09: tests: docker: Relax marionette timeout., guix-commits, 2022/06/24
- 05/09: gnu: docker: Fix mkfs.xfs reference., guix-commits, 2022/06/24
- 04/09: gnu: containerd: Switch to gexp arguments.,
guix-commits <=
- 07/09: gnu: docker: Switch to gexp and new input style., guix-commits, 2022/06/24
- 06/09: gnu: docker: Update to 20.10.17., guix-commits, 2022/06/24