guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: go@1.12: Apply patch from a build phase.


From: guix-commits
Subject: 01/01: gnu: go@1.12: Apply patch from a build phase.
Date: Tue, 17 Sep 2019 05:34:38 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit ae71bef532d6b1c9d1481a3ac65827f148b1e45b
Author: Ludovic Courtès <address@hidden>
Date:   Tue Sep 17 11:31:37 2019 +0200

    gnu: go@1.12: Apply patch from a build phase.
    
    This is a followup to b938892551816aedd01fd32b7eb1d5e061afce32.
    
    * gnu/packages/golang.scm (go-1.12)[source]: Remove 'patches'.
    [arguments]: In 'pre-build' phase, invoke "patch".
    [native-inputs]: Add "go-skip-gc-test.patch".
---
 gnu/packages/golang.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 128e62b..51be20b 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -409,8 +409,7 @@ in the style of communicating sequential processes 
(@dfn{CSP}).")
                            name version ".src.tar.gz"))
        (sha256
         (base32
-         "04rvwj69gmw3bz8pw5pf10r21ar0pgpnswp15nkddf04dxyl9s4m"))
-       (patches (search-patches "go-skip-gc-test.patch"))))
+         "04rvwj69gmw3bz8pw5pf10r21ar0pgpnswp15nkddf04dxyl9s4m"))))
     (arguments
      (substitute-keyword-arguments (package-arguments go-1.4)
        ((#:phases phases)
@@ -425,6 +424,12 @@ in the style of communicating sequential processes 
(@dfn{CSP}).")
                        (string-append (assoc-ref inputs "tzdata") 
"/share/zoneinfo"))
                       (output (assoc-ref outputs "out")))
 
+                 ;; Having the patch in the 'patches' field of <origin> breaks
+                 ;; the 'TestServeContent' test due to the fact that
+                 ;; timestamps are reset.  Thus, apply it from here.
+                 (invoke "patch" "-p2" "--force" "-i"
+                         (assoc-ref inputs "go-skip-gc-test.patch"))
+
                  ;; A side effect of these test scripts is testing
                  ;; cgo. Attempts at using cgo flags and directives with these
                  ;; scripts as specified here (https://golang.org/cmd/cgo/)
@@ -576,6 +581,7 @@ in the style of communicating sequential processes 
(@dfn{CSP}).")
                  #t)))))))
     (native-inputs
      `(("go" ,go-1.4)
+       ("go-skip-gc-test.patch" ,(search-patch "go-skip-gc-test.patch"))
        ,@(match (%current-system)
            ((or "armhf-linux" "aarch64-linux")
             `(("gold" ,binutils-gold)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]