mirror of https://codeberg.org/hako/Rosenthal.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.6 KiB
61 lines
2.6 KiB
;; SPDX-FileCopyrightText: 2022-2023 Hilton Chain <hako@ultrarare.space> |
|
;; |
|
;; SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
(define-module (rosenthal packages networking) |
|
#:use-module ((guix licenses) #:prefix license:) |
|
#:use-module (guix build-system go) |
|
#:use-module (guix gexp) |
|
#:use-module (guix git-download) |
|
#:use-module (guix packages) |
|
#:use-module (guix utils) |
|
#:use-module (gnu packages admin) |
|
#:use-module (gnu packages golang)) |
|
|
|
(define-public cloudflared |
|
(package |
|
(name "cloudflared") |
|
(version "2023.5.1") |
|
(source (origin |
|
(method git-fetch) |
|
(uri (git-reference |
|
(url "https://github.com/cloudflare/cloudflared") |
|
(commit version))) |
|
(file-name (git-file-name name version)) |
|
;; TODO: Unbundle vendored dependencies. |
|
;; (modules '((guix build utils))) |
|
;; (snippet '(delete-file-recursively "vendor")) |
|
(sha256 |
|
(base32 |
|
"09h7m145qrb64iz3wx468grf2md1rmrh356x6xqw67002g4f5pry")))) |
|
(build-system go-build-system) |
|
(arguments |
|
(list #:go go-1.19 |
|
#:install-source? #f |
|
#:import-path "github.com/cloudflare/cloudflared/cmd/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 |
|
"This package provides the command-line client for Cloudflare Tunnel, a |
|
tunneling daemon that proxies traffic from the Cloudflare network to your |
|
origins. This daemon sits between Cloudflare network and your origin (e.g. a |
|
webserver). Cloudflare attracts client requests and sends them to you via |
|
this daemon, without requiring you to poke holes on your firewall --- your |
|
origin can remain as closed as possible.") |
|
(license license:asl2.0)))
|
|
|