nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 36 lines 1.1 kB view raw
1{ lib, rustPlatform, fetchFromGitHub, llvmPackages }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "parinfer-rust"; 5 version = "0.4.3"; 6 7 src = fetchFromGitHub { 8 owner = "eraserhd"; 9 repo = "parinfer-rust"; 10 rev = "v${version}"; 11 sha256 = "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd"; 12 }; 13 14 cargoSha256 = "1lam4gwzcj6w0pyxf61l2cpbvvf5gmj2gwi8dangnhd60qhlnvrx"; 15 16 nativeBuildInputs = [ llvmPackages.clang ]; 17 buildInputs = [ llvmPackages.libclang ]; 18 LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; 19 20 postInstall = '' 21 mkdir -p $out/share/kak/autoload/plugins 22 cp rc/parinfer.kak $out/share/kak/autoload/plugins/ 23 24 rtpPath=$out/plugin 25 mkdir -p $rtpPath 26 sed "s,let s:libdir = .*,let s:libdir = '${placeholder "out"}/lib'," \ 27 plugin/parinfer.vim > $rtpPath/parinfer.vim 28 ''; 29 30 meta = with lib; { 31 description = "Infer parentheses for Clojure, Lisp, and Scheme"; 32 homepage = "https://github.com/eraserhd/parinfer-rust"; 33 license = licenses.isc; 34 maintainers = with maintainers; [ eraserhd ]; 35 }; 36}