From 13ae21cd05bc69595bea97cd9c63c5f135e4427f Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Wed, 3 Jul 2024 18:36:40 +0200 Subject: gnu: gvisor-tap-vsock: Fix build. * gnu/packages/containers.scm (gvisor-tap-vsock): Remove 'remove-go-references phase, add 'patch-go-reference phase and remove imported modules. Change-Id: I202292e303268b3ec0f13f19d4ceba517cd73aaa Signed-off-by: Sharlatan Hellseher --- gnu/packages/containers.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index c57f249ebd..8cded06753 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2023 Ricardo Wurmus ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz> ;;; Copyright © 2024 Foundation Devices, Inc. +;;; Copyright © 2024 Jean-Pierre De Jesus DIAZ ;;; ;;; This file is part of GNU Guix. ;;; @@ -392,12 +393,15 @@ configure network interfaces in Linux containers.") (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 +412,7 @@ configure network interfaces in Linux containers.") (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") -- cgit v1.2.3