diff options
author | John Ericson <Ericson2314@yahoo.com> | 2017-06-23 11:22:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 11:22:34 -0400 |
commit | afd2bdbad25db4b0007b52d07161345e6426ae72 (patch) | |
tree | d404b3da63264d45429f9c8600b43a9f3fe083ef /pkgs/applications/editors | |
parent | c76f8d9c7ab01119bbf051529e78d541e6f25d41 (diff) | |
parent | 198dceccbe5414a5fd72ca83624c0cc715db1aad (diff) | |
download | nixlib-afd2bdbad25db4b0007b52d07161345e6426ae72.tar nixlib-afd2bdbad25db4b0007b52d07161345e6426ae72.tar.gz nixlib-afd2bdbad25db4b0007b52d07161345e6426ae72.tar.bz2 nixlib-afd2bdbad25db4b0007b52d07161345e6426ae72.tar.lz nixlib-afd2bdbad25db4b0007b52d07161345e6426ae72.tar.xz nixlib-afd2bdbad25db4b0007b52d07161345e6426ae72.tar.zst nixlib-afd2bdbad25db4b0007b52d07161345e6426ae72.zip |
Merge pull request #26007 from obsidiansystems/cc-wrapper-prefix
Get rid of gcc-cross-wrapper
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r-- | pkgs/applications/editors/ed/default.nix | 13 | ||||
-rw-r--r-- | pkgs/applications/editors/vim/default.nix | 36 |
2 files changed, 26 insertions, 23 deletions
diff --git a/pkgs/applications/editors/ed/default.nix b/pkgs/applications/editors/ed/default.nix index ec56667a4ba6..053e1d22af31 100644 --- a/pkgs/applications/editors/ed/default.nix +++ b/pkgs/applications/editors/ed/default.nix @@ -1,4 +1,6 @@ -{ fetchurl, stdenv }: +{ stdenv, fetchurl +, buildPlatform, hostPlatform +}: stdenv.mkDerivation rec { name = "ed-${version}"; @@ -28,11 +30,12 @@ stdenv.mkDerivation rec { make: *** [check] Error 127 */ - doCheck = !stdenv.isDarwin; + doCheck = !(hostPlatform.isDarwin || hostPlatform != buildPlatform); - crossAttrs = { - compileFlags = [ "CC=${stdenv.cross.config}-gcc" ]; - }; + configureFlags = if hostPlatform == buildPlatform then null else [ + "--exec-prefix=${stdenv.cc.prefix}" + "CC=${stdenv.cc.prefix}cc" + ]; meta = { description = "An implementation of the standard Unix editor"; 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 |