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

nix: Add --print-build-logs flag #2810

Merged
merged 1 commit into from May 15, 2019
Merged

nix: Add --print-build-logs flag #2810

merged 1 commit into from May 15, 2019

Conversation

edolstra
Copy link
Member

@edolstra edolstra commented May 15, 2019

This causes nix to print build log output to stderr rather than showing the last log line in the progress bar. Log lines are prefixed by the name of the derivation (minus the version string), e.g.

binutils> make[1]: Leaving directory '/build/binutils-2.31.1'
binutils-wrapper> unpacking sources
binutils-wrapper> patching sources
...
binutils-wrapper> Using dynamic linker: '/nix/store/kr51dlsj9v5cr4n8700jliyz8v5b2q7q-bootstrap-stage0-glibc/lib/ld-linux-x86-64.so.2'
bootstrap-stage2-gcc-wrapper> unpacking sources
...
linux-headers> unpacking sources
linux-headers> unpacking source archive /nix/store/8javli69jhj3bkql2c35gsj5vl91p382-linux-4.19.16.tar.xz

#1904
https://github.com/tweag/nix/issues/87

This causes 'nix' to print build log output to stderr rather than
showing the last log line in the progress bar. Log lines are prefixed
by the name of the derivation (minus the version string), e.g.

  binutils> make[1]: Leaving directory '/build/binutils-2.31.1'
  binutils-wrapper> unpacking sources
  binutils-wrapper> patching sources
  ...
  binutils-wrapper> Using dynamic linker: '/nix/store/kr51dlsj9v5cr4n8700jliyz8v5b2q7q-bootstrap-stage0-glibc/lib/ld-linux-x86-64.so.2'
  bootstrap-stage2-gcc-wrapper> unpacking sources
  ...
  linux-headers> unpacking sources
  linux-headers> unpacking source archive /nix/store/8javli69jhj3bkql2c35gsj5vl91p382-linux-4.19.16.tar.xz
Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

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

Works nicely from here!

@edolstra edolstra merged commit 8f6c72f into master May 15, 2019
@grahamc grahamc deleted the print-build-logs branch May 15, 2019 19:54
@PetarKirov
Copy link

This option is super handy! Though it took me a while to find that it exists. Is it intentional that it's undocumented?

@brendanzab
Copy link

@PetarKirov It's documented on the top level nix command, but the documentation about these flags are not propagated to the subcommands! I just spent a while figuring this out too! The relevant issue is here: #4647

@PetarKirov
Copy link

@brendanzab Thanks for the info! I didn't consider checking the help for the top-level nix command. I will follow #4647.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants