make-tarball.nix: Fail if nixpkgs doesn't evaluate without warnings

Commit 3d6110d221 added a well-meaning
warning message, which unfortunately would also show up each time
`nix-env -qa` was run. It has been since fixed, but let's add a check
to prevent such errors from reaching the nixpkgs channel in the future.
This commit is contained in:
Tuomas Tynkkynen 2015-10-10 00:21:57 +03:00
parent e8ca6b7a62
commit 1357c3d533

View File

@ -49,12 +49,20 @@ releaseTools.sourceTarball rec {
exit 1
fi
# Check that all-packages.nix evaluates on a number of platforms.
# Check that all-packages.nix evaluates on a number of platforms without any warnings.
for platform in i686-linux x86_64-linux x86_64-darwin; do
header "checking pkgs/top-level/all-packages.nix on $platform"
NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages.nix \
--show-trace --argstr system "$platform" \
-qa --drv-path --system-filter \* --system > /dev/null
-qa --drv-path --system-filter \* --system 2>&1 >/dev/null | tee eval-warnings.log
if [ -s eval-warnings.log ]; then
echo "pkgs/top-level/all-packages.nix on $platform evaluated with warnings, aborting"
exit 1
fi
rm eval-warnings.log
NIXPKGS_ALLOW_BROKEN=1 nix-env -f pkgs/top-level/all-packages.nix \
--show-trace --argstr system "$platform" \
-qa --drv-path --system-filter \* --system --meta --xml > /dev/null