diff --git a/pkgs/applications/editors/vim/common.nix b/pkgs/applications/editors/vim/common.nix index afce0284b722..1f487157eafa 100644 --- a/pkgs/applications/editors/vim/common.nix +++ b/pkgs/applications/editors/vim/common.nix @@ -1,4 +1,8 @@ -{ lib, fetchFromGitHub }: +{ + lib, + fetchFromGitHub, + stdenv, +}: rec { version = "9.2.0106"; @@ -17,7 +21,7 @@ rec { enableParallelBuilding = true; enableParallelInstalling = false; - hardeningDisable = [ "fortify" ]; + hardeningDisable = if stdenv.cc.isClang then [ "strictflexarrays1" ] else [ "fortify" ]; # Use man from $PATH; escape sequences are still problematic. postPatch = '' diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix index 809e9808b1be..ec3e7c9a6253 100644 --- a/pkgs/applications/editors/vim/default.nix +++ b/pkgs/applications/editors/vim/default.nix @@ -17,7 +17,7 @@ }: let - common = callPackage ./common.nix { }; + common = callPackage ./common.nix { inherit stdenv; }; in stdenv.mkDerivation { pname = "vim"; diff --git a/pkgs/applications/editors/vim/full.nix b/pkgs/applications/editors/vim/full.nix index e2d251d93b99..a2a105e3182c 100644 --- a/pkgs/applications/editors/vim/full.nix +++ b/pkgs/applications/editors/vim/full.nix @@ -81,7 +81,7 @@ let endif ''; - common = callPackage ./common.nix { }; + common = callPackage ./common.nix { inherit stdenv; }; in stdenv.mkDerivation {