-
Notifications
You must be signed in to change notification settings - Fork 41
/
derivation.nix
36 lines (30 loc) · 976 Bytes
/
derivation.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
{ lib, stdenv, libiconv, rustPlatform, fetchFromGitHub, llvmPackages }:
rustPlatform.buildRustPackage rec {
name = "parinfer-rust-${version}";
version = "0.4.3";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
buildInputs = [
llvmPackages.libclang
llvmPackages.clang
libiconv
];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
postInstall = ''
mkdir -p $out/share/kak/autoload/plugins
cp rc/parinfer.kak $out/share/kak/autoload/plugins/
rtpPath=$out/share/vim-plugins/parinfer-rust
mkdir -p $rtpPath/plugin
sed "s,let s:libdir = .*,let s:libdir = '${placeholder "out"}/lib'," \
plugin/parinfer.vim >$rtpPath/plugin/parinfer.vim
'';
meta = with lib; {
description = "Infer parentheses for Clojure, Lisp, and Scheme.";
homepage = "https://github.com/eraserhd/parinfer-rust";
license = licenses.isc;
maintainers = with maintainers; [ eraserhd ];
platforms = platforms.all;
};
}