2024-03-10 18:46:10 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
2024-02-10 14:43:17 +00:00
|
|
|
, nixosTests
|
2024-03-10 18:46:10 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "mihomo";
|
2024-04-29 06:53:33 +00:00
|
|
|
version = "1.18.4";
|
2024-03-10 18:46:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MetaCubeX";
|
|
|
|
repo = "mihomo";
|
|
|
|
rev = "v${version}";
|
2024-04-29 06:53:33 +00:00
|
|
|
hash = "sha256-mqNcMB2nb8+e9XEGKqwaBE/nC4+jRaEFxE17e0JTo8Y=";
|
2024-03-10 18:46:10 +00:00
|
|
|
};
|
|
|
|
|
2024-04-29 06:53:33 +00:00
|
|
|
vendorHash = "sha256-9Ey4roUm/Y6GfFmLD6ij/A+YIgetStawWmhD+Iq3qc8=";
|
2024-03-10 18:46:10 +00:00
|
|
|
|
|
|
|
excludedPackages = [ "./test" ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/metacubex/mihomo/constant.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
tags = [
|
|
|
|
"with_gvisor"
|
|
|
|
];
|
|
|
|
|
|
|
|
# network required
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-02-10 14:43:17 +00:00
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
mihomo = nixosTests.mihomo;
|
|
|
|
};
|
|
|
|
|
2024-03-10 18:46:10 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A rule-based tunnel in Go";
|
2024-04-07 13:49:15 +00:00
|
|
|
homepage = "https://github.com/MetaCubeX/mihomo/tree/Alpha";
|
2024-03-10 18:46:10 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ oluceps ];
|
|
|
|
mainProgram = "mihomo";
|
|
|
|
};
|
|
|
|
}
|