From e95bbcf5f85bfd32c5ac95db01a27e86c403b806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 5 Jun 2019 22:11:17 +0200 Subject: [PATCH] vim_configurable: also apply the security patch --- pkgs/applications/editors/vim/common.nix | 6 ++++++ pkgs/applications/editors/vim/configurable.nix | 4 +++- pkgs/applications/editors/vim/default.nix | 8 +------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/editors/vim/common.nix b/pkgs/applications/editors/vim/common.nix index e0ac32c54ec5..6c5a21be40f6 100644 --- a/pkgs/applications/editors/vim/common.nix +++ b/pkgs/applications/editors/vim/common.nix @@ -13,6 +13,12 @@ rec { hardeningDisable = [ "fortify" ]; + patches = [ + # Arbitrary code execution fix + # https://github.com/numirias/security/blob/cf4f74e0c6c6e4bbd6b59823aa1b85fa913e26eb/doc/2019-06-04_ace-vim-neovim.md + ./0001-source-command-doesnt-check-for-the-sandbox-5357552.patch + ]; + postPatch = # Use man from $PATH; escape sequences are still problematic. '' diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index 3b75d08787e8..64930cb2b0e0 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -76,7 +76,9 @@ in stdenv.mkDerivation rec { "default" = common.src; # latest release }; - patches = [ ./cflags-prune.diff ] ++ stdenv.lib.optional ftNixSupport ./ft-nix-support.patch; + patches = common.patches or [] + ++ [ ./cflags-prune.diff ] + ++ stdenv.lib.optional ftNixSupport ./ft-nix-support.patch; configureFlags = [ "--enable-gui=${guiSupport}" diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix index 6378bc7c7dc2..b448c7057f94 100644 --- a/pkgs/applications/editors/vim/default.nix +++ b/pkgs/applications/editors/vim/default.nix @@ -15,7 +15,7 @@ in stdenv.mkDerivation rec { name = "vim-${version}"; - inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta; + inherit (common) version src patches postPatch hardeningDisable enableParallelBuilding meta; nativeBuildInputs = [ gettext pkgconfig ]; buildInputs = [ ncurses ] @@ -25,12 +25,6 @@ stdenv.mkDerivation rec { cf-private ]; - patches = [ - # Arbitrary code execution fix - # https://github.com/numirias/security/blob/cf4f74e0c6c6e4bbd6b59823aa1b85fa913e26eb/doc/2019-06-04_ace-vim-neovim.md - ./0001-source-command-doesnt-check-for-the-sandbox-5357552.patch - ]; - configureFlags = [ "--enable-multibyte" "--enable-nls"