-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
/
default.nix
74 lines (64 loc) · 1.63 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, libgit2
, zlib
, stdenv
, darwin
, vimUtils
, nix-update-script
}:
let
version = "0.54";
src = fetchFromGitHub {
owner = "liuchengxu";
repo = "vim-clap";
rev = "v${version}";
hash = "sha256-rhCum59GCIAwdi5QgSaPfrALelAIMncNetu81i53Q8c=";
};
meta = with lib; {
description = "Modern performant fuzzy picker for Vim and NeoVim";
mainProgram = "maple";
homepage = "https://github.com/liuchengxu/vim-clap";
changelog = "https://github.com/liuchengxu/vim-clap/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = [ ];
};
maple = rustPlatform.buildRustPackage {
pname = "maple";
inherit version src meta;
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"subprocess-0.2.10" = "sha256-WcGrJ103ofGlQwi32kRGM3Z+uvKSCFBmFZbZXAtuWwM=";
"tree-sitter-dockerfile-0.1.0" = "sha256-K+duK3HcxlVgbLXBos3MUxyfnTywcHX6JM4Do0qAJO0=";
"tree-sitter-vim-0.3.1-dev.0" = "sha256-CWxZ28LdptiMNO2VIk+Ny/DhQXdN604EuqRIb9oaCmI=";
};
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libgit2
zlib
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.AppKit
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.SystemConfiguration
];
};
in
vimUtils.buildVimPlugin {
pname = "vim-clap";
inherit version src meta;
postInstall = ''
ln -s ${maple}/bin/maple $out/bin/maple
'';
passthru = {
inherit maple;
updateScript = nix-update-script {
attrPath = "vimPlugins.vim-clap.maple";
};
};
}