aboutsummaryrefslogtreecommitdiff
path: root/pkgs/tools/networking/clash/default.nix
blob: 912716894129bcf50cebb14c61669f6bdc8405f1 (plain)
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
{ stdenv, fetchFromGitHub, buildGoModule }:

buildGoModule rec {
  pname = "clash";
  version = "1.2.0";

  src = fetchFromGitHub {
    owner = "Dreamacro";
    repo = pname;
    rev = "v${version}";
    sha256 = "16dgpq67bcy9z5lqwykwh61kwxi164khxqc78i6a3dc9xyivwfya";
  };

  vendorSha256 = "0gmyq54h9zb4ry2p24nsp8ybqrmaq69zlyp220w16kamx790j07j";

  doCheck = false;

  buildFlagsArray = [
    "-ldflags="
    "-X github.com/Dreamacro/clash/constant.Version=${version}"
  ];

  meta = with stdenv.lib; {
    description = "A rule-based tunnel in Go";
    homepage = "https://github.com/Dreamacro/clash";
    license = licenses.gpl3;
    maintainers = with maintainers; [ contrun filalex77 ];
  };
}