ncurses: combine $lib and $out outputs
The $lib output refers to the terminfo database in $out, which is about 10x larger than the ncurses shared library. Splitting these outputs saves a small amount of space for any derivations that use the terminfo database but not the ncurses library, but we do not have evidence that any such exist.
This commit is contained in:
parent
394ffcb3e5
commit
3ef7671cea
@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"LDFLAGS=-L${ncurses.lib}/lib"
|
"LDFLAGS=-L${ncurses.out}/lib"
|
||||||
"--with-xml2=yes"
|
"--with-xml2=yes"
|
||||||
"--with-gnutls=yes"
|
"--with-gnutls=yes"
|
||||||
"--with-mac"
|
"--with-mac"
|
||||||
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
CFLAGS = "-O3";
|
CFLAGS = "-O3";
|
||||||
LDFLAGS = "-O3 -L${ncurses.lib}/lib";
|
LDFLAGS = "-O3 -L${ncurses.out}/lib";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/share/emacs/site-lisp/
|
mkdir -p $out/share/emacs/site-lisp/
|
||||||
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace "/usr/local" "$out" \
|
--replace "/usr/local" "$out" \
|
||||||
--replace "CFLAGS = " "CFLAGS = -I${ncurses.dev}/include " \
|
--replace "CFLAGS = " "CFLAGS = -I${ncurses.dev}/include " \
|
||||||
--replace "LDFLAGS = " "LDFLAGS = -L${ncurses.lib}/lib " \
|
--replace "LDFLAGS = " "LDFLAGS = -L${ncurses.out}/lib " \
|
||||||
--replace "-lcurses" "-lncurses"
|
--replace "-lcurses" "-lncurses"
|
||||||
'';
|
'';
|
||||||
buildInputs = [ ncurses ];
|
buildInputs = [ ncurses ];
|
||||||
|
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
|||||||
mv doc $out/share
|
mv doc $out/share
|
||||||
|
|
||||||
# Hack around lack of libtinfo in NixOS
|
# Hack around lack of libtinfo in NixOS
|
||||||
ln -s ${ncurses.lib}/lib/libncursesw.so.5 $out/lib/libtinfo.so.5
|
ln -s ${ncurses.out}/lib/libncursesw.so.5 $out/lib/libtinfo.so.5
|
||||||
ln -s ${stdenv.cc.libc}/lib/libpthread.so.0 $out/lib/libpthread.so.0
|
ln -s ${stdenv.cc.libc}/lib/libpthread.so.0 $out/lib/libpthread.so.0
|
||||||
|
|
||||||
# Add a clang symlink for easy building with a suitable compiler.
|
# Add a clang symlink for easy building with a suitable compiler.
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses"
|
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.out}/lib -lncurses"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -20,7 +20,7 @@ let baseAttrs = rec {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses"
|
substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.out}/lib -lncurses"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -31,7 +31,7 @@ stdenv.mkDerivation {
|
|||||||
for f in $(find $out); do
|
for f in $(find $out); do
|
||||||
if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then
|
if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then
|
||||||
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \
|
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \
|
||||||
--set-rpath $out/lib:${gcc.lib or gcc}/lib:${ncurses.lib}/lib \
|
--set-rpath $out/lib:${gcc.lib or gcc}/lib:${ncurses.out}/lib \
|
||||||
"$f" || true
|
"$f" || true
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
|||||||
(if stdenv.isLinux then ''
|
(if stdenv.isLinux then ''
|
||||||
find . -type f -perm -0100 \
|
find . -type f -perm -0100 \
|
||||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath "${libedit}/lib:${ncurses.lib}/lib:${gmp.out}/lib" {} \;
|
--set-rpath "${libedit}/lib:${ncurses.out}/lib:${gmp.out}/lib" {} \;
|
||||||
for prog in ld ar gcc strip ranlib; do
|
for prog in ld ar gcc strip ranlib; do
|
||||||
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
|
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
|
||||||
done
|
done
|
||||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
|
|||||||
stdenv.lib.optionalString stdenv.isLinux ''
|
stdenv.lib.optionalString stdenv.isLinux ''
|
||||||
find . -type f -perm -0100 \
|
find . -type f -perm -0100 \
|
||||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath "${ncurses.lib}/lib:${gmp.out}/lib" {} \;
|
--set-rpath "${ncurses.out}/lib:${gmp.out}/lib" {} \;
|
||||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||||
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||||
for prog in ld ar gcc strip ranlib; do
|
for prog in ld ar gcc strip ranlib; do
|
||||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||||
|
@ -9,7 +9,7 @@ let
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||||
|
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
|||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
||||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.lib}/lib"
|
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||||
] ++ stdenv.lib.optional stdenv.isDarwin [
|
] ++ stdenv.lib.optional stdenv.isDarwin [
|
||||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||||
];
|
];
|
||||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||||
|
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
|
|||||||
# find editline/gmp.
|
# find editline/gmp.
|
||||||
stdenv.lib.optionalString stdenv.isLinux ''
|
stdenv.lib.optionalString stdenv.isLinux ''
|
||||||
mkdir -p "$out/lib"
|
mkdir -p "$out/lib"
|
||||||
ln -sv "${ncurses.lib}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5"
|
ln -sv "${ncurses.out}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5"
|
||||||
find . -type f -perm -0100 \
|
find . -type f -perm -0100 \
|
||||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath "$out/lib:${gmp.out}/lib" {} \;
|
--set-rpath "$out/lib:${gmp.out}/lib" {} \;
|
||||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||||
|
@ -25,7 +25,7 @@ in stdenv.mkDerivation rec {
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
|
||||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
DYNAMIC_BY_DEFAULT = NO
|
DYNAMIC_BY_DEFAULT = NO
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation (rec {
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
DYNAMIC_BY_DEFAULT = NO
|
DYNAMIC_BY_DEFAULT = NO
|
||||||
${stdenv.lib.optionalString stdenv.isDarwin ''
|
${stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
|
||||||
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||||
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
||||||
"--with-curses-includes=${ncurses}/include" "--with-curses-libraries=${ncurses.lib}/lib"
|
"--with-curses-includes=${ncurses}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||||
] ++ stdenv.lib.optional stdenv.isDarwin [
|
] ++ stdenv.lib.optional stdenv.isDarwin [
|
||||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||||
];
|
];
|
||||||
|
@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
|
|||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-gcc=${stdenv.cc}/bin/cc"
|
"--with-gcc=${stdenv.cc}/bin/cc"
|
||||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
||||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.lib}/lib"
|
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||||
] ++ stdenv.lib.optional stdenv.isDarwin [
|
] ++ stdenv.lib.optional stdenv.isDarwin [
|
||||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||||
];
|
];
|
||||||
|
@ -7,7 +7,7 @@ let
|
|||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
|
||||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
|
||||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
|
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
|
||||||
DYNAMIC_BY_DEFAULT = NO
|
DYNAMIC_BY_DEFAULT = NO
|
||||||
SRC_HC_OPTS = -H64m -O -fasm
|
SRC_HC_OPTS = -H64m -O -fasm
|
||||||
GhcLibHcOpts = -O -dcore-lint
|
GhcLibHcOpts = -O -dcore-lint
|
||||||
|
@ -34,7 +34,7 @@ let
|
|||||||
|
|
||||||
# GDB needs ncurses
|
# GDB needs ncurses
|
||||||
case "$file" in
|
case "$file" in
|
||||||
*gdb) patchelf --set-rpath "${ncurses.lib}/lib" "$file";;
|
*gdb) patchelf --set-rpath "${ncurses.out}/lib" "$file";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ in
|
|||||||
buildInputs = [ ncurses ];
|
buildInputs = [ ncurses ];
|
||||||
buildFlags = [
|
buildFlags = [
|
||||||
"--with-cflags=-I${ncurses.dev}/include"
|
"--with-cflags=-I${ncurses.dev}/include"
|
||||||
"--with-ldflags=-L${ncurses.lib}/lib"
|
"--with-ldflags=-L${ncurses.out}/lib"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ stdenv.mkDerivation {
|
|||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $dev/bin
|
mkdir -p $dev/bin
|
||||||
mv $bin/bin/aalib-config $dev/bin/aalib-config
|
mv $bin/bin/aalib-config $dev/bin/aalib-config
|
||||||
substituteInPlace $out/lib/libaa.la --replace "${ncurses.dev}/lib" "${ncurses.lib}/lib"
|
substituteInPlace $out/lib/libaa.la --replace "${ncurses.dev}/lib" "${ncurses.out}/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace $out/lib/gstreamer-0.10/libgstaasink.la \
|
substituteInPlace $out/lib/gstreamer-0.10/libgstaasink.la \
|
||||||
--replace "${ncurses.dev}/lib" "${ncurses.lib}/lib"
|
--replace "${ncurses.dev}/lib" "${ncurses.out}/lib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \
|
find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \
|
||||||
-e 's,-lncurses[a-z]*,-L${ncurses.lib}/lib -lncursesw,g'
|
-e 's,-lncurses[a-z]*,-L${ncurses.out}/lib -lncursesw,g'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
|||||||
# gcc-5.patch should be removed after 5.9
|
# gcc-5.patch should be removed after 5.9
|
||||||
patches = [ ./clang.patch ./gcc-5.patch ];
|
patches = [ ./clang.patch ./gcc-5.patch ];
|
||||||
|
|
||||||
outputs = [ "dev" "lib" "out" "man" ];
|
outputs = [ "dev" "out" "man" ];
|
||||||
setOutputFlags = false; # some aren't supported
|
setOutputFlags = false; # some aren't supported
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
|
|||||||
export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig"
|
export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig"
|
||||||
mkdir -p "$PKG_CONFIG_LIBDIR"
|
mkdir -p "$PKG_CONFIG_LIBDIR"
|
||||||
configureFlagsArray+=(
|
configureFlagsArray+=(
|
||||||
"--libdir=$lib/lib"
|
"--libdir=$out/lib"
|
||||||
"--includedir=$dev/include"
|
"--includedir=$dev/include"
|
||||||
"--bindir=$dev/bin"
|
"--bindir=$dev/bin"
|
||||||
"--mandir=$man/share/man"
|
"--mandir=$man/share/man"
|
||||||
@ -85,14 +85,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
for library in $libs; do
|
for library in $libs; do
|
||||||
for dylibtype in so dll dylib; do
|
for dylibtype in so dll dylib; do
|
||||||
if [ -e "$lib/lib/lib''${library}$suffix.$dylibtype" ]; then
|
if [ -e "$out/lib/lib''${library}$suffix.$dylibtype" ]; then
|
||||||
ln -svf lib''${library}$suffix.$dylibtype $lib/lib/lib$library$newsuffix.$dylibtype
|
ln -svf lib''${library}$suffix.$dylibtype $out/lib/lib$library$newsuffix.$dylibtype
|
||||||
ln -svf lib''${library}$suffix.$dylibtype.${abiVersion} $lib/lib/lib$library$newsuffix.$dylibtype.${abiVersion}
|
ln -svf lib''${library}$suffix.$dylibtype.${abiVersion} $out/lib/lib$library$newsuffix.$dylibtype.${abiVersion}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for statictype in a dll.a la; do
|
for statictype in a dll.a la; do
|
||||||
if [ -e "$lib/lib/lib''${library}$suffix.$statictype" ]; then
|
if [ -e "$out/lib/lib''${library}$suffix.$statictype" ]; then
|
||||||
ln -svf lib''${library}$suffix.$statictype $lib/lib/lib$library$newsuffix.$statictype
|
ln -svf lib''${library}$suffix.$statictype $out/lib/lib$library$newsuffix.$statictype
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
ln -svf ''${library}$suffix.pc $dev/lib/pkgconfig/$library$newsuffix.pc
|
ln -svf ''${library}$suffix.pc $dev/lib/pkgconfig/$library$newsuffix.pc
|
||||||
@ -101,7 +101,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
rm "$lib"/lib/*.a
|
rm "$out"/lib/*.a
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
|
|||||||
\( -type f -a -name "*.so*" \) -o \
|
\( -type f -a -name "*.so*" \) -o \
|
||||||
\( -type f -a -perm -0100 \) \
|
\( -type f -a -perm -0100 \) \
|
||||||
\) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \
|
\) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \
|
||||||
--set-rpath ${zlib.out}/lib:${ncurses.lib}/lib {} \;
|
--set-rpath ${zlib.out}/lib:${ncurses.out}/lib {} \;
|
||||||
# fix ineffective PROGDIR / MYNDKDIR determination
|
# fix ineffective PROGDIR / MYNDKDIR determination
|
||||||
for i in ndk-build ndk-gdb ndk-gdb-py
|
for i in ndk-build ndk-gdb ndk-gdb-py
|
||||||
do
|
do
|
||||||
|
@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
|
|||||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||||
"-DWITHOUT_OQGRAPH_STORAGE_ENGINE=1"
|
"-DWITHOUT_OQGRAPH_STORAGE_ENGINE=1"
|
||||||
"-DWITHOUT_TOKUDB=1"
|
"-DWITHOUT_TOKUDB=1"
|
||||||
"-DCURSES_LIBRARY=${ncurses.lib}/lib/libncurses.dylib"
|
"-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
|
||||||
];
|
];
|
||||||
|
|
||||||
# fails to find lex_token.h sometimes
|
# fails to find lex_token.h sometimes
|
||||||
|
@ -296,7 +296,7 @@ in rec {
|
|||||||
allowedRequisites = (with pkgs; [
|
allowedRequisites = (with pkgs; [
|
||||||
xz.out xz.bin libcxx libcxxabi icu.out gmp.out gnumake findutils bzip2.out
|
xz.out xz.bin libcxx libcxxabi icu.out gmp.out gnumake findutils bzip2.out
|
||||||
bzip2.bin llvm zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
|
bzip2.bin llvm zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
|
||||||
gzip ncurses.out ncurses.dev ncurses.lib ncurses.man gnused bash gawk
|
gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
|
||||||
gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out
|
gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out
|
||||||
binutils-raw.dev binutils gettext
|
binutils-raw.dev binutils gettext
|
||||||
]) ++ (with pkgs.darwin; [
|
]) ++ (with pkgs.darwin; [
|
||||||
|
@ -65,7 +65,7 @@ rec {
|
|||||||
cp -d ${libiconv.lib}/lib/lib*.dylib $out/lib
|
cp -d ${libiconv.lib}/lib/lib*.dylib $out/lib
|
||||||
cp -d ${gettext}/lib/libintl*.dylib $out/lib
|
cp -d ${gettext}/lib/libintl*.dylib $out/lib
|
||||||
chmod +x $out/lib/libintl*.dylib
|
chmod +x $out/lib/libintl*.dylib
|
||||||
cp -d ${ncurses.lib}/lib/libncurses*.dylib $out/lib
|
cp -d ${ncurses.out}/lib/libncurses*.dylib $out/lib
|
||||||
|
|
||||||
# Copy what we need of clang
|
# Copy what we need of clang
|
||||||
cp -d ${llvmPackages.clang-unwrapped}/bin/clang $out/bin
|
cp -d ${llvmPackages.clang-unwrapped}/bin/clang $out/bin
|
||||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace Makefile.mac --replace \
|
substituteInPlace Makefile.mac --replace \
|
||||||
" -I/opt/local/include -I /usr/local/include -I/opt/local/include" ""
|
" -I/opt/local/include -I /usr/local/include -I/opt/local/include" ""
|
||||||
substituteInPlace Makefile.mac --replace \
|
substituteInPlace Makefile.mac --replace \
|
||||||
"/opt/local/lib/libncurses.a" "${ncurses.lib}/lib/libncurses.dylib"
|
"/opt/local/lib/libncurses.a" "${ncurses.out}/lib/libncurses.dylib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = stdenv.lib.optionalString stdenv.isDarwin "make -f Makefile.mac";
|
buildPhase = stdenv.lib.optionalString stdenv.isDarwin "make -f Makefile.mac";
|
||||||
|
@ -11220,7 +11220,7 @@ let self = _self // overrides; _self = with self; {
|
|||||||
preConfigure =
|
preConfigure =
|
||||||
''
|
''
|
||||||
substituteInPlace Makefile.PL --replace '$Config{libpth}' \
|
substituteInPlace Makefile.PL --replace '$Config{libpth}' \
|
||||||
"'${pkgs.ncurses.lib}/lib'"
|
"'${pkgs.ncurses.out}/lib'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Tests don't work because they require /dev/tty.
|
# Tests don't work because they require /dev/tty.
|
||||||
|
Loading…
Reference in New Issue
Block a user