mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
48 lines
883 B
Nix
48 lines
883 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 = "Rule-based tunnel in Go";
|
|
homepage = "https://github.com/MetaCubeX/mihomo/tree/Alpha";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ oluceps ];
|
|
mainProgram = "mihomo";
|
|
};
|
|
}
|