about summary refs log tree commit diff
path: root/pkgs/top-level/nixpkgs-basic-release-checks.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-01-10 12:43:04 +0100
committerRobert Hensing <robert@roberthensing.nl>2022-01-10 12:43:04 +0100
commit625feda5da1316de7f14f49cce1a075b0d35e602 (patch)
tree91888261b0a1ced8afb2a54a4eb7b30ed74d305e /pkgs/top-level/nixpkgs-basic-release-checks.nix
parent498f8e26628d0c3efecdc0a36b1101fd3fca907a (diff)
nixpkgs-basic-release-checks: Print trace on lib.warn
Diffstat (limited to 'pkgs/top-level/nixpkgs-basic-release-checks.nix')
-rw-r--r--pkgs/top-level/nixpkgs-basic-release-checks.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/top-level/nixpkgs-basic-release-checks.nix b/pkgs/top-level/nixpkgs-basic-release-checks.nix
index 758c8bf06c367..fd302dfa5a102 100644
--- a/pkgs/top-level/nixpkgs-basic-release-checks.nix
+++ b/pkgs/top-level/nixpkgs-basic-release-checks.nix
@@ -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