depot/third_party/nixpkgs/pkgs/tools/networking/clash/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

38 lines
867 B
Nix

{ lib, fetchFromGitHub, buildGoModule, testers, clash }:
buildGoModule rec {
pname = "clash";
version = "1.13.0";
src = fetchFromGitHub {
owner = "Dreamacro";
repo = pname;
rev = "v${version}";
hash = "sha256-f/iSnSaRr1dqMRKb7GDZdc2WuykO42XMSNKwMOwuagc=";
};
vendorHash = "sha256-fDn6UlijI2TJPF4FS50u1MMDxnd8eDTbqHLnGso/FoU=";
# 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 ];
};
}