Merge pull request #164004 from aaronjheng/clash

This commit is contained in:
Sandro 2022-03-23 04:18:45 +01:00 committed by GitHub
commit cd035f3621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 6 deletions

View File

@ -1,24 +1,36 @@
{ lib, fetchFromGitHub, buildGoModule }:
{ lib, fetchFromGitHub, buildGoModule, testVersion, clash }:
buildGoModule rec {
pname = "clash";
version = "1.6.0";
version = "1.10.0";
src = fetchFromGitHub {
owner = "Dreamacro";
repo = pname;
rev = "v${version}";
sha256 = "sha256-XG/nci8Sj0vfa/SFPpJwl1Zmt/23LfKxocejplZtS0E=";
sha256 = "sha256-cAJjW+NzG48HcDRx12LLdj8VYyIroL+GWqrUrpHOOIk=";
};
vendorSha256 = "sha256-WR1CpjEMHRkpd0/iqrOm0oVXvyQO+r6GyeP0L0zx8aA=";
vendorSha256 = "sha256-hE2MgjaVme+4vG7+rmJXfjycd3N2R6cA5iSUUTFcQXE=";
doCheck = false;
postPatch = ''
# Do not build testing suit
rm -rf ./test
'';
CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X github.com/Dreamacro/clash/constant.Version=${version}"
];
passthru.tests.version = testVersion {
package = clash;
command = "clash -v";
};
meta = with lib; {
description = "A rule-based tunnel in Go";
homepage = "https://github.com/Dreamacro/clash";

View File

@ -2613,7 +2613,9 @@ with pkgs;
clac = callPackage ../tools/misc/clac {};
clash = callPackage ../tools/networking/clash { };
clash = callPackage ../tools/networking/clash {
buildGoModule = buildGo118Module;
};
clasp = callPackage ../tools/misc/clasp { };