wox: 2.1.1 -> 2.2.0; adopt

This commit is contained in:
eljamm 2026-06-19 08:41:35 +02:00
commit e17e65edf9
6 changed files with 138 additions and 234 deletions

View file

@ -2,63 +2,70 @@
lib,
fetchFromGitHub,
callPackage,
nodejs,
buildGoModule,
pkg-config,
replaceVars,
# build-time
autoPatchelfHook,
libxtst,
copyDesktopItems,
desktop-file-utils,
makeDesktopItem,
pkg-config,
xdg-utils,
# run-time
gtk3,
libayatana-appindicator,
libx11,
libxkbcommon,
libayatana-appindicator,
gtk3,
desktop-file-utils,
xdg-utils,
copyDesktopItems,
makeDesktopItem,
libxtst,
nodejs,
}:
buildGoModule (finalAttrs: {
pname = "wox";
version = "2.1.1";
version = "2.2.0";
src = fetchFromGitHub {
owner = "Wox-launcher";
repo = "Wox";
tag = "v${finalAttrs.version}";
hash = "sha256-jiid8emFUN7554ijyL5jTvaQPNz+1rO6IwBMrqdkm4I=";
hash = "sha256-FbOnENSko/BYtTI7z2Ep+IIYufgZpNWcz6d0mqhTL5g=";
};
vendorHash = "sha256-IDcIEZVCJp1ls5c2fblgX+I+MhfRDXqFbf0GhgcFiTo=";
sourceRoot = "${finalAttrs.src.name}/wox.core";
patches = [
(replaceVars ./plugin-host-python.patch {
plugin-host-python = "${finalAttrs.passthru.plugin-host-python}/bin/run";
})
(replaceVars ./plugin-host-nodejs.patch {
nodejs-path = "${lib.getExe nodejs}";
plugin-host-nodejs = "${finalAttrs.passthru.plugin-host-python}/node-host.js";
})
];
postPatch = ''
substituteInPlace plugin/host/host_python.go \
--replace-fail \
'pythonPath, path.Join(util.GetLocation().GetHostDirectory(), "python-host.pyz")' \
'"env", "${finalAttrs.passthru.plugin-host-python}/bin/run"'
substituteInPlace plugin/host/host_nodejs.go \
--replace-fail "/usr/bin/node" "${lib.getExe nodejs}"
substituteInPlace util/deeplink.go \
--replace-fail "update-desktop-database" "${desktop-file-utils}/bin/update-desktop-database" \
--replace-fail "xdg-mime" "${xdg-utils}/bin/xdg-mime" \
--replace-fail "Exec=%s" "Exec=wox"
sed -i '/^ "path"$/d' plugin/host/host_python.go
--replace-fail "xdg-mime" "${xdg-utils}/bin/xdg-mime"
'';
vendorHash = "sha256-IDcIEZVCJp1ls5c2fblgX+I+MhfRDXqFbf0GhgcFiTo=";
proxyVendor = true;
nativeBuildInputs = [
pkg-config
autoPatchelfHook
copyDesktopItems
pkg-config
];
buildInputs = [
libx11
libxtst
libxkbcommon
libayatana-appindicator
gtk3
libayatana-appindicator
libx11
libxkbcommon
libxtst
];
env.CGO_ENABLED = 1;
@ -101,9 +108,10 @@ buildGoModule (finalAttrs: {
meta = {
description = "Cross-platform launcher that simply works";
homepage = "https://github.com/Wox-launcher/Wox";
changelog = "https://github.com/Wox-launcher/Wox/blob/${finalAttrs.src.rev}/CHANGELOG.md";
mainProgram = "wox";
platforms = lib.platforms.linux;
license = with lib.licenses; [ gpl3Plus ];
maintainers = [ ];
maintainers = with lib.maintainers; [ eljamm ];
};
})

View file

@ -5,7 +5,7 @@
fetchPnpmDeps,
nodejs,
pnpmConfigHook,
pnpm_9,
pnpm_11,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "wox-plugin-host-nodejs";
@ -23,15 +23,15 @@ stdenv.mkDerivation (finalAttrs: {
src
sourceRoot
;
pnpm = pnpm_9;
fetcherVersion = 3;
hash = "sha256-cbuVQV8ih8rztERFLUHGnK63MBz8+QVmzeegYLDwcj4=";
pnpm = pnpm_11;
fetcherVersion = 4;
hash = "sha256-6zQDbNUxysqwrRaEMp8Sb5Vcf2HdkkdrdCpJwG8pHSs=";
};
nativeBuildInputs = [
nodejs
pnpmConfigHook
pnpm_9
pnpm_11
];
buildPhase = ''

View file

@ -0,0 +1,51 @@
---
plugin/host/host_nodejs.go | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/plugin/host/host_nodejs.go b/plugin/host/host_nodejs.go
index c7554883..b81f693f 100644
--- a/plugin/host/host_nodejs.go
+++ b/plugin/host/host_nodejs.go
@@ -6,7 +6,6 @@ import (
"fmt"
"os"
"os/exec"
- "path"
"path/filepath"
"runtime"
"strings"
@@ -39,12 +38,7 @@ func (n *NodejsHost) GetRuntime(ctx context.Context) plugin.Runtime {
}
func (n *NodejsHost) Start(ctx context.Context) error {
- nodePath, nodeErr := n.resolveNodejsPath(ctx)
- if nodeErr != nil {
- return nodeErr
- }
-
- return n.websocketHost.StartHost(ctx, nodePath, path.Join(util.GetLocation().GetHostDirectory(), "node-host.js"), nil)
+ return n.websocketHost.StartHost(ctx, "env", "@plugin-host-nodejs@", nil)
}
// FindNodejsPath finds the best available Node.js interpreter path
@@ -276,7 +270,7 @@ func collectNodejsPathsForDarwin() []string {
paths := []string{
"/opt/homebrew/bin/node",
"/usr/local/bin/node",
- "/usr/bin/node",
+ "@nodejs-path@",
"/usr/local/node",
}
paths = append(paths, collectNodejsPathsFromNvmUnix()...)
@@ -287,7 +281,7 @@ func collectNodejsPathsForDarwin() []string {
func collectNodejsPathsForLinux() []string {
paths := []string{
"/usr/local/bin/node",
- "/usr/bin/node",
+ "@nodejs-path@",
"/usr/local/node",
}
paths = append(paths, collectNodejsPathsFromNvmUnix()...)
--
2.54.0

View file

@ -0,0 +1,33 @@
---
plugin/host/host_python.go | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/plugin/host/host_python.go b/plugin/host/host_python.go
index 40e0195e..91a09501 100644
--- a/plugin/host/host_python.go
+++ b/plugin/host/host_python.go
@@ -6,7 +6,6 @@ import (
"fmt"
"os"
"os/exec"
- "path"
"path/filepath"
"runtime"
"strings"
@@ -39,12 +38,7 @@ func (n *PythonHost) GetRuntime(ctx context.Context) plugin.Runtime {
}
func (n *PythonHost) Start(ctx context.Context) error {
- pythonPath, pythonErr := n.resolvePythonPath(ctx)
- if pythonErr != nil {
- return pythonErr
- }
-
- return n.websocketHost.StartHost(ctx, pythonPath, path.Join(util.GetLocation().GetHostDirectory(), "python-host.pyz"), []string{"SHIV_ROOT=" + util.GetLocation().GetCacheDirectory()})
+ return n.websocketHost.StartHost(ctx, "env", "@plugin-host-python@", []string{"SHIV_ROOT=" + util.GetLocation().GetCacheDirectory()})
}
// FindPythonPath finds the best available Python interpreter path
--
2.54.0

View file

@ -1,7 +1,7 @@
{
"packages": {
"archive": {
"dependency": "transitive",
"dependency": "direct main",
"description": {
"name": "archive",
"sha256": "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd",
@ -100,16 +100,6 @@
"source": "hosted",
"version": "1.19.1"
},
"convert": {
"dependency": "transitive",
"description": {
"name": "convert",
"sha256": "b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.2"
},
"cross_file": {
"dependency": "transitive",
"description": {
@ -150,26 +140,6 @@
"source": "hosted",
"version": "0.7.0"
},
"device_info_plus": {
"dependency": "transitive",
"description": {
"name": "device_info_plus",
"sha256": "72d146c6d7098689ff5c5f66bcf593ac11efc530095385356e131070333e64da",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "11.3.0"
},
"device_info_plus_platform_interface": {
"dependency": "transitive",
"description": {
"name": "device_info_plus_platform_interface",
"sha256": "e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.0.3"
},
"dio": {
"dependency": "direct main",
"description": {
@ -431,56 +401,6 @@
"source": "hosted",
"version": "2.2.3"
},
"hotkey_manager": {
"dependency": "direct main",
"description": {
"name": "hotkey_manager",
"sha256": "06f0655b76c8dd322fb7101dc615afbdbf39c3d3414df9e059c33892104479cd",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.2.3"
},
"hotkey_manager_linux": {
"dependency": "transitive",
"description": {
"name": "hotkey_manager_linux",
"sha256": "83676bda8210a3377bc6f1977f193bc1dbdd4c46f1bdd02875f44b6eff9a8473",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.2.0"
},
"hotkey_manager_macos": {
"dependency": "transitive",
"description": {
"name": "hotkey_manager_macos",
"sha256": "03b5967e64357b9ac05188ea4a5df6fe4ed4205762cb80aaccf8916ee1713c96",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.2.0"
},
"hotkey_manager_platform_interface": {
"dependency": "transitive",
"description": {
"name": "hotkey_manager_platform_interface",
"sha256": "98ffca25b8cc9081552902747b2942e3bc37855389a4218c9d50ca316b653b13",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.2.0"
},
"hotkey_manager_windows": {
"dependency": "transitive",
"description": {
"name": "hotkey_manager_windows",
"sha256": "0d03ced9fe563ed0b68f0a0e1b22c9ffe26eb8053cb960e401f68a4f070e0117",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.2.0"
},
"http": {
"dependency": "transitive",
"description": {
@ -507,26 +427,6 @@
"source": "sdk",
"version": "0.0.0"
},
"intl": {
"dependency": "transitive",
"description": {
"name": "intl",
"sha256": "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.20.2"
},
"json_annotation": {
"dependency": "transitive",
"description": {
"name": "json_annotation",
"sha256": "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.9.0"
},
"leak_tracker": {
"dependency": "transitive",
"description": {
@ -943,96 +843,6 @@
"source": "hosted",
"version": "0.3.1"
},
"syncfusion_flutter_core": {
"dependency": "transitive",
"description": {
"name": "syncfusion_flutter_core",
"sha256": "e1fdfcc3ed7e1f040ba95838780b2eb1857e3e5eccb817fbe94ea2b09c35eac4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.2.18"
},
"syncfusion_flutter_pdf": {
"dependency": "transitive",
"description": {
"name": "syncfusion_flutter_pdf",
"sha256": "4077abff3d3dcae757317c0a85cb607b98cc6ea8f3b47c7d8488d4144ef01a9f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.2.18"
},
"syncfusion_flutter_pdfviewer": {
"dependency": "direct main",
"description": {
"name": "syncfusion_flutter_pdfviewer",
"sha256": "4bb3cdff34fe937430fdd0b5d6488f6a68efa8cfe08c73cc4b19d2a879dde057",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.1.21"
},
"syncfusion_flutter_signaturepad": {
"dependency": "transitive",
"description": {
"name": "syncfusion_flutter_signaturepad",
"sha256": "56c35321879b900f59a91e0758af7ca66973447bfdaeb643fe1da0084cbc5b22",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.2.18"
},
"syncfusion_pdfviewer_linux": {
"dependency": "transitive",
"description": {
"name": "syncfusion_pdfviewer_linux",
"sha256": "bae7feb109b38ecf9f8be99bd032503adf98e56da048307a17af8515d0f9d2ed",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.2.18"
},
"syncfusion_pdfviewer_macos": {
"dependency": "transitive",
"description": {
"name": "syncfusion_pdfviewer_macos",
"sha256": "5c02ead2a430cd3f203639ede38ce2e06fb6c8aab6791b0d15c01436f882f482",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.2.18"
},
"syncfusion_pdfviewer_platform_interface": {
"dependency": "transitive",
"description": {
"name": "syncfusion_pdfviewer_platform_interface",
"sha256": "65641e064385ac65253930ec96a6edc2eea781c9e15bf3d5fa15e459037817e7",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.2.18"
},
"syncfusion_pdfviewer_web": {
"dependency": "transitive",
"description": {
"name": "syncfusion_pdfviewer_web",
"sha256": "c55201d9eda49f543b9ad21f539b0f5fbe45ca1a3b30081ee471eb4dff7132f4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.2.18"
},
"syncfusion_pdfviewer_windows": {
"dependency": "transitive",
"description": {
"name": "syncfusion_pdfviewer_windows",
"sha256": "1b706e58a95c794687d037e055cf0580370ceee27a59a8cd4e14368534161af8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "31.2.18"
},
"term_glyph": {
"dependency": "transitive",
"description": {
@ -1073,16 +883,6 @@
"source": "hosted",
"version": "1.4.0"
},
"uni_platform": {
"dependency": "transitive",
"description": {
"name": "uni_platform",
"sha256": "e02213a7ee5352212412ca026afd41d269eb00d982faa552f419ffc2debfad84",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.3"
},
"universal_platform": {
"dependency": "transitive",
"description": {
@ -1293,6 +1093,17 @@
"source": "hosted",
"version": "1.1.5"
},
"windows_gpu_recovery": {
"dependency": "direct main",
"description": {
"path": ".",
"ref": "master",
"resolved-ref": "5d4f3101af0c1a28b80500703c0fd95844545a1e",
"url": "https://github.com/DitriXNew/windows_gpu_recovery.git"
},
"source": "git",
"version": "0.1.0"
},
"xdg_directories": {
"dependency": "transitive",
"description": {
@ -1316,6 +1127,6 @@
},
"sdks": {
"dart": ">=3.10.0-0 <4.0.0",
"flutter": ">=3.35.1"
"flutter": ">=3.35.0"
}
}

View file

@ -20,6 +20,7 @@ flutter341.buildFlutterApplication (finalAttrs: {
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes.extended_text_field = "sha256-GOvaWGklfmJKRWYbVTvpZfKj9QMxxlaqrJkfDKR2T0o=";
gitHashes.windows_gpu_recovery = "sha256-+LQV2wgbQ0ADM2KeRfgbvCHPODBBsq5XrPulXl6GWG8=";
nativeBuildInputs = [
autoPatchelfHook