{ lib , fetchFromGitHub , buildGoModule , nixosTests }: buildGoModule rec { pname = "mihomo"; version = "1.18.6"; src = fetchFromGitHub { owner = "MetaCubeX"; repo = "mihomo"; rev = "v${version}"; hash = "sha256-h/H5T9UBCp/gXM+c5muRs8luz3LoHofBGwP3jofQ9Qg="; }; vendorHash = "sha256-lBHL4vD+0JDOlc6SWFsj0cerE/ypImoh8UFbL736SmA="; excludedPackages = [ "./test" ]; ldflags = [ "-s" "-w" "-X github.com/metacubex/mihomo/constant.Version=${version}" ]; tags = [ "with_gvisor" ]; # network required doCheck = false; passthru.tests = { mihomo = nixosTests.mihomo; }; meta = with lib; { description = "Rule-based tunnel in Go"; homepage = "https://github.com/MetaCubeX/mihomo/tree/Alpha"; license = licenses.gpl3Only; maintainers = with maintainers; [ oluceps ]; mainProgram = "mihomo"; }; }