nixpkgs/pkgs/by-name/mi/mihomo/package.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
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/'
2024-06-09 23:07:45 +02:00

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";
};
}