depot/pkgs/test/build-environment-info/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

39 lines
810 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
lib,
stdenv,
runCommand,
getent,
xcbuild,
}:
# Prints information about the state of the build environment for
# assistance debugging Hydra. Feel free to add anything you would find
# useful to this.
runCommand "build-environment-info"
{
nativeBuildInputs = [ getent ] ++ lib.optionals stdenv.buildPlatform.isDarwin [ xcbuild ];
}
''
# Its useful to get more info even if a command fails.
set +e
run() {
echoCmd : "$@"
"$@"
}
run uname -a
${lib.optionalString stdenv.buildPlatform.isDarwin ''
run env SYSTEM_VERSION_COMPAT=0 plutil -p /System/Library/CoreServices/SystemVersion.plist
''}
run id
run getent passwd "$(id -un)"
run ulimit -a
# Always fail so that this job can easily be restarted.
run exit 1
''