Skip to content

Commit

Permalink
Revert "cc-wrapper, bintools-wrapper: simply symlink man and info out…
Browse files Browse the repository at this point in the history
…puts"

This reverts commit 02c09e0.
  • Loading branch information
edolstra committed Aug 9, 2018
1 parent fe68c9d commit c981787
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions pkgs/build-support/bintools-wrapper/default.nix
Expand Up @@ -6,10 +6,9 @@
# compiler and the linker just "work".

{ name ? ""
, stdenvNoCC
, bintools ? null, libc ? null, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? !nativeTools && bintools != null && bintools ? man
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, bintools ? null, libc ? null
, coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null
, extraPackages ? [], extraBuildCommands ? ""
, buildPackages ? {}
, useMacosReexportHack ? false
Expand Down Expand Up @@ -268,8 +267,9 @@ stdenv.mkDerivation {
## Man page and info support
##
ln -s ${bintools.man} $man
ln -s ${bintools.info} $info
mkdir -p $man/nix-support $info/nix-support
printWords ${bintools.man or ""} >> $man/nix-support/propagated-build-inputs
printWords ${bintools.info or ""} >> $info/nix-support/propagated-build-inputs
''

+ ''
Expand Down
9 changes: 4 additions & 5 deletions pkgs/build-support/cc-wrapper/default.nix
Expand Up @@ -6,10 +6,8 @@
# compiler and the linker just "work".

{ name ? ""
, stdenvNoCC
, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, cc ? null, libc ? null, bintools, coreutils ? null, shell ? stdenvNoCC.shell
, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? ""
, propagateDoc ? !nativeTools && cc != null && cc ? man
, extraPackages ? [], extraBuildCommands ? ""
, isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null
, buildPackages ? {}
Expand Down Expand Up @@ -263,8 +261,9 @@ stdenv.mkDerivation {
## Man page and info support
##
ln -s ${cc.man} $man
ln -s ${cc.info} $info
mkdir -p $man/nix-support $info/nix-support
printWords ${cc.man or ""} >> $man/nix-support/propagated-build-inputs
printWords ${cc.info or ""} >> $info/nix-support/propagated-build-inputs
''

+ ''
Expand Down
1 change: 1 addition & 0 deletions pkgs/stdenv/darwin/default.nix
Expand Up @@ -88,6 +88,7 @@ in rec {
extraPackages = lib.optional (libcxx != null) libcxx;

nativeTools = false;
propagateDoc = false;
nativeLibc = false;
inherit buildPackages coreutils gnugrep bintools;
libc = last.pkgs.darwin.Libsystem;
Expand Down
1 change: 1 addition & 0 deletions pkgs/stdenv/linux/default.nix
Expand Up @@ -90,6 +90,7 @@ let
else lib.makeOverridable (import ../../build-support/cc-wrapper) {
name = "${name}-gcc-wrapper";
nativeTools = false;
propagateDoc = false;
nativeLibc = false;
buildPackages = lib.optionalAttrs (prevStage ? stdenv) {
inherit (prevStage) stdenv;
Expand Down

6 comments on commit c981787

@Profpatsch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason this was reverted? binutils is missing manpages again.

@Ericson2314
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh. Yes at the very least this should have been amended to always use propagated-user-env-package as you yourself wanted, @edolstra.

@edolstra
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the next commit: fde7296

@Ericson2314
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh OK. I'm sorry. Still, @edolstra, if you had made a PR with both commits and then instantly merged it, it would be easier to see that is a two-commit "transaction" and the individual revert shouldn't be evaluated in isolation. We'd be having this conversation in that PR thread and not on this commit too.

@Profpatsch so it's still not working despite fde7296 ?

@Profpatsch
Copy link
Member

@Profpatsch Profpatsch commented on c981787 Sep 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a current master:

> find $(nix-build -A binutils.man)
/nix/store/4z7d3ivm2xwlgm09rw0yigl5yw0d7j5g-binutils-wrapper-2.30-man
/nix/store/4z7d3ivm2xwlgm09rw0yigl5yw0d7j5g-binutils-wrapper-2.30-man/nix-support
/nix/store/4z7d3ivm2xwlgm09rw0yigl5yw0d7j5g-binutils-wrapper-2.30-man/nix-support/propagated-user-env-packages
> cat /nix/store/4z7d3ivm2xwlgm09rw0yigl5yw0d7j5g-binutils-wrapper-2.30-man/nix-support/propagated-user-env-packages
/nix/store/zkvg421vdj5igh8aal9acbvypjpxkimw-binutils-2.30-man

Does this mean propagated-user-env-packages needs to be picked up by tools?

@Ericson2314
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Profpatsch it works with nix-env it doesn't work with nix-shell -p stdenv.cc.man. Only the symlink works with both.

Please sign in to comment.