summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-25 11:38:07 +0100
committerVladimír Čunát <vcunat@gmail.com>2015-10-28 10:15:55 +0100
commitefcad4c910a271e846f1d274fe297a83ba97b3cc (patch)
tree2633a22674c436cf94761ba7e674cdf27015bddc /pkgs
parent55d129609ddbf667e7a93a9fd0638336a348a647 (diff)
downloadnixpkgs-efcad4c910a271e846f1d274fe297a83ba97b3cc.tar
nixpkgs-efcad4c910a271e846f1d274fe297a83ba97b3cc.tar.gz
nixpkgs-efcad4c910a271e846f1d274fe297a83ba97b3cc.tar.bz2
nixpkgs-efcad4c910a271e846f1d274fe297a83ba97b3cc.tar.lz
nixpkgs-efcad4c910a271e846f1d274fe297a83ba97b3cc.tar.xz
nixpkgs-efcad4c910a271e846f1d274fe297a83ba97b3cc.tar.zst
nixpkgs-efcad4c910a271e846f1d274fe297a83ba97b3cc.zip
gcc5: split $doc into $man and $info
... because cc-wrapper is meant to propagate man pages into user envs,
and info pages are rather large.

Also replace the duplicate g++ and gcc man1 pages by a symlink.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/builder.sh19
3 files changed, 12 insertions, 11 deletions
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index 8bb215947b0..0c7bf5b667f 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -140,7 +140,7 @@ stdenv.mkDerivation {
       # Propagate the wrapped cc so that if you install the wrapper,
       # you get tools like gcov, the manpages, etc. as well (including
       # for binutils and Glibc).
-      echo ${cc} ${binutils_bin} ${libc_bin} > $out/nix-support/propagated-user-env-packages
+      echo ${cc} ${cc.man or ""} ${binutils_bin} ${libc_bin} > $out/nix-support/propagated-user-env-packages
 
       echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs
     ''
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index a02a59c4347..2a5b43a871f 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -215,7 +215,7 @@ stdenv.mkDerivation ({
 
   inherit patches;
 
-  outputs = [ "out" "lib" "doc" ];
+  outputs = [ "out" "lib" "man" "info" ];
   setOutputFlags = false;
   NIX_NO_SELF_RPATH = true;
 
diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh
index bfe3b6a559f..2f19f4219da 100644
--- a/pkgs/development/compilers/gcc/builder.sh
+++ b/pkgs/development/compilers/gcc/builder.sh
@@ -211,16 +211,14 @@ preInstall() {
 
 postInstall() {
     # Move runtime libraries to $lib.
-    mkdir -p $lib/lib
-    ln -s lib $lib/lib64
-    mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/
-    for i in $lib/lib/*.la; do
-        substituteInPlace $i --replace $out $lib
-    done
+    _moveToOutput "lib/lib*.so*" "$lib"
+    _moveToOutput "lib/lib*.la"  "$lib"
+    ln -s lib "$lib/lib64" # for *.la
+    _moveToOutput "share/gcc-*/python" "$lib"
 
-    # Remove precompiled headers for now.  They are very big and
-    # probably not very useful yet.
-    find $out/include -name "*.gch" -exec rm -rf {} \; -prune
+    for i in "$lib"/lib/*.{la,py}; do
+        substituteInPlace "$i" --replace "$out" "$lib"
+    done
 
     # Remove `fixincl' to prevent a retained dependency on the
     # previous gcc.
@@ -266,6 +264,9 @@ postInstall() {
     paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus}
 
     eval "$postInstallGhdl"
+
+    # Two identical man pages are shipped (moving and compressing is done later)
+    ln -sf gcc.1 "$out"/share/man/man1/g++.1
 }
 
 genericBuild