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:
Thomas Tuegel
2016-02-01 11:16:50 -06:00
parent 394ffcb3e5
commit 3ef7671cea
33 changed files with 41 additions and 41 deletions

View File

@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
# gcc-5.patch should be removed after 5.9
patches = [ ./clang.patch ./gcc-5.patch ];
outputs = [ "dev" "lib" "out" "man" ];
outputs = [ "dev" "out" "man" ];
setOutputFlags = false; # some aren't supported
configureFlags = [
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
export PKG_CONFIG_LIBDIR="$dev/lib/pkgconfig"
mkdir -p "$PKG_CONFIG_LIBDIR"
configureFlagsArray+=(
"--libdir=$lib/lib"
"--libdir=$out/lib"
"--includedir=$dev/include"
"--bindir=$dev/bin"
"--mandir=$man/share/man"
@@ -85,14 +85,14 @@ stdenv.mkDerivation rec {
for library in $libs; do
for dylibtype in so dll dylib; do
if [ -e "$lib/lib/lib''${library}$suffix.$dylibtype" ]; then
ln -svf lib''${library}$suffix.$dylibtype $lib/lib/lib$library$newsuffix.$dylibtype
ln -svf lib''${library}$suffix.$dylibtype.${abiVersion} $lib/lib/lib$library$newsuffix.$dylibtype.${abiVersion}
if [ -e "$out/lib/lib''${library}$suffix.$dylibtype" ]; then
ln -svf lib''${library}$suffix.$dylibtype $out/lib/lib$library$newsuffix.$dylibtype
ln -svf lib''${library}$suffix.$dylibtype.${abiVersion} $out/lib/lib$library$newsuffix.$dylibtype.${abiVersion}
fi
done
for statictype in a dll.a la; do
if [ -e "$lib/lib/lib''${library}$suffix.$statictype" ]; then
ln -svf lib''${library}$suffix.$statictype $lib/lib/lib$library$newsuffix.$statictype
if [ -e "$out/lib/lib''${library}$suffix.$statictype" ]; then
ln -svf lib''${library}$suffix.$statictype $out/lib/lib$library$newsuffix.$statictype
fi
done
ln -svf ''${library}$suffix.pc $dev/lib/pkgconfig/$library$newsuffix.pc
@@ -101,7 +101,7 @@ stdenv.mkDerivation rec {
'';
preFixup = ''
rm "$lib"/lib/*.a
rm "$out"/lib/*.a
'';
meta = {