Unverified Commit 3f9f279c authored by oluceps's avatar oluceps Committed by GitHub
Browse files

clash-meta: rename to mihomo (#271658)



* mihomo: rename from clash-meta

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

* clash-meta: reinit at 1.8.1

---------

Co-authored-by: default avatarAnderson Torres <torres.anderson.85@protonmail.com>
Co-authored-by: default avatarWeijia Wang <9713184+wegank@users.noreply.github.com>
parent 02fb2e43
Loading
Loading
Loading
Loading
+5 −37
Original line number Diff line number Diff line
{ 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";
  };
}
})
+41 −0
Original line number Diff line number Diff line
{ 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";
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -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