From c49301b2f76c4de1261089c6fa761dae5116c22a Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Sat, 20 Jun 2015 13:59:11 -0700 Subject: [PATCH] ncurses: Cleanup some old hacks --- .../development/libraries/ncurses/default.nix | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index abfa184daf0..7315d0679bb 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -20,23 +20,17 @@ stdenv.mkDerivation rec { # gcc-5.patch should be removed after 5.9 patches = [ ./clang.patch ./gcc-5.patch ]; - configureFlags = - [ "--with-shared" "--without-debug" "--enable-pc-files" "--enable-symlinks" ] - ++ lib.optional unicode "--enable-widec"; + configureFlags = [ + "--with-shared" + "--without-debug" + "--enable-pc-files" + "--enable-symlinks" + "--includedir=\${out}/include" + ] ++ lib.optional unicode "--enable-widec"; buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm; - # PKG_CONFIG_LIBDIR is where the *.pc files will be installed. If this - # directory doesn't exist, the configure script will disable installation of - # *.pc files. The configure script usually (on LSB distros) pick $(path of - # pkg-config)/../lib/pkgconfig. On NixOS that path doesn't exist and is not - # the place we want to put *.pc files from other packages anyway. So we must - # tell it explicitly where to install with PKG_CONFIG_LIBDIR. - preConfigure = '' - export configureFlags="$configureFlags --includedir=$out/include" - export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig" - mkdir -p "$PKG_CONFIG_LIBDIR" - '' + lib.optionalString stdenv.isCygwin '' + preConfigure = lib.optionalString stdenv.isCygwin '' sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure ''; @@ -46,6 +40,11 @@ stdenv.mkDerivation rec { doCheck = false; + # The install expects the pkgconfig directory to exist in 5.9 + preInstall = '' + mkdir -p "$out/lib/pkgconfig" + ''; + # 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).