tests.build-environment-info: add more information
The user information would have helped diagnose the empty GECOS issue we had with the Hydra Darwin builders recently and the OS information seems generally nice to have.
···1-{ runCommand }:
00000023# Prints information about the state of the build environment for
4# assistance debugging Hydra. Feel free to add anything you would find
5# useful to this.
6-runCommand "build-environment-info" { } ''
7- ulimit -a
0000089- # Always fail so that this job can easily be restarted.
10- exit 1
11-''
00000000000000000
···1+{
2+ lib,
3+ stdenv,
4+ runCommand,
5+ getent,
6+ xcbuild,
7+}:
89# Prints information about the state of the build environment for
10# assistance debugging Hydra. Feel free to add anything you would find
11# useful to this.
12+runCommand "build-environment-info"
13+ {
14+ nativeBuildInputs = [ getent ] ++ lib.optionals stdenv.buildPlatform.isDarwin [ xcbuild ];
15+ }
16+ ''
17+ # It’s useful to get more info even if a command fails.
18+ set +e
1920+ run() {
21+ echoCmd : "$@"
22+ "$@"
23+ }
24+25+ run uname -a
26+27+ ${lib.optionalString stdenv.buildPlatform.isDarwin ''
28+ run env SYSTEM_VERSION_COMPAT=0 plutil -p /System/Library/CoreServices/SystemVersion.plist
29+ ''}
30+31+ run id
32+33+ run getent passwd "$(id -un)"
34+35+ run ulimit -a
36+37+ # Always fail so that this job can easily be restarted.
38+ run exit 1
39+ ''