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
883 B
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, buildGoModule
2024-02-10 14:43:17 +00:00
, nixosTests
}:
buildGoModule rec {
pname = "mihomo";
2024-05-18 12:52:33 +00:00
version = "1.18.5";
src = fetchFromGitHub {
owner = "MetaCubeX";
repo = "mihomo";
rev = "v${version}";
2024-05-18 12:52:33 +00:00
hash = "sha256-YNnZ/wlOzmTAD76py4CRlClPi2S1b4PaanCfT/Q426A=";
};
2024-05-18 12:52:33 +00:00
vendorHash = "sha256-yBQ4Nt03VS2em6vkzMa1WH9jHc6pwdlW0tt9cth55oQ=";
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 = "Rule-based tunnel in Go";
homepage = "https://github.com/MetaCubeX/mihomo/tree/Alpha";
license = licenses.gpl3Only;
maintainers = with maintainers; [ oluceps ];
mainProgram = "mihomo";
};
}