Skip to content

Commit 5c91bfb

Browse files
authored
vimPlugins.sniprun: 1.3.16 -> 1.3.17 (#380992)
2 parents b00b6c5 + 94af5ee commit 5c91bfb

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

pkgs/applications/editors/vim/plugins/non-generated/sniprun/default.nix

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
{
22
lib,
33
fetchFromGitHub,
4-
nix-update-script,
4+
5+
# sniprun-bin
56
rustPlatform,
6-
vimUtils,
77
makeWrapper,
88
bashInteractive,
99
coreutils,
1010
curl,
1111
gnugrep,
1212
gnused,
1313
procps,
14+
15+
# sniprun
16+
vimUtils,
17+
substituteAll,
18+
nix-update-script,
1419
}:
1520
let
16-
version = "1.3.16";
21+
version = "1.3.17";
1722
src = fetchFromGitHub {
1823
owner = "michaelb";
1924
repo = "sniprun";
2025
tag = "v${version}";
21-
hash = "sha256-2rVeBUkdLXUiHkd8slyiLTYQBKwgMQvIi/uyCToVBYA=";
26+
hash = "sha256-o8U3GXg61dfEzQxrs9zCgRDWonhr628aSPd/l+HxS70=";
2227
};
2328
sniprun-bin = rustPlatform.buildRustPackage {
2429
pname = "sniprun-bin";
2530
inherit version src;
2631

2732
useFetchCargoVendor = true;
28-
cargoHash = "sha256-j3i86I5Lmt0+fQONikHnxfeLEbiyFSairgjHXmjZfTk=";
33+
cargoHash = "sha256-HLPTt0JCmCM4SRmP8o435ilM1yxoxpAnf8hg3+8C54I=";
2934

3035
nativeBuildInputs = [ makeWrapper ];
3136

@@ -44,17 +49,20 @@ let
4449
'';
4550

4651
doCheck = false;
52+
53+
meta.mainProgram = "sniprun";
4754
};
4855
in
4956
vimUtils.buildVimPlugin {
5057
pname = "sniprun";
5158
inherit version src;
5259

53-
patches = [ ./fix-paths.patch ];
54-
55-
postPatch = ''
56-
substituteInPlace lua/sniprun.lua --replace '@sniprun_bin@' ${sniprun-bin}
57-
'';
60+
patches = [
61+
(substituteAll {
62+
src = ./fix-paths.patch;
63+
sniprun = lib.getExe sniprun-bin;
64+
})
65+
];
5866

5967
propagatedBuildInputs = [ sniprun-bin ];
6068

@@ -69,7 +77,7 @@ vimUtils.buildVimPlugin {
6977

7078
meta = {
7179
homepage = "https://github.com/michaelb/sniprun/";
72-
changelog = "https://github.com/michaelb/sniprun/blob/${src.tag}/CHANGELOG.md";
80+
changelog = "https://github.com/michaelb/sniprun/blob/v${version}/CHANGELOG.md";
7381
maintainers = with lib.maintainers; [ GaetanLepage ];
7482
license = lib.licenses.mit;
7583
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/lua/sniprun.lua b/lua/sniprun.lua
2-
index 49be442..1834566 100644
2+
index 49be442..9342351 100644
33
--- a/lua/sniprun.lua
44
+++ b/lua/sniprun.lua
55
@@ -3,9 +3,7 @@ M.ping_anwsered = 0
@@ -9,7 +9,7 @@ index 49be442..1834566 100644
99
-local binary_path = vim.fn.fnamemodify(
1010
- vim.api.nvim_get_runtime_file("lua/sniprun.lua", false)[1], ":h:h")
1111
- .. "/target/release/sniprun"
12-
+local binary_path = "@sniprun_bin@/bin/sniprun"
12+
+local binary_path = "@sniprun@"
1313

1414
local sniprun_path = vim.fn.fnamemodify(vim.api.nvim_get_runtime_file("lua/sniprun.lua", false)[1], ":p:h") .. "/.."
1515

0 commit comments

Comments
 (0)