Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{llvm,clang}-{4,5}: don't rebuild entire projects just to get manpages #33948

Merged
merged 2 commits into from Jan 21, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 16, 2018

#33369 (comment)

Also give manpage derivations different names so that they
don't clutter up nix-env -qaP and such.

Doesn't change hash for current llvm/clang-unwrapped,
hopefully avoids mass-rebuild on Darwin.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@vcunat
Copy link
Member

vcunat commented Jan 16, 2018

:-)

$ nix build -f . llvm.man && cat ./result/nix-support/propagated-build-inputs 
/nix/store/sak99pxxw27vlczqfx71fz7sw9nyg4ps-ncurses-6.0-20171125-dev /nix/store/r2icacayl0prn5n65206x0bqx4idarpm-zlib-1.2.11-dev

EDIT: it probably doesn't much matter, as people aren't likely to use it without llvm itself...

Much cheaper to build this way.

Also this gives them a different name to avoid confusion
and clutter when using `nix-env -qaP` or similar.
@dtzWill
Copy link
Member Author

dtzWill commented Jan 16, 2018

@vcunat haha whoops, fixed!

@@ -20,7 +20,7 @@ let
# Add man output without introducing extra dependencies.
overrideManOutput = drv:
let drv-manpages = drv.override { enableManpages = true; }; in
drv // { man = drv-manpages.man; /*outputs = drv.outputs ++ ["man"];*/ };
drv // { man = drv-manpages.out; /*outputs = drv.outputs ++ ["man"];*/ };
Copy link
Member

Choose a reason for hiding this comment

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

Is this still necessary?

Copy link
Member

Choose a reason for hiding this comment

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

It's less painful, as the pages are relatively cheap to build. I suppose it can be useful for uniformity (e.g. programs.man.enable in configuration.nix).

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe so, unfortunately :P. While this makes the manpages much cheaper to build and have a tiny runtime closure, the build-time dependencies are still numerous but most problematically is that they include things like Sphinx (python package) that shouldn't force Darwin rebuilds.

Copy link
Member

@vcunat vcunat Jan 16, 2018

Choose a reason for hiding this comment

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

BTW, the build-time closure of man pages could be cut down, somewhat, but probably not too much.

@dtzWill
Copy link
Member Author

dtzWill commented Jan 18, 2018

Ping!

@orivej
Copy link
Contributor

orivej commented Jan 19, 2018

Please rebase to resolve conflicts.

@vcunat
Copy link
Member

vcunat commented Jan 21, 2018

The conflict was trivial (syntactic).

@vcunat vcunat merged commit 514f67e into NixOS:master Jan 21, 2018
vcunat added a commit that referenced this pull request Jan 21, 2018
Don't rebuild entire projects just to get manpages.
@dtzWill
Copy link
Member Author

dtzWill commented Jan 21, 2018

Thanks @vcunat! (and thanks for review/follow-up @orivej 👍)

@dtzWill dtzWill deleted the feature/llvm-manpages-slim branch January 21, 2018 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants