-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Run builds in a pseudo-terminal #2878
Conversation
👍 After the There are a few packages (if I dig up a good example I'll report back) that don't neatly handle not having a pty either at all or as stdin. This has caused strange behavior between sandbox/non-sandboxed builds in the past. Anyway this is all my way of saying "this is great and might improve some other pain points a bit too" 😁. Setting TERM=xterm-256color raises questions/concerns about providing appropriate terminfo and such to builders, and is a hack since we're not xterm at all-- a common kludge but a kludge nevertheless :). EDIT: shorter but also bits about TERM and such :) |
Yeah, it will be interesting to see how many packages fail to build because of this. The stdenv bootstrap worked fine BTW. Regarding terminfo, anything in Nixpkgs that uses ncurses should work because it contains terminfo. There might be a better choice than |
This allows many programs (e.g. gcc, clang, cmake) to print colorized log output (assuming $TERM is set to a value like "xterm"). There are other ways to get colors, in particular setting CLICOLOR_FORCE, but they're less widely supported and can break programs that parse tool output.
FYI this change made some Python
errors go away in a way that I don't quite understand, see: |
I understand it now, Python 2 detects the TTY to determine the default |
It seems that there might be hydra machines that run an older version of Nix where NixOS/nix#2878 is not yet included (unconfirmed) In addition crystal 0.32.1 has a bug that only occurs when there is no tty: crystal-lang/crystal#8609 Combining this lead to a crystal build failing: https://hydra.nixos.org/build/113074265 This fixes that probably rather uncommon occurence by applying the upstream fix for the bug: crystal-lang/crystal#8609
It seems that there might be hydra machines that run an older version of Nix where NixOS/nix#2878 is not yet included (unconfirmed) In addition crystal 0.32.1 has a bug that only occurs when there is no tty: crystal-lang/crystal#8609 Combining this lead to a crystal build failing: https://hydra.nixos.org/build/113074265 This fixes that probably rather uncommon occurence by applying the upstream fix for the bug: crystal-lang/crystal#8609
This allows many programs (e.g. gcc, clang, cmake) to print colorized log output (assuming
$TERM
is set to a value likexterm
).There are other ways to get colors, in particular setting
CLICOLOR_FORCE
, but they're less widely supported and can break programs that parse tool output.Example output: