vimPlugins.peek-nvim: build JS (#403252)
This commit is contained in:
@@ -2756,9 +2756,15 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
peek-nvim = super.peek-nvim.overrideAttrs {
|
||||
runtimeDeps = [ deno ];
|
||||
};
|
||||
peek-nvim = super.peek-nvim.overrideAttrs (old: {
|
||||
patches = [
|
||||
# Patch peek-nvim to run using nixpkgs deno
|
||||
# This means end-users have to build peek-nvim the first time they use it...
|
||||
(replaceVars ./patches/peek-nvim/cmd.patch {
|
||||
deno = lib.getExe deno;
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
persisted-nvim = super.persisted-nvim.overrideAttrs {
|
||||
nvimSkipModules = [
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
diff --git a/app/src/main.ts b/app/src/main.ts
|
||||
index c82d914..e8542f3 100644
|
||||
--- a/app/src/main.ts
|
||||
+++ b/app/src/main.ts
|
||||
@@ -73,7 +73,7 @@ async function init(socket: WebSocket) {
|
||||
const onListen: Deno.ServeOptions['onListen'] = ({ hostname, port }) => {
|
||||
const serverUrl = `${hostname.replace('0.0.0.0', 'localhost')}:${port}`;
|
||||
logger.info(`listening on ${serverUrl}`);
|
||||
- const webview = new Deno.Command('deno', {
|
||||
+ const webview = new Deno.Command('@deno@', {
|
||||
cwd: dirname(fromFileUrl(Deno.mainModule)),
|
||||
args: [
|
||||
'run',
|
||||
diff --git a/lua/peek/app.lua b/lua/peek/app.lua
|
||||
index af5148e..5e67563 100644
|
||||
--- a/lua/peek/app.lua
|
||||
+++ b/lua/peek/app.lua
|
||||
@@ -38,10 +38,17 @@ function module.setup()
|
||||
end
|
||||
|
||||
cmd = vim.list_extend({
|
||||
- 'deno',
|
||||
- 'task',
|
||||
- '--quiet',
|
||||
+ '@deno@',
|
||||
'run',
|
||||
+ '--allow-read',
|
||||
+ '--allow-write',
|
||||
+ '--allow-net',
|
||||
+ '--allow-env',
|
||||
+ '--allow-run',
|
||||
+ '--no-check',
|
||||
+ '--allow-import',
|
||||
+ '--no-lock',
|
||||
+ '../../app/src/main.ts',
|
||||
}, args)
|
||||
end
|
||||
Reference in New Issue
Block a user