2023-02-22 10:55:15 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
}:
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "clash-meta";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.18.1";
|
2023-02-22 10:55:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MetaCubeX";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "mihomo";
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-ezOkDrpytZQdc+Txe4eUyuWY6oipn9jIrmu7aO8lNlQ=";
|
2023-02-22 10:55:15 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
vendorHash = "sha256-tvPR5kAta4MlMTwjfxwVOacRr2nVpfalbN08mfxml64=";
|
2023-02-22 10:55:15 +00:00
|
|
|
|
|
|
|
excludedPackages = [ "./test" ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
2024-02-29 20:09:43 +00:00
|
|
|
"-X github.com/metacubex/mihomo/constant.Version=${version}"
|
2023-02-22 10:55:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
tags = [
|
|
|
|
"with_gvisor"
|
|
|
|
];
|
|
|
|
|
|
|
|
# network required
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
mv $out/bin/mihomo $out/bin/clash-meta
|
2023-02-22 10:55:15 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
description = "A rule-based tunnel in Go. Present named mihomo";
|
|
|
|
homepage = "https://github.com/MetaCubeX/mihomo";
|
2023-02-22 10:55:15 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ oluceps ];
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "clash-meta";
|
2023-02-22 10:55:15 +00:00
|
|
|
};
|
|
|
|
}
|