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.

41 lines
879 B
Nix
Raw Normal View History

{ lib, fetchFromGitHub, buildGoModule, testers, clash }:
2019-12-30 02:18:10 +00:00
buildGoModule rec {
pname = "clash";
2022-03-13 14:17:42 +00:00
version = "1.10.0";
2019-12-30 02:18:10 +00:00
src = fetchFromGitHub {
owner = "Dreamacro";
repo = pname;
rev = "v${version}";
2022-03-13 14:17:42 +00:00
sha256 = "sha256-cAJjW+NzG48HcDRx12LLdj8VYyIroL+GWqrUrpHOOIk=";
2019-12-30 02:18:10 +00:00
};
2022-03-13 14:17:42 +00:00
vendorSha256 = "sha256-hE2MgjaVme+4vG7+rmJXfjycd3N2R6cA5iSUUTFcQXE=";
2019-12-30 02:18:10 +00:00
2022-03-13 14:17:42 +00:00
postPatch = ''
# Do not build testing suit
rm -rf ./test
'';
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
};
}