[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/14: gnu: nebula: Use G-expressions.
From: |
guix-commits |
Subject: |
14/14: gnu: nebula: Use G-expressions. |
Date: |
Mon, 12 Feb 2024 18:38:48 -0500 (EST) |
sharlatan pushed a commit to branch master
in repository guix.
commit ffc7650c11fd7c4b9f7b4894f8e0a451e0e49063
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Mon Feb 12 23:12:47 2024 +0000
gnu: nebula: Use G-expressions.
* gnu/packages/networking.scm (nebula) [arguments]: Use G-expressions.
<#:phases>: Set version during build time.
Change-Id: I0cda81f952e3543ac2a01d5d917df4944ac82950
---
gnu/packages/networking.scm | 46 +++++++++++++++++++++++++--------------------
1 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index e1f4bf5afd..aecb4faeb8 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -4696,26 +4696,32 @@ IPv6 Internet connectivity - it also works over IPv4.")
(delete-file-recursively "wintun")))))
(build-system go-build-system)
(arguments
- `(#:go ,go-1.20
- #:import-path "github.com/slackhq/nebula"
- #:install-source? #f
- #:phases
- (modify-phases %standard-phases
- (replace 'build
- (lambda _
- ;; Build nebula and nebula-cert
- (let* ((dir "github.com/slackhq/nebula")
- (nebula-cmd (string-append dir "/cmd/nebula"))
- (cert-cmd (string-append dir "/cmd/nebula-cert")))
- (invoke "go" "build" nebula-cmd)
- (invoke "go" "build" cert-cmd))))
-
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bindir (string-append out "/bin")))
- (install-file "nebula" bindir)
- (install-file "nebula-cert" bindir)))))))
+ (list
+ #:go go-1.20
+ #:import-path "github.com/slackhq/nebula"
+ #:install-source? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key import-path #:allow-other-keys)
+ ;; Suggested option to provide build time flags is not supported
+ ;; in Guix for go-build-system.
+ ;; -ldflags "-X main.Build=SOMEVERSION"
+ (substitute* (string-append "src/" import-path
"/cmd/nebula/main.go")
+ (("Version: ")
+ (string-append "Version: " #$version)))
+ ;; Build nebula and nebula-cert
+ (let* ((dir "github.com/slackhq/nebula")
+ (nebula-cmd (string-append dir "/cmd/nebula"))
+ (cert-cmd (string-append dir "/cmd/nebula-cert")))
+ (invoke "go" "build" nebula-cmd)
+ (invoke "go" "build" cert-cmd))))
+ (replace 'install
+ (lambda _
+ (let* ((out #$output)
+ (bindir (string-append out "/bin")))
+ (install-file "nebula" bindir)
+ (install-file "nebula-cert" bindir)))))))
(inputs
(list go-dario-cat-mergo
go-github-com-anmitsu-go-shlex
- 08/14: gnu: go-github-com-prometheus-client-model: Move to golang-xyz., (continued)
- 08/14: gnu: go-github-com-prometheus-client-model: Move to golang-xyz., guix-commits, 2024/02/12
- 05/14: gnu: Add go-github-com-nbrownus-go-metrics-prometheus., guix-commits, 2024/02/12
- 02/14: gnu: Add go-github-com-armon-go-radix., guix-commits, 2024/02/12
- 10/14: gnu: go-github-com-stathat-go: Move to golang-xyz., guix-commits, 2024/02/12
- 11/14: gnu: Add go-dario-cat-mergo., guix-commits, 2024/02/12
- 12/14: gnu: Add nebula., guix-commits, 2024/02/12
- 13/14: gnu: nebula: Update to 1.8.2., guix-commits, 2024/02/12
- 07/14: gnu: Add go-github-com-skip2-go-qrcode., guix-commits, 2024/02/12
- 09/14: gnu: go-github-com-rcrowley-go-metrics: Move to golang-xyz., guix-commits, 2024/02/12
- 06/14: gnu: Add go-github-com-songgao-water., guix-commits, 2024/02/12
- 14/14: gnu: nebula: Use G-expressions.,
guix-commits <=