diff options
-rw-r--r-- | pkgs/applications/editors/vim/default.nix | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix index 98e9a47a7604..b8fee7bd1e24 100644 --- a/pkgs/applications/editors/vim/default.nix +++ b/pkgs/applications/editors/vim/default.nix @@ -6,7 +6,9 @@ sha256 = "18ifhv5q9prd175q3vxbqf6qyvkk6bc7d2lhqdk0q78i68kv9y0c"; } # apple frameworks -, Carbon, Cocoa }: +, Carbon, Cocoa +, buildPlatform, hostPlatform +}: let common = callPackage ./common.nix {}; @@ -17,12 +19,26 @@ stdenv.mkDerivation rec { inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta; buildInputs = [ ncurses pkgconfig ] - ++ stdenv.lib.optionals stdenv.isDarwin [ Carbon Cocoa ]; + ++ stdenv.lib.optionals hostPlatform.isDarwin [ Carbon Cocoa ]; nativeBuildInputs = [ gettext ]; configureFlags = [ "--enable-multibyte" "--enable-nls" + ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ + "vim_cv_toupper_broken=no" + "--with-tlib=ncurses" + "vim_cv_terminfo=yes" + "vim_cv_tty_group=tty" + "vim_cv_tty_mode=0660" + "vim_cv_getcwd_broken=no" + "vim_cv_stat_ignores_slash=yes" + "ac_cv_sizeof_int=4" + "vim_cv_memmove_handles_overlap=yes" + "vim_cv_memmove_handles_overlap=yes" + + # TODO(@Ericson2314): wont' be needed soon. + "STRIP=${hostPlatform.config}-strip" ]; postInstall = '' @@ -31,22 +47,6 @@ stdenv.mkDerivation rec { cp "${vimrc}" $out/share/vim/vimrc ''; - crossAttrs = { - configureFlags = [ - "vim_cv_toupper_broken=no" - "--with-tlib=ncurses" - "vim_cv_terminfo=yes" - "vim_cv_tty_group=tty" - "vim_cv_tty_mode=0660" - "vim_cv_getcwd_broken=no" - "vim_cv_stat_ignores_slash=yes" - "ac_cv_sizeof_int=4" - "vim_cv_memmove_handles_overlap=yes" - "vim_cv_memmove_handles_overlap=yes" - "STRIP=${stdenv.cross.config}-strip" - ]; - }; - __impureHostDeps = [ "/dev/ptmx" ]; # To fix the trouble in vim73, that it cannot cross-build with this patch |