2022-10-01 22:34:39 +08:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "clash-meta";
|
2022-10-02 00:18:35 +08:00
|
|
|
version = "dev";
|
|
|
|
src = ./.;
|
2022-10-01 22:34:39 +08:00
|
|
|
vendorSha256 = "sha256-7HjYcoqWA5gvPUc5psCgy0UTc17CBzBJ/OiGvII/iBA=";
|
|
|
|
|
|
|
|
# Do not build testing suit
|
|
|
|
excludedPackages = [ "./test" ];
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/Dreamacro/clash/constant.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
# network required
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/clash $out/bin/clash-meta
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Another Clash Kernel";
|
|
|
|
homepage = "https://github.com/MetaCubeX/Clash.Meta";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
};
|
|
|
|
}
|