nixpkgs/pkgs/by-name/mi/mihomo/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
885 B
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, buildGoModule
2024-02-10 14:43:17 +00:00
, nixosTests
}:
buildGoModule rec {
pname = "mihomo";
version = "1.18.4";
src = fetchFromGitHub {
owner = "MetaCubeX";
repo = "mihomo";
rev = "v${version}";
hash = "sha256-mqNcMB2nb8+e9XEGKqwaBE/nC4+jRaEFxE17e0JTo8Y=";
};
vendorHash = "sha256-9Ey4roUm/Y6GfFmLD6ij/A+YIgetStawWmhD+Iq3qc8=";
excludedPackages = [ "./test" ];
ldflags = [
"-s"
"-w"
"-X github.com/metacubex/mihomo/constant.Version=${version}"
];
tags = [
"with_gvisor"
];
# network required
doCheck = false;
2024-02-10 14:43:17 +00:00
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";
};
}