3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/clash/default.nix
2022-06-25 11:48:38 +00:00

39 lines
871 B
Nix

{ lib, fetchFromGitHub, buildGoModule, testers, clash }:
buildGoModule rec {
pname = "clash";
version = "1.11.0";
src = fetchFromGitHub {
owner = "Dreamacro";
repo = pname;
rev = "v${version}";
sha256 = "sha256-8g5rrkRA31wHvwY3JDFIU+slU0cLHFpADyd897hVyw0=";
};
vendorSha256 = "sha256-iW14KxtUY2nhpShcdrHLiCRZxsoXyLSPt01dB0Ds28Y=";
# Do not build testing suit
excludedPackages = [ "./test" ];
CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X github.com/Dreamacro/clash/constant.Version=${version}"
];
passthru.tests.version = testers.testVersion {
package = clash;
command = "clash -v";
};
meta = with lib; {
description = "A rule-based tunnel in Go";
homepage = "https://github.com/Dreamacro/clash";
license = licenses.gpl3Only;
maintainers = with maintainers; [ contrun Br1ght0ne ];
};
}