Merge pull request #208069 from NickCao/singbox
sing-box: init at 1.1.1
This commit is contained in:
commit
bfdc69ecfb
54
pkgs/tools/networking/sing-box/default.nix
Normal file
54
pkgs/tools/networking/sing-box/default.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "sing-box";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SagerNet";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-CNy+C5E5iAZHZ7PsS0Hj43irCuCvy/bes3kovvH81/o=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-fUHfvqzbu2P7N413dDuV41myhReNSYvgF+Cc6SgG6y4=";
|
||||
|
||||
tags = [
|
||||
"with_quic"
|
||||
"with_grpc"
|
||||
"with_wireguard"
|
||||
"with_shadowsocksr"
|
||||
"with_ech"
|
||||
"with_utls"
|
||||
"with_acme"
|
||||
"with_clash_api"
|
||||
"with_v2ray_api"
|
||||
"with_gvisor"
|
||||
];
|
||||
|
||||
subPackages = [
|
||||
"cmd/sing-box"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = let emulator = stdenv.hostPlatform.emulator buildPackages; in ''
|
||||
installShellCompletion --cmd sing-box \
|
||||
--bash <(${emulator} $out/bin/sing-box completion bash) \
|
||||
--fish <(${emulator} $out/bin/sing-box completion fish) \
|
||||
--zsh <(${emulator} $out/bin/sing-box completion zsh )
|
||||
'';
|
||||
|
||||
meta = with lib;{
|
||||
homepage = "https://sing-box.sagernet.org";
|
||||
description = "The universal proxy platform";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ nickcao ];
|
||||
};
|
||||
}
|
@ -11693,6 +11693,8 @@ with pkgs;
|
||||
|
||||
skydns = callPackage ../servers/skydns { };
|
||||
|
||||
sing-box = callPackage ../tools/networking/sing-box { };
|
||||
|
||||
sipcalc = callPackage ../tools/networking/sipcalc { };
|
||||
|
||||
skribilo = callPackage ../tools/typesetting/skribilo {
|
||||
|
Loading…
Reference in New Issue
Block a user