vim: Modernize derivation, hopefully fixing cross
This commit is contained in:
parent
167b80ba76
commit
8b22e497f2
@ -6,7 +6,9 @@
|
|||||||
sha256 = "18ifhv5q9prd175q3vxbqf6qyvkk6bc7d2lhqdk0q78i68kv9y0c";
|
sha256 = "18ifhv5q9prd175q3vxbqf6qyvkk6bc7d2lhqdk0q78i68kv9y0c";
|
||||||
}
|
}
|
||||||
# apple frameworks
|
# apple frameworks
|
||||||
, Carbon, Cocoa }:
|
, Carbon, Cocoa
|
||||||
|
, buildPlatform, hostPlatform
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
common = callPackage ./common.nix {};
|
common = callPackage ./common.nix {};
|
||||||
@ -17,12 +19,26 @@ stdenv.mkDerivation rec {
|
|||||||
inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta;
|
inherit (common) version src postPatch hardeningDisable enableParallelBuilding meta;
|
||||||
|
|
||||||
buildInputs = [ ncurses pkgconfig ]
|
buildInputs = [ ncurses pkgconfig ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
|
++ stdenv.lib.optionals hostPlatform.isDarwin [ Carbon Cocoa ];
|
||||||
nativeBuildInputs = [ gettext ];
|
nativeBuildInputs = [ gettext ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-multibyte"
|
"--enable-multibyte"
|
||||||
"--enable-nls"
|
"--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 = ''
|
postInstall = ''
|
||||||
@ -31,22 +47,6 @@ stdenv.mkDerivation rec {
|
|||||||
cp "${vimrc}" $out/share/vim/vimrc
|
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" ];
|
__impureHostDeps = [ "/dev/ptmx" ];
|
||||||
|
|
||||||
# To fix the trouble in vim73, that it cannot cross-build with this patch
|
# To fix the trouble in vim73, that it cannot cross-build with this patch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user