mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
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.
This commit is contained in:
parent
d19e646c83
commit
923a121751
1 changed files with 14 additions and 29 deletions
|
@ -14,7 +14,7 @@
|
||||||
;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
|
;;; Copyright © 2016, 2017 Pjotr Prins <pjotr.guix@thebird.nl>
|
||||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;; Copyright © 2017, 2020, 2021 Leo Famulari <leo@famulari.name>
|
;;; 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, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
|
||||||
;;; Copyright © 2017, 2019 Gábor Boskovits <boskovits@gmail.com>
|
;;; Copyright © 2017, 2019 Gábor Boskovits <boskovits@gmail.com>
|
||||||
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
|
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
|
||||||
|
@ -4086,34 +4086,19 @@ (define-public yggdrasil
|
||||||
;; TODO: figure out how tests are run
|
;; TODO: figure out how tests are run
|
||||||
#:tests? #f
|
#:tests? #f
|
||||||
#:install-source? #f
|
#:install-source? #f
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases
|
||||||
(replace 'build
|
(modify-phases %standard-phases
|
||||||
(lambda _
|
(replace 'build
|
||||||
(for-each
|
(lambda* (#:key import-path build-flags #:allow-other-keys)
|
||||||
(lambda (c)
|
(for-each
|
||||||
(invoke
|
(lambda (directory)
|
||||||
"go" "build" "-v" "-ldflags=-s -w"
|
((assoc-ref %standard-phases 'build)
|
||||||
(string-append
|
#:build-flags build-flags
|
||||||
"github.com/yggdrasil-network/yggdrasil-go/cmd/" c)))
|
#:import-path directory))
|
||||||
(list "yggdrasil" "yggdrasilctl" "genkeys"))
|
(list "github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasil"
|
||||||
#t))
|
"github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasilctl"
|
||||||
(replace 'install
|
"github.com/yggdrasil-network/yggdrasil-go/cmd/genkeys"))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
#t)))))
|
||||||
(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)))))
|
|
||||||
;; https://github.com/kardianos/minwinsvc is windows only
|
;; https://github.com/kardianos/minwinsvc is windows only
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(;;("go-golang-zx2c4-com-wireguard-windows"
|
`(;;("go-golang-zx2c4-com-wireguard-windows"
|
||||||
|
|
Loading…
Reference in a new issue