From 91407a8bdfb2dbb95b6cc5c99a44b0925bd464f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 5 Oct 2015 20:32:54 +0200 Subject: [PATCH] ncurses: split into multiple outputs Some programs (e.g. tput) might better be moved somewhere else than $dev/bin, but that can be improved later if need be. --- .../audio/google-musicmanager/default.nix | 2 +- .../editors/emacs-24/macport-24.3.nix | 6 ++-- pkgs/applications/editors/heme/default.nix | 5 +-- pkgs/applications/misc/girara/default.nix | 2 +- pkgs/applications/misc/pinfo/default.nix | 2 +- .../misc/zathura/core/default.nix | 2 +- .../science/logic/saw-tools/default.nix | 2 +- .../virtualization/xen/generic.nix | 2 +- pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix | 2 +- .../gnome-3/3.16/core/vte/default.nix | 2 +- pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix | 2 +- .../gnome-3/3.18/core/vte/default.nix | 2 +- .../compilers/gcc-arm-embedded/default.nix | 2 +- .../compilers/ghc/6.10.2-binary.nix | 2 +- pkgs/development/compilers/ghc/6.12.3.nix | 4 +-- .../compilers/ghc/7.0.4-binary.nix | 2 +- pkgs/development/compilers/ghc/7.0.4.nix | 4 +-- pkgs/development/compilers/ghc/7.10.2.nix | 4 +-- pkgs/development/compilers/ghc/7.2.2.nix | 4 +-- .../compilers/ghc/7.4.2-binary.nix | 2 +- pkgs/development/compilers/ghc/7.4.2.nix | 4 +-- pkgs/development/compilers/ghc/7.6.3.nix | 4 +-- pkgs/development/compilers/ghc/7.8.3.nix | 4 +-- pkgs/development/compilers/ghc/7.8.4.nix | 4 +-- pkgs/development/compilers/ghc/head.nix | 4 +-- pkgs/development/compilers/ghc/nokinds.nix | 4 +-- pkgs/development/compilers/mentor/default.nix | 2 +- .../development/interpreters/pypy/default.nix | 8 ++--- .../ruby/bundler-env/default-gem-config.nix | 4 +-- .../development/libraries/libedit/default.nix | 2 +- .../development/libraries/ncurses/default.nix | 31 ++++++++++--------- pkgs/development/libraries/slang/default.nix | 5 +-- .../mobile/androidenv/androidndk.nix | 2 +- pkgs/development/tools/misc/drush/default.nix | 2 +- .../development/tools/misc/global/default.nix | 2 +- pkgs/tools/misc/entr/default.nix | 2 +- pkgs/tools/networking/inetutils/default.nix | 2 +- pkgs/tools/security/tor/tor-arm.nix | 2 +- pkgs/top-level/perl-packages.nix | 2 +- 39 files changed, 75 insertions(+), 70 deletions(-) diff --git a/pkgs/applications/audio/google-musicmanager/default.nix b/pkgs/applications/audio/google-musicmanager/default.nix index 48f17564ef42..8127579f0229 100644 --- a/pkgs/applications/audio/google-musicmanager/default.nix +++ b/pkgs/applications/audio/google-musicmanager/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { buildPhase = '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc.out}/lib:${qt48}/lib:${stdenv.cc.cc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager + --set-rpath "$out/opt/google/musicmanager:${stdenv.lib.makeLibraryPath [ readline ncurses stdenv.cc.libc.out qt48 stdenv.cc.cc libidn expat flac libvorbis ]}" opt/google/musicmanager/MusicManager ''; dontPatchELF = true; diff --git a/pkgs/applications/editors/emacs-24/macport-24.3.nix b/pkgs/applications/editors/emacs-24/macport-24.3.nix index 191969eef5b0..edf8a28d6ff4 100644 --- a/pkgs/applications/editors/emacs-24/macport-24.3.nix +++ b/pkgs/applications/editors/emacs-24/macport-24.3.nix @@ -33,12 +33,12 @@ stdenv.mkDerivation rec { # Further, we need to make sure that the -L option occurs before mention # of the library, so that it finds it within the Nix store. sed -i 's/tinfo ncurses/tinfo ncursesw/' configure - ncurseslib=$(echo ${ncurses}/lib | sed 's#/#\\/#g') + ncurseslib=$(echo ${ncurses.lib}/lib | sed 's#/#\\/#g') sed -i "s/OLIBS=\$LIBS/OLIBS=\"-L$ncurseslib \$LIBS\"/" configure sed -i 's/LIBS="\$LIBS_TERMCAP \$LIBS"/LIBS="\$LIBS \$LIBS_TERMCAP"/' configure configureFlagsArray=( - LDFLAGS=-L${ncurses}/lib + LDFLAGS=-L${ncurses.lib}/lib --with-xml2=yes --with-gnutls=yes --with-mac @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { ) makeFlagsArray=( CFLAGS=-O3 - LDFLAGS="-O3 -L${ncurses}/lib" + LDFLAGS="-O3 -L${ncurses.lib}/lib" ); ''; diff --git a/pkgs/applications/editors/heme/default.nix b/pkgs/applications/editors/heme/default.nix index d377e5cb36f6..19c4183ea672 100644 --- a/pkgs/applications/editors/heme/default.nix +++ b/pkgs/applications/editors/heme/default.nix @@ -10,10 +10,11 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Makefile \ --replace "/usr/local" "$out" \ - --replace "CFLAGS = " "CFLAGS = -I${ncurses}/include " \ - --replace "LDFLAGS = " "LDFLAGS = -L${ncurses}/lib " \ + --replace "CFLAGS = " "CFLAGS = -I${ncurses.dev}/include " \ + --replace "LDFLAGS = " "LDFLAGS = -L${ncurses.lib}/lib " \ --replace "-lcurses" "-lncurses" ''; + buildInputs = [ ncurses ]; preBuild = '' mkdir -p $out/bin mkdir -p $out/man/man1 diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix index e91e94695f5a..7bb5fb7ddcc0 100644 --- a/pkgs/applications/misc/girara/default.nix +++ b/pkgs/applications/misc/girara/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig gtk gettext ]; makeFlags = [ "PREFIX=$(out)" ] - ++ optional withBuildColors "TPUT=${ncurses}/bin/tput" + ++ optional withBuildColors "TPUT=${ncurses.dev}/bin/tput" ++ optional (!withBuildColors) "TPUT_AVAILABLE=0" ; diff --git a/pkgs/applications/misc/pinfo/default.nix b/pkgs/applications/misc/pinfo/default.nix index 658ff410d379..222dddc0e897 100644 --- a/pkgs/applications/misc/pinfo/default.nix +++ b/pkgs/applications/misc/pinfo/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { buildInputs = [ autoreconfHook gettext texinfo ncurses readline ]; - configureFlags = [ "--with-curses=${ncurses}" "--with-readline=${readline}" ]; + configureFlags = [ "--with-curses=${ncurses.dev}" "--with-readline=${readline}" ]; meta = with stdenv.lib; { description = "A viewer for info files"; diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index cab6423b77e5..92892b54845c 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { "PREFIX=$(out)" "RSTTOMAN=${docutils}/bin/rst2man.py" "VERBOSE=1" - "TPUT=${ncurses}/bin/tput" + "TPUT=${ncurses.dev}/bin/tput" ]; postInstall = '' diff --git a/pkgs/applications/science/logic/saw-tools/default.nix b/pkgs/applications/science/logic/saw-tools/default.nix index eebe6ff0a06c..97a06bf093d3 100644 --- a/pkgs/applications/science/logic/saw-tools/default.nix +++ b/pkgs/applications/science/logic/saw-tools/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { mv doc $out/share # Hack around lack of libtinfo in NixOS - ln -s ${ncurses}/lib/libncursesw.so.5 $out/lib/libtinfo.so.5 + ln -s ${ncurses.lib}/lib/libncursesw.so.5 $out/lib/libtinfo.so.5 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. diff --git a/pkgs/applications/virtualization/xen/generic.nix b/pkgs/applications/virtualization/xen/generic.nix index 71c26c5f99c9..5f4147ea2cfa 100644 --- a/pkgs/applications/virtualization/xen/generic.nix +++ b/pkgs/applications/virtualization/xen/generic.nix @@ -130,7 +130,7 @@ stdenv.mkDerivation { --replace /usr/bin/pkill ${procps}/bin/pkill substituteInPlace tools/xenstat/Makefile \ - --replace /usr/include/curses.h ${ncurses}/include/curses.h + --replace /usr/include/curses.h ${ncurses.dev}/include/curses.h substituteInPlace tools/qemu-xen-traditional/xen-hooks.mak \ --replace /usr/include/pci ${pciutils}/include/pci diff --git a/pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix b/pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix index 5ccca36bcaad..663d6b9e3524 100644 --- a/pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix +++ b/pkgs/desktops/gnome-3/3.16/core/vte/2.90.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses" + substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.16/core/vte/default.nix b/pkgs/desktops/gnome-3/3.16/core/vte/default.nix index 89a1405f62b7..2f0062101f2e 100644 --- a/pkgs/desktops/gnome-3/3.16/core/vte/default.nix +++ b/pkgs/desktops/gnome-3/3.16/core/vte/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses" + substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix b/pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix index 5ccca36bcaad..663d6b9e3524 100644 --- a/pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix +++ b/pkgs/desktops/gnome-3/3.18/core/vte/2.90.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses" + substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses" ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/gnome-3/3.18/core/vte/default.nix b/pkgs/desktops/gnome-3/3.18/core/vte/default.nix index b47381cf61b8..e1e260f1e021 100644 --- a/pkgs/desktops/gnome-3/3.18/core/vte/default.nix +++ b/pkgs/desktops/gnome-3/3.18/core/vte/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postInstall = '' - substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses}/lib -lncurses" + substituteInPlace $out/lib/libvte2_90.la --replace "-lncurses" "-L${ncurses.lib}/lib -lncurses" ''; meta = with stdenv.lib; { diff --git a/pkgs/development/compilers/gcc-arm-embedded/default.nix b/pkgs/development/compilers/gcc-arm-embedded/default.nix index 1d192fbbc56a..cfd6ecd713da 100644 --- a/pkgs/development/compilers/gcc-arm-embedded/default.nix +++ b/pkgs/development/compilers/gcc-arm-embedded/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation { for f in $(find $out); do if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \ - --set-rpath $out/lib:${gcc}/lib:${ncurses}/lib \ + --set-rpath $out/lib:${gcc.lib}/lib:${ncurses.lib}/lib \ "$f" || true fi done diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index 96ec4e6c114a..cafbe0e5a6cb 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { (if stdenv.isLinux then '' find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \; + --set-rpath "${libedit}/lib:${ncurses.lib}/lib:${gmp}/lib" {} \; for prog in ld ar gcc strip ranlib; do find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; done diff --git a/pkgs/development/compilers/ghc/6.12.3.nix b/pkgs/development/compilers/ghc/6.12.3.nix index f6beaf3a0067..1fa10f3ed078 100644 --- a/pkgs/development/compilers/ghc/6.12.3.nix +++ b/pkgs/development/compilers/ghc/6.12.3.nix @@ -15,8 +15,8 @@ stdenv.mkDerivation rec { buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ''; preConfigure = '' diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix index 31df7f1fa355..73a589f44ba6 100644 --- a/pkgs/development/compilers/ghc/7.0.4-binary.nix +++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { stdenv.lib.optionalString stdenv.isLinux '' find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${ncurses}/lib:${gmp}/lib" {} \; + --set-rpath "${ncurses.lib}/lib:${gmp}/lib" {} \; 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 for prog in ld ar gcc strip ranlib; do diff --git a/pkgs/development/compilers/ghc/7.0.4.nix b/pkgs/development/compilers/ghc/7.0.4.nix index 281e5ca66a2c..46605daee93d 100644 --- a/pkgs/development/compilers/ghc/7.0.4.nix +++ b/pkgs/development/compilers/ghc/7.0.4.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.10.2.nix b/pkgs/development/compilers/ghc/7.10.2.nix index 73fcd788c74f..3dfd94eea7d6 100644 --- a/pkgs/development/compilers/ghc/7.10.2.nix +++ b/pkgs/development/compilers/ghc/7.10.2.nix @@ -7,8 +7,8 @@ let buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.2.2.nix b/pkgs/development/compilers/ghc/7.2.2.nix index 7276f413967f..f8459cd2a13b 100644 --- a/pkgs/development/compilers/ghc/7.2.2.nix +++ b/pkgs/development/compilers/ghc/7.2.2.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix index 03dd4dcd35bb..a57aff4d864f 100644 --- a/pkgs/development/compilers/ghc/7.4.2-binary.nix +++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { # find editline/gmp. stdenv.lib.optionalString stdenv.isLinux '' mkdir -p "$out/lib" - ln -sv "${ncurses}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5" + ln -sv "${ncurses.lib}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5" find . -type f -perm -0100 \ -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "$out/lib:${gmp}/lib" {} \; diff --git a/pkgs/development/compilers/ghc/7.4.2.nix b/pkgs/development/compilers/ghc/7.4.2.nix index b2abcb08ec3a..68bc922e1767 100644 --- a/pkgs/development/compilers/ghc/7.4.2.nix +++ b/pkgs/development/compilers/ghc/7.4.2.nix @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.6.3.nix b/pkgs/development/compilers/ghc/7.6.3.nix index 366c0044a67a..d14ecc32b8b4 100644 --- a/pkgs/development/compilers/ghc/7.6.3.nix +++ b/pkgs/development/compilers/ghc/7.6.3.nix @@ -24,8 +24,8 @@ in stdenv.mkDerivation rec { buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" diff --git a/pkgs/development/compilers/ghc/7.8.3.nix b/pkgs/development/compilers/ghc/7.8.3.nix index 2e0f5ba07e4d..3cbc04f6d7f1 100644 --- a/pkgs/development/compilers/ghc/7.8.3.nix +++ b/pkgs/development/compilers/ghc/7.8.3.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation rec { buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" DYNAMIC_BY_DEFAULT = NO ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" diff --git a/pkgs/development/compilers/ghc/7.8.4.nix b/pkgs/development/compilers/ghc/7.8.4.nix index 4323341dc4a4..3ceea24b3dba 100644 --- a/pkgs/development/compilers/ghc/7.8.4.nix +++ b/pkgs/development/compilers/ghc/7.8.4.nix @@ -16,8 +16,8 @@ stdenv.mkDerivation (rec { buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" DYNAMIC_BY_DEFAULT = NO ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index fe0d0b37371e..adff7f12a3c4 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -5,8 +5,8 @@ let buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" DYNAMIC_BY_DEFAULT = NO ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" diff --git a/pkgs/development/compilers/ghc/nokinds.nix b/pkgs/development/compilers/ghc/nokinds.nix index 6334759496f0..09dac0e95115 100644 --- a/pkgs/development/compilers/ghc/nokinds.nix +++ b/pkgs/development/compilers/ghc/nokinds.nix @@ -5,8 +5,8 @@ let buildMK = '' libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib" libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include" - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" + libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib" DYNAMIC_BY_DEFAULT = NO SRC_HC_OPTS = -H64m -O -fasm GhcLibHcOpts = -O -dcore-lint diff --git a/pkgs/development/compilers/mentor/default.nix b/pkgs/development/compilers/mentor/default.nix index 7ff013b23441..573bf8210319 100644 --- a/pkgs/development/compilers/mentor/default.nix +++ b/pkgs/development/compilers/mentor/default.nix @@ -34,7 +34,7 @@ let # GDB needs ncurses case "$file" in - *gdb) patchelf --set-rpath "${ncurses}/lib" "$file";; + *gdb) patchelf --set-rpath "${ncurses.lib}/lib" "$file";; esac done diff --git a/pkgs/development/interpreters/pypy/default.nix b/pkgs/development/interpreters/pypy/default.nix index fe209f6f1148..4f26a40b0ce7 100644 --- a/pkgs/development/interpreters/pypy/default.nix +++ b/pkgs/development/interpreters/pypy/default.nix @@ -43,9 +43,9 @@ let # hint pypy to find nix ncurses substituteInPlace pypy/module/_minimal_curses/fficurses.py \ - --replace "/usr/include/ncurses/curses.h" "${ncurses}/include/curses.h" \ - --replace "ncurses/curses.h" "${ncurses}/include/curses.h" \ - --replace "ncurses/term.h" "${ncurses}/include/term.h" \ + --replace "/usr/include/ncurses/curses.h" "${ncurses.dev}/include/curses.h" \ + --replace "ncurses/curses.h" "${ncurses.dev}/include/curses.h" \ + --replace "ncurses/term.h" "${ncurses.dev}/include/term.h" \ --replace "libraries=['curses']" "libraries=['ncurses']" # tkinter hints @@ -72,7 +72,7 @@ let doCheck = true; checkPhase = '' - export TERMINFO="${ncurses}/share/terminfo/"; + export TERMINFO="${ncurses.out}/share/terminfo/"; export TERM="xterm"; export HOME="$TMPDIR"; # disable shutils because it assumes gid 0 exists diff --git a/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix b/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix index c91c6da28d9f..cbb64bc12774 100644 --- a/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix +++ b/pkgs/development/interpreters/ruby/bundler-env/default-gem-config.nix @@ -54,8 +54,8 @@ in ncursesw = attrs: { buildInputs = [ ncurses ]; buildFlags = [ - "--with-cflags=-I${ncurses}/include" - "--with-ldflags=-L${ncurses}/lib" + "--with-cflags=-I${ncurses.dev}/include" + "--with-ldflags=-L${ncurses.lib}/lib" ]; }; diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix index dc8ecf7e95d8..23b26e343db6 100644 --- a/pkgs/development/libraries/libedit/default.nix +++ b/pkgs/development/libraries/libedit/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { postInstall = '' find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \ - -e 's,-lncurses[a-z]*,-L${ncurses}/lib -lncursesw,g' + -e 's,-lncurses[a-z]*,-L${ncurses.lib}/lib -lncursesw,g' ''; configureFlags = [ "--enable-widec" ]; diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 046c7347f863..04fa1d4b81b9 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -16,6 +16,9 @@ stdenv.mkDerivation rec { patches = [ ./clang.patch ]; + outputs = [ "dev" "lib" "out" ]; + setOutputFlags = false; # some aren't supported + configureFlags = [ "--with-shared" "--with-cxx-shared" @@ -24,14 +27,14 @@ stdenv.mkDerivation rec { "--enable-overwrite" # Needed for proper header installation "--enable-pc-files" "--enable-symlinks" + "--libdir=$(lib)/lib" "--includedir=$(dev)/include" "--bindir=$(dev)/bin" ] ++ lib.optional unicode "--enable-widec"; nativeBuildInputs = [ pkgconfig libtool ]; buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm; preConfigure = '' - configureFlagsArray+=("--includedir=$out/include") - export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig" + export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig" mkdir -p "$PKG_CONFIG_LIBDIR" configureFlagsArray+=("--with-pkg-config-libdir=$PKG_CONFIG_LIBDIR") '' + lib.optionalString stdenv.isCygwin '' @@ -47,37 +50,37 @@ stdenv.mkDerivation rec { # When building a wide-character (Unicode) build, create backward # compatibility links from the the "normal" libraries to the # wide-character libraries (e.g. libncurses.so to libncursesw.so). - postInstall = '' + postFixup = '' # Determine what suffixes our libraries have suffix="$(awk -F': ' 'f{print $3; f=0} /default library suffix/{f=1}' config.log)" - libs="$(ls $out/lib/pkgconfig | tr ' ' '\n' | sed "s,\(.*\)$suffix\.pc,\1,g")" + libs="$(ls $dev/lib/pkgconfig | tr ' ' '\n' | sed "s,\(.*\)$suffix\.pc,\1,g")" suffixes="$(echo "$suffix" | awk '{for (i=1; i < length($0); i++) {x=substr($0, i+1, length($0)-i); print x}}')" # Get the path to the config util - cfg=$(basename $out/bin/ncurses*-config) + cfg=$(basename $dev/bin/ncurses*-config) # symlink the full suffixed include directory - ln -svf . $out/include/ncurses$suffix + ln -svf . $dev/include/ncurses$suffix for newsuffix in $suffixes ""; do # Create a non-abi versioned config util links - ln -svf $cfg $out/bin/ncurses$newsuffix-config + ln -svf $cfg $dev/bin/ncurses$newsuffix-config # Allow for end users who #include - ln -svf . $out/include/ncurses$newsuffix + ln -svf . $dev/include/ncurses$newsuffix - for lib in $libs; do + for library in $libs; do for dylibtype in so dll dylib; do - if [ -e "$out/lib/lib''${lib}$suffix.$dylibtype" ]; then - ln -svf lib''${lib}$suffix.$dylibtype $out/lib/lib$lib$newsuffix.$dylibtype + if [ -e "$lib/lib/lib''${library}$suffix.$dylibtype" ]; then + ln -svf lib''${library}$suffix.$dylibtype $lib/lib/lib$library$newsuffix.$dylibtype fi done for statictype in a dll.a la; do - if [ -e "$out/lib/lib''${lib}$suffix.$statictype" ]; then - ln -svf lib''${lib}$suffix.$statictype $out/lib/lib$lib$newsuffix.$statictype + if [ -e "$lib/lib/lib''${library}$suffix.$statictype" ]; then + ln -svf lib''${library}$suffix.$statictype $lib/lib/lib$library$newsuffix.$statictype fi done - ln -svf ''${lib}$suffix.pc $out/lib/pkgconfig/$lib$newsuffix.pc + ln -svf ''${library}$suffix.pc $dev/lib/pkgconfig/$library$newsuffix.pc done done ''; diff --git a/pkgs/development/libraries/slang/default.nix b/pkgs/development/libraries/slang/default.nix index bf1f38fbb83d..8aeb19ac2e35 100644 --- a/pkgs/development/libraries/slang/default.nix +++ b/pkgs/development/libraries/slang/default.nix @@ -9,9 +9,10 @@ stdenv.mkDerivation rec { # Fix some wrong hardcoded paths preConfigure = '' - sed -i -e "s|/usr/lib/terminfo|${ncurses}/lib/terminfo|" configure - sed -i -e "s|/usr/lib/terminfo|${ncurses}/lib/terminfo|" src/sltermin.c + sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure + sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" src/sltermin.c sed -i -e "s|/bin/ln|ln|" src/Makefile.in + sed -i -e "s|-ltermcap|-lncurses|" ./configure ''; configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}"; buildInputs = [ncurses pcre libpng zlib readline]; diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix index 03d7cae1a9db..3ffc4dab145c 100644 --- a/pkgs/development/mobile/androidenv/androidndk.nix +++ b/pkgs/development/mobile/androidenv/androidndk.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { \( -type f -a -name "*.so*" \) -o \ \( -type f -a -perm -0100 \) \ \) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \ - --set-rpath ${zlib}/lib:${ncurses}/lib {} \; + --set-rpath ${stdenv.lib.makeLibraryPath [ zlib ncurses ]} {} \; # fix ineffective PROGDIR / MYNDKDIR determination for i in ndk-build ndk-gdb ndk-gdb-py do diff --git a/pkgs/development/tools/misc/drush/default.nix b/pkgs/development/tools/misc/drush/default.nix index cb534d511eaf..0751f51281de 100644 --- a/pkgs/development/tools/misc/drush/default.nix +++ b/pkgs/development/tools/misc/drush/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { mkdir -p "$out" cp -r . "$out/src" mkdir "$out/bin" - wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses}/bin" + wrapProgram "$out/src/drush" --prefix PATH : "${which}/bin:${php}/bin:${bash}/bin:${coreutils}/bin:${ncurses.dev}/bin" ln -s "$out/src/drush" "$out/bin/drush" ''; } diff --git a/pkgs/development/tools/misc/global/default.nix b/pkgs/development/tools/misc/global/default.nix index 63b29fccd527..741b494ec398 100644 --- a/pkgs/development/tools/misc/global/default.nix +++ b/pkgs/development/tools/misc/global/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-ltdl-include=${libtool}/include" - "--with-ltdl-lib=${libtool}/lib" + "--with-ltdl-lib=${libtool.lib}/lib" "--with-ncurses=${ncurses}" "--with-sqlite3=${sqlite}" "--with-exuberant-ctags=${ctags}/bin/ctags" diff --git a/pkgs/tools/misc/entr/default.nix b/pkgs/tools/misc/entr/default.nix index 8770a5858875..ae402e35c2eb 100644 --- a/pkgs/tools/misc/entr/default.nix +++ b/pkgs/tools/misc/entr/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Makefile.bsd --replace /bin/echo echo substituteInPlace entr.c --replace /bin/cat ${coreutils}/bin/cat - substituteInPlace entr.c --replace /usr/bin/clear ${ncurses}/bin/clear + substituteInPlace entr.c --replace /usr/bin/clear ${ncurses.dev}/bin/clear substituteInPlace entr.1 --replace /bin/cat cat substituteInPlace entr.1 --replace /usr/bin/clear clear ''; diff --git a/pkgs/tools/networking/inetutils/default.nix b/pkgs/tools/networking/inetutils/default.nix index eca416b53d4e..a92c34328579 100644 --- a/pkgs/tools/networking/inetutils/default.nix +++ b/pkgs/tools/networking/inetutils/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses /* for `talk' */ ]; - configureFlags = "--with-ncurses-include-dir=${ncurses}/include"; + configureFlags = "--with-ncurses-include-dir=${ncurses.dev}/include"; # Test fails with "UNIX socket name too long", probably because our # $TMPDIR is too long. diff --git a/pkgs/tools/security/tor/tor-arm.nix b/pkgs/tools/security/tor/tor-arm.nix index 6c4d61d825f9..365379c8f6a8 100644 --- a/pkgs/tools/security/tor/tor-arm.nix +++ b/pkgs/tools/security/tor/tor-arm.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { for i in $(cd $out/bin && ls); do wrapProgram $out/bin/$i \ --prefix PYTHONPATH : "$(toPythonPath $out):$(toPythonPath ${pythonPackages.curses}):$out/libexec:$PYTHONPATH" \ - --set TERMINFO "${ncurses}/share/terminfo" \ + --set TERMINFO "${ncurses.out}/share/terminfo" \ --set TERM "xterm" done ''; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index cdebdf5b4317..ecd5f8d93cf2 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -10448,7 +10448,7 @@ let self = _self // overrides; _self = with self; { preConfigure = '' substituteInPlace Makefile.PL --replace '$Config{libpth}' \ - "'${pkgs.ncurses}/lib'" + "'${pkgs.ncurses.lib}/lib'" ''; # Tests don't work because they require /dev/tty.