gui-for-singbox: 1.9.7 -> 1.9.8 (#432671)

authored by Weijia Wang and committed by GitHub b33d70c8 280accc6

+39 -36
+3 -3
pkgs/by-name/gu/gui-for-singbox/bridge.patch pkgs/by-name/gu/gui-for-singbox/xdg-path-and-restart-patch.patch
··· 1 - --- a/bridge/bridge.go 2025-05-13 07:36:58.578038227 +0000 2 - +++ b/bridge/bridge.go 2025-05-13 07:39:01.667180229 +0000 1 + --- a/bridge/bridge.go 2 + +++ b/bridge/bridge.go 3 3 @@ -41,13 +41,13 @@ 4 4 } 5 5 ··· 28 28 + exePath := "@basepath@/bin" + "/" + Env.AppName 29 29 30 30 cmd := exec.Command(exePath) 31 - SetCmdWindowHidden(cmd) 31 + SetCmdWindowHidden(cmd)
+36 -33
pkgs/by-name/gu/gui-for-singbox/package.nix
··· 1 1 { 2 2 lib, 3 3 stdenv, 4 - nodejs, 5 - pnpm_9, 4 + buildGoModule, 6 5 fetchFromGitHub, 7 - buildGoModule, 8 - wails, 9 - webkitgtk_4_0, 10 - pkg-config, 11 - libsoup_3, 12 6 autoPatchelfHook, 13 - makeDesktopItem, 14 7 copyDesktopItems, 8 + nodejs, 9 + pkg-config, 10 + pnpm_10, 11 + wails, 12 + webkitgtk_4_1, 13 + makeDesktopItem, 15 14 nix-update-script, 16 15 }: 17 16 18 17 let 19 18 pname = "gui-for-singbox"; 20 - version = "1.9.7"; 19 + version = "1.9.8"; 21 20 22 21 src = fetchFromGitHub { 23 22 owner = "GUI-for-Cores"; 24 23 repo = "GUI.for.SingBox"; 25 24 tag = "v${version}"; 26 - hash = "sha256-2wmg0qPXFRuVd5jU1RT9QuqEaG/h2R+VSNeniVZELLk="; 25 + hash = "sha256-9Vai/C9cJgqM3n+FzFPXismR5vF6eQNJHdI7o47zinI="; 27 26 }; 28 27 29 28 metaCommon = { 30 - description = "SingBox GUI program developed by vue3 + wails"; 31 29 homepage = "https://github.com/GUI-for-Cores/GUI.for.SingBox"; 32 30 license = with lib.licenses; [ gpl3Plus ]; 33 31 maintainers = with lib.maintainers; [ ]; 34 - platforms = lib.platforms.linux; 35 32 }; 36 33 37 34 frontend = stdenv.mkDerivation (finalAttrs: { 38 35 inherit pname version src; 36 + 37 + sourceRoot = "${finalAttrs.src.name}/frontend"; 39 38 40 39 nativeBuildInputs = [ 41 40 nodejs 42 - pnpm_9.configHook 41 + pnpm_10.configHook 43 42 ]; 44 43 45 - pnpmDeps = pnpm_9.fetchDeps { 46 - inherit (finalAttrs) pname version src; 47 - sourceRoot = "${finalAttrs.src.name}/frontend"; 48 - fetcherVersion = 1; 49 - hash = "sha256-5tz1FItH9AvZhJjka8i5Kz22yf/tEmRPkDhz6iswZzc="; 44 + pnpmDeps = pnpm_10.fetchDeps { 45 + inherit (finalAttrs) 46 + pname 47 + version 48 + src 49 + sourceRoot 50 + ; 51 + fetcherVersion = 2; 52 + hash = "sha256-iVD/9uTK3cUzKE20pJk67uk53UCtfj/YCpgwgxmmg8k="; 50 53 }; 51 - 52 - sourceRoot = "${finalAttrs.src.name}/frontend"; 53 54 54 55 buildPhase = '' 55 56 runHook preBuild ··· 67 68 runHook postInstall 68 69 ''; 69 70 70 - meta = metaCommon; 71 + meta = metaCommon // { 72 + description = "GUI program developed by vue3"; 73 + platforms = lib.platforms.all; 74 + }; 71 75 }); 72 76 in 73 77 74 78 buildGoModule { 75 79 inherit pname version src; 76 80 77 - patches = [ ./bridge.patch ]; 81 + patches = [ ./xdg-path-and-restart-patch.patch ]; 78 82 83 + # As we need the $out reference, we can't use `replaceVars` here. 79 84 postPatch = '' 80 - # As we need the $out reference, we can't use `replaceVars` here. 81 85 substituteInPlace bridge/bridge.go \ 82 - --replace-fail '@basepath@' "$out" 86 + --subst-var out 83 87 ''; 84 88 85 - vendorHash = "sha256-Coq8GtaIS7ClmOTFw6PSgGDFW/CpGpKPvXgNw8qz3Hs="; 89 + vendorHash = "sha256-7pFjfUFkpXyYEVjiXbfFUC7FQSlZubKJJ5MI8WY0IVA="; 86 90 87 91 nativeBuildInputs = [ 88 - wails 89 - pkg-config 90 92 autoPatchelfHook 91 93 copyDesktopItems 94 + pkg-config 95 + wails 92 96 ]; 93 97 94 - buildInputs = [ 95 - webkitgtk_4_0 96 - libsoup_3 97 - ]; 98 + buildInputs = [ webkitgtk_4_1 ]; 98 99 99 100 preBuild = '' 100 101 cp -r ${frontend} frontend/dist ··· 103 104 buildPhase = '' 104 105 runHook preBuild 105 106 106 - wails build -m -s -trimpath -skipbindings -devtools -tags webkit2_40 -o GUI.for.SingBox 107 + wails build -m -s -trimpath -skipbindings -devtools -tags webkit2_41 -o GUI.for.SingBox 107 108 108 109 runHook postBuild 109 110 ''; ··· 124 125 runHook preInstall 125 126 126 127 install -Dm 0755 build/bin/GUI.for.SingBox $out/bin/GUI.for.SingBox 127 - install -Dm 0644 build/appicon.png $out/share/pixmaps/gui-for-singbox.png 128 + install -Dm 0644 build/appicon.png $out/share/icons/hicolor/256x256/apps/gui-for-singbox.png 128 129 129 130 runHook postInstall 130 131 ''; ··· 140 141 }; 141 142 142 143 meta = metaCommon // { 144 + description = "SingBox GUI program developed by vue3 + wails"; 143 145 mainProgram = "GUI.for.SingBox"; 146 + platforms = lib.platforms.linux; 144 147 }; 145 148 }