clash-meta: rename to mihomo (#271658)

* mihomo: rename from clash-meta

Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>

* clash-meta: reinit at 1.8.1

---------

Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
This commit is contained in:
oluceps 2024-03-11 02:46:10 +08:00 committed by GitHub
parent 02fb2e4340
commit 3f9f279cef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 47 additions and 38 deletions

View File

@ -1,45 +1,13 @@
{ lib
, fetchFromGitHub
, buildGoModule
}:
{ mihomo }:
buildGoModule rec {
mihomo.overrideAttrs (finalAttrs: previousAttrs: {
pname = "clash-meta";
version = "1.18.1";
src = fetchFromGitHub {
owner = "MetaCubeX";
repo = "mihomo";
rev = "v${version}";
hash = "sha256-ezOkDrpytZQdc+Txe4eUyuWY6oipn9jIrmu7aO8lNlQ=";
};
vendorHash = "sha256-tvPR5kAta4MlMTwjfxwVOacRr2nVpfalbN08mfxml64=";
excludedPackages = [ "./test" ];
ldflags = [
"-s"
"-w"
"-X github.com/metacubex/mihomo/constant.Version=${version}"
];
tags = [
"with_gvisor"
];
# network required
doCheck = false;
postInstall = ''
mv $out/bin/mihomo $out/bin/clash-meta
mv $out/bin/${previousAttrs.meta.mainProgram} $out/bin/${finalAttrs.meta.mainProgram}
'';
meta = with lib; {
description = "A rule-based tunnel in Go. Present named mihomo";
homepage = "https://github.com/MetaCubeX/mihomo";
license = licenses.gpl3Only;
maintainers = with maintainers; [ oluceps ];
meta = previousAttrs.meta // {
mainProgram = "clash-meta";
};
}
})

View File

@ -0,0 +1,41 @@
{ lib
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "mihomo";
version = "1.18.1";
src = fetchFromGitHub {
owner = "MetaCubeX";
repo = "mihomo";
rev = "v${version}";
hash = "sha256-ezOkDrpytZQdc+Txe4eUyuWY6oipn9jIrmu7aO8lNlQ=";
};
vendorHash = "sha256-tvPR5kAta4MlMTwjfxwVOacRr2nVpfalbN08mfxml64=";
excludedPackages = [ "./test" ];
ldflags = [
"-s"
"-w"
"-X github.com/metacubex/mihomo/constant.Version=${version}"
];
tags = [
"with_gvisor"
];
# network required
doCheck = false;
meta = with lib; {
description = "A rule-based tunnel in Go";
homepage = "https://github.com/MetaCubeX/mihomo";
license = licenses.gpl3Only;
maintainers = with maintainers; [ oluceps ];
mainProgram = "mihomo";
};
}

View File

@ -171,7 +171,7 @@ mapAliases ({
cpp-ipfs-api = cpp-ipfs-http-client; # Project has been renamed. Added 2022-05-15
crispyDoom = crispy-doom; # Added 2023-05-01
cryptowatch-desktop = throw "Cryptowatch Desktop was sunset on September 30th 2023 and has been removed from nixpkgs"; # Added 2023-12-22
clash = throw "'clash' has been removed, upstream gone. Consider using 'clash-meta' instead."; # added 2023-11-10
clash = throw "'clash' has been removed, upstream gone. Consider using 'mihomo' instead."; # added 2023-11-10
clasp = clingo; # added 2022-12-22
claws-mail-gtk3 = claws-mail; # Added 2021-07-10
clucene_core_1 = throw "'clucene_core_1' has been renamed to/replaced by 'clucene_core'"; # Added 2023-12-09