2021-02-05 17:12:51 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, llvmPackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "parinfer-rust";
|
|
|
|
version = "0.4.3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eraserhd";
|
|
|
|
repo = "parinfer-rust";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd";
|
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
cargoHash = "sha256-PW9LIQamQfusaijyJ2R9xe29LhM0GNf9BdxI9vkjVdE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [ llvmPackages.clang rustPlatform.bindgenHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/kak/autoload/plugins
|
|
|
|
cp rc/parinfer.kak $out/share/kak/autoload/plugins/
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
rtpPath=$out/plugin
|
|
|
|
mkdir -p $rtpPath
|
2020-04-24 23:36:52 +00:00
|
|
|
sed "s,let s:libdir = .*,let s:libdir = '${placeholder "out"}/lib'," \
|
2021-09-18 10:52:07 +00:00
|
|
|
plugin/parinfer.vim > $rtpPath/parinfer.vim
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "Infer parentheses for Clojure, Lisp, and Scheme";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "parinfer-rust";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/eraserhd/parinfer-rust";
|
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ eraserhd ];
|
|
|
|
};
|
|
|
|
}
|