blob: 4dfa46544ca6ee277a4797f9afb1925285ffc1b8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{ lib
, fetchFromGitHub
, buildGoModule
, nixosTests
}:
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;
passthru.tests = {
mihomo = nixosTests.mihomo;
};
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";
};
}
|