Unverified Commit f21ae37d authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

clash-verge: remove (#342557)

parents 4eddf778 fe0d4615
Loading
Loading
Loading
Loading
+21 −6
Original line number Diff line number Diff line
{ config, lib, pkgs, ... }:
{
  config,
  lib,
  pkgs,
  ...
}:

{
  options.programs.clash-verge = {
    enable = lib.mkEnableOption "Clash Verge";
    package = lib.mkPackageOption pkgs "clash-verge" {};
    package = lib.mkOption {
      type = lib.types.package;
      description = ''
        The clash-verge package to use. Available options are
        clash-verge-rev and clash-nyanpasu, both are forks of
        the original clash-verge project.
      '';
      example = "pkgs.clash-verge-rev";
    };
    autoStart = lib.mkEnableOption "Clash Verge auto launch";
    tunMode = lib.mkEnableOption "Clash Verge TUN mode";
  };
@@ -16,10 +29,12 @@

      environment.systemPackages = [
        cfg.package
        (lib.mkIf cfg.autoStart (pkgs.makeAutostartItem {
        (lib.mkIf cfg.autoStart (
          pkgs.makeAutostartItem {
            name = "clash-verge";
            package = cfg.package;
        }))
          }
        ))
      ];

      security.wrappers.clash-verge = lib.mkIf cfg.tunMode {
+0 −66
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, dpkg
, wrapGAppsHook3
, autoPatchelfHook
, clash-meta
, openssl
, webkitgtk
, udev
, libayatana-appindicator
, nix-update-script
}:

stdenv.mkDerivation rec {
  pname = "clash-verge";
  version = "1.3.8";

  src = fetchurl {
    url = "https://github.com/zzzgydi/clash-verge/releases/download/v${version}/clash-verge_${version}_amd64.deb";
    hash = "sha256-kOju4yaa+EKzFWDrk0iSJVoWkQMBjQG3hKLfAsqlsy8=";
  };

  nativeBuildInputs = [
    dpkg
    wrapGAppsHook3
    autoPatchelfHook
  ];

  buildInputs = [
    openssl
    webkitgtk
    stdenv.cc.cc
  ];

  runtimeDependencies = [
    (lib.getLib udev)
    libayatana-appindicator
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    mv usr/* $out

    runHook postInstall
  '';

  postFixup = ''
    rm -f $out/bin/clash
    ln -sf ${lib.getExe clash-meta} $out/bin/${clash-meta.meta.mainProgram}
  '';

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
    description = "Clash GUI based on tauri";
    homepage = "https://github.com/zzzgydi/clash-verge";
    platforms = [ "x86_64-linux" ];
    license = licenses.gpl3Plus;
    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
    maintainers = with maintainers; [ zendo ];
    mainProgram = "clash-verge";
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -263,6 +263,7 @@ mapAliases ({
  crossLibcStdenv = stdenvNoLibc; # Added 2024-09-06
  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 'mihomo' instead."; # added 2023-11-10
  clash-verge = throw "'clash-verge' has been removed, as it was broken and unmaintained. Consider using 'clash-verge-rev' or 'clash-nyanpasu' instead"; # Added 2024-09-17
  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