gui-for-clash: 1.9.7 -> 1.9.8 (#432670)
This commit is contained in:
@@ -1,29 +1,28 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
nodejs,
|
||||
pnpm_9,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
wails,
|
||||
webkitgtk_4_0,
|
||||
pkg-config,
|
||||
libsoup_3,
|
||||
fetchFromGitHub,
|
||||
autoPatchelfHook,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
nodejs,
|
||||
pkg-config,
|
||||
pnpm_10,
|
||||
wails,
|
||||
webkitgtk_4_1,
|
||||
makeDesktopItem,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "gui-for-clash";
|
||||
version = "1.9.7";
|
||||
version = "1.9.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GUI-for-Cores";
|
||||
repo = "GUI.for.Clash";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-Ij9zyBzYpAfDEjJXqOiPxun+5e1T5j3juYudpvraBcQ=";
|
||||
hash = "sha256-YwolOIN4pQ9ykXruKAetUDMFkNnQppkzioDNlrPefL8=";
|
||||
};
|
||||
|
||||
metaCommon = {
|
||||
@@ -35,20 +34,24 @@ let
|
||||
frontend = stdenv.mkDerivation (finalAttrs: {
|
||||
inherit pname version src;
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/frontend";
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
pnpm_9.configHook
|
||||
pnpm_10.configHook
|
||||
];
|
||||
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
sourceRoot = "${finalAttrs.src.name}/frontend";
|
||||
fetcherVersion = 1;
|
||||
hash = "sha256-5tz1FItH9AvZhJjka8i5Kz22yf/tEmRPkDhz6iswZzc=";
|
||||
pnpmDeps = pnpm_10.fetchDeps {
|
||||
inherit (finalAttrs)
|
||||
pname
|
||||
version
|
||||
src
|
||||
sourceRoot
|
||||
;
|
||||
fetcherVersion = 2;
|
||||
hash = "sha256-iVD/9uTK3cUzKE20pJk67uk53UCtfj/YCpgwgxmmg8k=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/frontend";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
@@ -74,27 +77,24 @@ in
|
||||
buildGoModule {
|
||||
inherit pname version src;
|
||||
|
||||
patches = [ ./bridge.patch ];
|
||||
patches = [ ./xdg-path-and-restart-patch.patch ];
|
||||
|
||||
# As we need the $out reference, we can't use `replaceVars` here.
|
||||
postPatch = ''
|
||||
# As we need the $out reference, we can't use `replaceVars` here.
|
||||
substituteInPlace bridge/bridge.go \
|
||||
--replace-fail '@basepath@' "$out"
|
||||
--subst-var out
|
||||
'';
|
||||
|
||||
vendorHash = "sha256-Coq8GtaIS7ClmOTFw6PSgGDFW/CpGpKPvXgNw8qz3Hs=";
|
||||
vendorHash = "sha256-7pFjfUFkpXyYEVjiXbfFUC7FQSlZubKJJ5MI8WY0IVA=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
wails
|
||||
pkg-config
|
||||
autoPatchelfHook
|
||||
copyDesktopItems
|
||||
pkg-config
|
||||
wails
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
webkitgtk_4_0
|
||||
libsoup_3
|
||||
];
|
||||
buildInputs = [ webkitgtk_4_1 ];
|
||||
|
||||
preBuild = ''
|
||||
cp -r ${frontend} frontend/dist
|
||||
@@ -103,7 +103,7 @@ buildGoModule {
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
wails build -m -s -trimpath -skipbindings -devtools -tags webkit2_40 -o GUI.for.Clash
|
||||
wails build -m -s -trimpath -skipbindings -devtools -tags webkit2_41 -o GUI.for.Clash
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
@@ -124,7 +124,7 @@ buildGoModule {
|
||||
runHook preInstall
|
||||
|
||||
install -Dm 0755 build/bin/GUI.for.Clash $out/bin/GUI.for.Clash
|
||||
install -Dm 0644 build/appicon.png $out/share/pixmaps/gui-for-clash.png
|
||||
install -Dm 0644 build/appicon.png $out/share/icons/hicolor/256x256/apps/gui-for-clash.png
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
--- a/bridge/bridge.go 2024-12-25 20:53:45.504021585 +0000
|
||||
+++ b/bridge/bridge.go 2024-12-25 21:02:20.318422528 +0000
|
||||
--- a/bridge/bridge.go
|
||||
+++ b/bridge/bridge.go
|
||||
@@ -41,13 +41,13 @@
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
func (a *App) RestartApp() FlagResult {
|
||||
- exePath := Env.BasePath + "/" + Env.AppName
|
||||
+ exePath := "@basepath@/bin" + "/" + Env.AppName
|
||||
+ exePath := "@out@/bin" + "/" + Env.AppName
|
||||
|
||||
cmd := exec.Command(exePath)
|
||||
SetCmdWindowHidden(cmd)
|
||||
SetCmdWindowHidden(cmd)
|
||||
Reference in New Issue
Block a user