guix-commits
[Top][All Lists]
Advanced

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

03/03: gnu: yggdrasil: Simplify build phases.


From: guix-commits
Subject: 03/03: gnu: yggdrasil: Simplify build phases.
Date: Thu, 2 Dec 2021 07:36:41 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit 923a121751041fdc7e0380b2348e7662cc50ed80
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Dec 2 14:28:06 2021 +0200

    gnu: yggdrasil: Simplify build phases.
    
    * gnu/packages/networking.scm (yggdrasil)[arguments]: Rewrite custom
    'build phase reusing go-build-system 'build phase. Remove custom
    'install phase.
---
 gnu/packages/networking.scm | 43 ++++++++++++++-----------------------------
 1 file changed, 14 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index cebcd3a..739bd1a 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2017, 2020, 2021 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2019, 2020, 2021 Efraim Flashner 
<efraim@flashner.co.il>
 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2017, 2019 Gábor Boskovits <boskovits@gmail.com>
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
@@ -4086,34 +4086,19 @@ network.")
        ;; TODO: figure out how tests are run
        #:tests? #f
        #:install-source? #f
-       #:phases (modify-phases %standard-phases
-                  (replace 'build
-                    (lambda _
-                      (for-each
-                       (lambda (c)
-                         (invoke
-                          "go" "build" "-v" "-ldflags=-s -w"
-                          (string-append
-                           "github.com/yggdrasil-network/yggdrasil-go/cmd/" 
c)))
-                       (list "yggdrasil" "yggdrasilctl" "genkeys"))
-                      #t))
-                  (replace 'install
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let* ((out (assoc-ref outputs "out"))
-                             (bin (string-append out "/bin/"))
-                             (doc (string-append out "/share/doc/yggdrasil/")))
-                        (mkdir-p bin)
-                        (for-each
-                         (lambda (f)
-                           (install-file f bin))
-                         (list "yggdrasil" "yggdrasilctl" "genkeys"))
-                        (mkdir-p doc)
-                        (copy-recursively
-                         (string-append
-                          "src/github.com/yggdrasil-network/yggdrasil-go/"
-                          "doc/yggdrasil-network.github.io")
-                         doc))
-                      #t)))))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda* (#:key import-path build-flags #:allow-other-keys)
+             (for-each
+               (lambda (directory)
+                 ((assoc-ref %standard-phases 'build)
+                  #:build-flags build-flags
+                  #:import-path directory))
+               (list "github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasil"
+                     
"github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasilctl"
+                     "github.com/yggdrasil-network/yggdrasil-go/cmd/genkeys"))
+             #t)))))
     ;; https://github.com/kardianos/minwinsvc is windows only
     (propagated-inputs
      `(;;("go-golang-zx2c4-com-wireguard-windows"



reply via email to

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