1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00

Merge pull request #154275 from hercules-ci/nixpkgs-basic-release-checks-trace-on-warn

nixpkgs-basic-release-checks: Print trace on lib.warn
This commit is contained in:
Robert Hensing 2022-01-19 13:26:42 +01:00 committed by GitHub
commit b77b529e4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,10 @@ pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; }
for platform in ${pkgs.lib.concatStringsSep " " supportedSystems}; do
header "checking Nixpkgs on $platform"
# To get a call trace; see https://nixos.org/manual/nixpkgs/stable/#function-library-lib.trivial.warn
# Relies on impure eval
export NIX_ABORT_ON_WARN=true
nix-env -f $src \
--show-trace --argstr system "$platform" \
--arg config '{ allowAliases = false; }' \
@ -40,6 +44,7 @@ pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; }
-qa --drv-path --system-filter \* --system \
"''${opts[@]}" 2>&1 >/dev/null | tee eval-warnings.log
# Catch any trace calls not caught by NIX_ABORT_ON_WARN (lib.warn)
if [ -s eval-warnings.log ]; then
echo "Nixpkgs on $platform evaluated with warnings, aborting"
exit 1