2023-03-02 08:01:47 +00:00
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, callPackage
} :
cloudflared: init at 2018.10.3
'cloudflared' is a multi-purpose client-side tool for CloudFlare Argo
Tunnel, CloudFlare Access, as well as including a simple DNS-over-HTTP
(DoH) proxy tool as well.
However, 'cloudflared' is NOT available under an open source license.
Furthermore, the exact terms of redistribution (namely, if we are able
to redistribute binaries at all) are not entirely clear to me. As a
result, I have filed the following bug report concerning the terms of
redistribution for the source code and binaries:
https://github.com/cloudflare/cloudflared/issues/53
'cloudflared' does have source code available, however, and it
encourages users to use 'go install' in order to set it up, in fact (or
download their prebuilt, compiled binaries). So using the source seems
to be encouraged. Even then, I'm still not sure if Hydra can serve these
binaries.
In lieu of a more pointed answer regarding source/binary licensing, and
to avoid keeping this expression in my private tree, I've marked it as
'unfree' (to avoid Hydra serving it in any way) as well as compiled from
source (to avoid any 'redistribution allowed while unmodified' terms
that may crop up).
The dependencies for this build were generated using 'dep2nix'.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-10-18 03:41:42 +00:00
2022-02-04 12:16:47 +00:00
buildGoModule rec {
2019-08-15 12:41:18 +00:00
pname = " c l o u d f l a r e d " ;
2023-03-02 21:36:45 +00:00
version = " 2 0 2 3 . 3 . 0 " ;
cloudflared: init at 2018.10.3
'cloudflared' is a multi-purpose client-side tool for CloudFlare Argo
Tunnel, CloudFlare Access, as well as including a simple DNS-over-HTTP
(DoH) proxy tool as well.
However, 'cloudflared' is NOT available under an open source license.
Furthermore, the exact terms of redistribution (namely, if we are able
to redistribute binaries at all) are not entirely clear to me. As a
result, I have filed the following bug report concerning the terms of
redistribution for the source code and binaries:
https://github.com/cloudflare/cloudflared/issues/53
'cloudflared' does have source code available, however, and it
encourages users to use 'go install' in order to set it up, in fact (or
download their prebuilt, compiled binaries). So using the source seems
to be encouraged. Even then, I'm still not sure if Hydra can serve these
binaries.
In lieu of a more pointed answer regarding source/binary licensing, and
to avoid keeping this expression in my private tree, I've marked it as
'unfree' (to avoid Hydra serving it in any way) as well as compiled from
source (to avoid any 'redistribution allowed while unmodified' terms
that may crop up).
The dependencies for this build were generated using 'dep2nix'.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-10-18 03:41:42 +00:00
src = fetchFromGitHub {
2022-09-05 00:33:21 +00:00
owner = " c l o u d f l a r e " ;
repo = " c l o u d f l a r e d " ;
2023-03-02 08:01:47 +00:00
rev = " r e f s / t a g s / ${ version } " ;
2023-03-02 21:36:45 +00:00
hash = " s h a 2 5 6 - L E K 8 0 9 M s w D V w P J 6 C u C 1 3 F x b 7 f v l i u g i x S / N O K B a j q K M = " ;
cloudflared: init at 2018.10.3
'cloudflared' is a multi-purpose client-side tool for CloudFlare Argo
Tunnel, CloudFlare Access, as well as including a simple DNS-over-HTTP
(DoH) proxy tool as well.
However, 'cloudflared' is NOT available under an open source license.
Furthermore, the exact terms of redistribution (namely, if we are able
to redistribute binaries at all) are not entirely clear to me. As a
result, I have filed the following bug report concerning the terms of
redistribution for the source code and binaries:
https://github.com/cloudflare/cloudflared/issues/53
'cloudflared' does have source code available, however, and it
encourages users to use 'go install' in order to set it up, in fact (or
download their prebuilt, compiled binaries). So using the source seems
to be encouraged. Even then, I'm still not sure if Hydra can serve these
binaries.
In lieu of a more pointed answer regarding source/binary licensing, and
to avoid keeping this expression in my private tree, I've marked it as
'unfree' (to avoid Hydra serving it in any way) as well as compiled from
source (to avoid any 'redistribution allowed while unmodified' terms
that may crop up).
The dependencies for this build were generated using 'dep2nix'.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-10-18 03:41:42 +00:00
} ;
2020-06-09 10:19:16 +00:00
vendorSha256 = null ;
cloudflared: init at 2018.10.3
'cloudflared' is a multi-purpose client-side tool for CloudFlare Argo
Tunnel, CloudFlare Access, as well as including a simple DNS-over-HTTP
(DoH) proxy tool as well.
However, 'cloudflared' is NOT available under an open source license.
Furthermore, the exact terms of redistribution (namely, if we are able
to redistribute binaries at all) are not entirely clear to me. As a
result, I have filed the following bug report concerning the terms of
redistribution for the source code and binaries:
https://github.com/cloudflare/cloudflared/issues/53
'cloudflared' does have source code available, however, and it
encourages users to use 'go install' in order to set it up, in fact (or
download their prebuilt, compiled binaries). So using the source seems
to be encouraged. Even then, I'm still not sure if Hydra can serve these
binaries.
In lieu of a more pointed answer regarding source/binary licensing, and
to avoid keeping this expression in my private tree, I've marked it as
'unfree' (to avoid Hydra serving it in any way) as well as compiled from
source (to avoid any 'redistribution allowed while unmodified' terms
that may crop up).
The dependencies for this build were generated using 'dep2nix'.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-10-18 03:41:42 +00:00
2023-03-02 08:01:47 +00:00
ldflags = [
" - s "
" - w "
" - X m a i n . V e r s i o n = ${ version } "
" - X g i t h u b . c o m / c l o u d f l a r e / c l o u d f l a r e d / c m d / c l o u d f l a r e d / u p d a t e r . B u i l t F o r P a c k a g e M a n a g e r = n i x p k g s "
] ;
2019-07-05 16:56:39 +00:00
2022-04-13 10:13:11 +00:00
preCheck = ''
# Workaround for: sshgen_test.go:74: mkdir /homeless-shelter/.cloudflared: no such file or directory
2022-09-05 00:33:21 +00:00
export HOME = " $ ( m k t e m p - d ) "
2022-04-13 10:13:11 +00:00
# Workaround for: protocol_test.go:11:
# lookup protocol-v2.argotunnel.com on [::1]:53: read udp [::1]:51876->[::1]:53: read: connection refused
substituteInPlace " e d g e d i s c o v e r y / p r o t o c o l _ t e s t . g o " \
- - replace " T e s t P r o t o c o l P e r c e n t a g e " " S k i p P r o t o c o l P e r c e n t a g e "
2022-09-05 00:33:21 +00:00
# Workaround for: origin_icmp_proxy_test.go:46:
# cannot create ICMPv4 proxy: socket: permission denied nor ICMPv6 proxy: socket: permission denied
substituteInPlace " i n g r e s s / o r i g i n _ i c m p _ p r o x y _ t e s t . g o " \
- - replace " T e s t I C M P R o u t e r E c h o " " S k i p I C M P R o u t e r E c h o "
# Workaround for: origin_icmp_proxy_test.go:110:
# cannot create ICMPv4 proxy: socket: permission denied nor ICMPv6 proxy: socket: permission denied
substituteInPlace " i n g r e s s / o r i g i n _ i c m p _ p r o x y _ t e s t . g o " \
- - replace " T e s t C o n c u r r e n t R e q u e s t s T o S a m e D s t " " S k i p C o n c u r r e n t R e q u e s t s T o S a m e D s t "
# Workaround for: origin_icmp_proxy_test.go:242:
# cannot create ICMPv4 proxy: socket: permission denied nor ICMPv6 proxy: socket: permission denied
substituteInPlace " i n g r e s s / o r i g i n _ i c m p _ p r o x y _ t e s t . g o " \
- - replace " T e s t I C M P R o u t e r R e j e c t N o t E c h o " " S k i p I C M P R o u t e r R e j e c t N o t E c h o "
# Workaround for: origin_icmp_proxy_test.go:108:
# Received unexpected error: cannot create ICMPv4 proxy: Group ID 100 is not between ping group 65534 to 65534 nor ICMPv6 proxy: socket: permission denied
substituteInPlace " i n g r e s s / o r i g i n _ i c m p _ p r o x y _ t e s t . g o " \
- - replace " T e s t T r a c e I C M P R o u t e r E c h o " " S k i p T r a c e I C M P R o u t e r E c h o "
# Workaround for: icmp_posix_test.go:28: socket: permission denied
substituteInPlace " i n g r e s s / i c m p _ p o s i x _ t e s t . g o " \
- - replace " T e s t F u n n e l I d l e T i m e o u t " " S k i p F u n n e l I d l e T i m e o u t "
# Workaround for: icmp_posix_test.go:88: Received unexpected error: Group ID 100 is not between ping group 65534 to 65534
substituteInPlace " i n g r e s s / i c m p _ p o s i x _ t e s t . g o " \
- - replace " T e s t R e u s e F u n n e l " " S k i p R e u s e F u n n e l "
2023-02-09 14:35:59 +00:00
# Workaround for: manager_test.go:197:
# Should be false
substituteInPlace " d a t a g r a m s e s s i o n / m a n a g e r _ t e s t . g o " \
- - replace " T e s t M a n a g e r C t x D o n e C l o s e S e s s i o n s " " S k i p M a n a g e r C t x D o n e C l o s e S e s s i o n s "
2022-04-13 10:13:11 +00:00
'' ;
doCheck = ! stdenv . isDarwin ;
2022-09-05 00:33:21 +00:00
passthru . tests . simple = callPackage ./tests.nix { inherit version ; } ;
2021-01-11 07:54:33 +00:00
meta = with lib ; {
2022-09-05 00:33:21 +00:00
description = " C l o u d f l a r e T u n n e l d a e m o n , C l o u d f l a r e A c c e s s t o o l k i t , a n d D N S - o v e r - H T T P S c l i e n t " ;
homepage = " h t t p s : / / w w w . c l o u d f l a r e . c o m / p r o d u c t s / t u n n e l " ;
2023-03-02 07:59:13 +00:00
changelog = " h t t p s : / / g i t h u b . c o m / c l o u d f l a r e / c l o u d f l a r e d / r e l e a s e s / t a g / ${ version } " ;
2022-09-05 00:33:21 +00:00
license = licenses . asl20 ;
platforms = platforms . unix ++ platforms . windows ;
maintainers = with maintainers ; [ bbigras enorris thoughtpolice piperswe ] ;
cloudflared: init at 2018.10.3
'cloudflared' is a multi-purpose client-side tool for CloudFlare Argo
Tunnel, CloudFlare Access, as well as including a simple DNS-over-HTTP
(DoH) proxy tool as well.
However, 'cloudflared' is NOT available under an open source license.
Furthermore, the exact terms of redistribution (namely, if we are able
to redistribute binaries at all) are not entirely clear to me. As a
result, I have filed the following bug report concerning the terms of
redistribution for the source code and binaries:
https://github.com/cloudflare/cloudflared/issues/53
'cloudflared' does have source code available, however, and it
encourages users to use 'go install' in order to set it up, in fact (or
download their prebuilt, compiled binaries). So using the source seems
to be encouraged. Even then, I'm still not sure if Hydra can serve these
binaries.
In lieu of a more pointed answer regarding source/binary licensing, and
to avoid keeping this expression in my private tree, I've marked it as
'unfree' (to avoid Hydra serving it in any way) as well as compiled from
source (to avoid any 'redistribution allowed while unmodified' terms
that may crop up).
The dependencies for this build were generated using 'dep2nix'.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-10-18 03:41:42 +00:00
} ;
}