mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-22 17:31:04 +03:00
nixpkgs-basic-release-checks: Print trace on lib.warn
This commit is contained in:
parent
498f8e2662
commit
625feda5da
1 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,10 @@ pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; }
|
||||||
for platform in ${pkgs.lib.concatStringsSep " " supportedSystems}; do
|
for platform in ${pkgs.lib.concatStringsSep " " supportedSystems}; do
|
||||||
header "checking Nixpkgs on $platform"
|
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 \
|
nix-env -f $src \
|
||||||
--show-trace --argstr system "$platform" \
|
--show-trace --argstr system "$platform" \
|
||||||
--arg config '{ allowAliases = false; }' \
|
--arg config '{ allowAliases = false; }' \
|
||||||
|
@ -40,6 +44,7 @@ pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; }
|
||||||
-qa --drv-path --system-filter \* --system \
|
-qa --drv-path --system-filter \* --system \
|
||||||
"''${opts[@]}" 2>&1 >/dev/null | tee eval-warnings.log
|
"''${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
|
if [ -s eval-warnings.log ]; then
|
||||||
echo "Nixpkgs on $platform evaluated with warnings, aborting"
|
echo "Nixpkgs on $platform evaluated with warnings, aborting"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue