From b0327ac2409f9d7e9a5aa0379f2b351b56058dfd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 Sep 2016 15:09:28 +0200 Subject: [PATCH] tcl: Separate man output and use symlinks This reduces tcl's total size from 25.0 MiB to 8.6 MiB. Admittedly this is also because putting the manpages in the right place causes all man3 pages to be deleted by the multiple outputs setup hook. Not sure if that's desirable behaviour... --- pkgs/development/interpreters/tcl/generic.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/tcl/generic.nix b/pkgs/development/interpreters/tcl/generic.nix index d01df5ce8be8..eafffba4a34f 100644 --- a/pkgs/development/interpreters/tcl/generic.nix +++ b/pkgs/development/interpreters/tcl/generic.nix @@ -10,15 +10,23 @@ stdenv.mkDerivation rec { inherit src; + outputs = [ "out" "man" ]; + + setOutputFlags = false; + preConfigure = '' + # Note: using $out instead of $man to prevent a runtime dependency on $man. + configureFlagsArray+=(--mandir=$out/share/man --enable-man-symlinks) cd unix ''; + enableParallelBuilding = true; + postInstall = '' make install-private-headers ln -s $out/bin/tclsh${release} $out/bin/tclsh ''; - + meta = with stdenv.lib; { description = "The Tcl scription language"; homepage = http://www.tcl.tk/; @@ -26,7 +34,7 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ wkennington vrthra ]; }; - + passthru = rec { inherit release version; libPrefix = "tcl${release}";