nixpkgs/pkgs/tools/networking/clash-meta/default.nix
2023-02-20 23:14:29 +08:00

45 lines
878 B
Nix

{ lib
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "clash-meta";
version = "1.14.2";
src = fetchFromGitHub {
owner = "MetaCubeX";
repo = "Clash.Meta";
rev = "v${version}";
sha256 = "sha256-sn+0TNXCK4af4zfkf09hLsFkuvkcyjhwh35kKo993FQ=";
};
vendorHash = "sha256-3j+5fF57eu7JJd3rnrWYwuWDivycUkUTTzptYaK3G/Q=";
# Do not build testing suit
excludedPackages = [ "./test" ];
ldflags = [
"-s"
"-w"
"-X github.com/Dreamacro/clash/constant.Version=${version}"
];
tags = [
"with_gvisor"
];
# network required
doCheck = false;
postInstall = ''
mv $out/bin/clash $out/bin/clash-meta
'';
meta = with lib; {
description = "Another Clash Kernel";
homepage = "https://github.com/MetaCubeX/Clash.Meta";
license = licenses.gpl3Only;
maintainers = with maintainers; [ oluceps ];
};
}