From 4234ef550c6646ef34b6888730b05173a8648334 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Sun, 8 Mar 2020 00:16:53 -0500 Subject: [PATCH] vimacs: init at 2016-03-24 --- pkgs/applications/editors/vim/vimacs.nix | 34 ++++++++++++++++++++++++ pkgs/misc/vim-plugins/generated.nix | 11 ++++++++ pkgs/misc/vim-plugins/overrides.nix | 15 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + pkgs/top-level/all-packages.nix | 2 ++ 5 files changed, 63 insertions(+) create mode 100644 pkgs/applications/editors/vim/vimacs.nix diff --git a/pkgs/applications/editors/vim/vimacs.nix b/pkgs/applications/editors/vim/vimacs.nix new file mode 100644 index 000000000000..d067b4181213 --- /dev/null +++ b/pkgs/applications/editors/vim/vimacs.nix @@ -0,0 +1,34 @@ +{ stdenv, config, vim_configurable, macvim, vimPlugins +, useMacvim ? stdenv.isDarwin && (config.vimacs.macvim or true) +, vimacsExtraArgs ? "" }: + +stdenv.mkDerivation rec { + pname = "vimacs"; + version = vimPackage.version; + vimPackage = if useMacvim then macvim else vim_configurable; + + buildInputs = [ vimPackage vimPlugins.vimacs ]; + + buildCommand = '' + mkdir -p "$out"/bin + cp "${vimPlugins.vimacs}"/share/vim-plugins/vimacs/bin/vim $out/bin/vimacs + substituteInPlace "$out"/bin/vimacs \ + --replace '-vim}' '-@bin@/bin/vim}' \ + --replace '-gvim}' '-@bin@/bin/vim -g}' \ + --replace '--cmd "let g:VM_Enabled = 1"' \ + '--cmd "let g:VM_Enabled = 1" --cmd "set rtp^=@rtp@" ${vimacsExtraArgs}' \ + --replace @rtp@ ${vimPlugins.vimacs.rtp} \ + --replace @bin@ ${vimPackage} + for prog in vm gvm gvimacs vmdiff vimacsdiff + do + ln -s "$out"/bin/vimacs $out/bin/$prog + done + ''; + + meta = with stdenv.lib; { + description = "Vim-Improved eMACS: Emacs emulation for Vim"; + homepage = "http://algorithm.com.au/code/vimacs"; + license = licenses.gpl2Plus; + maintainers = with stdenv.lib.maintainers; [ millerjason ]; + }; +} diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 12700eb8ef49..0093bc78c418 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -5888,6 +5888,17 @@ let }; }; + vimacs = buildVimPluginFrom2Nix { + pname = "vimacs"; + version = "2016-03-24"; + src = fetchFromGitHub { + owner = "andrep"; + repo = "vimacs"; + rev = "7b8e297722d55089f0f0535fe6422533c98112fb"; + sha256 = "0x92jcpdlvxhhdpwkv7ig9ya7s96yqjy6ms9xnx8djkf12xql16f"; + }; + }; + vimagit = buildVimPluginFrom2Nix { pname = "vimagit"; version = "2020-01-12"; diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index 5248a817f43e..86a65e1ad8ce 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -460,6 +460,21 @@ self: super: { }; }); + vimacs = super.vimacs.overrideAttrs(old: { + buildPhase = '' + substituteInPlace bin/vim \ + --replace '/usr/bin/vim' 'vim' \ + --replace '/usr/bin/gvim' 'gvim' + # remove unnecessary duplicated bin wrapper script + rm -r plugin/vimacs + ''; + meta = with stdenv.lib; { + description = "Vim-Improved eMACS: Emacs emulation plugin for Vim"; + homepage = "http://algorithm.com.au/code/vimacs"; + license = licenses.gpl2Plus; + maintainers = with stdenv.lib.maintainers; [ millerjason ]; + }; + }); vimshell-vim = super.vimshell-vim.overrideAttrs(old: { dependencies = with super; [ vimproc-vim ]; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 14f2ff80a236..62333ae15e31 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -9,6 +9,7 @@ alvan/vim-closetag alx741/vim-hindent alx741/vim-stylishask amiorin/ctrlp-z +andrep/vimacs andreshazard/vim-logreview andsild/peskcolor.vim andviro/flake8-vim diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4d1f57640d54..0341fd97bc0b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22447,6 +22447,8 @@ in gtk3 = if stdenv.isDarwin then gtk3-x11 else gtk3; }); + vimacs = callPackage ../applications/editors/vim/vimacs.nix { }; + qpdfview = libsForQt5.callPackage ../applications/misc/qpdfview {}; qtile = callPackage ../applications/window-managers/qtile {