depot/third_party/nixpkgs/pkgs/by-name/mi/mihomo/package.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

47 lines
885 B
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, nixosTests
}:
buildGoModule rec {
pname = "mihomo";
version = "1.18.5";
src = fetchFromGitHub {
owner = "MetaCubeX";
repo = "mihomo";
rev = "v${version}";
hash = "sha256-YNnZ/wlOzmTAD76py4CRlClPi2S1b4PaanCfT/Q426A=";
};
vendorHash = "sha256-yBQ4Nt03VS2em6vkzMa1WH9jHc6pwdlW0tt9cth55oQ=";
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 = "A rule-based tunnel in Go";
homepage = "https://github.com/MetaCubeX/mihomo/tree/Alpha";
license = licenses.gpl3Only;
maintainers = with maintainers; [ oluceps ];
mainProgram = "mihomo";
};
}