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