vimPlugins.sniprun: 1.3.16 -> 1.3.17 (#380992)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
|
||||
# sniprun-bin
|
||||
rustPlatform,
|
||||
vimUtils,
|
||||
makeWrapper,
|
||||
bashInteractive,
|
||||
coreutils,
|
||||
@@ -11,21 +11,26 @@
|
||||
gnugrep,
|
||||
gnused,
|
||||
procps,
|
||||
|
||||
# sniprun
|
||||
vimUtils,
|
||||
substituteAll,
|
||||
nix-update-script,
|
||||
}:
|
||||
let
|
||||
version = "1.3.16";
|
||||
version = "1.3.17";
|
||||
src = fetchFromGitHub {
|
||||
owner = "michaelb";
|
||||
repo = "sniprun";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-2rVeBUkdLXUiHkd8slyiLTYQBKwgMQvIi/uyCToVBYA=";
|
||||
hash = "sha256-o8U3GXg61dfEzQxrs9zCgRDWonhr628aSPd/l+HxS70=";
|
||||
};
|
||||
sniprun-bin = rustPlatform.buildRustPackage {
|
||||
pname = "sniprun-bin";
|
||||
inherit version src;
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-j3i86I5Lmt0+fQONikHnxfeLEbiyFSairgjHXmjZfTk=";
|
||||
cargoHash = "sha256-HLPTt0JCmCM4SRmP8o435ilM1yxoxpAnf8hg3+8C54I=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@@ -44,17 +49,20 @@ let
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.mainProgram = "sniprun";
|
||||
};
|
||||
in
|
||||
vimUtils.buildVimPlugin {
|
||||
pname = "sniprun";
|
||||
inherit version src;
|
||||
|
||||
patches = [ ./fix-paths.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace lua/sniprun.lua --replace '@sniprun_bin@' ${sniprun-bin}
|
||||
'';
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
sniprun = lib.getExe sniprun-bin;
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ sniprun-bin ];
|
||||
|
||||
@@ -69,7 +77,7 @@ vimUtils.buildVimPlugin {
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/michaelb/sniprun/";
|
||||
changelog = "https://github.com/michaelb/sniprun/blob/${src.tag}/CHANGELOG.md";
|
||||
changelog = "https://github.com/michaelb/sniprun/blob/v${version}/CHANGELOG.md";
|
||||
maintainers = with lib.maintainers; [ GaetanLepage ];
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/lua/sniprun.lua b/lua/sniprun.lua
|
||||
index 49be442..1834566 100644
|
||||
index 49be442..9342351 100644
|
||||
--- a/lua/sniprun.lua
|
||||
+++ b/lua/sniprun.lua
|
||||
@@ -3,9 +3,7 @@ M.ping_anwsered = 0
|
||||
@@ -9,7 +9,7 @@ index 49be442..1834566 100644
|
||||
-local binary_path = vim.fn.fnamemodify(
|
||||
- vim.api.nvim_get_runtime_file("lua/sniprun.lua", false)[1], ":h:h")
|
||||
- .. "/target/release/sniprun"
|
||||
+local binary_path = "@sniprun_bin@/bin/sniprun"
|
||||
+local binary_path = "@sniprun@"
|
||||
|
||||
local sniprun_path = vim.fn.fnamemodify(vim.api.nvim_get_runtime_file("lua/sniprun.lua", false)[1], ":p:h") .. "/.."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user