mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
42 lines
801 B
Nix
42 lines
801 B
Nix
|
{ lib
|
||
|
, fetchFromGitHub
|
||
|
, buildGoModule
|
||
|
}:
|
||
|
|
||
|
buildGoModule rec {
|
||
|
pname = "mihomo";
|
||
|
version = "1.18.1";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "MetaCubeX";
|
||
|
repo = "mihomo";
|
||
|
rev = "v${version}";
|
||
|
hash = "sha256-ezOkDrpytZQdc+Txe4eUyuWY6oipn9jIrmu7aO8lNlQ=";
|
||
|
};
|
||
|
|
||
|
vendorHash = "sha256-tvPR5kAta4MlMTwjfxwVOacRr2nVpfalbN08mfxml64=";
|
||
|
|
||
|
excludedPackages = [ "./test" ];
|
||
|
|
||
|
ldflags = [
|
||
|
"-s"
|
||
|
"-w"
|
||
|
"-X github.com/metacubex/mihomo/constant.Version=${version}"
|
||
|
];
|
||
|
|
||
|
tags = [
|
||
|
"with_gvisor"
|
||
|
];
|
||
|
|
||
|
# network required
|
||
|
doCheck = false;
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "A rule-based tunnel in Go";
|
||
|
homepage = "https://github.com/MetaCubeX/mihomo";
|
||
|
license = licenses.gpl3Only;
|
||
|
maintainers = with maintainers; [ oluceps ];
|
||
|
mainProgram = "mihomo";
|
||
|
};
|
||
|
}
|