add gnused to impure darwin stdenv

This commit is contained in:
Jude Taylor 2015-06-19 22:08:01 -07:00
parent 099f85465c
commit 14d83e9565
4 changed files with 9 additions and 11 deletions

View File

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

View File

@ -106,7 +106,7 @@ rec {
inherit system config;
inherit (stage1.stdenv) shell fetchurlBoot preHook cc;
initialPath = [ stage1.pkgs.xz ] ++ stage1.stdenv.initialPath;
initialPath = [ stage1.pkgs.xz stage1.pkgs.gnused ] ++ stage1.stdenv.initialPath;
};
pkgs = allPackages {
inherit system platform;

View File

@ -12,6 +12,7 @@ cd $out/bin
ln -s $mkdir
ln -s /bin/sh
ln -s /bin/cp
ln -s /bin/dd
ln -s /bin/mv
ln -s /bin/rm
ln -s /bin/ls
@ -63,4 +64,4 @@ ln -s /usr/bin/which
ln -s /usr/bin/install
ln -s /usr/bin/basename
ln -s /usr/bin/dirname
ln -s /usr/bin/readlink
ln -s /usr/bin/readlink

View File

@ -8,14 +8,11 @@ stdenv.mkDerivation rec {
sha256 = "1mallg1gprimlggdisfzdmh1xi676jsfdlfyvanlcw72ny8fsj3g";
};
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 needSedSpace "''"} '/gets is a security hole/d' lib/stdio.in.h
'';
preConfigure = ''
# 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
'';
# GNU Gettext is needed on non-GNU platforms.
buildInputs = [ gettext coreutils ];