From e954eff55e0ef2958a860ca8fcd9ae6b5fcf4957 Mon Sep 17 00:00:00 2001 From: Lily Ballard Date: Sat, 4 Apr 2026 19:20:03 -0700 Subject: [PATCH] macvim: add vim common hardeningDisable flags The other vim derivations all use a common definition of `hardeningDisable` which disables `fortify`. The vim source already sets `-D_FORTIFY_SOURCE=1` so it's not fully disabled, though it's certainly weaker than what we get if we don't disable it. Disabling `fortify` like this fixes a crash that occurs as a consequence of `strictflexarrays1` now being enabled by default. Arguably we should just disable that instead of disabling `fortify` but this keeps us consistent with the other vim derivations. --- pkgs/applications/editors/vim/macvim.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/vim/macvim.nix b/pkgs/applications/editors/vim/macvim.nix index 0d356f77f762..36e22ddc2b0a 100644 --- a/pkgs/applications/editors/vim/macvim.nix +++ b/pkgs/applications/editors/vim/macvim.nix @@ -1,6 +1,7 @@ { lib, stdenv, + callPackage, fetchFromGitHub, apple-sdk_14, ncurses, @@ -24,6 +25,9 @@ let ruby = ruby_3_4; in +let + common = callPackage ./common.nix { inherit stdenv; }; +in stdenv.mkDerivation (finalAttrs: { pname = "macvim"; @@ -182,7 +186,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # macvim obj-c log macro triggers -Wformat-security (seems like a bug? it's a string literal!) - hardeningDisable = [ "format" ]; + hardeningDisable = common.hardeningDisable ++ [ "format" ]; # os_log also enables -Werror,-Wformat by default env.NIX_CFLAGS_COMPILE = "-DOS_LOG_FORMAT_WARNINGS";