Skip to content

Commit

Permalink
vim_configurable: remove redundant nix support patches
Browse files Browse the repository at this point in the history
Vim 9 includes syntax highlighting for nix files, but not the
ftplugin/indent parts of vim-nix so we still include those.

LnL7/vim-nix#47
vim/vim#11646
  • Loading branch information
ncfavier committed Jun 6, 2023
1 parent 5acfd65 commit e3091da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
9 changes: 4 additions & 5 deletions pkgs/applications/editors/vim/configurable.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
, netbeansSupport ? config.netbeans or true # Enable NetBeans integration support.
, ximSupport ? config.vim.xim or true # less than 15KB, needed for deadkeys
, darwinSupport ? config.vim.darwin or false # Enable Darwin support
, ftNixSupport ? config.vim.ftNix or true # Add .nix filetype detection and minimal syntax highlighting support
, ftNixSupport ? config.vim.ftNix or true # Add nix indentation support from vim-nix (not needed for basic syntax highlighting)
}:


Expand Down Expand Up @@ -61,7 +61,7 @@ let

common = callPackage ./common.nix {};

in stdenv.mkDerivation rec {
in stdenv.mkDerivation {

pname = "vim-full";

Expand All @@ -71,7 +71,7 @@ in stdenv.mkDerivation rec {
default = common.src; # latest release
};

patches = [ ./cflags-prune.diff ] ++ lib.optional ftNixSupport ./ft-nix-support.patch;
patches = [ ./cflags-prune.diff ];

configureFlags = [
"--with-features=${features}"
Expand Down Expand Up @@ -163,10 +163,9 @@ in stdenv.mkDerivation rec {
# error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fdeclspec";

preConfigure = "" + lib.optionalString ftNixSupport ''
preConfigure = lib.optionalString ftNixSupport ''
cp ${vimPlugins.vim-nix.src}/ftplugin/nix.vim runtime/ftplugin/nix.vim
cp ${vimPlugins.vim-nix.src}/indent/nix.vim runtime/indent/nix.vim
cp ${vimPlugins.vim-nix.src}/syntax/nix.vim runtime/syntax/nix.vim
'';

preInstall = ''
Expand Down
20 changes: 0 additions & 20 deletions pkgs/applications/editors/vim/ft-nix-support.patch

This file was deleted.

0 comments on commit e3091da

Please sign in to comment.