fix conditionals for bootstrap sed calls

This commit is contained in:
Jude Taylor 2015-06-18 13:40:17 -07:00
parent 61596bf405
commit e26b421b71
2 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
] else null;
postInstall = ''
sed -i s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc
sed -i ${stdenv.lib.optionalString (stdenv.isDarwin && stdenv.cc.nativeLibc) "''"} s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc
'';
configureFlags = [ "--enable-widec" ];

View File

@ -9,10 +9,12 @@ stdenv.mkDerivation rec {
};
preConfigure =
''
let needSedSpace = ((stdenv.isFreeBSD || stdenv.isOpenBSD) && stdenv.cc.nativeTools)
|| (stdenv.isDarwin && stdenv.cc.nativeLibc);
in ''
# Fix for building on Glibc 2.16. Won't be needed once the
# gnulib in sharutils is updated.
sed -i ${stdenv.lib.optionalString ((stdenv.isFreeBSD || stdenv.isOpenBSD) && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h
sed -i ${stdenv.lib.optionalString needSedSpace "''"} '/gets is a security hole/d' lib/stdio.in.h
'';
# GNU Gettext is needed on non-GNU platforms.