Skip to content

Commit

Permalink
Print stdout and stderr when nix-build fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Jul 2, 2018
1 parent 20a78f7 commit d9df5c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nixpkgs/nixpkgs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ Set which Nixpkgs to use explicitly using 'repository' or 'path' attributes.
if res.return_code == 0:
output_path = res.stdout.splitlines()[-1]
else:
fail("Cannot build Nix attribute %s." % ctx.attr.name)
fail("Cannot build Nix attribute %s.\nstdout:\n%s\n\nstderr:\n%s\n" %
(ctx.attr.name, res.stdout, res.stderr)
)

# Build a forest of symlinks (like new_local_package() does) to the
# Nix store.
Expand Down

0 comments on commit d9df5c8

Please sign in to comment.