diff mbox series

[bug#71923,1/4] gnu: gvisor-tap-vsock: Fix build.

Message ID 49da27736e5834aa9444c8bf7b9fa727f938b521.1720024272.git.jean@foundation.xyz
State New
Headers show
Series gnu: gvisor-tap-vsock, buildah, podman build fix. | expand

Commit Message

Jean-Pierre De Jesus DIAZ July 3, 2024, 4:36 p.m. UTC
* gnu/packages/containers.scm (gvisor-tap-vsock)<arguments>: Remove
'remove-go-references phase, add 'patch-go-reference phase and remove
imported modules.

Change-Id: I202292e303268b3ec0f13f19d4ceba517cd73aaa
---
 gnu/packages/containers.scm | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index c57f249ebd..396324284e 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -392,12 +392,15 @@  (define-public gvisor-tap-vsock
      (list
       #:make-flags `(list ,(string-append "GIT_VERSION=v" version))
       #:test-target "test"
-      #:imported-modules
-      (source-module-closure `(,@%gnu-build-system-modules
-                               (guix build go-build-system)))
       #:phases
       #~(modify-phases %standard-phases
           (delete 'configure)
+          ;; Add -trimpath flag to avoid keeping references to go package
+          ;; in the store.
+          (add-after 'unpack 'patch-go-reference
+            (lambda _
+              (substitute* "Makefile"
+                (("go build") "go build -trimpath"))))
           (add-before 'build 'setenv
             (lambda _
               ;; For golang toolchain.
@@ -408,9 +411,7 @@  (define-public gvisor-tap-vsock
               (invoke "rm" "-r" "test")))
           (replace 'install
             (lambda _
-              (install-file "bin/gvproxy" (string-append #$output "/bin"))))
-          (add-after 'install 'remove-go-references
-            (@@ (guix build go-build-system) remove-go-references)))))
+              (install-file "bin/gvproxy" (string-append #$output "/bin")))))))
     (native-inputs (list go-1.20))
     (home-page "https://github.com/containers/gvisor-tap-vsock")
     (synopsis "Network stack for virtualization based on gVisor")