From 44d32929f6a85202d939c0b4e5aa50e93f8979f8 Mon Sep 17 00:00:00 2001 From: Jason Felice Date: Sun, 12 May 2019 11:34:33 -0400 Subject: [PATCH] kakounePlugins.kak-ansi: init at 0.2.1 --- .../editors/kakoune/plugins/default.nix | 1 + .../editors/kakoune/plugins/kak-ansi.nix | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/applications/editors/kakoune/plugins/kak-ansi.nix diff --git a/pkgs/applications/editors/kakoune/plugins/default.nix b/pkgs/applications/editors/kakoune/plugins/default.nix index f53d345d49ed..61e2b3a58459 100644 --- a/pkgs/applications/editors/kakoune/plugins/default.nix +++ b/pkgs/applications/editors/kakoune/plugins/default.nix @@ -3,6 +3,7 @@ { inherit parinfer-rust; + kak-ansi = pkgs.callPackage ./kak-ansi.nix { }; kak-auto-pairs = pkgs.callPackage ./kak-auto-pairs.nix { }; kak-buffers = pkgs.callPackage ./kak-buffers.nix { }; kak-fzf = pkgs.callPackage ./kak-fzf.nix { }; diff --git a/pkgs/applications/editors/kakoune/plugins/kak-ansi.nix b/pkgs/applications/editors/kakoune/plugins/kak-ansi.nix new file mode 100644 index 000000000000..408cba45fbe6 --- /dev/null +++ b/pkgs/applications/editors/kakoune/plugins/kak-ansi.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "kak-ansi"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "eraserhd"; + repo = "kak-ansi"; + rev = "v${version}"; + sha256 = "0ddjih8hfyf6s4g7y46p1355kklaw1ydzzh61141i0r45wyb2d0d"; + }; + + installPhase = '' + mkdir -p $out/bin $out/share/kak/autoload/plugins/ + cp kak-ansi-filter $out/bin/ + # Hard-code path of filter and don't try to build when Kakoune boots + sed ' + /^declare-option.* ansi_filter /i\ +declare-option -hidden str ansi_filter %{'"$out"'/bin/kak-ansi-filter} + /^declare-option.* ansi_filter /,/^}/d + ' rc/ansi.kak >$out/share/kak/autoload/plugins/ansi.kak + ''; + + meta = with stdenv.lib; { + description = "Kakoune support for rendering ANSI code"; + homepage = "https://github.com/eraserhd/kak-ansi"; + license = licenses.unlicense; + maintainers = with maintainers; [ eraserhd ]; + platforms = platforms.all; + }; +}