3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/clash/default.nix

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

39 lines
871 B
Nix
Raw Normal View History

{ lib, fetchFromGitHub, buildGoModule, testers, clash }:
2019-12-30 02:18:10 +00:00
buildGoModule rec {
pname = "clash";
2022-07-08 06:49:50 +01:00
version = "1.11.4";
2019-12-30 02:18:10 +00:00
src = fetchFromGitHub {
owner = "Dreamacro";
repo = pname;
rev = "v${version}";
2022-07-08 06:49:50 +01:00
sha256 = "sha256-NLGX72eZCfyh6y3mud/btMh15rNXnss7S0P7ujCX1ms=";
2019-12-30 02:18:10 +00:00
};
2022-07-08 06:49:50 +01:00
vendorSha256 = "sha256-zaWN/zI4WhHnEK12k1tWZ/qjLGvaZbJ4WfEvCZJ0+ms=";
2019-12-30 02:18:10 +00:00
2022-05-22 08:50:12 +01:00
# Do not build testing suit
excludedPackages = [ "./test" ];
2022-03-13 14:17:42 +00:00
CGO_ENABLED = 0;
2021-08-26 07:45:51 +01:00
ldflags = [
2022-03-13 14:17:42 +00:00
"-s"
"-w"
"-X github.com/Dreamacro/clash/constant.Version=${version}"
2020-01-02 10:56:51 +00:00
];
passthru.tests.version = testers.testVersion {
2022-03-13 14:17:42 +00:00
package = clash;
command = "clash -v";
};
meta = with lib; {
2019-12-30 02:18:10 +00:00
description = "A rule-based tunnel in Go";
homepage = "https://github.com/Dreamacro/clash";
license = licenses.gpl3Only;
maintainers = with maintainers; [ contrun Br1ght0ne ];
2019-12-30 02:18:10 +00:00
};
}