From ecac695859ac0c3c8371c367923d6c4cd039d210 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Tue, 21 Feb 2023 15:09:13 +0800 Subject: [PATCH] rosenthal: cloudflared: Add build flags and install documentation. * rosenthal/packages/networking.scm (cloudflared)[arguments]<#:build-flags>: Add field. <#:phases>: Install documentation. --- rosenthal/packages/networking.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/rosenthal/packages/networking.scm b/rosenthal/packages/networking.scm index fa2d519..2b6efbf 100644 --- a/rosenthal/packages/networking.scm +++ b/rosenthal/packages/networking.scm @@ -34,7 +34,22 @@ (list #:go go-1.19 #:install-source? #f #:import-path "github.com/cloudflare/cloudflared/cmd/cloudflared" - #:unpack-path "github.com/cloudflare/cloudflared")) + #:unpack-path "github.com/cloudflare/cloudflared" + #:build-flags + #~(list (string-append + "-ldflags=" + " -X main.Version=" #$version + " -X github.com/cloudflare/cloudflared/cmd/cloudflared/updater.BuiltForPackageManager=Guix")) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-documentation + (lambda _ + (let ((src "src/github.com/cloudflare/cloudflared/cloudflared_man_template") + (dst (string-append #$output "/share/man/man1/cloudflared.1"))) + (substitute* src + (("\\$\\{VERSION\\}") #$version)) + (mkdir-p (dirname dst)) + (copy-file src dst))))))) (home-page "https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/") (synopsis "Cloudflare Tunnel client") (description