Loading pkgs/by-name/ka/kakoune-lsp/Use-full-Perl-path.patch→pkgs/by-name/ka/kakoune-lsp/Hardcode-perl.patch +51 −0 Original line number Diff line number Diff line From b93660cfa8a80a5e5bf72e1f06fb7bf95272c7e4 Mon Sep 17 00:00:00 2001 From: PoweredByPie <poweredbypie@users.noreply.github.com> Date: Fri, 8 Dec 2023 04:39:01 -0800 Subject: [PATCH] Use full Perl path From 14bdb9c39cfd813697a4f5d83ed2b4c4c043a309 Mon Sep 17 00:00:00 2001 From: V <v@anomalous.eu> Date: Tue, 9 Apr 2024 06:15:00 +0200 Subject: [PATCH] Hardcode perl --- rc/lsp.kak | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) rc/lsp.kak | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/rc/lsp.kak b/rc/lsp.kak index d695a2e..7c6a436 100644 index 306b405..6662d29 100644 --- a/rc/lsp.kak +++ b/rc/lsp.kak @@ -2339,11 +2339,6 @@ define-command -hidden lsp-snippets-insert-completion -params 1 %{ evaluate-comm @@ -280,12 +280,8 @@ define-command -hidden lsp-menu -params 1.. %{ } define-command -hidden lsp-menu-impl %{ evaluate-commands %sh{ - if ! command -v perl > /dev/null; then - echo "lsp-show-error %{'perl' must be installed to use the 'lsp-menu' command}" - exit - fi echo >$kak_command_fifo "echo -to-file $kak_response_fifo -quoting kakoune -- %reg{a}" - perl < $kak_response_fifo -we ' + @perl@/bin/perl < $kak_response_fifo -we ' use strict; my $Q = "'\''"; my @args = (); @@ -2467,11 +2463,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 2>&1; then - printf "fail '''perl'' must be installed to use the ''snippets-insert'' command'" - if ! command -v perl > /dev/null; then - printf "fail %{'perl' must be installed to use the 'lsp-snippets-insert' command'}" - fi - } evaluate-commands -draft -save-regs '^"' %[ set-register '"' %arg{1} execute-keys <a-P> @@ -2397,7 +2392,7 @@ define-command lsp-snippets-insert -hidden -params 1 %[ @@ -2526,7 +2517,7 @@ define-command lsp-snippets-insert -hidden -params 1 %[ define-command -hidden lsp-snippets-insert-perl-impl %[ set-register x nop evaluate-commands %sh[ # $kak_quoted_selections - perl -e ' + @perlPath@/bin/perl -e ' + @perl@/bin/perl -e ' use strict; use warnings; use Text::ParseWords(); -- 2.42.0 2.45.2 pkgs/by-name/ka/kakoune-lsp/package.nix +35 −17 Original line number Diff line number Diff line { stdenv, lib, fetchFromGitHub, rustPlatform, perl, CoreServices, Security, SystemConfiguration }: { lib, rustPlatform, fetchFromGitHub, replaceVars, perl, stdenv, CoreServices, Security, SystemConfiguration, }: rustPlatform.buildRustPackage rec { pname = "kakoune-lsp"; version = "16.0.0"; version = "17.1.1"; src = fetchFromGitHub { owner = pname; repo = pname; owner = "kakoune-lsp"; repo = "kakoune-lsp"; rev = "v${version}"; sha256 = "sha256-d4Tc6iYp20uOKMd+T2LhWgXWZzvzq1E+VWqjhhiIiHE="; sha256 = "sha256-XBH2pMDiHJNXrx90Lt0IcsbMFUM+X7GAHgiHpdlIdR4="; }; cargoHash = "sha256-kV8d0PwIWS6gyfCtv70iv8MrL91ZOZbwYznhc3lUw0U="; patches = [ (replaceVars ./Hardcode-perl.patch { inherit perl; }) ]; buildInputs = [ perl ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ]; cargoHash = "sha256-Yi+T+9E3Wvce4kDLsRgZ07RAGLrq7dkinKpvvGeLeS0="; patches = [ ./Use-full-Perl-path.patch buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ]; postPatch = '' substituteInPlace rc/lsp.kak \ --subst-var-by perlPath ${lib.getBin perl} ''; meta = with lib; { meta = { description = "Kakoune Language Server Protocol Client"; homepage = "https://github.com/kakoune-lsp/kakoune-lsp"; license = with licenses; [ unlicense /* or */ mit ]; maintainers = with maintainers; [ philiptaron spacekookie poweredbypie ]; # See https://github.com/kakoune-lsp/kakoune-lsp/commit/55dfc83409b9b7d3556bacda8ef8b71fc33b58cd license = with lib.licenses; [ unlicense mit ]; maintainers = with lib.maintainers; [ philiptaron spacekookie poweredbypie ]; mainProgram = "kak-lsp"; }; } Loading
pkgs/by-name/ka/kakoune-lsp/Use-full-Perl-path.patch→pkgs/by-name/ka/kakoune-lsp/Hardcode-perl.patch +51 −0 Original line number Diff line number Diff line From b93660cfa8a80a5e5bf72e1f06fb7bf95272c7e4 Mon Sep 17 00:00:00 2001 From: PoweredByPie <poweredbypie@users.noreply.github.com> Date: Fri, 8 Dec 2023 04:39:01 -0800 Subject: [PATCH] Use full Perl path From 14bdb9c39cfd813697a4f5d83ed2b4c4c043a309 Mon Sep 17 00:00:00 2001 From: V <v@anomalous.eu> Date: Tue, 9 Apr 2024 06:15:00 +0200 Subject: [PATCH] Hardcode perl --- rc/lsp.kak | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) rc/lsp.kak | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/rc/lsp.kak b/rc/lsp.kak index d695a2e..7c6a436 100644 index 306b405..6662d29 100644 --- a/rc/lsp.kak +++ b/rc/lsp.kak @@ -2339,11 +2339,6 @@ define-command -hidden lsp-snippets-insert-completion -params 1 %{ evaluate-comm @@ -280,12 +280,8 @@ define-command -hidden lsp-menu -params 1.. %{ } define-command -hidden lsp-menu-impl %{ evaluate-commands %sh{ - if ! command -v perl > /dev/null; then - echo "lsp-show-error %{'perl' must be installed to use the 'lsp-menu' command}" - exit - fi echo >$kak_command_fifo "echo -to-file $kak_response_fifo -quoting kakoune -- %reg{a}" - perl < $kak_response_fifo -we ' + @perl@/bin/perl < $kak_response_fifo -we ' use strict; my $Q = "'\''"; my @args = (); @@ -2467,11 +2463,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 2>&1; then - printf "fail '''perl'' must be installed to use the ''snippets-insert'' command'" - if ! command -v perl > /dev/null; then - printf "fail %{'perl' must be installed to use the 'lsp-snippets-insert' command'}" - fi - } evaluate-commands -draft -save-regs '^"' %[ set-register '"' %arg{1} execute-keys <a-P> @@ -2397,7 +2392,7 @@ define-command lsp-snippets-insert -hidden -params 1 %[ @@ -2526,7 +2517,7 @@ define-command lsp-snippets-insert -hidden -params 1 %[ define-command -hidden lsp-snippets-insert-perl-impl %[ set-register x nop evaluate-commands %sh[ # $kak_quoted_selections - perl -e ' + @perlPath@/bin/perl -e ' + @perl@/bin/perl -e ' use strict; use warnings; use Text::ParseWords(); -- 2.42.0 2.45.2
pkgs/by-name/ka/kakoune-lsp/package.nix +35 −17 Original line number Diff line number Diff line { stdenv, lib, fetchFromGitHub, rustPlatform, perl, CoreServices, Security, SystemConfiguration }: { lib, rustPlatform, fetchFromGitHub, replaceVars, perl, stdenv, CoreServices, Security, SystemConfiguration, }: rustPlatform.buildRustPackage rec { pname = "kakoune-lsp"; version = "16.0.0"; version = "17.1.1"; src = fetchFromGitHub { owner = pname; repo = pname; owner = "kakoune-lsp"; repo = "kakoune-lsp"; rev = "v${version}"; sha256 = "sha256-d4Tc6iYp20uOKMd+T2LhWgXWZzvzq1E+VWqjhhiIiHE="; sha256 = "sha256-XBH2pMDiHJNXrx90Lt0IcsbMFUM+X7GAHgiHpdlIdR4="; }; cargoHash = "sha256-kV8d0PwIWS6gyfCtv70iv8MrL91ZOZbwYznhc3lUw0U="; patches = [ (replaceVars ./Hardcode-perl.patch { inherit perl; }) ]; buildInputs = [ perl ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ]; cargoHash = "sha256-Yi+T+9E3Wvce4kDLsRgZ07RAGLrq7dkinKpvvGeLeS0="; patches = [ ./Use-full-Perl-path.patch buildInputs = lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ]; postPatch = '' substituteInPlace rc/lsp.kak \ --subst-var-by perlPath ${lib.getBin perl} ''; meta = with lib; { meta = { description = "Kakoune Language Server Protocol Client"; homepage = "https://github.com/kakoune-lsp/kakoune-lsp"; license = with licenses; [ unlicense /* or */ mit ]; maintainers = with maintainers; [ philiptaron spacekookie poweredbypie ]; # See https://github.com/kakoune-lsp/kakoune-lsp/commit/55dfc83409b9b7d3556bacda8ef8b71fc33b58cd license = with lib.licenses; [ unlicense mit ]; maintainers = with lib.maintainers; [ philiptaron spacekookie poweredbypie ]; mainProgram = "kak-lsp"; }; }