kakoune-lsp: use replaceVars

This commit is contained in:
Philip Taron 2024-08-12 14:02:55 -07:00
parent d176239d50
commit 6d151f1e19
No known key found for this signature in database
2 changed files with 6 additions and 11 deletions

View File

@ -21,13 +21,13 @@ index b173478..015c3ca 100644
- fi
echo >$kak_command_fifo "echo -to-file $kak_response_fifo -quoting kakoune -- %reg{a}"
- perl < $kak_response_fifo -we '
+ @perl@ < $kak_response_fifo -we '
+ @perl@/bin/perl < $kak_response_fifo -we '
use strict;
my $Q = "'\''";
my @args = ();
@@ -2410,11 +2406,6 @@ define-command -hidden lsp-snippets-insert-completion -params 1 %{ evaluate-comm
}}
define-command lsp-snippets-insert -hidden -params 1 %[
- evaluate-commands %sh{
- if ! command -v perl > /dev/null; then
@ -42,10 +42,10 @@ index b173478..015c3ca 100644
set-register x nop
evaluate-commands %sh[ # $kak_quoted_selections
- perl -e '
+ @perl@ -e '
+ @perl@/bin/perl -e '
use strict;
use warnings;
use Text::ParseWords();
--
--
2.44.0

View File

@ -2,7 +2,7 @@
lib,
rustPlatform,
fetchFromGitHub,
substituteAll,
replaceVars,
perl,
stdenv,
CoreServices,
@ -21,12 +21,7 @@ rustPlatform.buildRustPackage rec {
sha256 = "sha256-uXKquAjfytUn/Q0kx+0BGRQTkVMQ9rMRnTCy622upag=";
};
patches = [
(substituteAll {
src = ./Hardcode-perl.patch;
perl = lib.getExe perl;
})
];
patches = [ (replaceVars ./Hardcode-perl.patch { inherit perl; }) ];
cargoHash = "sha256-XnhYODMzqInwbgM8wveY048sljZ8OKw4hLYJG5h8Twc=";