gui-for-clash: remove (#517308)

This commit is contained in:
Marcin Serwin
2026-06-04 09:49:47 +00:00
committed by GitHub
3 changed files with 1 additions and 162 deletions

View File

@@ -1,148 +0,0 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
autoPatchelfHook,
copyDesktopItems,
nodejs,
pkg-config,
pnpm_10,
fetchPnpmDeps,
pnpmConfigHook,
wails,
webkitgtk_4_1,
makeDesktopItem,
nix-update-script,
}:
let
pname = "gui-for-clash";
version = "1.21.1";
src = fetchFromGitHub {
owner = "GUI-for-Cores";
repo = "GUI.for.Clash";
tag = "v${version}";
hash = "sha256-eIJYtXa0JdP7hLvBRnWyh0KkdMWvOd2GRXPaqCvP8yE=";
};
metaCommon = {
homepage = "https://github.com/GUI-for-Cores/GUI.for.Clash";
hydraPlatforms = [ ]; # https://gui-for-cores.github.io/guide/#note
license = with lib.licenses; [ gpl3Plus ];
maintainers = [ ];
};
frontend = stdenv.mkDerivation (finalAttrs: {
inherit pname version src;
sourceRoot = "${finalAttrs.src.name}/frontend";
nativeBuildInputs = [
nodejs
pnpmConfigHook
pnpm_10
];
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs)
pname
version
src
sourceRoot
;
pnpm = pnpm_10;
fetcherVersion = 3;
hash = "sha256-gr6XIhLKWSOJ4LWiliOvMoA9QbPiohrCPmvObz49/pw=";
};
buildPhase = ''
runHook preBuild
pnpm run build-only
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
meta = metaCommon // {
description = "GUI program developed by vue3";
platforms = lib.platforms.all;
};
});
in
buildGoModule {
inherit pname version src;
patches = [ ./xdg-path-and-restart-patch.patch ];
vendorHash = "sha256-EeIxt0BzSaZh1F38btUXN9kAvj12nlqEerVgWVGkiuk=";
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
pkg-config
wails
];
buildInputs = [ webkitgtk_4_1 ];
preBuild = ''
cp -r ${frontend} frontend/dist
'';
buildPhase = ''
runHook preBuild
wails build -m -s -trimpath -skipbindings -devtools -tags webkit2_41 -o GUI.for.Clash
runHook postBuild
'';
desktopItems = [
(makeDesktopItem {
name = "gui-for-clash";
exec = "GUI.for.Clash";
icon = "gui-for-clash";
genericName = "GUI.for.Clash";
desktopName = "GUI.for.Clash";
categories = [ "Network" ];
keywords = [ "Proxy" ];
})
];
installPhase = ''
runHook preInstall
install -Dm 0755 build/bin/GUI.for.Clash $out/bin/GUI.for.Clash
install -Dm 0644 build/appicon.png $out/share/icons/hicolor/256x256/apps/gui-for-clash.png
runHook postInstall
'';
passthru = {
inherit frontend;
updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^v([0-9.]+)$"
"--subpackage"
"frontend"
];
};
};
meta = metaCommon // {
description = "Clash GUI program developed by vue3 + wails";
mainProgram = "GUI.for.Clash";
platforms = lib.platforms.linux;
};
}

View File

@@ -1,14 +0,0 @@
--- a/bridge/bridge.go
+++ b/bridge/bridge.go
@@ -93,7 +93,10 @@
func (a *App) RestartApp() FlagResult {
log.Printf("RestartApp")
- exePath := Env.BasePath + "/" + Env.AppName
+ exePath, err := os.Executable()
+ if err != nil {
+ exePath = filepath.Join(Env.BasePath, Env.AppName)
+ }
cmd := exec.Command(exePath)
SetCmdWindowHidden(cmd)

View File

@@ -942,6 +942,7 @@ mapAliases {
gtkextra = throw "'gtkextra' has been removed due to lack of maintenance upstream."; # Added 2025-06-10
gtkgnutella = gtk-gnutella; # Added 2026-05-21
gtuber = throw "'gtuber' has been removed due to being discontinued by upstream."; # Added 2025-12-12
gui-for-clash = throw "'gui-for-clash' has been removed, as it is unmaintained"; # Added 2026-05-28
guile-disarchive = throw "'guile-disarchive' has been renamed to/replaced by 'disarchive'"; # Converted to throw 2025-10-27
guile-sdl = throw "guile-sdl has been removed, as it was broken"; # Added 2025-08-25
gutenprintBin = gutenprint-bin; # Added 2025-08-21